Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Constance Lavinia Dami
ProjetPetitPrince
Commits
d351bfc9
Commit
d351bfc9
authored
May 15, 2020
by
ConstiDami
Browse files
fix
parent
8bb7ebdf
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Prince2020/prince/prince.db
View file @
d351bfc9
No preview for this file type
Prince2020/prince/prince.sql
View file @
d351bfc9
This diff is collapsed.
Click to expand it.
Prince2020/prince/templates/langue.html
View file @
d351bfc9
{% extends "layout.html" %}
{% block content %}
<h1>
Langue : {{title}}
</h1>
{% set page_title = sentence_case(title)%}
{% if langue.english != '' %}
{% set page_title = page_title + ' - ' + sentence_case(langue.english)|safe %}
{% endif %}
{% if langue.self != '' %}
{% set page_title = page_title + ' - ' + sentence_case(langue.self)%}
{% endif %}
<!-- Printing the name of the language with the first letter capitalized -->
<
p
>
{{
langue.english|capitalize|saf
e}}
<
br
>
{{langue.self|capitalize}}
</p>
<
h2
>
{{
page_titl
e}}
<
/h2
>
<!-- If an image of the text is available, displays it -->
{% if langue.imgtext != '' %}
...
...
@@ -17,10 +25,9 @@
<div
class=
"column_langue"
>
<!-- If there is at least one recording in this language, displays the list of recordings -->
{% if sounds.first() is not none %}
<p><b>
Liste des enregistrements
</b></p>
{% for sound in sounds %}
<audio
controls
src=
"{{ url_for('static', filename='audio/') }}{{sound.filename}}"
>
Your browser does not support the
<code>
audio
</code>
element.
</audio>
{{sound.date}}
<br>
<audio
controls
src=
"{{ url_for('static', filename='audio/') }}{{sound.filename}}"
controlsList=
"nodownload"
>
Your browser does not support the
<code>
audio
</code>
element.
</audio>
<!--
{{sound.date}}
-->
<br>
{% endfor %}
<br>
{% endif %}
...
...
Prince2020/prince/templates/layout.html
View file @
d351bfc9
...
...
@@ -40,6 +40,10 @@
</nav>
</header>
<main
role=
"main"
class=
"container"
>
{% macro sentence_case(text) %}
{{ text[0]|upper}}{{text[1:] }}
{% endmacro %}
{% block content %}{% endblock %}
</main>
<!-- Footer -->
...
...
Prince2020/prince/templates/liste_langues.html
View file @
d351bfc9
{% extends "layout.html" %}
{% block content %}
<h1>
Liste des langues
</h1>
<!-- Sorting by alphabetical order in french -->
...
...
@@ -23,19 +24,19 @@
<div
class=
"col-sm-3 col1"
>
<!-- liste_lang[i] refers to the current language -->
<!-- Displays also the number of recordings for this current language -->
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i].french}}"
>
{{liste_lang[i].french
|capitalize
}} ({{sounds|selectattr("language", "equalto", liste_lang[i].iso)|list|length}})
</a>
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i].french}}"
>
{{
sentence_case(
liste_lang[i].french
)
}} ({{sounds|selectattr("language", "equalto", liste_lang[i].iso)|list|length}})
</a>
</div>
<div
class=
"col-sm-3 col2"
>
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i+nb_par_col].french}}"
>
{{liste_lang[i+nb_par_col].french
|capitalize
}} ({{sounds|selectattr("language", "equalto", liste_lang[i+nb_par_col].iso)|list|length}})
</a>
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i+nb_par_col].french}}"
>
{{
sentence_case(
liste_lang[i+nb_par_col].french
)
}} ({{sounds|selectattr("language", "equalto", liste_lang[i+nb_par_col].iso)|list|length}})
</a>
</div>
<div
class=
"col-sm-3 col3"
>
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i+2*nb_par_col].french}}"
>
{{liste_lang[i+2*nb_par_col].french
|capitalize
}} ({{sounds|selectattr("language", "equalto", liste_lang[i+2*nb_par_col].iso)|list|length}})
</a>
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i+2*nb_par_col].french}}"
>
{{
sentence_case(
liste_lang[i+2*nb_par_col].french
)
}} ({{sounds|selectattr("language", "equalto", liste_lang[i+2*nb_par_col].iso)|list|length}})
</a>
</div>
<!-- Makes sure that the index isn't out of range (deals with the last rows,
when there isn't a fourth column to display) -->
{% if i+3*nb_par_col
<
liste_lang
|
length
%}
<
div
class=
"col-sm-3 col4"
>
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i+3*nb_par_col].french}}"
>
{{liste_lang[i+3*nb_par_col].french
|capitalize
}} ({{sounds|selectattr("language", "equalto", liste_lang[i+3*nb_par_col].iso)|list|length}})
</a>
<a
href=
"/projet_19-20/petit_prince/langue/{{liste_lang[i+3*nb_par_col].french}}"
>
{{
sentence_case(
liste_lang[i+3*nb_par_col].french
)
}} ({{sounds|selectattr("language", "equalto", liste_lang[i+3*nb_par_col].iso)|list|length}})
</a>
</div>
{% endif %}
<!-- Closing the row and opening a new one -->
...
...
@@ -51,7 +52,7 @@
{%for langue in liste_lang%}
<div
class=
"col-sm phone_lang"
>
<!-- Displays also the number of recordings for this current language -->
<a
href=
"/projet_19-20/petit_prince/langue/{{langue.french}}"
>
{{langue.french
|capitalize
}} ({{sounds|selectattr("language", "equalto", langue.iso)|list|length}})
</a>
<a
href=
"/projet_19-20/petit_prince/langue/{{langue.french}}"
>
{{
sentence_case(
langue.french
)
}} ({{sounds|selectattr("language", "equalto", langue.iso)|list|length}})
</a>
</div>
{% endfor %}
<br>
...
...
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