1
0
Fork 0
mirror of synced 2024-07-01 12:30:24 +12:00
ArchiveBox/templates/index_row.html
Brian Hardisty 31ec3203c5
Use template strings for substitution in HTML output
`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
2017-07-05 02:59:09 -07:00

13 lines
742 B
HTML

<tr>
<td>${time}</td>
<td><a href="${archive_url}" style="font-size:1.4em;text-decoration:none;color:black;" title="${title}">
<img src="${favicon_url}">
${title} <small style="background-color: #eee;border-radius:4px; float:right">${tags}</small>
</td>
<td style="text-align:center"><a href="${files_url}" title="Files">📂</a></td>
<td style="text-align:center"><a href="${pdf_link}" title="PDF">📄</a></td>
<td style="text-align:center"><a href="${screenshot_link}" title="Screenshot">🖼</a></td>
<td style="text-align:center"><a href="${archive_org_url}" title="Archive.org">🏛</a></td>
<td>🔗 <img src="${google_favicon_url}" height="16px"> <a href="${url}">${url}</a></td>
</tr>