split en and zh into 2 columns for assemblies

This commit is contained in:
imohkay 2021-10-28 16:00:36 +05:30
parent 21dab42524
commit 81d4df0b32
3 changed files with 32 additions and 11 deletions

View file

@ -67,6 +67,7 @@ main > .film {
max-width: 250px; max-width: 250px;
} }
.texts { .texts {
margin-top: var(--spacing-2); margin-top: var(--spacing-2);
margin-bottom: var(--spacing-2); margin-bottom: var(--spacing-2);

View file

@ -102,3 +102,17 @@ main > .about {
} }
} }
.assemblies {
&.row {
@media only screen and (max-width: 799px) {
flex-direction: column;
}
}
.col {
@media only screen and (min-width: 800px) {
width: 50%;
}
}
}

28
app/templates/texts.html Normal file → Executable file
View file

@ -3,17 +3,23 @@
{% block main %} {% block main %}
<div class="texts"> <div class="texts">
{% for text in en_texts %} <div class="assemblies">
<div class="text en"> <div class="col">
<h1><a href="{{ text.get_absolute_url }}">{{ text.title | safe }}</a></h1> {% for text in en_texts %}
<h2>{{ text.byline|striptags }}</h2> <div class="text en">
<h1><a href="{{ text.get_absolute_url }}">{{ text.title | safe }}</a></h1>
<h2>{{ text.byline|striptags }}</h2>
</div>
{% endfor %}
</div>
<div class="col">
{% for text in zh_texts %}
<div class="text zh">
<h1><a href="{{ text.get_absolute_url }}">{{ text.title | safe }}</a></h1>
<h2>{{ text.byline|striptags }}</h2>
</div>
{% endfor %}
</div>
</div> </div>
{% endfor %}
{% for text in zh_texts %}
<div class="text zh">
<h1><a href="{{ text.get_absolute_url }}">{{ text.title | safe }}</a></h1>
<h2>{{ text.byline|striptags }}</h2>
</div>
{% endfor %}
</div> </div>
{% endblock %} {% endblock %}