about summary refs log tree commit diff
path: root/app/views/stream_entries
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/stream_entries')
-rw-r--r--app/views/stream_entries/_detailed_status.html.haml9
-rw-r--r--app/views/stream_entries/_simple_status.html.haml8
-rw-r--r--app/views/stream_entries/_status.html.haml16
-rw-r--r--app/views/stream_entries/show.html.haml2
4 files changed, 23 insertions, 12 deletions
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index 466e0dd5a..e3cc522be 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -5,14 +5,15 @@
         = image_tag status.account.avatar.url(:original), width: 48, height: 48, alt: '', class: 'u-photo'
     %span.display-name
       %strong.p-name.emojify= display_name(status.account)
-      %span.p-nickname= acct(status.account)
+      %span= acct(status.account)
 
-  .status__content.e-content.p-name.emojify<
+  .status__content.p-name.emojify<
     - if status.spoiler_text?
       %p{ style: 'margin-bottom: 0' }<
-        %span>= "#{status.spoiler_text} "
+        %span.p-summary>= "#{status.spoiler_text} "
         %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
-    %div{ style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
+    %div.e-content{ style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
+
 
   - unless status.media_attachments.empty?
     - if status.media_attachments.first.video?
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index a758d5ccd..52905ff5e 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -10,14 +10,14 @@
           = image_tag status.account.avatar(:original), width: 48, height: 48, alt: '', class: 'u-photo'
       %span.display-name
         %strong.p-name.emojify= display_name(status.account)
-        %span.p-nickname= acct(status.account)
+        %span= acct(status.account)
 
-  .status__content.e-content.p-name.emojify<
+  .status__content.p-name.emojify<
     - if status.spoiler_text?
       %p{ style: 'margin-bottom: 0' }<
-        %span>= "#{status.spoiler_text} "
+        %span.p-summary>= "#{status.spoiler_text} "
         %a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
-    %div{ style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
+    %div.e-content{ style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl?(status.content) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
 
   - unless status.media_attachments.empty?
     .status__attachments
diff --git a/app/views/stream_entries/_status.html.haml b/app/views/stream_entries/_status.html.haml
index 1333d4d82..f389a8dfe 100644
--- a/app/views/stream_entries/_status.html.haml
+++ b/app/views/stream_entries/_status.html.haml
@@ -1,12 +1,22 @@
 - include_threads ||= false
 - is_predecessor  ||= false
 - is_successor    ||= false
+- direct_reply_id ||= false
+- parent_id       ||= false
+- is_direct_parent  = direct_reply_id == status.id
+- is_direct_child  = parent_id == status.in_reply_to_id
+- parent_id       ||= false
 - centered        ||= include_threads && !is_predecessor && !is_successor
+- h_class         = microformats_h_class(status, is_predecessor, is_successor, include_threads)
+- style_classes   = style_classes(status, is_predecessor, is_successor, include_threads)
+- mf_classes      = microformats_classes(status, is_direct_parent, is_direct_child)
+- entry_classes   = h_class + ' ' + mf_classes + ' ' + style_classes
 
 - if status.reply? && include_threads
-  = render partial: 'stream_entries/status', collection: @ancestors, as: :status, locals: { is_predecessor: true }
+  = render partial: 'stream_entries/status', collection: @ancestors, as: :status, locals: { is_predecessor: true, direct_reply_id: status.in_reply_to_id}
+
+.entry{ class: entry_classes }
 
-.entry{ class: entry_classes(status, is_predecessor, is_successor, include_threads) }
   - if status.reblog?
     .pre-header
       %div.pre-header__icon
@@ -19,4 +29,4 @@
   = render partial: centered ? 'stream_entries/detailed_status' : 'stream_entries/simple_status', locals: { status: status.proper }
 
 - if include_threads
-  = render partial: 'stream_entries/status', collection: @descendants, as: :status, locals: { is_successor: true }
+  = render partial: 'stream_entries/status', collection: @descendants, as: :status, locals: { is_successor: true, parent_id: status.id}
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index 088881b11..f37fb7919 100644
--- a/app/views/stream_entries/show.html.haml
+++ b/app/views/stream_entries/show.html.haml
@@ -23,5 +23,5 @@
 - if !user_signed_in? && !Rails.configuration.x.single_user_mode
   = render partial: 'shared/landing_strip', locals: { account: @stream_entry.account }
 
-.activity-stream.activity-stream-headless
+.activity-stream.activity-stream-headless.h-entry
   = render partial: "stream_entries/#{@type}", locals: { @type.to_sym => @stream_entry.activity, include_threads: true }