File tree Expand file tree Collapse file tree 4 files changed +20
-16
lines changed
templates/modules/partial Expand file tree Collapse file tree 4 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -1572,6 +1572,10 @@ spec:
1572
1572
- group : footer
1573
1573
label : 页脚
1574
1574
formSchema :
1575
+ - $formkit : checkbox
1576
+ name : allow_switch_theme
1577
+ label : 是否显示切换主题的按钮
1578
+ value : false
1575
1579
- $formkit : repeater
1576
1580
name : social
1577
1581
label : 社交媒体
Original file line number Diff line number Diff line change 45
45
window . localStorage . setItem ( 'Stellar.theme' , newTheme )
46
46
47
47
const messages = {
48
- light : [ [ #{ message. theme_switched . light } ] ] ,
49
- dark : [ [ #{ message. theme_switched . dark } ] ] ,
50
- auto : [ [ #{ message. theme_switched . auto } ] ] ,
48
+ light : " #{message.theme_switched.light}" ,
49
+ dark : " #{message.theme_switched.dark}" ,
50
+ auto : " #{message.theme_switched.auto}" ,
51
51
}
52
52
hud ?. toast ?. ( messages [ newTheme ] )
53
53
}
Original file line number Diff line number Diff line change 1
1
< footer class ="footer dis-select ">
2
2
< div class ="social-wrap ">
3
- < a th:each ="social : ${theme.config.footer.social} "
4
- th:with ="is_contain = ${#strings.contains(social.url,'://')} "
5
- class ="social "
6
- th:title ="${social.title} "
7
- th:href ="${social.url} "
8
- th:target ="${is_contain ? '_blank' : '_self'} "
9
- th::rel ="${ is_contain ? 'external nofollow noopener noreferrer' : 'noopener noreferrer'} ">
10
- < th:block th:if ="${not #strings.isEmpty(social.icon)} " th:utext ="${social.icon} "> </ th:block >
3
+ < a th:each ="social : ${theme.config.footer.social} "
4
+ th:with ="is_contain = ${#strings.contains(social.url,'://')} " class ="social " th:title ="${social.title} "
5
+ th:href ="${social.url} " th:target ="${is_contain ? '_blank' : '_self'} "
6
+ th::rel ="${ is_contain ? 'external nofollow noopener noreferrer' : 'noopener noreferrer'} ">
7
+ < th:block th:if ="${not #strings.isEmpty(social.icon)} " th:utext ="${social.icon} "> </ th:block >
8
+ </ a >
9
+ < a class ="social " onclick ="switchTheme() " th:if ="${theme.config.footer.allow_switch_theme} ">
10
+ < svg viewBox ="0 0 1024 1024 " xmlns ="http://www.w3.org/2000/svg ">
11
+ < path
12
+ d ="M582.4 326.4c-140.8 0-256 115.2-256 256s115.2 256 256 256 256-115.2 256-256-115.2-256-256-256z m0 448c-70.4 0-131.2-36.8-164.8-92.8 12.8 3.2 27.2 4.8 40 4.8 121.6 0 219.2-99.2 219.2-219.2 0-17.6-1.6-35.2-6.4-52.8 60.8 32 102.4 96 102.4 169.6 1.6 104-84.8 190.4-190.4 190.4zM582.4 262.4c17.6 0 32-14.4 32-32v-128c0-17.6-14.4-32-32-32s-32 14.4-32 32v128c0 17.6 14.4 32 32 32zM262.4 582.4c0-17.6-14.4-32-32-32h-128c-17.6 0-32 14.4-32 32s14.4 32 32 32h128c17.6 0 32-14.4 32-32zM310.4 356.8c6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6 12.8-12.8 12.8-32 0-44.8l-91.2-91.2c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8l91.2 91.2zM944 220.8c-12.8-12.8-32-12.8-44.8 0l-91.2 91.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6l91.2-91.2c12.8-12.8 12.8-33.6 0-44.8zM310.4 808l-91.2 91.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.4 9.6 22.4 9.6 8 0 16-3.2 22.4-9.6l91.2-91.2c12.8-12.8 12.8-32 0-44.8-11.2-11.2-32-11.2-44.8 0z "
13
+ fill ="currentColor " fill-rule ="evenodd ">
14
+ </ path >
15
+ </ svg >
11
16
</ a >
12
17
</ div >
13
18
</ footer >
Original file line number Diff line number Diff line change @@ -2,10 +2,6 @@ apiVersion: theme.halo.run/v1alpha1
2
2
kind : Theme
3
3
metadata :
4
4
name : theme-stellar
5
- annotations :
6
- # Add supports for Halo App Store
7
- # https://www.halo.run/store/apps/app-KxJeQ
8
- " store.halo.run/app-id " : " app-KxJeQ"
9
5
spec :
10
6
customTemplates :
11
7
page :
34
30
license :
35
31
- name : " MIT license"
36
32
url : " https://github.com/chengzhongxue/halo-theme-stellar/blob/main/LICENSE"
37
-
You can’t perform that action at this time.
0 commit comments