Browse Source

Improving borders between predecessor/successor statuses

closed-social-v3
Eugen Rochko 8 years ago
parent
commit
bf08d46e58
3 changed files with 8 additions and 3 deletions
  1. +1
    -0
      app/assets/stylesheets/stream_entries.scss
  2. +6
    -2
      app/views/stream_entries/_status.html.haml
  3. +1
    -1
      app/views/stream_entries/show.html.haml

+ 1
- 0
app/assets/stylesheets/stream_entries.scss View File

@ -14,6 +14,7 @@
&.entry-predecessor, &.entry-successor { &.entry-predecessor, &.entry-successor {
background: #d9e1e8; background: #d9e1e8;
border-left-color: #d9e1e8; border-left-color: #d9e1e8;
border-bottom-color: darken(#d9e1e8, 15%);
.header { .header {
.header__right { .header__right {

+ 6
- 2
app/views/stream_entries/_status.html.haml View File

@ -1,6 +1,10 @@
- include_threads ||= false
- is_predecessor ||= false
- is_successor ||= false
- if status.reply? && include_threads - if status.reply? && include_threads
- status.ancestors.with_includes.with_counters.each do |status| - status.ancestors.with_includes.with_counters.each do |status|
= render partial: 'status', locals: { status: status, include_threads: false, is_predecessor: true, is_successor: false }
= render partial: 'status', locals: { status: status, is_predecessor: true }
.entry{ class: entry_classes(status, is_predecessor, is_successor, include_threads) } .entry{ class: entry_classes(status, is_predecessor, is_successor, include_threads) }
- if status.reblog? - if status.reblog?
@ -34,4 +38,4 @@
- if include_threads - if include_threads
- status.descendants.with_includes.with_counters.each do |status| - status.descendants.with_includes.with_counters.each do |status|
= render partial: 'status', locals: { status: status, include_threads: false, is_successor: true, is_predecessor: false }
= render partial: 'status', locals: { status: status, is_successor: true }

+ 1
- 1
app/views/stream_entries/show.html.haml View File

@ -2,4 +2,4 @@
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/ %link{ rel: 'alternate', type: 'application/atom+xml', href: account_stream_entry_url(@account, @stream_entry, format: 'atom') }/
.activity-stream.activity-stream-headless .activity-stream.activity-stream-headless
= render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true, is_predecessor: false, is_successor: false }
= render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true }

Loading…
Cancel
Save