浏览代码

feat: logo保存到本地

SongZihuan 2 年之前
父节点
当前提交
75aa085358
共有 3 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      .gitignore
  2. 1 0
      configure/__init__.py
  3. 1 1
      templates/base.html

+ 2 - 1
.gitignore

@@ -139,4 +139,5 @@ dmypy.json
 # Cython debug symbols
 cython_debug/
 
-etc
+etc
+static/logo.jpg

+ 1 - 0
configure/__init__.py

@@ -34,6 +34,7 @@ conf = {
                   "%(message)s",
     "LOG_LEVEL": logging.INFO,
     "LOG_STDERR": True,
+    "LOGO": "logo.jpg",
 }
 
 

+ 1 - 1
templates/base.html

@@ -7,7 +7,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 
     {% block icon %}
-        <link rel="icon" href="{{ url_for('oss.get_page', name="/hblog/logo.jpg") }}" type="image/x-icon"/>
+        <link rel="icon" href="{{ url_for('static', filename=conf["LOGO"]) }}" type="image/x-icon"/>
     {% endblock %}
 
     {% block font %}