From: Vladimír Vondruš Date: Wed, 17 Jan 2018 00:10:36 +0000 (+0100) Subject: Ability to show list of latest news on the index page. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=c0814fd985acc46c18974d1933514dc45a2208c4;p=blog.git Ability to show list of latest news on the index page. --- diff --git a/css/m-components.css b/css/m-components.css index 64cf7f47..76f605af 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -515,6 +515,21 @@ article#m-jumbo.m-inverted > header a:hover, article#m-jumbo.m-inverted > header color: #0f0f0f; } +/* News list on landing pages */ +.m-landing-news h3 a { + color: var(--color); + text-decoration: none; + text-transform: var(--nav-heading-case); +} +.m-landing-news h3 a:hover, .m-landing-news h3 a:hover, .m-landing-news h3 a:focus, .m-landing-news h3 a:active { + color: var(--article-heading-color); +} +.m-landing-news time { + display: inline-block; + margin-left: 1rem; + float: right; +} + /* Article pagination */ .m-article-pagination { text-align: center; diff --git a/doc/css/page-layout.rst b/doc/css/page-layout.rst index e8b84756..96817041 100644 --- a/doc/css/page-layout.rst +++ b/doc/css/page-layout.rst @@ -698,3 +698,44 @@ and save vertical space. For a tag cloud, mark the :html:` + +`News list on index page`_ +-------------------------- + +Sometimes you may want just a small list of news items tucked to the bottom of +an index page that's otherwise full of other content. Mark a block with +:css:`.m-landing-news` and put a list of articles in it. The :html:`

` can +be used to link to the blog front page; if you use the :html:`