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
2649cfbb
Commit
2649cfbb
authored
Jul 08, 2014
by
eric
Browse files
Make language available as metadata, encode the language as a class on the home-page list
parent
6d56b5d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
relearn/management/commands/index.py
View file @
2649cfbb
...
...
@@ -77,6 +77,7 @@ short_names = {
"http://purl.org/dc/terms/title"
:
"title"
,
"http://purl.org/dc/terms/creator"
:
"author"
,
"http://purl.org/dc/terms/created"
:
"date"
,
"http://purl.org/dc/terms/language"
:
"language"
,
}
def
query_results_to_template_articles
(
query_results
):
...
...
relearn/templates/home.html
View file @
2649cfbb
...
...
@@ -17,7 +17,7 @@
{% block content %}
<ul>
{% for article in articles %}
<li>
{{ article.author }}
<a
href=
"{{ article.href }}"
>
{{ article.title }}
</a></li>
<li
class=
"{{ article.language }}"
>
{{ article.author }}
<a
href=
"{{ article.href }}"
>
{{ article.title }}
</a></li>
{% endfor %}
</ul>
{% endblock %}
...
...
relearn/templates/pad-read.html
View file @
2649cfbb
...
...
@@ -23,7 +23,7 @@
{% block head_meta %}{% if meta %}
{% if meta.title %}
<meta
property=
"dc:title"
content=
"{{ meta.title|natural_join:'et' }}"
/>
{% endif %}
{% if meta.
titl
e %}
<meta
property=
"dc:
titl
e"
content=
"{{
meta.title|natural_join:'et' }}"
/>
{% endif %}
{% if meta.
language %}{% for language in meta.languag
e %}
<meta
property=
"dc:
languag
e"
content=
"{{
language|lower }}"
/>
{% endfor %}
{% endif %}
{% endif %}{% endblock %}
...
...
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