Compare commits

...

10 Commits
v2.23 ... main

Author SHA1 Message Date
Meekdai 77a8aaa2b1 Update GmeekVercount.js 2026-02-05 13:27:12 +08:00
Meekdai 93dd93bd31 Update GmeekBSZ.js 2026-02-05 13:25:17 +08:00
Meekdai 50d14d40e7
Merge pull request #303 from MaxLHy0424/main
修复witdh拼写错误和页脚添加空格
2026-02-05 10:34:35 +08:00
MaxLHy0424 027908eda8
更正语法错误 2026-02-04 23:39:28 +08:00
MaxLHy0424 3626570590
fix bug 2026-02-04 23:29:47 +08:00
Meekdai ac556c5cba 修复评论按钮多次点击导致的BUG 2024-11-12 09:04:07 +08:00
Meekdai 35263fd99d 修改首页h1标签为div 2024-08-16 12:07:27 +08:00
Meekdai f7ea52be7f 修复关闭状态的issue编辑后会被抓取的BUG 2024-08-15 18:19:40 +08:00
Meekdai 8beb6d388a Update plist.html 2024-08-14 14:15:36 +08:00
Meekdai 9f02e2620b Update post.html 2024-08-11 22:17:33 +08:00
5 changed files with 23 additions and 19 deletions

View File

@ -16,9 +16,9 @@ from jinja2 import Environment, FileSystemLoader
from transliterate import translit from transliterate import translit
from collections import OrderedDict from collections import OrderedDict
###################################################################################### ######################################################################################
i18n={"Search":"Search","switchTheme":"switch theme","home":"home","comments":"comments","run":"run ","days":" days","Previous":"Previous","Next":"Next"} i18n={"Search":"Search","switchTheme":"switch theme","home":"home","comments":"comments","run":"run ","days":" day(s)","Previous":"Previous","Next":"Next"}
i18nCN={"Search":"搜索","switchTheme":"切换主题","home":"首页","comments":"评论","run":"网站运行","days":"","Previous":"上一页","Next":"下一页"} i18nCN={"Search":"搜索","switchTheme":"切换主题","home":"首页","comments":"评论","run":"网站运行 ","days":" ","Previous":"上一页","Next":"下一页"}
i18nRU={"Search":"Поиск","switchTheme": "Сменить тему","home":"Главная","comments":"Комментарии","run":"работает ","days":" дней","Previous":"Предыдущая","Next":"Следующая"} i18nRU={"Search":"Поиск","switchTheme": "Сменить тему","home":"Главная","comments":"Комментарии ","run":" работает ","days":" дней","Previous":"Предыдущая","Next":"Следующая"}
IconBase={ IconBase={
"post":"M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14H1.75A1.75 1.75 0 0 1 0 12.25Zm1.75-.25a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25ZM3.5 6.25a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75Zm.75 2.25h4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1 0-1.5Z", "post":"M0 3.75C0 2.784.784 2 1.75 2h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 14.25 14H1.75A1.75 1.75 0 0 1 0 12.25Zm1.75-.25a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25ZM3.5 6.25a.75.75 0 0 1 .75-.75h7a.75.75 0 0 1 0 1.5h-7a.75.75 0 0 1-.75-.75Zm.75 2.25h4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1 0-1.5Z",
"link":"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z", "link":"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z",
@ -422,11 +422,14 @@ class GMEEK():
def runOne(self,number_str): def runOne(self,number_str):
print("====== start create static html ======") print("====== start create static html ======")
issue=self.repo.get_issue(int(number_str)) issue=self.repo.get_issue(int(number_str))
listJsonName=self.addOnePostJson(issue) if issue.state == "open":
self.createPostHtml(self.blogBase[listJsonName]["P"+number_str]) listJsonName=self.addOnePostJson(issue)
self.createPlistHtml() self.createPostHtml(self.blogBase[listJsonName]["P"+number_str])
self.createFeedXml() self.createPlistHtml()
print("====== create static html end ======") self.createFeedXml()
print("====== create static html end ======")
else:
print("====== issue is closed ======")
def createFileName(self,issue,useLabel=False): def createFileName(self,issue,useLabel=False):
if useLabel==True: if useLabel==True:

View File

@ -1,10 +1,10 @@
function createBSZ() { function createBSZ() {
var postBody = document.getElementById('postBody'); var postBody = document.getElementById('postBody');
if (postBody){ if (postBody){
postBody.insertAdjacentHTML('afterend','<div id="busuanzi_container_page_pv" style="display:none;float:left;margin-top:8px;font-size:small;">本文浏览量<span id="busuanzi_value_page_pv"></span>次</div>'); postBody.insertAdjacentHTML('afterend','<div id="busuanzi_container_page_pv" style="display:none;float:left;margin-top:8px;font-size:small;">本文浏览量 <span id="busuanzi_value_page_pv"></span> 次</div>');
} }
var runday = document.getElementById('runday'); var runday = document.getElementById('runday');
runday.insertAdjacentHTML('afterend', '<div id="busuanzi_container_site_pv" style="display:none;">总浏览量<span id="busuanzi_value_site_pv"></span>次 • </div>'); runday.insertAdjacentHTML('afterend', '<div id="busuanzi_container_site_pv" style="display:none;">总浏览量 <span id="busuanzi_value_site_pv"></span> 次 • </div>');
} }
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {

View File

@ -1,10 +1,10 @@
function createVercount() { function createVercount() {
var postBody = document.getElementById('postBody'); var postBody = document.getElementById('postBody');
if (postBody){ if (postBody){
postBody.insertAdjacentHTML('afterend','<div id="busuanzi_container_page_pv" style="display:none;float:left;margin-top:8px;font-size:small;">本文浏览量<span id="busuanzi_value_page_pv"></span>次</div>'); postBody.insertAdjacentHTML('afterend','<div id="busuanzi_container_page_pv" style="display:none;float:left;margin-top:8px;font-size:small;">本文浏览量 <span id="busuanzi_value_page_pv"></span> 次</div>');
} }
var runday = document.getElementById('runday'); var runday = document.getElementById('runday');
runday.insertAdjacentHTML('afterend', '<span id="busuanzi_container_site_pv" style="display:none">总浏览量<span id="busuanzi_value_site_pv"></span>次 • </span>'); runday.insertAdjacentHTML('afterend', '<span id="busuanzi_container_site_pv" style="display:none">总浏览量 <span id="busuanzi_value_site_pv"></span> 次 • </span>');
} }
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {

View File

@ -13,7 +13,7 @@
<style> <style>
.avatar {transition: 0.8s;width:64px;height:64px;object-fit: cover;} .avatar {transition: 0.8s;width:64px;height:64px;object-fit: cover;}
.avatar:hover{transform: scale(1.15) rotate(360deg);} .avatar:hover{transform: scale(1.15) rotate(360deg);}
#header h1 a{color:inherit;text-decoration:none;vertical-align: bottom;font-size:40px;font-family:Monaco;margin-left:8px;} .title-left a{color:inherit;text-decoration:none;vertical-align: bottom;font-size:40px;font-weight: bold;font-family:Monaco;margin-left:8px;}
.title-right{display:flex;margin:auto 0 0 auto;} .title-right{display:flex;margin:auto 0 0 auto;}
.title-right button{margin-right:8px;padding:16px;} .title-right button{margin-right:8px;padding:16px;}
.title-right .circle{padding: 14px 16px;} .title-right .circle{padding: 14px 16px;}
@ -38,14 +38,14 @@
{% endblock %} {% endblock %}
{% block header %} {% block header %}
<h1> <div class="title-left">
<img src="{{ blogBase['avatarUrl'] }}" class="avatar circle" id="avatarImg" alt="avatar"> <img src="{{ blogBase['avatarUrl'] }}" class="avatar circle" id="avatarImg" alt="avatar">
{%- if blogBase['displayTitle']=='eekdai' -%} {%- if blogBase['displayTitle']=='Meekdai' -%}
<a class="blogTitle" href="https://meekdai.com">{{ blogBase['displayTitle'] }}</a> <a class="blogTitle" href="https://meekdai.com"><span style="font-size:0;">M</span>eekdai</a>
{% else -%} {% else -%}
<a class="blogTitle">{{ blogBase['displayTitle'] }}</a> <a class="blogTitle">{{ blogBase['displayTitle'] }}</a>
{%- endif -%} {%- endif -%}
</h1> </div>
<div class="title-right"> <div class="title-right">
<a href="{{ blogBase['homeUrl'] }}/tag.html" id="buttonSearch" class="btn btn-invisible circle" title="{{ i18n['Search'] }}"> <a href="{{ blogBase['homeUrl'] }}/tag.html" id="buttonSearch" class="btn btn-invisible circle" title="{{ i18n['Search'] }}">
<svg class="octicon" width="16" height="16" > <svg class="octicon" width="16" height="16" >
@ -85,7 +85,7 @@
{% for num in postListJson -%} {% for num in postListJson -%}
<a class="SideNav-item d-flex flex-items-center flex-justify-between" href="{{ postListJson[num]['postUrl']|e }}"> <a class="SideNav-item d-flex flex-items-center flex-justify-between" href="{{ postListJson[num]['postUrl']|e }}">
<div class="d-flex flex-items-center"> <div class="d-flex flex-items-center">
<svg class="SideNav-icon octicon" style="witdh:16px;height:16px"><path class="svgTop{{ postListJson[num]['top'] }}" d=""></path> <svg class="SideNav-icon octicon" style="width:16px;height:16px"><path class="svgTop{{ postListJson[num]['top'] }}" d=""></path>
</svg> </svg>
<span class="listTitle">{{ postListJson[num]['postTitle']|e }}</span> <span class="listTitle">{{ postListJson[num]['postTitle']|e }}</span>
</div> </div>

View File

@ -79,7 +79,7 @@
{% block script %} {% block script %}
<script> <script>
document.getElementById("pathHome").setAttribute("d",IconList["home"]); document.getElementById("pathHome").setAttribute("d",IconList["home"]);
document.getElementById("pathIssue").setAttribute("d",IconList["github"]); {% if blogBase['showPostSource']==1 %}document.getElementById("pathIssue").setAttribute("d",IconList["github"]);{% endif %}
{% if blogBase['commentNum']>0 -%} {% if blogBase['commentNum']>0 -%}
cmButton=document.getElementById("cmButton"); cmButton=document.getElementById("cmButton");
span=document.createElement("span"); span=document.createElement("span");
@ -92,6 +92,7 @@ document.getElementById("pathIssue").setAttribute("d",IconList["github"]);
function openComments(){ function openComments(){
cm=document.getElementById("comments"); cm=document.getElementById("comments");
cmButton=document.getElementById("cmButton"); cmButton=document.getElementById("cmButton");
cmButton.disabled=true;
cmButton.innerHTML="loading"; cmButton.innerHTML="loading";
span=document.createElement("span"); span=document.createElement("span");
span.setAttribute("class","AnimatedEllipsis"); span.setAttribute("class","AnimatedEllipsis");