mxr612 27794895c9 feat: implement multilingual template support
- Updated app.py to dynamically load Jinja2 templates based on the detected language.
- Created new template files for English and Chinese, including base, index, list, scale, and result pages.
- Modified template rendering logic to utilize the appropriate language-specific templates based on user preferences.
2025-06-17 08:08:18 +08:00

24 lines
753 B
HTML

{% extends 'base.html' %}
{% block head_extra %}
<title>{{ scale.title }}</title>
{% endblock %}
{% block main %}
<h1>{{ scale.title }}</h1>
<div>
{{ scale.instructions|safe }}
</div>
<form class="scale" action="/scales/{{ scale_id }}" method="post">
{% for id, question in scale['items'].items() %}
<label for="{{ id }}">{{ id }}. {{ question }}</label>
<div class="scale-button">
{% for option, label in scale.options.items() %}
<input type="radio" id="{{ id }}_{{ option }}" name="{{ id }}" value="{{ option }}" required>
<label for="{{ id }}_{{ option }}" title="{{label}}">{{ option }}</label>
{% endfor %}
</div>
{% endfor %}
<input type="submit" value="提交">
</form>
{% endblock %}