Improve link highlighting in file.html
- Author
- Maarten 'Vngngdn' Vangeneugden
- Date
- Oct. 19, 2017, 5:47 a.m.
- Hash
- b99f48c558729e8a2305090cb517cd35a4dc7798
- Parent
- 84209d2e48ae8de4c56bda81754b2278f27ea70e
- Modified file
- templates/gitar/file.html
templates/gitar/file.html ¶
8 additions and 3 deletions.
View changes Hide changes
1 |
1 |
|
2 |
2 |
{% block title %}Gitar | Index page{% endblock title %} |
3 |
3 |
|
4 |
4 |
{% block stylesheets %} |
5 |
5 |
<link href="/static/website/materialize/css/google-icons.css" rel="stylesheet" /> |
6 |
6 |
<link href="/static/website/materialize/css/materialize.css" rel="stylesheet" media="screen, projection" /> |
7 |
7 |
<link rel="stylesheet" href="https://cdn.rawgit.com/tonsky/FiraCode/1.204/distr/fira_code.css"> |
8 |
8 |
<!-- TODO: Download Fira Code stylesheet and serve via the static folder. --> |
9 |
9 |
<!--<style> |
10 |
10 |
td { |
11 |
11 |
padding: 0 0 0 0; |
12 |
12 |
} |
13 |
13 |
pre { |
14 |
14 |
margin-top: 10px; |
15 |
15 |
margin-bottom: 10px; |
16 |
16 |
} |
17 |
17 |
table { |
18 |
18 |
line-height: 0px; |
19 |
19 |
padding-top: 0px; |
20 |
20 |
padding-bottom: 0px; |
21 |
21 |
border-spacing: 0 0; |
22 |
22 |
margin-top: 0px; |
23 |
23 |
margin-bottom: 0px; |
24 |
24 |
} |
25 |
25 |
</style>--> |
26 |
26 |
{# For the syntax coloring of Gitar. TODO for later. #} |
27 |
27 |
<link rel="stylesheet" type="text/css" href="/static/website/syntax.css" /> |
28 |
28 |
<link rel="stylesheet" type="text/css" href="/static/gitar/css/file.css" /> |
29 |
29 |
{% endblock stylesheets %} |
30 |
30 |
|
31 |
31 |
{% block title %}{{repository_name}}/{{title}} | Gitar{% endblock title %} |
32 |
32 |
{% block description %} |
33 |
33 |
Content of {{title}} in {{repository_name}} |
34 |
34 |
{% endblock description %} |
35 |
35 |
{% block main %} |
36 |
36 |
{% with mdac=materialDesign_accentColor %} {# You'll see why this is handy shortly. #} |
37 |
- | <div class="section {{ materialDesign_color }} lighten-2"> |
+ |
37 |
<div class="section {{ materialDesign_color }} lighten-2"> |
38 |
38 |
</div> |
39 |
39 |
<div class="container section" style="font-family: 'Fira Code', monospace;"> |
40 |
40 |
<h3 class="{{mdac}}-text text-accent-3">{{title}}</h3> |
41 |
41 |
<table> |
42 |
- | {% for line in content %} |
+ |
42 |
{% for line in content %} |
43 |
43 |
<tr> |
44 |
44 |
<td id="{{ forloop.counter }}" class="line-number"><a href="#{{ forloop.counter }}"><pre>{{ forloop.counter }}</pre></a></td> |
45 |
- | <td><pre>{{ line|safe }}</pre></td> |
+ |
45 |
<a |
+ |
46 |
class="{{mdc}}-text" |
+ |
47 |
style="a:hover { color: #00e676;}" |
+ |
48 |
href="#{{ forloop.counter }}"> |
+ |
49 |
<pre>{{ forloop.counter }}</pre></a></td> |
+ |
50 |
<td><pre>{{ line|safe }}</pre></td> |
46 |
51 |
</tr> |
47 |
52 |
{% endfor %} |
48 |
53 |
</table> |
49 |
54 |
{% endwith %} |
50 |
55 |
{% endblock main %} |
51 |
56 |