|
|
@ -19,7 +19,6 @@ function run() { |
|
|
|
var n = p.cloneNode(true); |
|
|
|
var n = p.cloneNode(true); |
|
|
|
n.id = 'journalmark_' + j.tag; |
|
|
|
n.id = 'journalmark_' + j.tag; |
|
|
|
var created = new Date(j.created); |
|
|
|
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('date')[0].innerText = created.getDate().toString() + '.' + (created.getMonth()+1).toString() + '.' + created.getFullYear().toString(); |
|
|
|
n.getElementsByClassName('tag')[0].innerText = j.tag; |
|
|
|
n.getElementsByClassName('tag')[0].innerText = j.tag; |
|
|
|
n.getElementsByClassName('tag')[0].href = '/' + j.tag; |
|
|
|
n.getElementsByClassName('tag')[0].href = '/' + j.tag; |
|
|
@ -28,8 +27,10 @@ function run() { |
|
|
|
decrs.push(journalmarks_decrypturl(j.content).then(function(url) { |
|
|
|
decrs.push(journalmarks_decrypturl(j.content).then(function(url) { |
|
|
|
n.getElementsByClassName('url')[0].href = url.url; |
|
|
|
n.getElementsByClassName('url')[0].href = url.url; |
|
|
|
n.getElementsByClassName('url')[0].innerText = 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')[0].innerText = url.comment; |
|
|
|
|
|
|
|
n.getElementsByClassName('comment-row')[0].style.display = 'table-row'; |
|
|
|
|
|
|
|
} |
|
|
|
}).catch(function(error) { |
|
|
|
}).catch(function(error) { |
|
|
|
console.log(error); |
|
|
|
console.log(error); |
|
|
|
n.getElementsByClassName('url')[0].innerText = 'unable to decrypt url'; |
|
|
|
n.getElementsByClassName('url')[0].innerText = 'unable to decrypt url'; |
|
|
@ -53,7 +54,7 @@ else document.attachEvent('onreadystatechange', function(){ |
|
|
|
#prototype { |
|
|
|
#prototype { |
|
|
|
display: none; |
|
|
|
display: none; |
|
|
|
} |
|
|
|
} |
|
|
|
#journalmarks p { |
|
|
|
.journalmark { |
|
|
|
margin: 1em; |
|
|
|
margin: 1em; |
|
|
|
padding: 1em; |
|
|
|
padding: 1em; |
|
|
|
border: 1px solid grey; |
|
|
|
border: 1px solid grey; |
|
|
@ -61,21 +62,38 @@ else document.attachEvent('onreadystatechange', function(){ |
|
|
|
#back-to-welcome { |
|
|
|
#back-to-welcome { |
|
|
|
text-align: center; |
|
|
|
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; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
{% endblock %} |
|
|
|
{% endblock %} |
|
|
|
{% block body %} |
|
|
|
{% block body %} |
|
|
|
<h1>Journalmarks Overview</h1> |
|
|
|
<h1>Journalmarks Overview</h1> |
|
|
|
|
|
|
|
|
|
|
|
<p id="back-to-welcome"> |
|
|
|
<p id="back-to-welcome"> |
|
|
|
<a href="{{ url_for('journalmarks.index') }}">Back to welcome page</a> |
|
|
|
<a href="{{ url_for('journalmarks.index') }}">Back to welcome page</a> |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
<div id="journalmarks"> |
|
|
|
<div id="journalmarks"> |
|
|
|
<p id="prototype"> |
|
|
|
<div class="journalmark" id="prototype"> |
|
|
|
Tag: <a class="tag" href=""></a><br> |
|
|
|
<table> |
|
|
|
URL: <a class="url" rel="noreferrer" href=""></a><br> |
|
|
|
<tr><td>Tag:</td><td><a class="tag" href=""></a></td></tr> |
|
|
|
Comment: <span class="comment"></span><br> |
|
|
|
<tr><td>URL:</td><td><a class="url" rel="noreferrer" href=""></a></td></tr> |
|
|
|
Created: <span class="date"></span> |
|
|
|
<tr><td>Created:</td><td><span class="date"></td></tr> |
|
|
|
</p> |
|
|
|
<tr class="comment-row"><td>Comment:</td><td><span class="comment"></span></td></tr> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{% endblock %} |
|
|
|
{% endblock %} |
|
|
|