From e26a569649f18e493001f6ba4b2ff78e7a070e4a Mon Sep 17 00:00:00 2001 From: Frederic Date: Sun, 18 Mar 2018 11:54:52 +0100 Subject: [PATCH] overview style --- journalmarks/templates/overview.html | 38 ++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/journalmarks/templates/overview.html b/journalmarks/templates/overview.html index 8cca193..b7f3007 100644 --- a/journalmarks/templates/overview.html +++ b/journalmarks/templates/overview.html @@ -19,7 +19,6 @@ function run() { var n = p.cloneNode(true); n.id = 'journalmark_' + j.tag; var created = new Date(j.created); - console.log(created); n.getElementsByClassName('date')[0].innerText = created.getDate().toString() + '.' + (created.getMonth()+1).toString() + '.' + created.getFullYear().toString(); n.getElementsByClassName('tag')[0].innerText = j.tag; n.getElementsByClassName('tag')[0].href = '/' + j.tag; @@ -28,8 +27,10 @@ function run() { decrs.push(journalmarks_decrypturl(j.content).then(function(url) { n.getElementsByClassName('url')[0].href = url.url; n.getElementsByClassName('url')[0].innerText = url.url; - if(url.hasOwnProperty('comment')) + if(url.hasOwnProperty('comment')) { n.getElementsByClassName('comment')[0].innerText = url.comment; + n.getElementsByClassName('comment-row')[0].style.display = 'table-row'; + } }).catch(function(error) { console.log(error); n.getElementsByClassName('url')[0].innerText = 'unable to decrypt url'; @@ -53,7 +54,7 @@ else document.attachEvent('onreadystatechange', function(){ #prototype { display: none; } -#journalmarks p { +.journalmark { margin: 1em; padding: 1em; border: 1px solid grey; @@ -61,21 +62,38 @@ else document.attachEvent('onreadystatechange', function(){ #back-to-welcome { text-align: center; } +.tag { + font-size: 2em; +} +.comment-row { + display: none; +} +.journalmark td:first-child { + font-size: 0.8em; + color: #7e7e7e; + vertical-align: bottom; + text-align: right; + padding-right: 1em; + +} + {% endblock %} {% block body %}

Journalmarks Overview

-Back to welcome page + Back to welcome page

-

-Tag:
-URL:
-Comment:
-Created: -

+
+ + + + + +
Tag:
URL:
Created:
Comment:
+
{% endblock %}