Currently moving from Gitlab to Gitea at https://labs.phundrak.com. Some features may not work anymore on this Gitlab instance.

styling for language's word list

parent b6a778d3
Pipeline #124 passed with stage
in 2 minutes and 44 seconds
content {
margin: 0 10px 10px 10px;
display: grid;
grid-template-columns: auto;
grid-template-rows: 100px auto;
......
content {
}
.wordblock {
text-decoration: none;
margin: 40px;
padding: 20px;
display: grid;
grid-template-areas:
'word word'
'wclass gender'
'translation translation';
background: #343131;
color: #fcfcfc;
box-shadow: 5px 5px 10px #000;
}
word {
margin: 10px;
grid-area: word;
font-size: 2em;
}
wclass {
grid-area: wclass;
}
gender {
grid-area: gender;
}
.translations {
grid-area: translation;
list-style: none;
}
.translations::before {
content: "Translations:";
}
li {
margin: 10px;
}
......@@ -14,9 +14,7 @@ body {
overflow: auto;
height: 100vh;
grid-template-columns: 300px auto;
grid-template-rows: 90px auto;
grid-template-areas:
'sidebar errormessage'
'sidebar content';
color: #404040;
}
......@@ -45,16 +43,16 @@ sidebar {
}
content {
margin: 10px;
grid-area: content;
}
errormessage, content {
content {
max-width: 900px;
background-color: #fcfcfc;
}
errormessage {
grid-area: errormessage;
margin: 10px 10px 0px 10px;
color: red;
text-align: center;
font-size: 1.5em;
......
......@@ -11,14 +11,13 @@
</head>
<body>
<sidebar>{% block sidebarcontent %}{% endblock %}</sidebar>
<content>
<errormessage>
{% if error_message %}
<p><strong>{{ error_message }}</strong></p>
{% endif %}
</errormessage>
<sidebar></sidebar>
<content>
{% block body %}
{% endblock %}
</content>
......
......@@ -4,32 +4,22 @@
{% block title %}{{from_lang.name}} -> {{to_lang.name}}{% endblock %}
{% block addhead %}
<link rel="stylesheet" href="{% static 'dictionary/language.css'" type="text/css" media="screen" />
<link rel="stylesheet" href="{% static 'dictionary/language.css' %}" type="text/css" media="screen" />
{% endblock %}
{% block body %}
<wordlist>
{% for word in words %}
<!-- <wordblock> -->
<!-- <word>{{word.word}}</word> -->
<!-- <grammar> -->
<!-- <wclass>{{word.wordclass}}</wclass> -->
<!-- <gender>{{word.gender}}</gender> -->
<!-- </grammar> -->
<!-- {% for trans in word.translation.all %} -->
<!-- <translation>{{trans}} ({{trans.language.name}})</translation> -->
<!-- {% endfor %} -->
<!-- </wordblock> -->
<a href="{% url 'dictionary:details' from_lang.code to_lang.code word.slug %}" class="wordblock">
<word>{{word.word}}</word>
<grammar>
<wclass>{{word.wordclass}}</wclass>
<gender>{{word.gender}}</gender>
</grammar>
<ul class="translations">
{% for trans in word.translation.all %}
<translation>{{trans}} ({{trans.language.name}})</translation>
<li>{{trans}} ({{trans.language.name}})</li>
{% endfor %}
</ul>
</a>
{% endfor %}
</wordlist>
......
Markdown is supported
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