Browse Source

Writed Tags's function & modified css

pull/8/head
186526 1 year ago
parent
commit
a183a377c6
6 changed files with 82 additions and 27 deletions
  1. 2
      src/js/main-min.js
  2. 8
      src/js/main.js
  3. 2
      theme/classic/src/intro-min.js
  4. 50
      theme/classic/src/intro.js
  5. 2
      theme/classic/src/main-min.css
  6. 45
      theme/classic/src/main.css

2
src/js/main-min.js

@ -1 +1 @@
function blogging_info(t){console.log("%c Blogging %c "+t+" %c", "background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color:#fff", "background:#41b883 ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff" ,"background: transparent");}function whenAvailable(t,e){window.setTimeout((function(){window[t]?e(window[t]):window.setTimeout(arguments.callee,100)}),100)}function getpar(t){for(var e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var s=e[n].split("=");if(s[0]==t&&null==s[1])return!0;if(s[0]==t)return s[1]}return!1}if(getpar("p"))settings={par:"p"};else if(getpar("url"))var settings={par:"url"};else if(getpar("page"))var settings={par:"page"};else window.location.search="?page=home";let t="/";var comment,config,mdcontent;for(let e of window.location.pathname.split("/").slice(1,-1))t=t+e+"/";settings.domain=window.location.protocol+"//"+window.location.host+t,blogging_info("init Blogging ..."),fetch("config.json").then(t=>{if(t.status>=200&&t.status<300)return blogging_info("Load config"),t;document.all[0].innerHTML="<h1>Error fetch config.json<br>Status Code="+t.status+"</h1>"}).then(t=>t.json()).then((function(t){for(i in config=t,settings.themeUrl=settings.domain+config.file.theme+config.theme+"/",settings.post=settings.domain+config.file.post,config.comment.config)comment=config.comment.config[i]})).then(t=>{a=document.createElement("link"),a.rel="prefetch","page"===settings.par?a.href=settings.themeUrl+"html/"+getpar(settings.par)+".html":"url"!==settings.par&&"p"!==settings.par||(a.href=settings.themeUrl+"html/200.html"),document.head.append(a)}).then((function(){blogging_info("Load Plugin who loadtime = init");for(let t in config.plugins)if("init"==config.plugins[t].loadtime){blogging_info("Load "+config.plugins[t].name+" with defer enabled "+config.plugins[t].defer);for(let e in config.plugins[t].depend){let n=document.createElement("script");n.src=config.plugins[t].depend[e],document.head.append(n)}let e=document.createElement("script");e.src=config.plugins[t].script,config.plugins[t].defer&&(e.defer=!0),document.head.append(e)}})).then(()=>{whenAvailable("markdownrender",()=>(blogging_info("Markdown Render Load finish"),114514))}).then((function(){"url"===settings.par?(blogging_info("Load post"),settings.content={url:decodeURIComponent(getpar(settings.par))},fetch(settings.content.url).then(t=>{if(settings.content.status=t.status,settings.date=new Date,t.status>=200&&t.status<300)return t;fetch(settings.themeUrl+"html/404.html").then(t=>t.text()).then((function(t){settings.content.success=!1,settings.content.preview={response:null,mdcontent:null},document.write(t)}))}).then(t=>t.text()).then(t=>(settings.content.preview={response:t},settings.content.preview.mdcontent=marked(t),markdownrender(t))).then(t=>{fetch(settings.themeUrl+"html/200.html").then(t=>t.text()).then((function(t){settings.content.success=!0,document.write(t)}))}).catch((function(t){return settings.content.preview.mdcontent=t.message,document.write(t.message),t.message}))):"p"===settings.par?(blogging_info("Load post"),settings.content={url:decodeURIComponent(settings.post+getpar(settings.par)+".md")},fetch(settings.content.url).then(t=>{if(settings.content.status=t.status,settings.date=new Date,t.status>=200&&t.status<300)return t;fetch(settings.themeUrl+"html/404.html").then(t=>t.text()).then((function(t){settings.content.success=!1,settings.content.preview={response:null,mdcontent:null},document.write(t)}))}).then(t=>t.text()).then(t=>(settings.content.preview={response:t},settings.content.preview.mdcontent=marked(t),markdownrender(t))).then(t=>{fetch(settings.themeUrl+"html/200.html").then(t=>t.text()).then((function(t){settings.content.success=!0,document.write(t)}))}).catch((function(t){return settings.content.preview.mdcontent=t.message,document.write(t.message),t.message}))):"page"===settings.par&&(blogging_info("geting page"),settings.content={url:settings.themeUrl+"html/"+getpar(settings.par)+".html"},fetch(settings.content.url).then(t=>{if(settings.content.status=t.status,settings.date=new Date,t.status>=200&&t.status<300)return t;fetch(settings.themeUrl+"html/404.html").then(t=>t.text()).then((function(t){settings.content.success=!1,settings.content.preview={response:null,mdcontent:null},document.write(t)}))}).then(t=>t.text()).then(t=>{settings.content.success=!0,settings.content.preview={response:t},document.write(t)}))})).then((function(){blogging_info("rendering content")}));
function blogging_info(t){console.log("%c Blogging %c "+t+" %c", "background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color:#fff", "background:#41b883 ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff" ,"background: transparent");}function whenAvailable(t,e){window.setTimeout((function(){window[t]?e(window[t]):window.setTimeout(arguments.callee,100)}),100)}function getpar(t){for(var e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var s=e[n].split("=");if(s[0]==t&&null==s[1])return!0;if(s[0]==t)return s[1]}return!1}if(getpar("p"))settings={par:"p"};else if(getpar("url"))var settings={par:"url"};else if(getpar("page"))var settings={par:"page"};else window.location.search="?page=home";let t="/";var comment,config,mdcontent;for(let e of window.location.pathname.split("/").slice(1,-1))t=t+e+"/";settings.domain=window.location.protocol+"//"+window.location.host+t,blogging_info("init Blogging ..."),fetch("config.json").then(t=>{if(t.status>=200&&t.status<300)return blogging_info("Load config"),t;document.all[0].innerHTML="<h1>Error fetch config.json<br>Status Code="+t.status+"</h1>"}).then(t=>t.json()).then(t=>{for(i in config=t,settings.themeUrl=settings.domain+config.file.theme+config.theme+"/",settings.post=settings.domain+config.file.post,config.comment.config)comment=config.comment.config[i]}).then(t=>{a=document.createElement("link"),a.rel="prefetch","page"===settings.par?a.href=settings.themeUrl+"html/"+getpar(settings.par)+".html":"url"!==settings.par&&"p"!==settings.par||(a.href=settings.themeUrl+"html/200.html"),document.head.append(a)}).then(()=>{blogging_info("Load Plugin who loadtime = init");for(let t in config.plugins)if("init"==config.plugins[t].loadtime){blogging_info("Load "+config.plugins[t].name+" with defer enabled "+config.plugins[t].defer);for(let e in config.plugins[t].depend){let n=document.createElement("script");n.src=config.plugins[t].depend[e],document.head.append(n)}let e=document.createElement("script");e.src=config.plugins[t].script,config.plugins[t].defer&&(e.defer=!0),document.head.append(e)}}).then(()=>{whenAvailable("markdownrender",()=>(blogging_info("Markdown Render Load finish"),114514))}).then((function(){"url"===settings.par?(blogging_info("Load post"),settings.content={url:decodeURIComponent(getpar(settings.par))},fetch(settings.content.url).then(t=>{if(settings.content.status=t.status,settings.date=new Date,t.status>=200&&t.status<300)return t;fetch(settings.themeUrl+"html/404.html").then(t=>t.text()).then((function(t){settings.content.success=!1,settings.content.preview={response:null,mdcontent:null},document.write(t)}))}).then(t=>t.text()).then(t=>(settings.content.preview={response:t},settings.content.preview.mdcontent=marked(t),markdownrender(t))).then(t=>{fetch(settings.themeUrl+"html/200.html").then(t=>t.text()).then((function(t){settings.content.success=!0,document.write(t)}))}).catch(t=>(settings.content.preview.mdcontent=t.message,document.write(t.message),t.message))):"p"===settings.par?(blogging_info("Load post"),settings.content={url:decodeURIComponent(settings.post+getpar(settings.par)+".md")},fetch(settings.content.url).then(t=>{if(settings.content.status=t.status,settings.date=new Date,t.status>=200&&t.status<300)return t;fetch(settings.themeUrl+"html/404.html").then(t=>t.text()).then((function(t){settings.content.success=!1,settings.content.preview={response:null,mdcontent:null},document.write(t)}))}).then(t=>t.text()).then(t=>(settings.content.preview={response:t},settings.content.preview.mdcontent=marked(t),markdownrender(t))).then(t=>{fetch(settings.themeUrl+"html/200.html").then(t=>t.text()).then((function(t){settings.content.success=!0,document.write(t)}))}).catch((function(t){return settings.content.preview.mdcontent=t.message,document.write(t.message),t.message}))):"page"===settings.par&&(blogging_info("geting page"),settings.content={url:settings.themeUrl+"html/"+getpar(settings.par)+".html"},fetch(settings.content.url).then(t=>{if(settings.content.status=t.status,settings.date=new Date,t.status>=200&&t.status<300)return t;fetch(settings.themeUrl+"html/404.html").then(t=>t.text()).then((function(t){settings.content.success=!1,settings.content.preview={response:null,mdcontent:null},document.write(t)}))}).then(t=>t.text()).then(t=>{settings.content.success=!0,settings.content.preview={response:t},document.write(t)}))})).then(()=>{blogging_info("rendering content")});

8
src/js/main.js

@ -60,7 +60,7 @@ fetch("config.json")
}
})
.then((res) => res.json())
.then(function (resconfig) {
.then((resconfig)=>{
config = resconfig;
settings.themeUrl =
settings.domain + config.file.theme + config.theme + "/";
@ -79,7 +79,7 @@ fetch("config.json")
}
document.head.append(a);
})
.then(function () {
.then(()=>{
blogging_info("Load Plugin who loadtime = init");
for (let i in config.plugins) {
if (config.plugins[i].loadtime == "init") {
@ -147,7 +147,7 @@ fetch("config.json")
document.write(text);
});
})
.catch(function (t) {
.catch(t=>{
settings.content.preview.mdcontent = t.message;
document.write(t.message);
return t.message;
@ -231,6 +231,6 @@ fetch("config.json")
});
}
})
.then(function () {
.then(()=>{
blogging_info("rendering content");
});

2
theme/classic/src/intro-min.js

@ -1 +1 @@
async function get_posts_content(e,t){let n={};return await fetch(e.url).then(e=>e.text()).then(e=>(n.preview={response:e},n.preview.mdcontent=markdownrender(e),markdownrender(e))).then(e=>{document.getElementsByClassName("none")[0].innerHTML=e,imgs=document.getElementsByClassName("none")[0].getElementsByTagName("img");for(let e=0;e<imgs.length;e++)imgs[e].src=""}).then((function(){n.preview.title=document.getElementsByClassName("none")[0].getElementsByTagName("h1")[0].innerText,n.preview.intro=config.post[t].introduction})).then((function(){return"?page=archive"===window.location.search?n.container='<div class="post-container"><h1>'+n.preview.title+'</h1><div class="post-info">'+n.preview.mdcontent+'</div><div class="post-time"><i class="material-icons date_range"></i>'+loadtime(config.post[t].url).posttime+'</div><p><a href="?p='+config.post[t].url+'">Reading<i class="material-icons arrow_forward"></i></a></p></div>':n.container='<div class="post-container"><h1>'+n.preview.title+'</h1><p class="post-intro">'+n.preview.intro+'</p><div class="post-time"><i class="material-icons date_range"></i>'+loadtime(config.post[t].url).posttime+'</div><p><a href="?p='+config.post[t].url+'">Reading<i class="material-icons arrow_forward"></i></a></p></div>',n.container})).then(e=>{document.getElementById("post").innerHTML+=e}).then((function(){document.getElementsByClassName("none")[0].innerHTML=""})),""}async function init_post_container(){var e="";for(let t=0;t<config.post.length;t++){const n={};n.url=settings.post+config.post[t].url+".md",e+=get_posts_content(n,t)}return e}async function init_plugins(){blogging_info("Load Plugin who loadtime = themerender");for(let e in config.plugins)if("themerender"===config.plugins[e].loadtime){blogging_info("Load "+config.plugins[e].name+" with defer enabled "+config.plugins[e].defer);for(let t in config.plugins[e].depend){let n=document.createElement("script");n.src=config.plugins[e].depend[t],await document.head.appendChild(n)}let t=document.createElement("script");t.src=config.plugins[e].script,config.plugins[e].deferS&&(t.defer=!0),document.head.append(t)}setTimeout(()=>{blogging_info("plugins load finish")},1)}function loadcomments(){if(config.comment.enable){blogging_info("Start load comment");for(let e in comment.depend.js)a=document.createElement("script"),a.src=comment.depend.js[e],document.getElementById("jscomments").append(a);a=document.createElement("script"),a.src=settings.domain+"src/js/"+comment.load,a.defer="defer",document.getElementById("jscomments").append(a)}}document.getElementById("avatar").src=config.theme_config.avatar,document.getElementById("intro-text-title").innerHTML=config.theme_config.author+"'s Blog",document.getElementById("intro-text-intro").innerHTML="—— "+config.theme_config.introduction;var loadtime=e=>{for(let t in config.post)if(e===config.post[t].url)return{postunixtimestamp:Math.round(config.post[t].time/1e3),posttime:new Date(Math.round(config.post[t].time)).toLocaleString(),nowtime:(new Date).toLocaleString()}},gettime=e=>{let t=document.createElement("div"),n=document.createElement("i");return n.classList="material-icons date_range",t.append(n),t.classList="posttime",t.innerHTML+=loadtime(e).posttime,t};function config_page(){var e=document.getElementsByTagName("img");for(let t=0;t<e.length;t++)e[t].loading="lazy";let t=document.createElement("link");t.rel="shortcut icon",t.href=config.theme_config.avatar,document.head.append(t)}async function init_post(){document.getElementById("func").append(gettime("index"))}if(getpar("page"))init_plugins(),config_page(),init_post_container();else{let e=!0;e&&document.getElementById("comments").getBoundingClientRect().top<=1300&&(loadcomments(),e=!1,document.onscroll=function(){}),document.onscroll=function(){e&&document.getElementById("comments").getBoundingClientRect().top<=1300&&(loadcomments(),e=!1,document.onscroll=function(){})},init_plugins(),config_page(),init_post()}document.getElementById("des").content=config.theme_config.introduction;
async function get_posts_content(e,t){let n={};return await fetch(e.url).then(e=>e.text()).then(e=>(n.preview={response:e},n.preview.mdcontent=markdownrender(e),markdownrender(e))).then(e=>{document.getElementsByClassName("none")[0].innerHTML=e,imgs=document.getElementsByClassName("none")[0].getElementsByTagName("img");for(let e=0;e<imgs.length;e++)imgs[e].src=""}).then((function(){n.preview.title=document.getElementsByClassName("none")[0].getElementsByTagName("h1")[0].innerText,n.preview.intro=config.post[t].introduction})).then((function(){return"?page=archive"===window.location.search?n.container='<div class="post-container"><h1>'+n.preview.title+'</h1><div class="post-info">'+n.preview.mdcontent+'</div><div class="post-time"><i class="material-icons date_range"></i>'+loadtime(config.post[t].url).posttime+'</div><p><a href="?p='+config.post[t].url+'">Reading<i class="material-icons arrow_forward"></i></a></p></div>':n.container='<div class="post-container"><h1>'+n.preview.title+'</h1><p class="post-intro">'+n.preview.intro+'</p><div class="post-time"><i class="material-icons date_range"></i>'+loadtime(config.post[t].url).posttime+'</div><p><a href="?p='+config.post[t].url+'">Reading<i class="material-icons arrow_forward"></i></a></p></div>',n.container})).then(e=>{document.getElementById("post").innerHTML+=e}).then((function(){document.getElementsByClassName("none")[0].innerHTML=""})),""}async function init_post_container(){var e="";for(let t=0;t<config.post.length;t++){const n={};n.url=settings.post+config.post[t].url+".md",e+=get_posts_content(n,t)}return e}async function init_plugins(){blogging_info("Load Plugin who loadtime = themerender");for(let e in config.plugins)if("themerender"===config.plugins[e].loadtime){blogging_info("Load "+config.plugins[e].name+" with defer enabled "+config.plugins[e].defer);for(let t in config.plugins[e].depend){let n=document.createElement("script");n.src=config.plugins[e].depend[t],await document.head.appendChild(n)}let t=document.createElement("script");t.src=config.plugins[e].script,config.plugins[e].deferS&&(t.defer=!0),document.head.append(t)}setTimeout(()=>{blogging_info("plugins load finish")},1)}function loadcomments(){if(config.comment.enable){blogging_info("Start load comment");for(let e in comment.depend.js)a=document.createElement("script"),a.src=comment.depend.js[e],document.getElementById("jscomments").append(a);a=document.createElement("script"),a.src=settings.domain+"src/js/"+comment.load,a.defer="defer",document.getElementById("jscomments").append(a)}}document.getElementById("avatar").src=config.theme_config.avatar,document.getElementById("intro-text-title").innerHTML=config.theme_config.author+"'s Blog",document.getElementById("intro-text-intro").innerHTML="—— "+config.theme_config.introduction;var loadtime=e=>{for(let t in config.post)if(e===config.post[t].url)return{postunixtimestamp:Math.round(config.post[t].time/1e3),posttime:new Date(Math.round(config.post[t].time)).toLocaleString(),nowtime:(new Date).toLocaleString()}},gettime=e=>{let t=document.createElement("div"),n=document.createElement("i");return n.classList="material-icons date_range",t.append(n),t.classList="posttime",t.innerHTML+=loadtime(e).posttime,t};function config_page(){var e=document.getElementsByTagName("img");for(let t=0;t<e.length;t++)e[t].loading="lazy";let t=document.createElement("link");t.rel="shortcut icon",t.href=config.theme_config.avatar,document.head.append(t)}async function init_post(){document.getElementById("func").append(gettime(getpar("p")))}var createtags=e=>{let t=gettags(e),n=[],o=document.createElement("div");o.classList="tags-container";for(let e in t)n[e]=document.createElement("a"),n[e].classList="tags-tags",n[e].innerHTML=t[e],n[e].href="?page=tags&tag="+t[e],o.append(n[e]);return o},checktags=e=>{let t=[];for(let n in e)for(let o in config.post)null!==gettags(config.post[o].url).toString().match(e[n])&&t.push(config.post[o].url);return t},gettags=e=>{for(let t in config.post)if(e===config.post[t].url)return config.post[t].tags};if(getpar("page"))init_plugins(),config_page(),init_post_container();else{let e=!0;e&&document.getElementById("comments").getBoundingClientRect().top<=1300&&(loadcomments(),e=!1,document.onscroll=function(){}),document.onscroll=function(){e&&document.getElementById("comments").getBoundingClientRect().top<=1300&&(loadcomments(),e=!1,document.onscroll=function(){})},init_plugins(),config_page(),init_post()}document.getElementById("des").content=config.theme_config.introduction;

50
theme/classic/src/intro.js

@ -82,9 +82,9 @@ async function init_plugins() {
if (config.plugins[i].loadtime === "themerender") {
blogging_info(
"Load " +
config.plugins[i].name +
" with defer enabled " +
config.plugins[i].defer
config.plugins[i].name +
" with defer enabled " +
config.plugins[i].defer
);
for (let b in config.plugins[i].depend) {
let a = document.createElement("script");
@ -153,9 +153,47 @@ function config_page() {
}
async function init_post() {
document.getElementById("func").append(gettime("index"));
document.getElementById("func").append(gettime(getpar("p")));
//document.getElementById("func").append(createtags(getpar("p")));
}
var createtags = (url) => {
let tags = gettags(url);
let tags_tags = [];
let a = document.createElement("div");
a.classList = "tags-container";
for (let i in tags) {
tags_tags[i] = document.createElement("a");
tags_tags[i].classList = "tags-tags";
tags_tags[i].innerHTML = tags[i];
tags_tags[i].href = "?page=tags&tag=" + tags[i];
a.append(tags_tags[i]);
}
return a;
};
var checktags = (tags) => {
let x = [];
for (let y in tags) {
for (let i in config.post) {
if (gettags(config.post[i].url).toString().match(tags[y]) === null) {
continue;
} else {
x.push(config.post[i].url);
}
}
}
return x;
};
var gettags = (url) => {
for (let i in config.post) {
if (url === config.post[i].url) {
return config.post[i].tags;
}
}
};
if (getpar("page")) {
init_plugins();
config_page();
@ -168,7 +206,7 @@ if (getpar("page")) {
) {
loadcomments();
finished = false;
document.onscroll = function () {};
document.onscroll = function () { };
}
document.onscroll = function () {
if (
@ -177,7 +215,7 @@ if (getpar("page")) {
) {
loadcomments();
finished = false;
document.onscroll = function () {};
document.onscroll = function () { };
}
};
init_plugins();

2
theme/classic/src/main-min.css

@ -1 +1 @@
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");@import url('https://fonts.googleapis.com/css2?family=Fira+Code&family=Noto+Sans+SC&family=Roboto&display=swap');*{padding:0;margin:0;font-family:"PingFang SC","更纱黑体 UI SC","Sarasa UI SC","Roboto","Noto Sans SC",sans-serif;--dark-text:#efefef;--dark-background:#000;--dark-background-darker:#111;--dark-text-darker:#aaa;--highlight:#a81900;--white-text:#111111;--white-background:#fff;--white-background-darker:#efefef;--white-text-darker:#626262;line-height:150%;word-wrap:break-word;}.hoverlink:hover{color:var(--highlight);}.hoverlink{color:var(--white-text-darker);}h1{padding-top:5%;padding-bottom:3%;font-size:49.5px;}h2{padding-top:5%;padding-bottom:3%;font-size:38.5px;}h3{padding-top:5%;padding-bottom:3%;font-size:32.5px;}h4{padding-top:5%;padding-bottom:3%;font-size:30.5px;}h5{padding-top:5%;padding-bottom:3%;font-size:25px;}hr{height:1.5px;background-color:#767676;border-color:#767676;border-radius:200px;margin:16px;}table,ol{padding-top:5%;padding-bottom:3%;}.siteinfo{bottom:-100px;position:absolute;font-size:15.6444px;left:0;right:0;margin:1.5% 10%;}a{color:var(--highlight);text-decoration:none;}#aboutme{float:right;}p,ul,li{font-size:22px;}footer{color:var(--white-text-darker);}pre{overflow:auto;margin-top:5%;margin-bottom:3%;padding:20px;border-radius:20px;border:2px solid var(--white-background-darker);background-color:var(--white-background-darker);}code,code *{overflow-y:hidden;overflow-x:scroll;font-family:"JetBrains Mono",Fira Code,Sarasa Mono SC,Cascadia Code,Menlo,Consolas,monaco,monospace;}.post-container{margin:5% 0%;border-radius:20px;border:2px solid var(--white-background-darker);background-color:var(--white-background-darker);}.post-container *{padding:0%;margin:0%;}.post-container h1{padding:3% 5%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.post-container p{padding:3% 5%;color:var(--white-text-darker);}.post-container a{vertical-align:middle;}.post-container i{vertical-align:middle;padding:0% 1%;}i{vertical-align:middle;padding:0% 1%;}.post-info *{color:var(--white-text-darker);font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:15px;padding:0% 5%;}.post-info img{padding:0%;}.post-info table,.post-info table *{padding:0%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.arrow_forward::before{content:"arrow_forward";}.date_range::before{content:"date_range";}.arrow_back::before{content:"arrow_back";}#container{position:relative;height:auto;margin:5% 10%;}.head *{display:inline;padding:5%;}.head .h1{font-size:40px;}.head .h3{font-size:30px;white-space:nowrap;}.intro{display:inline-block;margin-bottom:4%;}.intro *{vertical-align:middle;display:inline;}.intro span{display:inline-block;}.intro h1{margin-left:10px;font-size:40px;padding:0;}#intro-text-intro{font-size:25px;color:var(--dark-text-darker);}.intro #avatar{padding:0%;border-radius:50px;height:96px;width:96px;}img{max-width:100%;padding-top:5%;padding-bottom:3%;left:0;right:0;position:relative;}table{padding-top:5%;padding-bottom:3%;}.none{display:none;}.v p{font-size:20px;}blockquote{margin:1em 3em 1em 2em;padding-left:1em;border-left:4px solid rgba(0,0,0,.12);}blockquote:last-child{margin-bottom:0;}blockquote p{font-size:20px;}blockquote footer{margin-top:1%;}.posttime{font-size:10px;color:var(--white-text-darker);}.post-time{font-size:10px;color:var(--white-text-darker);padding:0 4%;}#func{margin-top:1%;}@media (prefers-color-scheme:dark){body{color:var(--dark-text);background-color:var(--dark-background)}footer{color:var(--dark-text-darker)}pre{border:2px solid var(--dark-background-darker);background-color:var(--dark-background-darker)}.hljs{background:var(--dark-background-darker);color:var(--dark-text)}.post-container{border:2px solid var(--dark-background-darker);background-color:var(--dark-background-darker)}.hoverlink{color:var(--dark-text-darker)}.post-info *,.post-container p,.posttime,.post-time{color:var(--dark-text-darker)}blockquote{border-left-color:rgba(255,255,255,.12)}}@media screen and (max-width:1165px){#blogginginfo{display:none}.siteinfo{text-align:center}#aboutme{float:none;margin:0 auto}}@media screen and (max-width:790px){.head *{padding:4%}.intro{display:block;text-align:center}}@media screen and (max-width:700px){h1{font-size:40px}#aboutme{font-size:14px}.head .display_none{display:none}.intro h1{display:block}.post-container .post-intro .post-time{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.post-container h1{font-size:30px}p{font-size:20px}.v h1{font-size:25px}.v p{font-size:18px}blockquote{margin:1em}}@media screen and (max-width:480px){.head *{padding:1%}}
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");@import url("https://fonts.googleapis.com/css2?family=Montserrat&Fira+Code&family=Noto+Sans+SC&family=Roboto&display=swap");*{padding:0;margin:0;font-family:"PingFang SC","更纱黑体 UI SC","Sarasa UI SC","Roboto","Noto Sans SC",sans-serif;--dark-text:#efefef;--dark-background:#000;--dark-background-darker:#111;--dark-text-darker:#aaa;--highlight:#a81900;--white-text:#111111;--white-background:#fff;--white-background-darker:#efefef;--white-text-darker:#626262;line-height:150%;word-wrap:break-word;}.hoverlink:hover{color:var(--highlight);}.hoverlink{color:var(--white-text-darker);}h1,h2,h3,h4,h5,h6{font-family:"Montserrat","PingFang SC","更纱黑体 UI SC","Sarasa UI SC","Roboto","Noto Sans SC",sans-serif;}h1{padding-top:5%;padding-bottom:3%;font-size:49.5px;}h2{padding-top:5%;padding-bottom:3%;font-size:38.5px;}h3{padding-top:5%;padding-bottom:3%;font-size:32.5px;}h4{padding-top:5%;padding-bottom:3%;font-size:30.5px;}h5{padding-top:5%;padding-bottom:3%;font-size:25px;}hr{height:1.5px;background-color:#767676;border-color:#767676;border-radius:200px;margin:16px;}table,ol{padding-top:5%;padding-bottom:3%;}.siteinfo{bottom:-100px;position:absolute;font-size:15.6444px;left:0;right:0;margin:1.5% 10%;}a{color:var(--highlight);text-decoration:none;}#aboutme{float:right;}p,ul,li{font-size:22px;}footer{color:var(--white-text-darker);}pre{overflow:auto;margin-top:5%;margin-bottom:3%;padding:20px;border-radius:20px;border:2px solid var(--white-background-darker);background-color:var(--white-background-darker);}code,code *{overflow-y:hidden;overflow-x:scroll;font-family:"JetBrains Mono",Fira Code,Sarasa Mono SC,Cascadia Code,Menlo,Consolas,monaco,monospace;}.post-container{margin:5% 0%;border-radius:20px;border:2px solid var(--white-background-darker);background-color:var(--white-background-darker);}.post-container *{padding:0%;margin:0%;}.post-container h1{padding:3% 5%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.post-container p{padding:3% 5%;color:var(--white-text-darker);}.post-container a{vertical-align:middle;}.post-container i{vertical-align:middle;padding:0% 1%;}i{vertical-align:middle;padding:0% 1%;}.post-info *{color:var(--white-text-darker);font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:15px;padding:0% 5%;}.post-info img{padding:0%;}.post-info table,.post-info table *{padding:0%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.arrow_forward::before{content:"arrow_forward";}.date_range::before{content:"date_range";}.arrow_back::before{content:"arrow_back";}#container{position:relative;height:auto;margin:5% 10%;}.head *{display:inline;padding:5%;}.head .h1{font-size:40px;}.head .h3{font-size:30px;white-space:nowrap;}.intro{display:inline-block;margin-bottom:4%;}.intro *{vertical-align:middle;display:inline;}.intro span{display:inline-block;}.intro h1{margin-left:10px;font-size:40px;padding:0;}#intro-text-intro{font-size:25px;color:var(--dark-text-darker);}.intro #avatar{padding:0%;border-radius:50px;height:96px;width:96px;}img{max-width:100%;padding-top:5%;padding-bottom:3%;left:0;right:0;position:relative;}table{padding-top:5%;padding-bottom:3%;}.none{display:none;}.v p{font-size:20px;}blockquote{margin:1em 3em 1em 2em;padding-left:1em;border-left:4px solid rgba(0,0,0,.12);}blockquote:last-child{margin-bottom:0;}blockquote p{font-size:20px;}blockquote footer{margin-top:1%;}.posttime{font-size:10px;color:var(--white-text-darker);}.post-time{font-size:10px;color:var(--white-text-darker);padding:0 4%;}#func{margin-top:1%;}tags-container{max-width:2%;max-height:import;}tags-container{max-width:2%;}@media (prefers-color-scheme:dark){body{color:var(--dark-text);background-color:var(--dark-background)}footer{color:var(--dark-text-darker)}pre{border:2px solid var(--dark-background-darker);background-color:var(--dark-background-darker)}.hljs{background:var(--dark-background-darker);color:var(--dark-text)}.post-container{border:2px solid var(--dark-background-darker);background-color:var(--dark-background-darker)}.hoverlink{color:var(--dark-text-darker)}.post-info *,.post-container p,.posttime,.post-time{color:var(--dark-text-darker)}blockquote{border-left-color:rgba(255,255,255,.12)}}@media screen and (max-width:1165px){#blogginginfo{display:none}.siteinfo{text-align:center}#aboutme{float:none;margin:0 auto}}@media screen and (max-width:790px){.head *{padding:4%}.intro{display:block;text-align:center}}@media screen and (max-width:700px){h1{font-size:40px}#aboutme{font-size:14px}.head .display_none{display:none}.intro h1{display:block}.post-container .post-intro .post-time{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.post-container h1{font-size:30px}p{font-size:20px}.v h1{font-size:25px}.v p{font-size:18px}blockquote{margin:1em}}@media screen and (max-width:480px){.head *{padding:1%}}

45
theme/classic/src/main.css

@ -1,9 +1,10 @@
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&family=Noto+Sans+SC&family=Roboto&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Montserrat&Fira+Code&family=Noto+Sans+SC&family=Roboto&display=swap");
* {
padding: 0;
margin: 0;
font-family: "PingFang SC", "更纱黑体 UI SC" ,"Sarasa UI SC","Roboto" ,"Noto Sans SC", sans-serif;
font-family: "PingFang SC", "更纱黑体 UI SC", "Sarasa UI SC", "Roboto",
"Noto Sans SC", sans-serif;
--dark-text: #efefef;
--dark-background: #000;
--dark-background-darker: #111;
@ -25,6 +26,11 @@
color: var(--white-text-darker);
}
h1, h2, h3, h4,h5,h6{
font-family: "Montserrat","PingFang SC", "更纱黑体 UI SC", "Sarasa UI SC", "Roboto",
"Noto Sans SC", sans-serif;
}
h1 {
padding-top: 5%;
padding-bottom: 3%;
@ -268,25 +274,25 @@ blockquote {
border-left: 4px solid rgba(0, 0, 0, 0.12);
}
blockquote:last-child{
margin-bottom:0;
blockquote:last-child {
margin-bottom: 0;
}
blockquote p{
blockquote p {
font-size: 20px;
}
blockquote footer {
margin-top:1%;
margin-top: 1%;
}
.posttime {
font-size:10px;
font-size: 10px;
color: var(--white-text-darker);
}
.post-time {
font-size:10px;
font-size: 10px;
color: var(--white-text-darker);
padding: 0 4%;
}
@ -295,6 +301,15 @@ blockquote footer {
margin-top: 1%;
}
tags-container {
max-width: 2%;
max-height: import;
}
tags-container {
max-width: 2%;
}
@media (prefers-color-scheme: dark) {
body {
color: var(--dark-text);
@ -319,7 +334,9 @@ blockquote footer {
color: var(--dark-text-darker);
}
.post-info *,
.post-container p ,.posttime,.post-time{
.post-container p,
.posttime,
.post-time {
color: var(--dark-text-darker);
}
blockquote {
@ -331,12 +348,12 @@ blockquote footer {
#blogginginfo {
display: none;
}
.siteinfo{
text-align:center;
.siteinfo {
text-align: center;
}
#aboutme {
float:none;
margin:0 auto;
float: none;
margin: 0 auto;
}
}
@ -364,7 +381,7 @@ blockquote footer {
.intro h1 {
display: block;
}
.post-container .post-intro .post-time{
.post-container .post-intro .post-time {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Loading…
Cancel
Save