1
0
Fork 0
mirror of synced 2024-06-29 11:30:46 +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_TEMPLATE = os.getenv('INDEX_TEMPLATE', 'templates/index.html')
INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_row.html') INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_row.html')
TEMPLATE_STATICFILES = os.getenv('TEMPLATE_STATICFILES', 'templates/static') 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 ### Output Paths
ROOT_FOLDER = os.path.dirname(os.path.abspath(__file__)) 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), 'num_links': len(links),
'date_updated': datetime.now().strftime('%Y-%m-%d'), 'date_updated': datetime.now().strftime('%Y-%m-%d'),
'time_updated': datetime.now().strftime('%Y-%m-%d %H:%M'), '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, 'rows': link_rows,
} }

View file

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

View file

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