1
0
Fork 0
mirror of synced 2024-06-26 10:00:19 +12:00

show footer info and refresh button

This commit is contained in:
Nick Sweeting 2018-04-17 09:14:01 -04:00
parent b7cae4f72e
commit 52a2ddd2b6
4 changed files with 31 additions and 8 deletions

View file

@ -34,6 +34,7 @@ LINK_INDEX_TEMPLATE = os.getenv('LINK_INDEX_TEMPLATE', 'templates/link_ind
INDEX_TEMPLATE = os.getenv('INDEX_TEMPLATE', 'templates/index.html')
INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_row.html')
TEMPLATE_STATICFILES = os.getenv('TEMPLATE_STATICFILES', 'templates/static')
FOOTER_INFO = os.getenv('FOOTER_INFO', 'Content is hosted for personal archiving purposes only. Contact server owner for any takedown requests.',)
### Output Paths
ROOT_FOLDER = os.path.dirname(os.path.abspath(__file__))

View file

@ -90,6 +90,9 @@ def write_html_links_index(out_dir, links):
'num_links': len(links),
'date_updated': datetime.now().strftime('%Y-%m-%d'),
'time_updated': datetime.now().strftime('%Y-%m-%d %H:%M'),
'footer_info': FOOTER_INFO,
'git_sha': GIT_SHA,
'short_git_sha': GIT_SHA[:8],
'rows': link_rows,
}

View file

@ -22,11 +22,12 @@
height: 100px;
}
header h1 {
font-size: 36px;
font-size: 38px;
font-weight: 300;
color: black;
margin-top: 2px;
padding-top: 14px;
line-height: 1.4;
margin-right: -200px;
}
header h1 small {
color: white;
@ -43,12 +44,17 @@
header h1 small a:hover {
opacity: 1;
}
.header-center {
width: 100%;
text-align: center;
}
.header-right {
float: right;
width: 50px;
height: 60px;
text-align: center;
padding: 20px;
margin-left: -100px;
}
table {
padding: 6px;
@ -82,7 +88,7 @@
<body>
<header>
<div class="header-right">
<a href="?">
<a href="?" title="Reload...">
<img src="static/archive.png" style="height: 100%;"/>
</a>
<br/>
@ -90,14 +96,12 @@
Docs
</a>
</div>
<div style="float:left; height: 50px">
<h1 title="Last modified 2017-10-30 05:19" style="text-align:left">
<div class="header-center">
<h1>
Archived Sites
<br/>
<small>
$num_links links, last updated $time_updated<br/>
Using <a href="https://github.com/pirate/bookmark-archiver" target="_blank" rel="noopener">Bookmark Archiver</a>.
<a href="?"> $num_links links</a> &nbsp; &nbsp; Last updated $time_updated<br/>
</small>
</h1>
</div>
@ -117,5 +121,18 @@
</thead>
<tbody>$rows</tbody>
</table>
<footer>
<br/>
<center>
<small>
Created using <a href="https://github.com/pirate/bookmark-archiver">Bookmark Archiver</a>
version <a href="https://github.com/pirate/bookmark-archiver/commit/$git_sha">$short_git_sha</a> &nbsp; | &nbsp;
Download index as <a href="index.json">JSON</a>
<br/><br/>
$footer_info
</small>
</center>
<br/>
</footer>
</body>
</html>

View file

@ -1,7 +1,9 @@
<tr>
<td title="Bookmarked timestamp: $timestamp">$date</td>
<td>
<a href="?" title="Refresh status...">
<img src="$favicon_url" onerror="this.src='static/spinner.gif'" class="link-favicon">
</a>
</td>
<td><a href="$archive_url" style="font-size:1.4em;text-decoration:none;color:black;" title="$title">
$title <small style="background-color: #eee;border-radius:4px; float:right">$tags</small>