diff --git a/layout/_mixins/post-timeline.pug b/layout/_mixins/post-timeline.pug index a17be0f51ed55db32c1fd5c65c8e3b3f788cc8ef..d6d2b9d7cdedb93718484172ed7275ac9b4ad7fd 100644 --- a/layout/_mixins/post-timeline.pug +++ b/layout/_mixins/post-timeline.pug @@ -17,4 +17,7 @@ mixin postTimeline(posts) a(href=url_for(post.link) target="_blank" rel="noopener").post-timeline-item-title__a= post.title || post.link else a(href=url_for(post.path)).post-timeline-item-title__a= post.title || __("post.untitled") + + if post.top + include ../_partials/widgets/sticky-top.pug - }) diff --git a/source/css/_common/components/post/post-timeline.styl b/source/css/_common/components/post/post-timeline.styl index cbe4ada6349c0aea76f1a47c5de87dd6af762a31..75d134f24fe3dbd103378b91f25c7e66e6ac6bac 100644 --- a/source/css/_common/components/post/post-timeline.styl +++ b/source/css/_common/components/post/post-timeline.styl @@ -51,6 +51,7 @@ time-width = 3em; time-margin = 1em; + sticky-top-width = 2em; &__time { display: inline-block; @@ -61,10 +62,15 @@ transform: translateY(3%); } + .sticky-top { + width: 2em; + height: 2em; + } + &-title { display: inline-block; margin: 0; - width: 'calc(100% - %s)' % (time-width + time-margin); + width: 'calc(100% - %s)' % (time-width + time-margin + sticky-top-width); font-size: 1em; font-weight: normal; vertical-align: middle;