优化了list页面样式

This commit is contained in:
mxr612 2025-03-09 10:38:10 +00:00
parent e2199cfe5a
commit f817765913
3 changed files with 13 additions and 4 deletions

1
app.py
View File

@ -28,6 +28,7 @@ def load_all_scales():
scale = yaml.safe_load(f)
scale['instructions']=markdown.markdown(scale['instructions'], extensions=['fenced_code','tables','mdx_math'])
scale['descriptions']=markdown.markdown(scale['descriptions'], extensions=['fenced_code','tables','mdx_math'])
scale['abstract']=markdown.markdown(scale['abstract'], extensions=['fenced_code','tables','mdx_math'])
if 'tag' not in scale or scale['tag'] not in tagmap:
scale['tag']='other'
tags[scale['tag']]=tagmap[scale['tag']]

View File

@ -78,6 +78,14 @@ main {
margin: 0 auto;
}
.scale-list .title {
text-decoration: none;
font-weight: 700;
font-size: x-large;
transition: color 0.3s ease;
color: #34495e;
}
@media (max-width: 768px) {
nav {
.menu-toggle {

View File

@ -5,12 +5,12 @@
{% endblock %}
{% block main %}
<ul>
<div class="scale-list">
{% for scale_id, scale in scales.items() %}
{% if scale.tag == tag %}
<li><a href="/scales/{{ scale_id }}" , title=" {{ scale.abstract }}">{{ scale.get('title','未命名问卷') }}</a>
</li>
<a class="title" href="/scales/{{ scale_id }}">{{ scale.get('title','未命名问卷') }}</a>
<p>{{ scale.abstract }}</p>
{% endif %}
{% endfor %}
</ul>
</div>
{% endblock %}