From fa2c0af4ec4be90b307593b3b218c6e4dc45be5c Mon Sep 17 00:00:00 2001 From: mxr612 Date: Sun, 9 Mar 2025 03:39:10 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=E7=BB=93=E6=9E=9C=E9=A1=B5=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/styles.css | 48 ++++++++++++++++++++++++------------------- templates/result.html | 2 +- templates/scale.html | 2 +- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/static/styles.css b/static/styles.css index 6f1eae1..1130fbe 100644 --- a/static/styles.css +++ b/static/styles.css @@ -35,30 +35,36 @@ main { } } -/* 定义单选按钮容器样式 */ -.scale-button { - display: flex; - /* 按钮之间的间距 */ -} +.scale { + .scale-button { + display: flex; -/* 定义单选按钮隐藏样式 */ -.scale-button input[type="radio"] { - display: none; -} + input[type="radio"] { + display: none; + } -/* 定义单选按钮标签样式 */ -.scale-button label { - flex-grow: 1; - padding: 10px 0px; - cursor: pointer; - text-align: center; - border: 3px solid #ffffff00; -} + label { + flex-grow: 1; + padding: 10px 0px; + cursor: pointer; + text-align: center; + border: 3px solid #ffffff00; + } -/* 定义单选按钮选中时标签样式 */ -.scale-button input[type="radio"]:checked+label { - border: 3px solid #909090; - border-radius: 20px; + input[type="radio"]:checked+label { + border: 3px solid #909090; + border-radius: 20px; + } + } + + input[type="submit"] { + background-color: #000000; + color: rgb(255, 255, 255); + padding: 10px 20px; + border: none; + border-radius: 4px; + cursor: pointer; + } } /* 导航栏样式 */ diff --git a/templates/result.html b/templates/result.html index b0507df..6c6b9d5 100644 --- a/templates/result.html +++ b/templates/result.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block head_extra %} -{{scale_title}} +{{scale.title}} {% endblock %} {% block main %} diff --git a/templates/scale.html b/templates/scale.html index c5bfeca..6d42bc2 100644 --- a/templates/scale.html +++ b/templates/scale.html @@ -9,7 +9,7 @@
{{ scale.instructions|safe }}
-
+ {% for id, question in scale.questions.items() %}