changeset 421:6d1d8604f882

web: Add icon for external links, tweak style of decorators.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 23 Mar 2017 22:01:49 -0700
parents 596e9ca2da86
children 49da205b4946
files wikked/assets/css/wikked/main.less wikked/assets/css/wikked/page.less wikked/templates/read-page.html
diffstat 3 files changed, 36 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/wikked/assets/css/wikked/main.less	Thu Mar 23 21:59:28 2017 -0700
+++ b/wikked/assets/css/wikked/main.less	Thu Mar 23 22:01:49 2017 -0700
@@ -5,20 +5,6 @@
 }
 
 // Global classes
-a {
-    text-decoration: none;
-    color: @color-blue;
-    &:link { color: @color-blue; }
-    &:visited { color: @color-blue; }
-    &:hover { color: @color-blue; text-decoration: underline; }
-    &:active { color: @color-blue; }
-}
-a.wiki-link.missing,
-a.wiki-meta-link.missing {
-    color: @color-orange;
-    &:hover { color: @color-orange; text-decoration: underline; }
-}
-
 em.hlt1 , em.hlt2, em.hlt3, em.hlt4, em.hlt5, em.hlt6 {
     background: @color-green;
 }
--- a/wikked/assets/css/wikked/page.less	Thu Mar 23 21:59:28 2017 -0700
+++ b/wikked/assets/css/wikked/page.less	Thu Mar 23 22:01:49 2017 -0700
@@ -11,6 +11,31 @@
     width: 100%;
 }
 
+article {
+    a {
+        text-decoration: none;
+        color: @color-blue;
+        &:link { color: @color-blue; }
+        &:visited { color: @color-blue; }
+        &:hover { color: @color-blue; text-decoration: underline; }
+        &:active { color: @color-blue; }
+    }
+    a.wiki-link.missing,
+    a.wiki-meta-link.missing {
+        color: @color-orange;
+        &:hover { color: @color-orange; text-decoration: underline; }
+    }
+}
+article.wiki-page {
+    a {
+        &::after { font-family: FontAwesome; content: ' \f14c';  }
+    }
+    a.wiki-link,
+    a.wiki-meta-link {
+        &::after { content: none; }
+    }
+}
+
 // Page title decorators
 .decorator {
     text-transform: uppercase;
@@ -20,11 +45,12 @@
     margin-top: -0.5em;
     margin-bottom: 1.5em;
     letter-spacing: 0.1em;
-    color: @color-gray-dark;
+    color: @color-green-dark;
 
     small {
         font-size: 60%;
         text-transform: none;
+        letter-spacing: 0.03em;
     }
 
     .rev_id {
--- a/wikked/templates/read-page.html	Thu Mar 23 21:59:28 2017 -0700
+++ b/wikked/templates/read-page.html	Thu Mar 23 22:01:49 2017 -0700
@@ -1,7 +1,7 @@
 {% extends 'index.html' %}
 {% block head %}{{custom_head|safe}}{% endblock %}
 {% block content %}
-<article>
+<article class="wiki-page">
     {% if not meta.notitle %}
     <header>
         <h1>{{meta.title}}</h1>
@@ -12,13 +12,15 @@
         <div class="decorator"><small>Redirected from 
             {% for r in redirected_from %}
             {% if not loop.first %} | {% endif %}
-            <a href="{{get_read_url(r)}}?no_redirect">{{r}}</a>
+            <a class="wiki-link" data-wiki-url="{{r}}"
+               href="{{get_read_url(r)}}?no_redirect">{{r}}</a>
             {% endfor %}
         </small></div>
         {% endif %}
         {% if meta.redirect %}
         <div class="decorator"><small>Redirects to
-                <a href="{{get_read_url(redirects_to)}}">{{redirects_to}}</a>
+                <a class="wiki-link" data-wiki-url="{{redirects_to}}"
+                   href="{{get_read_url(redirects_to)}}">{{redirects_to}}</a>
         </small></div>
         {% endif %}
     </header>
@@ -28,7 +30,8 @@
         {% if is_query %}
         {% if not text %}
         <p>No additional information is available for this page.
-           You can <a href="{{get_edit_url(meta.url)}}">write some right now</a>.</p>
+           You can <a class="wiki-link" data-wiki-url="{{meta.url}}"
+                      href="{{get_edit_url(meta.url)}}">write some right now</a>.</p>
         {% endif %}
         <h3>Pages in {{meta_query}} "{{meta_value}}"</h3>
         <ul>
@@ -45,7 +48,8 @@
         <span class="info-categories">Categories: </span>
         {% for c in meta.category %}
         {% if not loop.first %} | {% endif %}
-        <span><a href="{{get_read_url(c.url)}}">{{c.name}}</a></span>
+        <span><a class="wiki-link" data-wiki-url="{{c.url}}"
+                 href="{{get_read_url(c.url)}}">{{c.name}}</a></span>
         {% endfor %}
         {% endif %}
     </section>