关于页面地图优化,侧边最近评论优化
This commit is contained in:
parent
51b4a73d06
commit
268c89829f
|
@ -1309,10 +1309,13 @@ spec:
|
||||||
label: 地图相关配置
|
label: 地图相关配置
|
||||||
value:
|
value:
|
||||||
StrengthenTitle:
|
StrengthenTitle:
|
||||||
background:
|
mapLocation:
|
||||||
backgroundDark:
|
|
||||||
authorInfo:
|
authorInfo:
|
||||||
children:
|
children:
|
||||||
|
- $formkit: text
|
||||||
|
name: StrengthenTitle
|
||||||
|
label: 居住地
|
||||||
|
placeholder: 请输入内容
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
name: mapLocation
|
name: mapLocation
|
||||||
label: 居住地坐标
|
label: 居住地坐标
|
||||||
|
|
|
@ -52,12 +52,3 @@ ul li {
|
||||||
padding: 0.3rem 0.5rem;
|
padding: 0.3rem 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme=dark] .author-content-item.map {
|
|
||||||
background: none!important;
|
|
||||||
background-size: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.author-content-item.map {
|
|
||||||
background: none!important;
|
|
||||||
background-size: 100%;
|
|
||||||
}
|
|
||||||
|
|
|
@ -149,6 +149,13 @@
|
||||||
<link rel="stylesheet" th:href="@{/assets/libs/fancybox/jquery.fancybox.min.css}">
|
<link rel="stylesheet" th:href="@{/assets/libs/fancybox/jquery.fancybox.min.css}">
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 关于地图-->
|
||||||
|
<script src="https://map.qq.com/api/gljs?v=1.exp&key=YZOBZ-34HLF-K3OJV-JV6IN-OALJ5-7MBAC"></script>
|
||||||
|
|
||||||
|
<!-- 关于统计-->
|
||||||
|
<script th:src="@{/assets/libs/countup/countup.js}"></script>
|
||||||
|
|
||||||
|
|
||||||
<!-- icon图标 -->
|
<!-- icon图标 -->
|
||||||
<link rel="stylesheet" href="https://npm.elemecdn.com/anzhiyu-theme-static@1.1.0/icon/ali_iconfont_css.css">
|
<link rel="stylesheet" href="https://npm.elemecdn.com/anzhiyu-theme-static@1.1.0/icon/ali_iconfont_css.css">
|
||||||
|
|
||||||
|
|
|
@ -19,30 +19,48 @@
|
||||||
|
|
||||||
<div class="author-content-item-group column mapAndInfo">
|
<div class="author-content-item-group column mapAndInfo">
|
||||||
<div class="author-content-item map single" style="padding: 0;">
|
<div class="author-content-item map single" style="padding: 0;">
|
||||||
<div id="mapContainer" style="height: 120%;"></div>
|
<div id="mapContainer" style="height: 100%;"></div>
|
||||||
<span class="map-title">我现在住在
|
<span class="map-title">我现在住在
|
||||||
<b>[[${theme.config.about.map.StrengthenTitle}]]</b></span>
|
<b>[[${theme.config.about.map.StrengthenTitle}]]</b></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="author-content-item selfInfo single"
|
<div class="author-content-item selfInfo single"
|
||||||
th:if="${not #lists.isEmpty(theme.config.about.map.authorInfo)}"
|
th:if="${not #lists.isEmpty(theme.config.about.map.authorInfo)}"
|
||||||
th:with="texts = ${theme.config.about.map.authorInfo}">
|
th:with="texts = ${theme.config.about.map.authorInfo}">
|
||||||
<div th:if="${theme.config.about.map.authorInfo.size()}>'0'"><span class="selfInfo-title" th:text="${texts[0].authorInfoTitle}">生于</span><span
|
<div th:if="${theme.config.about.map.authorInfo.size()}>'0'"><span class="selfInfo-title"
|
||||||
class="selfInfo-content" id="selfInfo-content-year"
|
th:text="${texts[0].authorInfoTitle}">生于</span><span class="selfInfo-content"
|
||||||
th:style="'color:' + ${texts[0].authorInfoColor}"
|
id="selfInfo-content-year" th:style="'color:' + ${texts[0].authorInfoColor}"
|
||||||
th:text="${texts[0].authorInfoContent}">2000</span>
|
th:text="${texts[0].authorInfoContent}">2000</span>
|
||||||
</div>
|
</div>
|
||||||
<div th:if="${theme.config.about.map.authorInfo.size()}>'1'"><span class="selfInfo-title" th:text="${texts[1].authorInfoTitle}">太原理工大学</span><span
|
<div th:if="${theme.config.about.map.authorInfo.size()}>'1'"><span class="selfInfo-title"
|
||||||
class="selfInfo-content" th:style="'color:' + ${texts[1].authorInfoColor}"
|
th:text="${texts[1].authorInfoTitle}">太原理工大学</span><span class="selfInfo-content"
|
||||||
|
th:style="'color:' + ${texts[1].authorInfoColor}"
|
||||||
th:text="${texts[1].authorInfoContent}">计算机科学</span>
|
th:text="${texts[1].authorInfoContent}">计算机科学</span>
|
||||||
</div>
|
</div>
|
||||||
<div th:if="${theme.config.about.map.authorInfo.size()}>'2'"><span class="selfInfo-title" th:text="${texts[2].authorInfoTitle}">现在职业</span><span
|
<div th:if="${theme.config.about.map.authorInfo.size()}>'2'"><span class="selfInfo-title"
|
||||||
class="selfInfo-content" th:style="'color:' + ${texts[2].authorInfoColor}"
|
th:text="${texts[2].authorInfoTitle}">现在职业</span><span class="selfInfo-content"
|
||||||
|
th:style="'color:' + ${texts[2].authorInfoColor}"
|
||||||
th:text="${texts[2].authorInfoContent}">BI工程师</span>
|
th:text="${texts[2].authorInfoContent}">BI工程师</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script th:src="@{/assets/libs/countup/countup.js}"></script>
|
<style>
|
||||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=YZOBZ-34HLF-K3OJV-JV6IN-OALJ5-7MBAC"></script>
|
.author-content-item.map {
|
||||||
|
background: none !important;
|
||||||
|
min-height: 160px;
|
||||||
|
max-height: 400px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
height: 60%;
|
||||||
|
background-size: 100%;
|
||||||
|
transition: 1s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-theme=dark] .author-content-item.map {
|
||||||
|
background: none !important;
|
||||||
|
background-size: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
// 链接替换即可,不需要后面的参数
|
// 链接替换即可,不需要后面的参数
|
||||||
fetch("https://v6-widget.51.la/v6/[[${theme.config.about.LingQueMonitorID}]]/quote.js")
|
fetch("https://v6-widget.51.la/v6/[[${theme.config.about.LingQueMonitorID}]]/quote.js")
|
||||||
|
@ -111,8 +129,8 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script defer>
|
<script defer>
|
||||||
var t = new TMap.LatLng([[${theme.config.about.map.mapLocation}]])
|
var t = new TMap.LatLng([[${ theme.config.about.map.mapLocation }]])
|
||||||
, n = new TMap.Map(document.getElementById("mapContainer"),{
|
, n = new TMap.Map(document.getElementById("mapContainer"), {
|
||||||
center: t,
|
center: t,
|
||||||
zoom: 12,
|
zoom: 12,
|
||||||
});
|
});
|
||||||
|
@ -136,6 +154,10 @@
|
||||||
position: t
|
position: t
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 去除logo及水印
|
||||||
|
var a = document.querySelector('canvas+div:last-child')
|
||||||
|
a.style.display = 'none'
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
<div class="card-widget card-recent-post" th:fragment="comments">
|
<div class="card-widget card-recent-post" th:fragment="comments">
|
||||||
<div class="item-headline"><i class="iconfont icon-comment-dots"></i><span>最新评论</span></div>
|
<div class="item-headline"><i class="iconfont icon-comment-dots"></i><span>最新评论</span></div>
|
||||||
<div class="aside-list" id="newcomm">
|
<div class="aside-list" id="newcomm">
|
||||||
<script th:src="@{/assets/libs/twikoo/twikoo.all.min.js}"></script>
|
|
||||||
<script th:if="${theme.config.comments.twikooEnable && #strings.equals(theme.config.comments.use, 'Twikoo') && not #strings.isEmpty(theme.config.comments.twikoos.envId)}">
|
<script th:if="${theme.config.comments.twikooEnable && #strings.equals(theme.config.comments.use, 'Twikoo') && not #strings.isEmpty(theme.config.comments.twikoos.envId)}">
|
||||||
(()=>{
|
(()=>{
|
||||||
|
const runTwikoo = () => {
|
||||||
const pagesize = [[${theme.config.sidebar.newcommentnumber}]];
|
const pagesize = [[${theme.config.sidebar.newcommentnumber}]];
|
||||||
const defaultpagesize = 5;
|
const defaultpagesize = 5;
|
||||||
const finalpagesize = pagesize <= 0 ? defaultpagesize : pagesize;
|
const finalpagesize = pagesize <= 0 ? defaultpagesize : pagesize;
|
||||||
|
@ -41,6 +41,12 @@
|
||||||
// 发生错误
|
// 发生错误
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
if (typeof twikoo === 'object') {
|
||||||
|
runTwikoo()
|
||||||
|
} else {
|
||||||
|
getScript('/themes/theme-hao/assets/libs/twikoo/twikoo.all.min.js').then(runTwikoo)
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue