From: svbeon Date: Thu, 25 Feb 2016 20:26:01 +0000 (+0100) Subject: Merge branch 'master' into svbeon-patch-1 X-Git-Url: https://jfr.im/git/irc/freenode/web-7.0.git/commitdiff_plain/c2805fe1e8edf44ec898b1be88d0082d99e35dc1?hp=7a96c010e73c7296693f2c413011a960d422d94c Merge branch 'master' into svbeon-patch-1 --- diff --git a/static/css/style.css b/static/css/style.css index c1b4efd30..0046bdf80 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -201,49 +201,41 @@ hr { text-align: center; } -/* articles feed */ +/* articles */ h1 { margin: 0; } -div.art { +.art-info { clear: right; - flex-grow: 1; + line-height: 1.6; } -div.artlist { +.art-body { + margin-bottom: 1em; +} + +.artlist { max-width: var(--max-width); margin: 0 auto; margin-top: .5em; } -div.art:not(:first-child) { +.artlist .art-info:not(:first-child) { border-top: 1px solid var(--border-color); } -b.art { - margin-bottom: 0; - font-size: 18px; -} - -p.art-ingress { - font-style: italic; - margin: 0; -} - .art-date { float: right; color: #ccc; - line-height: 24px; font-feature-settings: tnum; } -p.heading { - white-space: nowrap; -} - -p.art-link { - margin-top: 0; +.art-nav { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; } @media all and (max-width: 600px) { diff --git a/templates/article.html b/templates/article.html index e313445cb..db501a6c0 100644 --- a/templates/article.html +++ b/templates/article.html @@ -1,15 +1,12 @@ {% extends "base.html" %} +{% import "artinfo.html" as artinfo with context %} +{% set title=article.title %} {% block content %}
-

{{ article.title }}  - {{ article.author }} on {{ article.datetime }}

-

{{ article.content }}

- + {{ artinfo.info(article) }} +
+ {{ article.render() }} +
+ {{ artinfo.nav(article) }}
{% endblock content %} diff --git a/templates/artinfo.html b/templates/artinfo.html new file mode 100644 index 000000000..f7b797773 --- /dev/null +++ b/templates/artinfo.html @@ -0,0 +1,22 @@ +{% macro info(article) %} +
+ {{ article.title }}  + {{ article.author }} on {{ article.datetime.astimezone().date() }} +
+{% endmacro %} + +{% macro nav(article) %} +
+ {% if article.older -%} + older + {%- else -%} + + {%- endif -%} + all + {%- if article.newer %} + newer + {%- else %} + + {%- endif %} +
+{% endmacro %} diff --git a/templates/artlist.html b/templates/artlist.html index 8b7035b23..cdf072f0a 100644 --- a/templates/artlist.html +++ b/templates/artlist.html @@ -1,12 +1,10 @@ +{% import "artinfo.html" as artinfo %} {% extends "base.html" %} {% set title = "archive" %} {% block content %}
{% for article in get_module("news").articles|reverse %} -
- {{ article.title }}  - {{ article.author }} on {{ article.datetime.astimezone().date() }} -
+ {{ artinfo.info(article) }} {% endfor %}
{% endblock content %} diff --git a/templates/base.html b/templates/base.html index 04bdd040d..ecc6c6877 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,7 +8,7 @@ - {{ title }} + {% block title %}{{ title }} - {{ config.name }}{% endblock %} @@ -20,11 +20,10 @@
- {% block content %}{% endblock %} -
+ {% block content %}{% endblock %}
- {% include "footer.html" %} + {% include "footer.html" %}
{% include "analytics.html" %} diff --git a/templates/index.html b/templates/index.html index 6235d8c30..c2bb7d2e9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,6 @@ {% extends "base.html" %} -{% set title = config.name %} +{% block title %}{{ config.name }}{% endblock %} +{% import "artinfo.html" as artinfo %} {% block content %}

Welcome to freenode — supporting free and open source communities since 1998

@@ -20,16 +21,13 @@
{% with article = get_module("news").articles[-1] %} - {{ article.title }}  - {{ article.author }} on {{ article.datetime }} -

{{ article.render() }}

+ {{ artinfo.info(article) }} +
{{ article.render() }}
{#
{% endblock content %}