Skip to content

Commit

Permalink
🎉auto update by Gmeek action
Browse files Browse the repository at this point in the history
  • Loading branch information
TM0088 committed Apr 7, 2024
1 parent 555bb77 commit 2430436
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 65 deletions.
2 changes: 1 addition & 1 deletion blogBase.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"singlePage": [], "startSite": "", "filingNum": "", "onePageListNum": 15, "commentLabelColor": "#006b75", "yearColorList": ["#bc4c00", "#0969da", "#1f883d", "#A333D0"], "i18n": "CN", "themeMode": "manual", "dayTheme": "light", "nightTheme": "dark", "urlMode": "pinyin", "script": "", "style": "", "bottomText": "", "showPostSource": 1, "iconList": {}, "UTC": 8, "rssSplit": "sentence", "title": "Blog Title", "subTitle": "Blog description", "avatarUrl": "https://github.githubassets.com/favicons/favicon.svg", "GMEEK_VERSION": "last", "postListJson": {"P1": {"htmlDir": "docs/post/Label.html", "labels": ["good first issue"], "postTitle": "Label", "postUrl": "post/Label.html", "postSourceUrl": "https://github.com/TM0088/Gmeek-miniblog/issues/1", "commentNum": 0, "wordCount": 5, "description": "Label\u3002", "top": 0, "createdAt": 1711417468, "style": "", "script": "", "createdDate": "2024-03-26", "dateLabelColor": "#bc4c00"}, "P2": {"htmlDir": "docs/post/l.html", "labels": ["good first issue"], "postTitle": "l", "postUrl": "post/l.html", "postSourceUrl": "https://github.com/TM0088/Gmeek-miniblog/issues/2", "commentNum": 0, "wordCount": 1, "description": "l\u3002", "top": 0, "createdAt": 1711419966, "style": "", "script": "", "createdDate": "2024-03-26", "dateLabelColor": "#bc4c00"}}, "singeListJson": {}, "labelColorDict": {"bug": "#d73a4a", "documentation": "#0075ca", "duplicate": "#cfd3d7", "enhancement": "#a2eeef", "good first issue": "#7057ff", "help wanted": "#008672", "invalid": "#e4e669", "question": "#d876e3", "wontfix": "#ffffff"}, "displayTitle": "Blog Title", "faviconUrl": "https://github.githubassets.com/favicons/favicon.svg", "homeUrl": "https://TM0088.github.io/Gmeek-miniblog", "prevUrl": "disabled", "nextUrl": "disabled"}
{"singlePage": [], "startSite": "", "filingNum": "", "onePageListNum": 15, "commentLabelColor": "#006b75", "yearColorList": ["#bc4c00", "#0969da", "#1f883d", "#A333D0"], "i18n": "CN", "themeMode": "manual", "dayTheme": "light", "nightTheme": "dark", "urlMode": "pinyin", "script": "", "style": "", "bottomText": "", "showPostSource": 1, "iconList": {}, "UTC": 8, "rssSplit": "sentence", "exlink": {}, "title": "Blog Title", "subTitle": "Blog description", "avatarUrl": "https://github.githubassets.com/favicons/favicon.svg", "GMEEK_VERSION": "last", "postListJson": {"P1": {"htmlDir": "docs/post/Label.html", "labels": ["good first issue"], "postTitle": "Label", "postUrl": "post/Label.html", "postSourceUrl": "https://github.com/TM0088/Gmeek-miniblog/issues/1", "commentNum": 0, "wordCount": 5, "description": "Label\u3002", "top": 0, "createdAt": 1711417468, "style": "", "script": "", "createdDate": "2024-03-26", "dateLabelColor": "#bc4c00"}, "P2": {"htmlDir": "docs/post/l.html", "labels": ["good first issue"], "postTitle": "l", "postUrl": "post/l.html", "postSourceUrl": "https://github.com/TM0088/Gmeek-miniblog/issues/2", "commentNum": 0, "wordCount": 1, "description": "l\u3002", "top": 0, "createdAt": 1711419966, "style": "", "script": "", "createdDate": "2024-03-26", "dateLabelColor": "#bc4c00"}}, "singeListJson": {}, "labelColorDict": {"bug": "#d73a4a", "documentation": "#0075ca", "duplicate": "#cfd3d7", "enhancement": "#a2eeef", "good first issue": "#7057ff", "help wanted": "#008672", "invalid": "#e4e669", "question": "#d876e3", "wontfix": "#ffffff"}, "displayTitle": "Blog Title", "faviconUrl": "https://github.githubassets.com/favicons/favicon.svg", "homeUrl": "https://TM0088.github.io/Gmeek-miniblog", "prevUrl": "disabled", "nextUrl": "disabled"}
19 changes: 11 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

.SideNav{min-width: 360px;}
.SideNav-icon{margin-right: 16px}
.SideNav-item .Label{color: #fff;margin-left:8px;}
.SideNav-item .Label{color: #fff;margin-left:4px;}
.d-flex{min-width:0;}
.listTitle{overflow:hidden;white-space:nowrap;text-overflow: ellipsis;max-width: 100%;}
.listLabels{white-space:nowrap;}
.listLabels{white-space:nowrap;display:flex;}
.listLabels object{max-height:16px;max-width:24px;}

@media (max-width: 600px) {
Expand All @@ -51,22 +51,23 @@
<h1>
<img src="https://github.githubassets.com/favicons/favicon.svg" class="avatar circle" id="avatarImg" alt="avatar"><a class="blogTitle">Blog Title</a></h1>
<div class="title-right">
<a href="https://TM0088.github.io/Gmeek-miniblog/tag.html"><button id="buttonSearch" class="btn btn-invisible circle" title="搜索">
<a href="https://TM0088.github.io/Gmeek-miniblog/tag.html" id="buttonSearch" class="btn btn-invisible circle" title="搜索">
<svg class="octicon" width="16" height="16" >
<path id="pathSearch" fill-rule="evenodd"></path>
</svg>
</button></a>
</a>

<a href="https://TM0088.github.io/Gmeek-miniblog/rss.xml" target="_blank"><button id="buttonRSS" class="btn btn-invisible circle" title="RSS">

<a href="https://TM0088.github.io/Gmeek-miniblog/rss.xml" target="_blank" id="buttonRSS" class="btn btn-invisible circle" title="RSS">
<svg class="octicon" width="16" height="16" >
<path id="pathRSS" fill-rule="evenodd"></path>
</svg>
</button></a>
<button class="btn btn-invisible circle" onclick="modeSwitch()" title="切换主题">
</a>
<a class="btn btn-invisible circle" onclick="modeSwitch()" title="切换主题">
<svg class="octicon" width="16" height="16" >
<path id="themeSwitch" fill-rule="evenodd"></path>
</svg>
</button>
</a>
</div>
</div>
<div id="content">
Expand Down Expand Up @@ -161,6 +162,8 @@ <h1>
}




</script>


Expand Down
14 changes: 6 additions & 8 deletions docs/post/Label.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,24 @@
<div id="header">
<h1 class="postTitle">Label</h1>
<div class="title-right">

<a href="https://TM0088.github.io/Gmeek-miniblog"><button id="buttonHome" class="btn btn-invisible circle" title="首页">
<a href="https://TM0088.github.io/Gmeek-miniblog" id="buttonHome" class="btn btn-invisible circle" title="首页">
<svg class="octicon" width="16" height="16">
<path id="pathHome" fill-rule="evenodd"></path>
</svg>
</button></a>

</a>

<a href="https://github.com/TM0088/Gmeek-miniblog/issues/1" target="_blank"><button class="btn btn-invisible circle" title="Issue">
<a href="https://github.com/TM0088/Gmeek-miniblog/issues/1" target="_blank" class="btn btn-invisible circle" title="Issue">
<svg class="octicon" width="16" height="16">
<path id="pathIssue" fill-rule="evenodd"></path>
</svg>
</button></a>
</a>


<button class="btn btn-invisible circle" onclick="modeSwitch();" title="切换主题">
<a class="btn btn-invisible circle" onclick="modeSwitch();" title="切换主题">
<svg class="octicon" width="16" height="16" >
<path id="themeSwitch" fill-rule="evenodd"></path>
</svg>
</button>
</a>

</div>
</div>
Expand Down
14 changes: 6 additions & 8 deletions docs/post/l.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,24 @@
<div id="header">
<h1 class="postTitle">l</h1>
<div class="title-right">

<a href="https://TM0088.github.io/Gmeek-miniblog"><button id="buttonHome" class="btn btn-invisible circle" title="首页">
<a href="https://TM0088.github.io/Gmeek-miniblog" id="buttonHome" class="btn btn-invisible circle" title="首页">
<svg class="octicon" width="16" height="16">
<path id="pathHome" fill-rule="evenodd"></path>
</svg>
</button></a>

</a>

<a href="https://github.com/TM0088/Gmeek-miniblog/issues/2" target="_blank"><button class="btn btn-invisible circle" title="Issue">
<a href="https://github.com/TM0088/Gmeek-miniblog/issues/2" target="_blank" class="btn btn-invisible circle" title="Issue">
<svg class="octicon" width="16" height="16">
<path id="pathIssue" fill-rule="evenodd"></path>
</svg>
</button></a>
</a>


<button class="btn btn-invisible circle" onclick="modeSwitch();" title="切换主题">
<a class="btn btn-invisible circle" onclick="modeSwitch();" title="切换主题">
<svg class="octicon" width="16" height="16" >
<path id="themeSwitch" fill-rule="evenodd"></path>
</svg>
</button>
</a>

</div>
</div>
Expand Down
83 changes: 43 additions & 40 deletions docs/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
.subnav-search-input{width:160px;border-top-right-radius:0px;border-bottom-right-radius:0px;}
.subnav-search button{padding:5px 8px;border-top-left-radius:0px;border-bottom-left-radius:0px;}

.SideNav-icon{margin-right: 16px}
.Label{color: #fff;margin-left:8px;}
.SideNav-icon{margin-right:16px}
.Label{color: #fff;margin-left:4px;}
#taglabel .Label {margin-bottom:8px;}
.Counter{color:#fff;background-color:rgba(234, 238, 242, 0.5)}

.genTime{float: right;}
.d-flex{min-width:0;}
.listTitle{overflow:hidden;white-space:nowrap;text-overflow: ellipsis;max-width: 100%;}
Expand All @@ -55,20 +58,20 @@
<path id="searchSVG" fill-rule="evenodd"></path>
</svg>
</div>
<a href="https://TM0088.github.io/Gmeek-miniblog"><button id="buttonHome" class="btn btn-invisible circle" title="首页">
<a href="https://TM0088.github.io/Gmeek-miniblog" id="buttonHome" class="btn btn-invisible circle" title="首页">
<svg class="octicon" width="16" height="16">
<path id="pathHome" fill-rule="evenodd"></path>
</svg>
</button></a>
<button class="btn btn-invisible circle" onclick="modeSwitch()" title="切换主题">
</a>
<a class="btn btn-invisible circle" onclick="modeSwitch()" title="切换主题">
<svg class="octicon" width="16" height="16" >
<path id="themeSwitch" fill-rule="evenodd"></path>
</svg>
</button>
</a>
</div>
</div>
<div id="content">
<div id="tagLable" style="margin-bottom: 16px;"></div>
<div id="taglabel" style="margin-bottom:8px;"></div>
<nav class="SideNav"></nav>
<div class="notFind" style="display:none;font-size:24px;margin:8px;">Not Find</div>
</div>
Expand Down Expand Up @@ -127,6 +130,7 @@
document.getElementById("searchSVG").setAttribute("d",IconList["search"]);

tagList=[];
labelsCount={};
jsonData='';
let requestJson="postList.json"
let request=new XMLHttpRequest();
Expand All @@ -136,41 +140,40 @@
request.onload=function(){
jsonData=JSON.parse(request.response);
console.log(jsonData);
showList();
showList(labelsCount);
setClassDisplay(decodeURI(window.location.hash.slice(1)));
}

function showList(){
function showList(labelsCount){
let SideNav=document.getElementsByClassName("SideNav")[0];
SideNav.setAttribute("class","SideNav border");
let tagLable=document.getElementById("tagLable");

if(tagList.length==0){
let showLabels=document.createElement("button");
showLabels.setAttribute("class","Label");
showLabels.setAttribute("style","background-color:#000");
showLabels.innerHTML="All";
showLabels.setAttribute("onclick","javascript:updateShowTag('All');");
tagLable.appendChild(showLabels);
}
SideNav.classList.add("border");
let taglabel=document.getElementById("taglabel");

let labelsSet = new Set();
for(let key in jsonData) {
jsonData['labelColorDict']["All"]="#000";
labelsCount["All"]=0;
for (let key in jsonData) {
if (key !== 'labelColorDict' && Array.isArray(jsonData[key]['labels'])) {
labelsCount["All"]++;
for (let label of jsonData[key]['labels']) {
labelsSet.add(label);
labelsCount[label] = (labelsCount[label] || 0) + 1;
}
}
}
let labelsList = Array.from(labelsSet);
for(label of labelsList){

let sortedLabelsList = Object.keys(labelsCount).sort((a, b) => labelsCount[b] - labelsCount[a]);
for (let label of sortedLabelsList) {
tagList.push(label);
let showLabels=document.createElement("button");
showLabels.setAttribute("class","Label");
showLabels.setAttribute("style","background-color:"+jsonData['labelColorDict'][label]);
showLabels.innerHTML=label;
showLabels.setAttribute("onclick","javascript:updateShowTag('"+label+"');");
tagLable.appendChild(showLabels);
let showLabels = document.createElement("button");
showLabels.setAttribute("class", "Label");
showLabels.setAttribute("style", "background-color:" + jsonData['labelColorDict'][label]+";padding:4px;");
showLabels.innerHTML="&nbsp;&nbsp;"+label+" ";
showLabels.setAttribute("onclick", "javascript:updateShowTag('" + label + "');");

let LabelNum=document.createElement("span");
LabelNum.setAttribute("class","Counter");
LabelNum.innerHTML=labelsCount[label];
showLabels.appendChild(LabelNum);
taglabel.appendChild(showLabels);
}

for(i in jsonData){
Expand Down Expand Up @@ -229,29 +232,29 @@
}
}

function setClassDisplay(lable){
function setClassDisplay(label){
let lists = document.getElementsByClassName("lists");
let tagTitle = document.getElementsByClassName("tagTitle")[0];
tagTitle.innerHTML="Tag #"+lable;
document.title=lable+" - Blog Title";
tagTitle.innerHTML="Tag #"+label;
document.title=label+" - Blog Title";
document.getElementsByClassName("subnav-search-input")[0].value='';
if(lable=="All"){
if(label=="All"){
for(let i = 0; i < lists.length; i++){lists[i].style.display='block';}
document.getElementsByClassName("notFind")[0].style.display='none';
}
else if(tagList.indexOf(lable)!=-1){
else if(tagList.indexOf(label)!=-1){
for(let i = 0; i < lists.length; i++){
lists[i].style.display='none';
}

let lables = document.getElementsByClassName(lable);
for(let i = 0; i < lables.length; i++){
lables[i].style.display='block';
let labels = document.getElementsByClassName(label);
for(let i = 0; i < labels.length; i++){
labels[i].style.display='block';
}
document.getElementsByClassName("notFind")[0].style.display='none';
}
else{
document.getElementsByClassName("subnav-search-input")[0].value=lable;
document.getElementsByClassName("subnav-search-input")[0].value=label;
searchShow();
}
}
Expand Down

0 comments on commit 2430436

Please sign in to comment.