Skip to content

Commit

Permalink
Merge pull request #108 from jiewenhuang/dev
Browse files Browse the repository at this point in the history
update:v1.1.3
  • Loading branch information
jiewenhuang committed Sep 30, 2023
2 parents 2efa2e6 + 540fd43 commit 117d8b0
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halo-theme-joe3.0",
"version": "1.1.2",
"version": "1.1.3",
"description": "Theme of Halo2",
"devDependencies": {
"uglify-js": "^3.17.4"
Expand Down
9 changes: 6 additions & 3 deletions settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2383,31 +2383,34 @@ spec:
label: 外部CSS链接
value: ""
help: "填入外部CSS链接,无需link标签,将插入head标签尾部"
- $formkit: textarea
- $formkit: code
name: custom_css
label: 自定义CSS
value: ""
help: "填入CSS代码,无需style标签,将插入head标签尾部"
language: css
- $formkit: text
name: custom_external_js_head
label: 外部JS链接(head)
value: ""
help: "填入外部JS链接,需要script标签,可按情况指定async和defer属性,将插入head标签尾部"
- $formkit: textarea
- $formkit: code
name: custom_js_head
label: 自定义JS(head)
value: ""
help: "填入JS代码,无需script标签,将插入head标签尾部"
language: javascript
- $formkit: text
name: custom_external_js_body
label: 外部JS链接(body)
value: ""
help: "填入外部JS链接,无需script标签,将插入body标签尾部(可用于添加插件等)"
- $formkit: textarea
- $formkit: code
name: custom_js_body
label: 自定义JS(body)
value: ""
help: "填入JS代码,无需script标签,将插入body标签尾部"
language: javascript
- $formkit: radio
name: show_loaded_time
label: 控制台输出页面加载耗时
Expand Down
4 changes: 2 additions & 2 deletions templates/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
<div class="joe_archives__wrapper animated fadeIn">
<div class="joe_archives-title">
<th:block th:if="${theme.config.archives.archives_list_type == 'timeline'}">
<i class="joe-font joe-icon-timeline"></i>时间轴<em>[[${'('+theme.config.archives.archives_timeline_metric == 'month' ? '月':'年'+')'}]]</em>
<i class="joe-font joe-icon-timeline"></i>时间轴<em>[[${theme.config.archives.archives_timeline_metric == 'month' ? '月':'年'}]]</em>
</th:block>
<th:block th:if="${theme.config.archives.archives_list_type == 'list'}">
<i class="joe-font joe-icon-rili"></i>列表
<i class="jiewen joe-icon-riqi"></i>列表
</th:block>
</div>
<th:block th:if="${theme.config.archives.archives_list_type =='list'}">
Expand Down
2 changes: 1 addition & 1 deletion templates/modules/common/blogger.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<th:block th:if="${theme.config.blogger.enable_strips}">
<canvas id="canvas-strips" width="300" height="340"></canvas>
<script th:src="@{/assets/effect/bg/strips.js}"></script>
<script th:inline="javascript">
<script th:inline="javascript" th:if="${theme.config.blogger.overview_type != 'A'}">
const url = [[${theme.config.basic.waline_serverURL+'/api/comment?type=count'}]];
fetch(url).then(async (response) => {
const data = await response.json();
Expand Down
13 changes: 9 additions & 4 deletions templates/modules/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@


<script id="theme-config-getter" type="text/javascript">
// if (ThemeConfig.mode === "development") {
// console.log("Joe2.0主题配置:", ThemeConfig);
// console.log("资源根路径:", ThemeConfig.BASE_RES_URL);
// }
if (window.location.hostname === 'localhost'||window.location.hostname === '127.0.0.1') {
ThemeConfig['mode'] = "development"
}
console.log(ThemeConfig.mode)

if (ThemeConfig.mode === "development") {
console.log("Joe3主题配置:", ThemeConfig);
console.log("资源根路径:", ThemeConfig.BASE_RES_URL);
}
// 读取主题模式
var initThemeMode = function() {
try {
Expand Down
2 changes: 1 addition & 1 deletion templates/modules/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/journals.min.css?v='+theme.spec.version}">
</th:block>
<th:block th:if="${htmlType == 'archives'}">
<link rel="preload stylesheet" as="style" th:href="{source_link+/assets/css/min/archives.min.css?v=+theme.spec.version}">
<link rel="preload stylesheet" as="style" th:href="${source_link+'/assets/css/min/archives.min.css?v='+theme.spec.version}">
</th:block>
<th:block th:if="${htmlType == 'photos'}">
<link rel="stylesheet" th:href="${source_link+'/assets/lib/justifiedGallery/justifiedGallery.min.css'}">
Expand Down
1 change: 0 additions & 1 deletion templates/modules/postMetaVariable.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
metas_enable_fold_long_code: /*[[${#annotations.getOrDefault(post, 'enable_fold_long_code', 'true')}]]*/ true
};
PageAttrs.metas_toc_depth = parseInt(PageAttrs.metas_toc_depth);
console.log(PageAttrs.metas_toc_depth)
</script>
</th:block>
</html>
59 changes: 29 additions & 30 deletions templates/photos.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,45 @@
<div class="joe_photos__type">
<div class="joe_photos__type-title">
<i class="joe-font joe-icon-tupian"></i>&nbsp;[[${theme.config.photos.photos_title?:'我的图库'}]]
</div>
<nav class="joe_photos__filter">
<ul>
<li data-sjslink="all">
<a >全部</a>
</li>
<th:block th:each="group : ${groups}">
<li th:data-sjslink="${group.metadata.name}">
<a >[[${group.spec.displayName}]]</a>
</li>
</th:block>

</ul>
</nav>

</div>
<nav class="joe_photos__filter">
<ul>
<li data-sjslink="all">
<a >全部</a>
</li>
<th:block th:each="group : ${groups}">
<li th:data-sjslink="${group.metadata.name}">
<a >[[${group.spec.displayName}]]</a>
</li>
</th:block>

</ul>
</nav>

</div>
<div class="wrapper">
<div id="sortable" class="sjs-default">
<div th:data-sjsel="${photo.spec.groupName}" th:each="photo : ${photoFinder.listAll()}">
<div class="card" >
<a class="item animated wow jg-entry" th:href="${photo.spec.url}" data-fancybox="gallery">

<div class="wrapper">
<div id="sortable" class="sjs-default">
<div th:data-sjsel="${photo.spec.groupName}" th:each="photo : ${photoFinder.listAll()}">
<div class="card" >
<a class="item animated wow jg-entry" th:href="${photo.spec.url}" data-fancybox="gallery">

<img class="card__picture" loading="lazy" th:data-src="${photo.spec.url}" th:src="@{/assets/img/lazyload.gif}" th:alt="${photo.spec.displayName}">
</a>
<!-- <div class="placeholder" style="width: 200px;height: 120px;background: #eee;"></div>-->
</div>
</div>
</div>
<img class="card__picture" loading="lazy" th:data-src="${photo.spec.url}" th:src="@{/assets/img/lazyload.gif}" th:alt="${photo.spec.displayName}">
</a>
</div>
</div>
</div>
</div>



</div>
</div>
<th:block th:if="${theme.config.aside.enable_photos_aside}">
<th:block th:replace="~{modules/common/aside :: aside}" />
</th:block>
</div>
<th:block th:replace="~{modules/common/actions :: actions}" />
<th:block th:replace="~{modules/common/footer :: footer}" />
</div>
<th:block th:replace="~{modules/common/actions :: actions}" />
<th:block th:replace="~{modules/common/footer :: footer}" />
</div>
<th:block th:replace="~{modules/macro/tail :: tail}" />
</body>
Expand Down
2 changes: 1 addition & 1 deletion theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
repo: "https://github.com/jiewenhuang/halo-theme-joe3.0"
settingName: "theme-Joe-setting"
configMapName: "theme-Joe-configMap"
version: "1.1.2"
version: "1.1.3"
require: ">=2.8.0"
customTemplates:
page:
Expand Down

0 comments on commit 117d8b0

Please sign in to comment.