Skip to content

Commit

Permalink
Fix Pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jan 27, 2024
1 parent 48497a7 commit eb22d5e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
Expand Down
7 changes: 5 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
from flask import Flask, render_template, request, send_from_directory
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
from flask_babel import Babel, gettext

from base import data, is_valid_key, get_translation

flask_app = Flask(__name__)
flask_app.config["SECRET_KEY"] = getenv("SECRET_KEY", "dev")

babel = Babel(flask_app)

page_lang = {
"zh_cn": {
"lang_name": "简体中文(中国大陆)",
Expand All @@ -32,8 +35,8 @@
class QueryForm(FlaskForm):
"""查询表单"""

source_string = StringField("查询的源字符串内容:")
submit = SubmitField("查询")
source_string = StringField(gettext("query_input_label"))
submit = SubmitField(gettext("query_button"))


@flask_app.route("/", methods=["GET", "POST"])
Expand Down
21 changes: 21 additions & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,27 @@ body {
height: auto;
}

/* 语言选单样式 */

.page-lang-selector {
position: fixed;
top: 10px;
left: 10px;
display: flex;
align-items: center;
}

.page-lang-selector label{
text-align: right;
}

.page-lang-selector select {
padding-top: .25em;
padding-bottom: .25em;
border: 1px solid #ccc;
border-radius: 5px;
}

/* 标题样式 */
.title {
font-family: 'Noto Serif CJK SC SemiBold', 'Source Han Serif SC SemiBold', '思源宋体 SemiBold', SimSun, 'Times New Roman', Times, serif;
Expand Down

0 comments on commit eb22d5e

Please sign in to comment.