Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
osp
tools.ethertoff
Commits
fb35ef94
Commit
fb35ef94
authored
Nov 13, 2019
by
gijs
Browse files
Styling the tags page
parent
5eb6b02d
Changes
5
Hide whitespace changes
Inline
Side-by-side
generator/management/commands/generate.py
View file @
fb35ef94
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
import
os
import
os
import
os.path
import
os.path
import
shutil
import
shutil
import
re
from
math
import
inf
from
math
import
inf
from
generator.index
import
make_index
from
generator.index
import
make_index
...
@@ -167,10 +168,12 @@ def generate ():
...
@@ -167,10 +168,12 @@ def generate ():
# output(os.path.join(outputdir, 'produsers.layout.html'), 'produsers.layout.html', { 'produsers': sorted(produsers.models, key=lambda r: str(r.key)), 'grouped_produsers': grouped_produsers })
# output(os.path.join(outputdir, 'produsers.layout.html'), 'produsers.layout.html', { 'produsers': sorted(produsers.models, key=lambda r: str(r.key)), 'grouped_produsers': grouped_produsers })
## Tags
## Tags
sorted_tags
=
sorted
(
tags
.
models
,
key
=
lambda
m
:
re
.
subn
(
r
'\W'
,
''
,
str
(
m
))[
0
].
lower
())
grouped_tags
=
regroup
(
sorted_tags
,
key
=
lambda
m
:
re
.
subn
(
r
'\W'
,
''
,
str
(
m
))[
0
].
lower
()[
0
])
output
(
output
(
os
.
path
.
join
(
outputdir
,
'tags.html'
),
os
.
path
.
join
(
outputdir
,
'tags.html'
),
'tags.html'
,
'tags.html'
,
{
'tags'
:
sorted
(
tags
.
models
,
key
=
getLabelAsSortKey
)
})
{
'tags'
:
sorted
_
tags
,
'grouped_tags'
:
grouped_tags
})
## Bibliography
## Bibliography
output
(
output
(
...
...
generator/settings.py
View file @
fb35ef94
...
@@ -5,7 +5,7 @@ MENU_ITEMS = [
...
@@ -5,7 +5,7 @@ MENU_ITEMS = [
(
'Produsers'
,
'produsers.html'
),
(
'Produsers'
,
'produsers.html'
),
# ('Bibliography', 'bibliography.html' ),
# ('Bibliography', 'bibliography.html' ),
# ('Related Projects', 'external-projects.html'),
# ('Related Projects', 'external-projects.html'),
#
('Tags', 'tags.html' ),
(
'Tags'
,
'tags.html'
),
# ('Contact', 'pages/contact.html')
# ('Contact', 'pages/contact.html')
]
]
...
...
generator/templates/produser.html
View file @
fb35ef94
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
{% endif %}
{% endif %}
{% if produser.notes %}
{% if produser.notes %}
<h2>
Notes
</h2>
<h2>
Notes
</h2>
<ul>
<ul
class=
"simplelist"
>
{% for note in produser.notes.targets %}
{% for note in produser.notes.targets %}
<li>
<li>
<a
href=
"{{ note.link }}"
class=
"note"
>
{{ note }}
</a>
<a
href=
"{{ note.link }}"
class=
"note"
>
{{ note }}
</a>
...
...
generator/templates/static/styles.simple.css
View file @
fb35ef94
...
@@ -608,4 +608,35 @@ section.audio {
...
@@ -608,4 +608,35 @@ section.audio {
.trajectory-list
.trajectory--item
:nth-child
(
-n
+
2
)
{
.trajectory-list
.trajectory--item
:nth-child
(
-n
+
2
)
{
border-top
:
0px
;
border-top
:
0px
;
}
.taglist
{
column-width
:
12.5em
;
column-gap
:
1.5em
;
line-height
:
140%
;
list-style-type
:
none
;
margin
:
0
;
padding
:
0
;
}
.taglist
h3
{
margin-top
:
1em
;
}
.taglist
:first-child
h3
{
margin-top
:
0
;
}
.taglist
li
{
padding-left
:
.5em
;
position
:
relative
;
}
.taglist
li
:before
{
content
:
'-'
;
position
:
absolute
;
left
:
0em
;
margin-left
:
0
;
}
.taglist
li
.letter
{
padding-left
:
0
;
}
.taglist
li
.letter
:before
{
content
:
''
;
}
}
\ No newline at end of file
generator/templates/tags.html
View file @
fb35ef94
...
@@ -4,9 +4,12 @@
...
@@ -4,9 +4,12 @@
{% block content %}
{% block content %}
<h1>
Tags
</h1>
<h1>
Tags
</h1>
<ul>
<ul
class=
"taglist"
>
{% for tag in tags %}
{% for letter, tags in grouped_tags %}
<li><a
href=
"{{ tag.link }}"
>
{{ tag }} ({{ tag.link_count }})
</a></li>
<li
id=
"{{ letter }}"
class=
"letter"
><h3>
{{ letter|upper }}
</h3></li>
{% for tag in tags %}
<li><a
href=
"{{ tag.link }}"
>
{{ tag }}
({{ tag.link_count }})
</a></li>
{% endfor %}
{% endfor %}
{% endfor %}
</ul>
</ul>
{% endblock %}
{% endblock %}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment