From d73bbe8d8cebaa555c6409a136347ee84d7e582d Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Tue, 30 Aug 2016 12:26:28 -0300 Subject: [PATCH 1/3] Add i18n-able text to last visit line --- app/assets/stylesheets/common/base/_topic-list.scss | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index ca918e970..d2f32e4f4 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -34,6 +34,15 @@ html.anon .topic-list a.title:visited:not(.badge-notification) {color: dark-ligh &.last-visit { border-bottom: 1px solid scale-color($danger, $lightness: 60%); + &::after { + content: attr(data-last-visit-text, 'New'); + color: scale-color($danger, $lightness: 50%); + position: absolute; + left: 50%; + margin-top: 40px; + padding: 0 10px; + background: $secondary; + } } } From a30778364492a99c38a2d1f591aeb332d74f9ff5 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Tue, 30 Aug 2016 12:37:05 -0300 Subject: [PATCH 2/3] attr fallback is not yet supported =( --- app/assets/stylesheets/common/base/_topic-list.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index d2f32e4f4..b16d60076 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -35,11 +35,11 @@ html.anon .topic-list a.title:visited:not(.badge-notification) {color: dark-ligh &.last-visit { border-bottom: 1px solid scale-color($danger, $lightness: 60%); &::after { - content: attr(data-last-visit-text, 'New'); + content: attr(data-last-visit-text); color: scale-color($danger, $lightness: 50%); position: absolute; left: 50%; - margin-top: 40px; + margin-top: 44px; padding: 0 10px; background: $secondary; } From 91840be2b90172fe055e1c2b5f92db9dc42880ed Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Tue, 30 Aug 2016 19:07:56 -0300 Subject: [PATCH 3/3] Makes it variable topic height proof --- app/assets/stylesheets/common/base/_topic-list.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index b16d60076..42f2a03b1 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -34,12 +34,12 @@ html.anon .topic-list a.title:visited:not(.badge-notification) {color: dark-ligh &.last-visit { border-bottom: 1px solid scale-color($danger, $lightness: 60%); - &::after { + + tr::after { content: attr(data-last-visit-text); color: scale-color($danger, $lightness: 50%); position: absolute; left: 50%; - margin-top: 44px; + margin-top: -10px; padding: 0 10px; background: $secondary; }