Bugfixes and preparation for M3 integration
Gitar has been in bug squishing mode for a while now, but now my exams are done I'm bringing it back. I did some small changes, but mostly removing redundant cruft (like the mdac-tags) so everything looks better.
- Author
- Maarten Vangeneugden
- Date
- Sept. 11, 2020, 5:52 p.m.
- Hash
- f9e996825fdabc3a93948a48a27cba1fbf84d5dd
- Parent
- a95db70d50b8bfc4e06210bb403a603676eb9cad
- Modified files
- templates/gitar/directory.djhtml
- templates/gitar/file.djhtml
- templates/gitar/header.djhtml
- templates/gitar/index.djhtml
- templates/gitar/repositories.djhtml
templates/gitar/directory.djhtml ¶
99 additions and 0 deletions.
View changes Hide changes
+ |
1 |
{% load i18n %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
2 |
{% load static %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
3 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
4 |
{% block title %}{{ repository_name }} | Gitar{% endblock title %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
5 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
6 |
{% block stylesheets %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
7 |
{{ block.super }} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
8 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
9 |
{% endblock stylesheets %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
10 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
11 |
{% block description %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
12 |
{{repository_description}} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
13 |
{% endblock description %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
14 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
15 |
{% block header %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
16 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
17 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
18 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
19 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
20 |
{% endblock header %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
21 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
22 |
{% block main %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
23 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
24 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
25 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
26 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
27 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
28 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
29 |
{{repository_description}} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
30 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
31 |
{% for bbranch in branches %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
32 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
33 |
{{bbranch}} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
34 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
35 |
{% endfor %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
36 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
37 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
38 |
{{repository_language}} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
39 |
code |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
40 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
41 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
42 |
{{repository_license}} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
43 |
copyright |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
44 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
45 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
46 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
47 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
48 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
49 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
76 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
77 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
78 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
79 |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
80 |
{% for commit in commits %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
81 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
82 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
83 |
class="{{mdac}}-text text-accent-3 tooltipped" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
84 |
{# href="{% url 'gitar-commit' repository_name commit.hash %}" #} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
85 |
data-position="left" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
86 |
data-delay="50" |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
87 |
data-tooltip="Viewing commits is not implemented yet!"> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
88 |
{{commit.hash|truncatechars:15}} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
89 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
90 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
91 |
{% trans "by" %} {{commit.author}} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
92 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
93 |
{{commit.description|lower|capfirst}}{% if commit.description|last != "." %}.{% endif %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
94 |
{% endfor %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
95 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
96 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
97 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
98 |
{% endblock main %} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ |
99 |
templates/gitar/file.djhtml ¶
87 additions and 0 deletions.
View changes Hide changes
+ |
1 |
{% load i18n %} |
|||||||||||||||||||||||||||||
+ |
2 |
{% load static %} |
|||||||||||||||||||||||||||||
+ |
3 |
||||||||||||||||||||||||||||||
+ |
4 |
{% block title %}{{repository_name}}/{{file_name}} | Gitar{% endblock title %} |
|||||||||||||||||||||||||||||
+ |
5 |
||||||||||||||||||||||||||||||
+ |
6 |
{% block stylesheets %} |
|||||||||||||||||||||||||||||
+ |
7 |
{{ block.super }} |
|||||||||||||||||||||||||||||
+ |
8 |
||||||||||||||||||||||||||||||
+ |
9 |
||||||||||||||||||||||||||||||
+ |
10 |
||||||||||||||||||||||||||||||
+ |
11 |
||||||||||||||||||||||||||||||
+ |
12 |
table.highlight tr { |
|||||||||||||||||||||||||||||
+ |
13 |
line-height: 15px; |
|||||||||||||||||||||||||||||
+ |
14 |
} |
|||||||||||||||||||||||||||||
+ |
15 |
||||||||||||||||||||||||||||||
+ |
16 |
/* These vendor prefixes are still necessary, yeah...*/ |
|||||||||||||||||||||||||||||
+ |
17 |
.line-number { |
|||||||||||||||||||||||||||||
+ |
18 |
-moz-user-select: none; |
|||||||||||||||||||||||||||||
+ |
19 |
-webkit-user-select: none; |
|||||||||||||||||||||||||||||
+ |
20 |
-ms-user-select: none; |
|||||||||||||||||||||||||||||
+ |
21 |
user-select: none; |
|||||||||||||||||||||||||||||
+ |
22 |
} |
|||||||||||||||||||||||||||||
+ |
23 |
||||||||||||||||||||||||||||||
+ |
24 |
{% endblock stylesheets %} |
|||||||||||||||||||||||||||||
+ |
25 |
||||||||||||||||||||||||||||||
+ |
26 |
{% block description %} |
|||||||||||||||||||||||||||||
+ |
27 |
Content of {{file_name}} in {{repository_name}} |
|||||||||||||||||||||||||||||
+ |
28 |
{% endblock description %} |
|||||||||||||||||||||||||||||
+ |
29 |
||||||||||||||||||||||||||||||
+ |
30 |
{% block header %} |
|||||||||||||||||||||||||||||
+ |
31 |
||||||||||||||||||||||||||||||
+ |
32 |
|
|||||||||||||||||||||||||||||
+ |
33 |
||||||||||||||||||||||||||||||
+ |
34 |
||||||||||||||||||||||||||||||
+ |
35 |
{% endblock header %} |
|||||||||||||||||||||||||||||
+ |
36 |
||||||||||||||||||||||||||||||
+ |
37 |
{% comment %} |
|||||||||||||||||||||||||||||
+ |
38 |
{% block stylesheets %} |
|||||||||||||||||||||||||||||
+ |
39 |
||||||||||||||||||||||||||||||
+ |
40 |
||||||||||||||||||||||||||||||
+ |
41 |
||||||||||||||||||||||||||||||
+ |
42 |
||||||||||||||||||||||||||||||
+ |
46 |
||||||||||||||||||||||||||||||
+ |
63 |
{# For the syntax coloring of Gitar. TODO for later. #} |
|||||||||||||||||||||||||||||
+ |
64 |
||||||||||||||||||||||||||||||
+ |
65 |
||||||||||||||||||||||||||||||
+ |
66 |
{% endblock stylesheets %} |
|||||||||||||||||||||||||||||
+ |
67 |
{% endcomment %} |
|||||||||||||||||||||||||||||
+ |
68 |
||||||||||||||||||||||||||||||
+ |
69 |
||||||||||||||||||||||||||||||
+ |
72 |
{% block main %} |
|||||||||||||||||||||||||||||
+ |
73 |
||||||||||||||||||||||||||||||
+ |
74 |
|
|||||||||||||||||||||||||||||
+ |
75 |
|
|||||||||||||||||||||||||||||
+ |
85 |
||||||||||||||||||||||||||||||
+ |
86 |
{% endblock main %} |
|||||||||||||||||||||||||||||
+ |
87 |
templates/gitar/header.djhtml ¶
36 additions and 0 deletions.
View changes Hide changes
+ |
1 |
Copyright 2015 Maarten Vangeneugden |
+ |
2 |
|
+ |
3 |
Licensed under the Apache License, Version 2.0 (the "License"); |
+ |
4 |
you may not use this file except in compliance with the License. |
+ |
5 |
You may obtain a copy of the License at |
+ |
6 |
|
+ |
7 |
https://www.apache.org/licenses/LICENSE-2.0 |
+ |
8 |
|
+ |
9 |
Unless required by applicable law or agreed to in writing, software |
+ |
10 |
distributed under the License is distributed on an "AS IS" BASIS, |
+ |
11 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
+ |
12 |
See the License for the specific language governing permissions and |
+ |
13 |
limitations under the License. |
+ |
14 |
{% endcomment %} |
+ |
15 |
|
+ |
16 |
|
+ |
17 |
|
+ |
18 |
|
+ |
19 |
|
+ |
20 |
|
+ |
21 |
|
+ |
22 |
|
+ |
23 |
|
+ |
24 |
|
+ |
25 |
|
+ |
26 |
{# This is actually the navigation bar. Perhaps it should be in its own template file. #} |
+ |
27 |
|
+ |
28 |
|
+ |
29 |
|
+ |
30 |
|
+ |
31 |
Vngngdn |
+ |
32 |
|
+ |
33 |
|
+ |
34 |
|
+ |
35 |
|
+ |
36 |
templates/gitar/index.djhtml ¶
86 additions and 0 deletions.
View changes Hide changes
+ |
1 |
{% load i18n %} |
+ |
2 |
{% load static %} |
+ |
3 |
|
+ |
4 |
{% block stylesheets %} |
+ |
5 |
{{ block.super }} |
+ |
6 |
|
+ |
7 |
{% endblock stylesheets %} |
+ |
8 |
|
+ |
9 |
{% block title %}{% trans "Gitar | Index page" %}{% endblock title %} |
+ |
10 |
|
+ |
11 |
{% block description %} |
+ |
12 |
{% trans "My personal answer to GitHub." %} |
+ |
13 |
{% endblock description %} |
+ |
14 |
|
+ |
15 |
{% block header %} |
+ |
16 |
|
+ |
17 |
|
+ |
18 |
|
+ |
19 |
|
+ |
20 |
{% endblock header %} |
+ |
21 |
|
+ |
22 |
{% block nav %} |
+ |
23 |
|
+ |
24 |
|
+ |
25 |
|
+ |
26 |
|
+ |
27 |
{% for title, date, blog_text, link in posts %} |
+ |
28 |
{{ title }} |
+ |
29 |
{% endfor %} |
+ |
30 |
|
+ |
31 |
{% trans "Front page" %} |
+ |
32 |
|
+ |
33 |
{% endblock nav %} |
+ |
34 |
|
+ |
35 |
|
+ |
36 |
{% block main %} |
+ |
37 |
|
+ |
38 |
{# with mdac=materialDesign_accentColor %} {# You'll see why this is handy shortly. #} |
+ |
39 |
{# with mdc=materialDesign_color #} |
+ |
40 |
|
+ |
41 |
|
+ |
42 |
|
+ |
43 |
{% blocktrans %} |
+ |
44 |
Gitar is a simple web app to easily host Git repositories using the Django framework. |
+ |
45 |
It's a hobby project of me, to make it easy for |
+ |
46 |
people to scroll through the code I publish, in a read-only fashion. It |
+ |
47 |
makes use of |
+ |
48 |
Pygments |
+ |
49 |
to read the source files, and apply the appropriate syntax coloring. |
+ |
50 |
{% endblocktrans %} |
+ |
51 |
|
+ |
52 |
|
+ |
53 |
{% blocktrans %}All repositories are automatically updated when changes |
+ |
54 |
have been pushed to the server, without any manual intervention from me. |
+ |
55 |
Special attention goes to clean URL design, adhering to web standards, |
+ |
56 |
and responsive design across all screen types.{% endblocktrans %} |
+ |
57 |
|
+ |
58 |
|
+ |
59 |
{% blocktrans %}Gitar is a project under development! |
+ |
60 |
While it's certainly presentable, there's still a lot of room for improvement. |
+ |
61 |
Also, if you happen to walk in while I'm working, it's possible you'll |
+ |
62 |
fall through the floor, so be warned =D{% endblocktrans %} |
+ |
63 |
|
+ |
64 |
|
+ |
65 |
|
+ |
66 |
|
+ |
67 |
{% for repository in repositories %} {# ARGH DON'T YOU LOVE THE READABILITY #} |
+ |
68 |
|
+ |
69 |
|
+ |
70 |
{{ repository.name }} |
+ |
71 |
|
+ |
72 |
{{ repository.description }} |
+ |
73 |
|
+ |
74 |
|
+ |
75 |
|
+ |
76 |
|
+ |
77 |
|
+ |
79 |
|
+ |
80 |
|
+ |
81 |
|
+ |
82 |
|
+ |
83 |
{% endfor %} |
+ |
84 |
|
+ |
85 |
{% endblock main %} |
+ |
86 |
templates/gitar/repositories.djhtml ¶
23 additions and 0 deletions.
View changes Hide changes
+ |
1 |
|
+ |
2 |
{% block title %}Gitar | Index page{% endblock title %} |
+ |
3 |
{% block description %} |
+ |
4 |
Vngngdn's Gitar app. Really nothing more to say, except that it FREAKING ROCKS! |
+ |
5 |
{% endblock description %} |
+ |
6 |
{% block main %} |
+ |
7 |
{% with mdac=materialDesign_accentColor %} {# You'll see why this is handy shortly. #} |
+ |
8 |
|
+ |
9 |
|
+ |
10 |
Gitar is a simple web app to easily host Git repositories using the Django framework. |
+ |
11 |
|
+ |
12 |
|
+ |
13 |
|
+ |
14 |
|
+ |
15 |
|
+ |
16 |
{% for file in files %} |
+ |
17 |
|
+ |
18 |
{% endfor %} |
+ |
19 |
|
+ |
20 |
|
+ |
21 |
{% endwith %} |
+ |
22 |
{% endblock main %} |
+ |
23 |