Commit 3ce01cd3 authored by Naoeltanuki's avatar Naoeltanuki
Browse files
parents a964a626 5c4d4149
......@@ -150,7 +150,13 @@ a:hover{
height:30px;
width:25px;
}
/*liste_langues*/
.computer_lang{
visibility: visible;
}
.phone_lang{
display:none;
}
/*langue*/
.column_langue {
float: left;
......@@ -169,7 +175,7 @@ a:hover{
height: 400px;
width: 400px;
}
@media screen and (max-width:768px) {
@media screen and (max-width:580px) {
.row_home{
display:grid;
}
......@@ -192,4 +198,10 @@ a:hover{
.info-legend{
visibility:hidden;
}
.phone_lang{
display: block;
}
.computer_lang{
display:none;
}
}
......@@ -4,14 +4,7 @@
<!-- Sorting by alphabetical order in french -->
{% set liste_lang = prince_language|list|sort(attribute='french')%}
{% set phone = False %}
<script type="text/javascript">
if (screen.width < '500') {
{% set phone = True %}
}
</script>
{% if not phone %}
<!-- Defines the number of languages to display by column, in order to know the range of the loop for -->
{% set nb_par_col = liste_lang|length//4 %}
......@@ -23,24 +16,24 @@
{% endif %}
<!-- Setting of a table with 4 columns -->
<div class="container-fluid computer_lang">
<div class="row">
<div class="row computer_lang">
{% for i in range(nb_par_col) %}
<div class="col-sm-3">
<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>
</div>
<div class="col-sm-3">
<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>
</div>
<div class="col-sm-3">
<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>
</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">
<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>
</div>
{% endif %}
......@@ -51,15 +44,15 @@
<!-- Closing the last row -->
</div>
</div>
{% else %}
<div class="container-fluid phone_lang">
{%for langue in liste_lang%}
<div class="col-sm">
<div class="col-sm phone_lang">
<!-- 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/{{langue.french}}">{{langue.french|capitalize}} ({{sounds|selectattr("language", "equalto", langue.iso)|list|length}})</a>
</div>
{% endfor %}
<br>
</div>
{% endif %}
{% endblock content%}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment