![Brian Hardisty](/assets/img/avatar_default.png)
`str.format()` can only use substitutions identified by braces (`{` and `}`). This has the potential to conflict with other code in the HTML template, such as CSS or JavaScript. Template strings can use substitutions identified by `$` or `${}`, e.g.: `$identifier` or `${identifier}`. These substitutions won't conflict with CSS or JavaScript, allowing users to write HTML templates that don't require double braces anywhere there's a substitution conflict. This is especially useful when one is using a build tool to generate the final CSS/JavaScript/HTML. https://docs.python.org/3/library/string.html#template-strings
90 lines
3.1 KiB
HTML
90 lines
3.1 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<title>Archived Sites</title>
|
|
<style>
|
|
html, body {
|
|
width: 100%;
|
|
height: 100%;
|
|
font-size: 20px;
|
|
font-weight: 200;
|
|
text-align: center;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
font-family: "Gill Sans", Helvetica, sans-serif;
|
|
}
|
|
header {
|
|
background-color: #aa1e55;
|
|
color: white;
|
|
padding: 10px;
|
|
}
|
|
header h1 {
|
|
font-weight: 300;
|
|
color: black;
|
|
margin-top: 10px;
|
|
margin-bottom: 12px;
|
|
}
|
|
header h1 small {
|
|
color: white;
|
|
font-size:0.5em;
|
|
}
|
|
header h1 small a {
|
|
text-decoration: none;
|
|
color: orange;
|
|
opacity: 0.6
|
|
font-weight: 300;
|
|
}
|
|
header h1 small a:hover {
|
|
opacity: 1;
|
|
}
|
|
table {
|
|
padding: 6px;
|
|
width: 100%;
|
|
}
|
|
table thead th {
|
|
font-weight: 400;
|
|
}
|
|
tbody tr:nth-child(odd) {
|
|
background-color: #ffebeb;
|
|
}
|
|
table tr td {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
padding-bottom: 0.4em;
|
|
padding-top: 0.4em;
|
|
padding-left: 2px;
|
|
}
|
|
table tr td img {
|
|
height: 24px;
|
|
padding: 0px;
|
|
padding-right: 5px;
|
|
text-indent: -10000px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1 title="Last modified ${time_updated}">
|
|
<img src="https://nicksweeting.com/images/archive.png" height="36px">
|
|
Archived Sites <img src="https://getpocket.com/favicon.ico" height="36px"> <br/>
|
|
<small>
|
|
Archived with: <a href="https://github.com/pirate/bookmark-archiver">Bookmark Archiver</a> on ${date_updated}
|
|
</small>
|
|
</h1>
|
|
</header>
|
|
<table style="width:100%;height: 90%; overflow-y: scroll;table-layout: fixed">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 120px;"><img src="https://getpocket.com/favicon.ico" height="12px"> Starred</th>
|
|
<th style="width: 45vw;">Saved Articles (${num_links})</th>
|
|
<th style="width: 50px">Files</th>
|
|
<th style="width: 50px">PDF</th>
|
|
<th style="width: 60px;font-size:0.8em;">Screenshot</th>
|
|
<th style="width: 50px">A.org</th>
|
|
<th style="width: 100px;whitespace:nowrap;overflow-x:scroll;display:block">Original URL</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>${rows}</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|