Commit 54fe8d91 authored by Van's avatar Van

🎨 #12720

parent 7939d17c
...@@ -25,5 +25,4 @@ ...@@ -25,5 +25,4 @@
"hljsStyle": "atom-one-light", "hljsStyle": "atom-one-light",
"langLabel": "${langLabel}" "langLabel": "${langLabel}"
}; };
Util.init()
</script> </script>
\ No newline at end of file
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
"randomArticles1Label": "${randomArticles1Label}", "randomArticles1Label": "${randomArticles1Label}",
"externalRelevantArticles1Label": "${externalRelevantArticles1Label}" "externalRelevantArticles1Label": "${externalRelevantArticles1Label}"
}); });
(function () { $(document).ready(function () {
page.load(); page.load();
// emotions // emotions
page.replaceCommentsEm("#comments .vditor-reset"); page.replaceCommentsEm("#comments .vditor-reset");
<#nested> <#nested>
})(); });
</script> </script>
</#macro> </#macro>
\ No newline at end of file
<#-- Solo - A small and beautiful blogging system written in Java. Copyright (c) 2010-2019, b3log.org & hacpai.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. --> <#macro head title canonical description=''> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> <meta name="theme-color" content="#3b3e43"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no" /> <title>${title}</title> <#if description != ''> <meta name="description" content="${description}"/> <meta property="og:description" content="${description}"/> <#elseif metaDescription??> <meta name="description" content="${metaDescription}"/> <meta property="og:description" content="${metaDescription}"/> <#else> <meta name="description" content="${blogTitle?html}。${blogSubtitle?html}"/> <meta property="og:description" content="${blogTitle?html}。${blogSubtitle?html}"/> </#if> <#if metaKeywords??> <meta name="keywords" content="${metaKeywords}"/> </#if> <link rel="dns-prefetch" href="${staticServePath}" /> <link rel="dns-prefetch" href="//cdn.jsdelivr.net" /> <link rel="preconnect" href="${staticServePath}"> <link rel="icon" type="image/png" href="${faviconURL}" /> <link rel="apple-touch-icon" href="${faviconURL}"> <link rel="shortcut icon" type="image/x-icon" href="${faviconURL}"> <meta name="copyright" content="B3log" /> <meta http-equiv="Window-target" content="_top" /> <meta property="og:locale" content="${langLabel}"/> <meta property="og:title" content="${title}"/> <meta property="og:site_name" content="${blogTitle?html}"/> <meta property="og:url" content="${servePath}${request.requestURI}<#if request.queryString??>?${request.queryString}</#if>"/> <meta property="og:image" content="${faviconURL}"/> <link rel="search" type="application/opensearchdescription+xml" title="${title}" href="/opensearch.xml"> <link href="${servePath}/rss.xml" title="RSS" type="application/rss+xml" rel="alternate" /> <link rel="manifest" href="${servePath}/manifest.json"> <link rel="canonical" href="${servePath}${canonical}"> <#nested> <link rel="stylesheet" href="${staticServePath}/skins/${skinDirName}/css/base.css?${staticResourceVersion}" /> <script src="${staticServePath}/js/lib/compress/pjax.min.js" defer></script> <script src="${staticServePath}/js/common${miniPostfix}.js?${staticResourceVersion}" defer></script> <script src="${staticServePath}/skins/${skinDirName}/js/common${miniPostfix}.js?${staticResourceVersion}" defer></script> ${htmlHead} </#macro>
\ No newline at end of file
This diff is collapsed.
<#--
Solo - A small and beautiful blogging system written in Java.
Copyright (c) 2010-2019, b3log.org & hacpai.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<ul class="article__toc">
<#list article.articleToC as item>
<li class="${item.className}">
<a href="#${item.id}">${item.text}</a>
</li>
</#list>
</ul>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.8.0.0, Mar 16, 2019 * @version 1.8.0.1, Mar 20, 2019
*/ */
/** /**
...@@ -117,6 +117,9 @@ var Util = { ...@@ -117,6 +117,9 @@ var Util = {
* @description 解析语法高亮 * @description 解析语法高亮
*/ */
parseLanguage: function () { parseLanguage: function () {
if ($('.vditor-reset pre > code').length === 0) {
return
}
Util.addStyle('https://cdn.jsdelivr.net/npm/highlight.js@9.15.6/styles/' + Util.addStyle('https://cdn.jsdelivr.net/npm/highlight.js@9.15.6/styles/' +
Label.hljsStyle + '.min.css', 'vditorHljsStyle') Label.hljsStyle + '.min.css', 'vditorHljsStyle')
......
/*
* Symphony - A modern community (forum/BBS/SNS/blog) platform written in Java.
* Copyright (C) 2012-2018, b3log.org & hacpai.com
*
* 本文件属于 Sym 商业版的一部分,请仔细阅读项目根文件夹的 LICENSE 并严格遵守相关约定
*/
/**
* comment
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</ta>
* @version 0.2.0.0, Nov 12, 2018
*/
.em00,.em01,.em02,.em03,.em04,.em05,.em06,.em07,.em08,.em09,.em10,.em11,.em12,.em13,.em14 {
cursor: pointer;
background-image: url(../../../images/emotions/emotions.png);
background-size: 120px;
float: left;
height: 24px;
margin-right: 5px;
width: 24px;
transition: all .2s ease-out;
-webkit-transition: all .2s ease-out;
-moz-transition: all .2s ease-out
}
#emotions span:hover,
#emotionsReply span:hover {
transform: scale(1.2) rotate(360deg);
-webkit-transform: scale(1.2) rotate(360deg);
-moz-transform: scale(1.2) rotate(360deg)
}
.em01 {
background-position: -24px 0
}
.em02 {
background-position: -48px 0
}
.em03 {
background-position: -72px 0
}
.em04 {
background-position: -96px 0
}
.em05 {
background-position: 0 -24px
}
.em06 {
background-position: -24px -24px
}
.em07 {
background-position: -48px -24px
}
.em08 {
background-position: -72px -24px
}
.em09 {
background-position: -96px -24px
}
.em10 {
background-position: 0 -48px
}
.em11 {
background-position: -24px -48px
}
.em12 {
background-position: -48px -48px
}
.em13 {
background-position: -72px -48px
}
.em14 {
background-position: -96px -48px
}
\ No newline at end of file
/* /**
* Symphony - A modern community (forum/BBS/SNS/blog) platform written in Java. * Solo - A small and beautiful blogging system written in Java.
* Copyright (C) 2012-2018, b3log.org & hacpai.com * Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* 本文件属于 Sym 商业版的一部分,请仔细阅读项目根文件夹的 LICENSE 并严格遵守相关约定 * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
* Function and font text style * Function and font text style
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</ta> * @author <a href="http://vanessa.b3log.org">Liyuan Li</ta>
* @version 0.2.0.0, Arp 29, 2018 * @version 0.2.0.1, Mar 20, 2019
*/ */
.fn { .fn {
......
/* Make clicks pass-through */ /**
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* Pjax progress
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</ta>
* @version 0.1.0.0, Mar 20, 2019
*/
#nprogress { #nprogress {
pointer-events: none; pointer-events: none;
} }
......
/* /**
* Symphony - A modern community (forum/BBS/SNS/blog) platform written in Java. * Solo - A small and beautiful blogging system written in Java.
* Copyright (C) 2012-2018, b3log.org & hacpai.com * Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* *
* 本文件属于 Sym 商业版的一部分,请仔细阅读项目根文件夹的 LICENSE 并严格遵守相关约定 * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
* Common style for reset * Common style for reset
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</ta> * @author <a href="http://vanessa.b3log.org">Liyuan Li</ta>
* @version 0.2.0.1, Arp 17, 2018 * @version 0.2.0.2, Mar 20, 2019
*/ */
html { html {
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
......
/**
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* toc
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</ta>
* @version 0.1.0.0, Mar 20, 2019
*/
// toc
.article__toc {
overflow: auto;
&::-webkit-scrollbar {
display: none;
}
li {
list-style-type: none;
a {
padding-left: 10px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&:hover {
text-decoration: none;
}
}
&.toc__h3 a {
padding-left: 20px;
}
&.toc__h4 a {
padding-left: 30px;
}
&.toc__h5 a {
padding-left: 40px;
}
}
}
\ No newline at end of file
/*
* Symphony - A modern community (forum/BBS/SNS/blog) platform written in Java.
* Copyright (C) 2012-2018, b3log.org & hacpai.com
*
* 本文件属于 Sym 商业版的一部分,请仔细阅读项目根文件夹的 LICENSE 并严格遵守相关约定
*/
/**
* tool tip.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Apr 18, 2018
*/
@-webkit-keyframes tooltip-appear {
from {
opacity: 0
}
to {
opacity: 1
}
}
@keyframes tooltip-appear {
from {
opacity: 0
}
to {
opacity: 1
}
}
.tooltipped {
position: relative;
cursor: pointer;
&::after {
position: absolute;
z-index: 1000000;
display: none;
padding: 5px 8px;
font-size: 11px;
font-weight: normal;
-webkit-font-smoothing: subpixel-antialiased;
color: #fff;
text-align: center;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-wrap: break-word;
white-space: pre;
pointer-events: none;
content: attr(aria-label);
background: rgba(0, 0, 0, 0.8);
border-radius: 3px;
line-height: 16px;
opacity: 0
}
&::before {
position: absolute;
z-index: 1000001;
display: none;
width: 0;
height: 0;
color: rgba(0, 0, 0, 0.8);
pointer-events: none;
content: "";
border: 5px solid transparent;
opacity: 0
}
&--hover::before,
&--hover::after,
&:hover::before,
&:hover::after,
&:active::before,
&:active::after,
&:focus::before,
&:focus::after {
display: inline-block;
text-decoration: none;
animation-name: tooltip-appear;
animation-duration: 0.1s;
animation-fill-mode: forwards;
animation-timing-function: ease-in;
animation-delay: 0.4s
}
&__s::after,
&__se::after,
&__sw::after {
top: 100%;
right: 50%;
margin-top: 5px
}
&__s::before,
&__se::before,
&__sw::before {
top: auto;
right: 50%;
bottom: -5px;
margin-right: -5px;
border-bottom-color: rgba(0, 0, 0, 0.8)
}
&__se::after {
right: auto;
left: 50%;
margin-left: -15px
}
&__sw::after {
margin-right: -15px
}
&__n::after,
&__ne::after,
&__nw::after {
right: 50%;
bottom: 100%;
margin-bottom: 5px
}
&__n::before,
&__ne::before,
&__nw::before {
top: -5px;
right: 50%;
bottom: auto;
margin-right: -5px;
border-top-color: rgba(0, 0, 0, 0.8)
}
&__ne::after {
right: auto;
left: 50%;
margin-left: -15px
}
&__nw::after {
margin-right: -15px
}
&__s::after,
&__n::after {
transform: translateX(50%)
}
&__w::after {
right: 100%;
bottom: 50%;
margin-right: 5px;
transform: translateY(50%);
}
&__w::before {
top: 50%;
bottom: 50%;
left: -5px;
margin-top: -5px;
border-left-color: rgba(0, 0, 0, 0.8);
}
&__e::after {
bottom: 50%;
left: 100%;
margin-left: 5px;
transform: translateY(50%)
}
&__e::before {
top: 50%;
right: -5px;
bottom: 50%;
margin-top: -5px;
border-right-color: rgba(0, 0, 0, 0.8)
}
}
/**
* Solo - A small and beautiful blogging system written in Java.
* Copyright (c) 2010-2019, b3log.org & hacpai.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* uesr site
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</ta>
* @version 0.1.0.0, Mar 20, 2019
*/
.user__site {
&:hover {
text-decoration: none;
}
}
\ No newline at end of file
This diff is collapsed.
...@@ -20,10 +20,9 @@ ...@@ -20,10 +20,9 @@
* *
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a> * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 3.1.0.1, Mar 16, 2019 * @version 3.1.0.2, Mar 20, 2019
*/ */
@import "reset"; @import "reset";
@import "tooltipped";
@import "function"; @import "function";
@import "vditor/src/assets/scss/classic"; @import "vditor/src/assets/scss/classic";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment