Download:
child 45:d120981c4310
parent 43:2e6ba4861557
44:1c2db26fa4bd
Anton Shestakov <av6@dwimlabs.net>, Sun, 19 Jun 2016 14:41:11 +0800
viewer: use a lineno class to put styles on the line number links

2 файлов изменено, 3 вставок(+), 3 удалений(-) [+]
static/main.css file | annotate | diff | comparison | revisions
templates/check.html file | annotate | diff | comparison | revisions
--- a/static/main.css Sun Jun 19 14:16:56 2016 +0800
+++ b/static/main.css Sun Jun 19 14:41:11 2016 +0800
@@ -30,7 +30,7 @@
background: #4c4c4c;
}
-.check-log div a {
+.check-log a.lineno {
display: inline-block;
text-align: right;
min-width: 42px; /* 4 digits */
@@ -39,7 +39,7 @@
color: #929292;
}
-.check-log div a::before {
+.check-log a.lineno::before {
content: attr(data-line-number);
padding-right: 10px;
}
--- a/templates/check.html Sun Jun 19 14:16:56 2016 +0800
+++ b/templates/check.html Sun Jun 19 14:41:11 2016 +0800
@@ -44,7 +44,7 @@
<pre class="check-log">{#
#}{% for number, (cls, line) in enumerate(lines, 1) %}{#
#}<div id="l{{ number }}"{% if cls %} class="{{ cls }}"{% end %}>{#
- #}<a href="#l{{ number }}" data-line-number="{{ number }}"></a>{#
+ #}<a href="#l{{ number }}" class="lineno" data-line-number="{{ number }}"></a>{#
#}{{ line }}{#
#}</div>{#
#}{% end %}{#