mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Experimental: Try adding a darker color in the timeline for unread
This commit is contained in:
parent
d161422002
commit
cacf48fdb5
@ -206,6 +206,7 @@ createWidget('timeline-scrollarea', {
|
|||||||
lastRead: position.lastRead,
|
lastRead: position.lastRead,
|
||||||
showButton
|
showButton
|
||||||
}));
|
}));
|
||||||
|
result.push(this.attach('timeline-unread-area', { top: lastReadTop}));
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -241,6 +242,21 @@ createWidget('timeline-scrollarea', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
createWidget('timeline-unread-area', {
|
||||||
|
tagName: 'div.timeline-unread',
|
||||||
|
|
||||||
|
buildAttributes(attrs) {
|
||||||
|
|
||||||
|
const top = attrs.top + (LAST_READ_HEIGHT / 2);
|
||||||
|
if (top) {
|
||||||
|
return {
|
||||||
|
style: `top: ${top}px; height: ${SCROLLAREA_HEIGHT - top}px`
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
createWidget('topic-timeline-container', {
|
createWidget('topic-timeline-container', {
|
||||||
tagName: 'div.timeline-container',
|
tagName: 'div.timeline-container',
|
||||||
buildClasses(attrs) {
|
buildClasses(attrs) {
|
||||||
|
@ -17,6 +17,15 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
-webkit-transform: translate3d(0,0,0);
|
-webkit-transform: translate3d(0,0,0);
|
||||||
|
|
||||||
|
.timeline-unread {
|
||||||
|
left: -1px;
|
||||||
|
position: absolute;
|
||||||
|
border-left: 3px solid;
|
||||||
|
border-color: $tertiary;
|
||||||
|
width: 10px;
|
||||||
|
z-index: 500;
|
||||||
|
}
|
||||||
|
|
||||||
&.timeline-docked {
|
&.timeline-docked {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
@ -52,6 +61,9 @@
|
|||||||
box-shadow: 0px -2px 4px -1px rgba(0,0,0,.25);
|
box-shadow: 0px -2px 4px -1px rgba(0,0,0,.25);
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
z-index: 100000;
|
z-index: 100000;
|
||||||
|
.timeline-unread {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.back-button {
|
.back-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -244,6 +256,7 @@
|
|||||||
background-color: dark-light-choose(scale-color($tertiary, $lightness: 80%), scale-color($tertiary, $lightness: 20%));
|
background-color: dark-light-choose(scale-color($tertiary, $lightness: 80%), scale-color($tertiary, $lightness: 20%));
|
||||||
height: 100%;
|
height: 100%;
|
||||||
float: left;
|
float: left;
|
||||||
|
z-index: 501;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeline-scroller-content {
|
.timeline-scroller-content {
|
||||||
@ -279,6 +292,7 @@
|
|||||||
color: $tertiary;
|
color: $tertiary;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
z-index: 502;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back-button {
|
.back-button {
|
||||||
|
Loading…
Reference in New Issue
Block a user