Skip to content

Commit

Permalink
灵动岛导航栏
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezgx committed Aug 15, 2023
1 parent dcf356b commit ced02ee
Show file tree
Hide file tree
Showing 17 changed files with 7,461 additions and 217 deletions.
49 changes: 28 additions & 21 deletions layout/includes/header/nav.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,40 @@

nav#nav
#navbar
span#blog_name
a#site-name(href=url_for('/'))
.title #[=theme.nav.title]
i.fa-solid.fa-house
if theme.nav.title.type === text
span#blog_name
a#site-name(href=url_for('/'))
.title #[=theme.nav.title.title]
i.fa-solid.fa-house
else
span#blog_name(style="margin-left:-5px;height:30px;width:30px")
a#site-name(href=url_for('/'))
img(src=url_for(theme.nav.title.title) style="width:30px;height:30px;border-radius:100vh;")
#toggle-menu(style='margin:auto;')
a.site-page(style='display:flex; align-items:center; height:35px;')
i.fas.fa-bars-progress.fa-fw
| 菜单

#menus
if (theme.algolia_search.enable || theme.local_search.enable)
div.nav-button#search-button
a.site-page.social-icon.search
.search-button-text
i.fas.fa-search.fa-fw
span 搜索
else
div.nav-button
a.site-page.social-icon.search
.search-button-text
i.fas.fa-search.fa-fw
span 未开启
!=partial('includes/header/menu_item', {}, {cache: true})

.nav-button
a.link(href="https://travellings.cn/go.html")
i.fas.fa-bus
a.link(href="https://travellings.cn/go.html" style='margin-right:10px')
i.fas.fa-bus
if (theme.algolia_search.enable || theme.local_search.enable)
div.nav-button#search-button
a.site-page.social-icon.search
.search-button-text
i.fas.fa-search.fa-fw
//- span 搜索
else
div.nav-button
a.site-page.social-icon.search
.search-button-text
i.fas.fa-search.fa-fw
span 未开启

#buttons
a.link(onclick='showconsolebtn()')
i.fas.fa-gear.fa-spin


!=partial('includes/header/menu_item', {}, {cache: true})

107 changes: 71 additions & 36 deletions layout/includes/hometop.pug
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
- var hometop = theme.hometop
- var fposts = theme.hometop.featured_posts
- const { effect,loop,source,sub,startDelay,typeSpeed,backSpeed } = theme.hometop
- let subContent = subtitle || new Array()

.hometop
.hometopin
.blog-title
span.title=config.title
if hometop.style === 1
.blog-title
.in
span.title=hometop.title.title
.subtitle
.swiper-container.sublist
.swiper-wrapper
each item in hometop.subtitle
.swiper-slide=`${item}`
script(src="/js/sub.js")
else
.blog-title
span.title=hometop.title.title
.fposts
.ftags
#tag-bar.hometop_item.bar
Expand All @@ -27,39 +40,44 @@
img.post_bg.entered.loaded(src=url_for(i.cover) onerror="this.onerror=null,this.src='/img/404.png'")
.recent-post-info(href=url_for(i.link))
a.article-title(href=url_for(i.link), title=i.title)= i.title
.hometop-creativity.hometop_item
.inbar
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
.group2
.siteinfo.hometop_item
include widget/card_webinfo.pug
.descr.hometop_item
img(src=url_for(hometop.descr.img))
.subtitle subtitle
span=hometop.descr.subtitle
if hometop.style === 1
.hometop-webinfo.hometop_item
include widget/card_webinfo.pug
else
.hometop-creativity.hometop_item
.inbar
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
img(src="https://bu.dusays.com/2023/04/21/6442840244ea8.webp", style="background:#e9572b", alt="html")
img(src="https://bu.dusays.com/2023/04/21/644284024536b.webp", style="background:#2c51db", alt="css3")
img(src="https://bu.dusays.com/2023/04/21/6442840245873.webp", style="background:#f7cb4f", alt="js")
img(src="https://bu.dusays.com/2023/04/21/6442840245495.webp", style="background:#df5b40", alt="git")
img(src="https://bu.dusays.com/2023/04/28/644bdead5d78f.webp", style="background:#57b6e6", alt="docker")
img(src="https://npm.elemecdn.com/[email protected]/img/svg/node-logo.svg", style="background:#333", alt="node")
if hometop.style === 2
.group2
.siteinfo.hometop_item
include widget/card_webinfo.pug
.descr.hometop_item
img(src=url_for(hometop.descr.img))
.subtitle subtitle
span=hometop.descr.subtitle
script(src="/js/fish.js")
#jsi-flying-fish-container
// section.main-hero-waves-area.waves-area
Expand All @@ -70,4 +88,21 @@
use(href='#gentle-wave', x='48', y='0')
use(href='#gentle-wave', x='48', y='3')
use(href='#gentle-wave', x='48', y='5')
use(href='#gentle-wave', x='48', y='7')
use(href='#gentle-wave', x='48', y='7')
- subContent = subContent.length ? subContent : new Array(config.subtitle)
//- script.
function subtitleType () {
if (!{effect}) {
window.typed = new Typed(".subtitle", {
strings: !{JSON.stringify(subContent)},
startDelay: !{startDelay},
typeSpeed: !{typeSpeed},
loop: !{loop},
backSpeed: !{backSpeed}
})
} else {
document.getElementById("subtitle").innerHTML = '!{subContent[0]}'
}
}
subtitleType()
36 changes: 17 additions & 19 deletions layout/includes/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,23 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside
i.fas.fa-arrow-up
span#percent 0
include ./waves.pug
#console_open_close_btn(onclick='showconsolebtn()')
i.fas.fa-gear.fa-spin
#console-pannel
| 控制台
.console-item
.console-button(onclick='hideaside()')
i.fas.fa-arrows-alt-h
.text 侧栏隐显
.console-item
.console-button(onclick='toggleTheme()')
i.fas.fa-adjust
.text 暗色模式
.console-item
.console-button(onclick='hidehometop()')
i.fas.fa-grip-vertical
.text 顶部隐显
.console-item
.console-button(onclick='toRandomPost()')
i.fas.fa-shuffle
.text 随机文章
#pannel
.console-item
.console-button(onclick='hideaside()')
i.fas.fa-arrows-alt-h
.text 侧栏隐显
.console-item
.console-button(onclick='toggleTheme()')
i.fas.fa-adjust
.text 暗色模式
.console-item
.console-button(onclick='hidehometop()')
i.fas.fa-grip-vertical
.text 顶部隐显
.console-item
.console-button(onclick='toRandomPost()')
i.fas.fa-shuffle
.text 随机文章
script(src="/js/custom.js")
script(src="/js/random.js")
68 changes: 42 additions & 26 deletions source/css/_custom/console.styl
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,44 @@

#console-pannel
position: fixed
bottom: 145px
top: -100px
display: block
z-index: 10002
background: var(--heo-theme)
transition: right .5s
color: var(--heo-font)
width: 115px
right: -115px
transition: top .5s
color: #fff
width: 100%
height: fit-content
padding: 10px
border-radius: 20px
font-weight: 600
border: 2px solid #e3e8f7

[data-theme="dark"] #console-pannel
border: 2px solid #3d3d3f
#pannel
max-width: 410px
align-items: center
display flex
justify-content: center
margin: auto
border-radius: 100vh
padding: 10px

#console-pannel .console-item .console-button
display: flex
justify-content: center
flex-flow: column
text-align: center

#console-pannel .console-item
width: 80px
height 80px
display flex
align-items: center
margin: 0 1%
background: #0006
border-radius: 20px
justify-content: center
backdrop-filter: blur(20px) saturate(180%)
-webkit-backdrop-filter: blur(20px) saturate(180%)

#console-pannel .console-item .console-button i
flex: 1
margin-right: 4px
line-height: 2
font-size: 25px
flex: 1

#console-pannel .close-button
right: 20px
Expand All @@ -70,37 +84,39 @@
background: #3d3d3d
border: 2.5px solid #F2B94B

.totopbutton span#percent
.totopbutton
transition: all .3s
span#percent
font-size: 30px
justify-content: center
width 100%
align-items: center
display: flex
font-weight: 700
opacity 1
color: #fff
text-shadow: 2px 1px #000
margin: auto
z-index inherit
top: 6px
position: relative

.totopbutton i
position: absolute
i
font-size: 30px
justify-content: center
align-items: center
display: none
display: flex
color: #fff
text-shadow: 2px 1px #000
opacity 0
font-weight: 700
margin: auto
z-index inherit
top: 20px
position: relative

.totopbutton:hover i
display: flex

.totopbutton:hover span#percent
display: none
&:hover i
opacity 1
&:hover span#percent
opacity 0

.totopbutton .main-hero-waves-area
width: 100%
Expand Down
6 changes: 0 additions & 6 deletions source/css/_custom/custom.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#page-header.post-bg:before {
background-color: rgba(0,0,0,0.0);
backdrop-filter: saturate(180%) blur(15px);
-webkit-backdrop-filter: blur(15px) saturate(180%);
}

#page {
background: transparent !important;
box-shadow: none !important;
Expand Down
Loading

0 comments on commit ced02ee

Please sign in to comment.