]> jfr.im git - irc/freenode/web-7.0.git/commitdiff
Merge branch 'master' into svbeon-patch-1 52/head
authorsvbeon <redacted>
Thu, 25 Feb 2016 20:26:01 +0000 (21:26 +0100)
committersvbeon <redacted>
Thu, 25 Feb 2016 20:26:01 +0000 (21:26 +0100)
static/css/style.css
templates/article.html
templates/artinfo.html [new file with mode: 0644]
templates/artlist.html
templates/base.html
templates/index.html

index c1b4efd30745946cfc18cdb6e776c4efa8828cb2..0046bdf805ca7e92c6c11e2c126dc1354f73fce0 100644 (file)
@@ -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) {
index e313445cb2148968b405ef46e2418b3ebfbf7da7..db501a6c0d2d765adec1908b746edfcd9aaddafc 100644 (file)
@@ -1,15 +1,12 @@
 {% extends "base.html" %}
+{% import "artinfo.html" as artinfo with context %}
+{% set title=article.title %}
 {% block content %}
 <div class="main">
-    <p><b class="art">{{ article.title }}</b>&nbsp;
-    <span class="art-date">{{ article.author }} on {{ article.datetime }}</span></p>
-    <p class="art-ingress">{{ article.content }}</p>
-    <p class="art-links">
-    {#
-        <a href="{{ next }}">Next</a>&nbsp;
-        <a href="{{ previous }}">Previous</a>&nbsp;
-        #}
-        <a href="{{ url_for("archive") }}">Archive</a>&nbsp;
-        </p>
+    {{ artinfo.info(article) }}
+    <div class="art-body">
+    {{ article.render() }}
+    </div>
+    {{ artinfo.nav(article) }}
 </div>
 {% endblock content %}
diff --git a/templates/artinfo.html b/templates/artinfo.html
new file mode 100644 (file)
index 0000000..f7b7977
--- /dev/null
@@ -0,0 +1,22 @@
+{% macro info(article) %}
+<div class="art-info">
+    <a href="{{ article.url }}"><b class="art">{{ article.title }}</b></a>&nbsp;
+    <span class="art-date">{{ article.author }} on {{ article.datetime.astimezone().date() }}</span>
+</div>
+{% endmacro %}
+
+{% macro nav(article) %}
+<div class="art-nav">
+    {% if article.older -%}
+    <a href="{{ article.older.url }}">older</a>
+    {%- else -%}
+    <span></span>
+    {%- endif -%}
+    <a href="{{ url_for("archive") }}">all</a>
+    {%- if article.newer %}
+    <a href="{{ article.newer.url }}">newer</a>
+    {%- else %}
+    <span></span>
+    {%- endif %}
+</div>
+{% endmacro %}
index 8b7035b23da319882334b2faca2f0257541f2e2b..cdf072f0a7ae03a6b0dee1862f023d32f8395f4f 100644 (file)
@@ -1,12 +1,10 @@
+{% import "artinfo.html" as artinfo %}
 {% extends "base.html" %}
 {% set title = "archive" %}
 {% block content %}
 <div class="artlist main">
 {% for article in get_module("news").articles|reverse %}
-<div class="art">
-    <a href="{{ article.url }}"><b class="art">{{ article.title }}</b></a>&nbsp;
-    <span class="art-date">{{ article.author }} on {{ article.datetime.astimezone().date() }}</span>
-</div>
+    {{ artinfo.info(article) }}
 {% endfor %}
 </div>
 {% endblock content %}
index 04bdd040d3bc09939ae09999ce62575c37e829b0..ecc6c6877a8bdb61661aaf4837e9f4e1d33e0fc6 100644 (file)
@@ -8,7 +8,7 @@
     <meta name="theme-color" content="#292f2f">
     <meta name="description" content="freenode IRC network">
     <link rel="icon" href="{{ url_for("static/img/logos/coloured-alphabg-sq-120.png") }}">
-    <title>{{ title }}</title>
+    <title>{% block title %}{{ title }} - {{ config.name }}{% endblock %}</title>
     <link href="{{ url_for("static/css/open-sans.css") }}" rel="stylesheet">
     <link href="{{ url_for("static/css/font-awesome.min.css") }}" rel="stylesheet">
     <link href="{{ url_for("static/css/freenode.css") }}" rel="stylesheet">
         <a href="https://www.privateinternetaccess.com/" target="_blank"><img alt="Private internet access" class="nlogo" src="{{ url_for("static/img/logos/PIALogo_white.svg") }}"></a>
     </nav>
     <div class="container">
-            {% block content %}{% endblock %}
-        </div>
+        {% block content %}{% endblock %}
     </div>
     <div class="footers">
-            {% include "footer.html" %}
+        {% include "footer.html" %}
     </div>
     {% include "analytics.html" %}
 </body>
index 6235d8c303ebe002185373eb90ef0428ac459339..c2bb7d2e909a635c63d2c3a3a2db151500c173b5 100644 (file)
@@ -1,5 +1,6 @@
 {% extends "base.html" %}
-{% set title = config.name %}
+{% block title %}{{ config.name }}{% endblock %}
+{% import "artinfo.html" as artinfo %}
 {% block content %}
 <div class="jumbotron">
     <h2 class="child">Welcome to freenode&thinsp;—&thinsp;supporting free and open source communities since 1998</h2>
 </div>
 <div class="main">
     {% with article = get_module("news").articles[-1] %}
-    <b class="art"><a href="{{ article.url }}">{{ article.title }}</a></b>&nbsp;
-    <span class="art-date">{{ article.author }} on {{ article.datetime }}</span>
-    <p class="art-ingress">{{ article.render() }}</p>
+    {{ artinfo.info(article) }}
+    <div class="art-body">{{ article.render() }}</div>
     {#
     <p class="art-links">
         <a href="{{ next }}">Next</a>&nbsp;
         <a href="{{ previous }}">Previous</a>&nbsp;
     #}
     {% endwith %}
-    <a href="{{ url_for("archive") }}" ckass="art-link">
-                News Archive</a>
 </div>
 {% endblock content %}