Move CSS out of template to static file

This commit is contained in:
Edward Betts 2023-11-25 19:56:25 +00:00
parent f07b407e7a
commit 4b73102c22
2 changed files with 24 additions and 26 deletions

23
static/css/diff.css Normal file
View file

@ -0,0 +1,23 @@
span.exact { padding: 2px; background: green; color: white; font-weight: bold; }
span.nomatch { padding: 2px; background: red; color: white; font-weight: bold; }
span.case_mismatch { padding: 2px; background: orange; color: white; font-weight: bold; }
span.searchmatch { font-weight: bold; }
table.diff,td.diff-otitle,td.diff-ntitle{background-color:white}
td.diff-otitle,td.diff-ntitle{text-align:center}
td.diff-marker{text-align:right;font-weight:bold;font-size:1.25em}
td.diff-lineno{font-weight:bold}
td.diff-addedline,td.diff-deletedline,td.diff-context{font-size:88%;vertical-align:top;white-space:-moz-pre-wrap;white-space:pre-wrap}
td.diff-addedline,td.diff-deletedline{border-style:solid;border-width:1px 1px 1px 4px;border-radius:0.33em}
td.diff-addedline{border-color:#a3d3ff}
td.diff-deletedline{border-color:#ffe49c}
td.diff-context{background:#f3f3f3;color:#333333;border-style:solid;border-width:1px 1px 1px 4px;border-color:#e6e6e6;border-radius:0.33em}
.diffchange{font-weight:bold;text-decoration:none}
table.diff{border:none;width:98%;border-spacing:4px; table-layout:fixed}
td.diff-addedline .diffchange,td.diff-deletedline .diffchange{border-radius:0.33em;padding:0.25em 0}
td.diff-addedline .diffchange{background:#d8ecff}
td.diff-deletedline .diffchange{background:#feeec8}
table.diff td{padding:0.33em 0.66em}
table.diff col.diff-marker{width:2%}
table.diff col.diff-content{width:48%}
table.diff td div{ word-wrap:break-word; overflow:auto}

View file

@ -3,32 +3,7 @@
{% block title %}{{ title }}{% endblock %} {% block title %}{{ title }}{% endblock %}
{% block style %} {% block style %}
<style> <link href="{{ url_for("static", filename="css/diff.css") }}" rel="stylesheet"/>
span.exact { padding: 2px; background: green; color: white; font-weight: bold; }
span.nomatch { padding: 2px; background: red; color: white; font-weight: bold; }
span.case_mismatch { padding: 2px; background: orange; color: white; font-weight: bold; }
span.searchmatch { font-weight: bold; }
table.diff,td.diff-otitle,td.diff-ntitle{background-color:white}
td.diff-otitle,td.diff-ntitle{text-align:center}
td.diff-marker{text-align:right;font-weight:bold;font-size:1.25em}
td.diff-lineno{font-weight:bold}
td.diff-addedline,td.diff-deletedline,td.diff-context{font-size:88%;vertical-align:top;white-space:-moz-pre-wrap;white-space:pre-wrap}
td.diff-addedline,td.diff-deletedline{border-style:solid;border-width:1px 1px 1px 4px;border-radius:0.33em}
td.diff-addedline{border-color:#a3d3ff}
td.diff-deletedline{border-color:#ffe49c}
td.diff-context{background:#f3f3f3;color:#333333;border-style:solid;border-width:1px 1px 1px 4px;border-color:#e6e6e6;border-radius:0.33em}
.diffchange{font-weight:bold;text-decoration:none}
table.diff{border:none;width:98%;border-spacing:4px; table-layout:fixed}
td.diff-addedline .diffchange,td.diff-deletedline .diffchange{border-radius:0.33em;padding:0.25em 0}
td.diff-addedline .diffchange{background:#d8ecff}
td.diff-deletedline .diffchange{background:#feeec8}
table.diff td{padding:0.33em 0.66em}
table.diff col.diff-marker{width:2%}
table.diff col.diff-content{width:48%}
table.diff td div{ word-wrap:break-word; overflow:auto}
</style>
{% endblock %} {% endblock %}
{% block content %} {% block content %}