custom footer

This commit is contained in:
2025-08-13 22:27:14 +08:00
parent 1b776034a9
commit 52c7654316
6 changed files with 473 additions and 889 deletions

View File

@@ -16,7 +16,6 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside
#web_bg(style=getBgPath(theme.background))
!=partial('includes/sidebar', {}, {cache: true})
#body-wrap(class=pageType)
include ./header/index.pug
@@ -30,7 +29,7 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside
- const footerBg = theme.footer_img
- const footer_bg = footerBg ? footerBg === true ? bg_img : getBgPath(footerBg) : ''
footer#footer(style='background: transparent')
footer#footer(style=footer_bg)
!=partial('includes/footer', {}, {cache: true})
include ./rightside.pug

View File

@@ -1,321 +0,0 @@
#footer_icons{
border-radius:12px 12px 0 0;
padding-top:2rem;
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex;
-webkit-box-lines:multiple;
-moz-box-lines:multiple;
-o-box-lines:multiple;
-webkit-flex-wrap:wrap;
-ms-flex-wrap:wrap;
flex-wrap:wrap;
-webkit-box-pack:center;
-moz-box-pack:center;
-o-box-pack:center;
-ms-flex-pack:center;
-webkit-justify-content:center;
justify-content:center;
-webkit-box-align:center;
-moz-box-align:center;
-o-box-align:center;
-ms-flex-align:center;
-webkit-align-items:center;
align-items:center
}
#footer_icons .icon_link{
height:40px;
width:40px;
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex;
-webkit-box-align:center;
-moz-box-align:center;
-o-box-align:center;
-ms-flex-align:center;
-webkit-align-items:center;
align-items:center;
-webkit-box-pack:center;
-moz-box-pack:center;
-o-box-pack:center;
-ms-flex-pack:center;
-webkit-justify-content:center;
justify-content:center;
margin:1rem;
background-color:var(--font-color);
border-radius:50%
}
#footer_icons .icon_link:hover{
background-color:var(--marcus-blue)!important
}
#footer_icons .icon_link i{
font-size:20px;
color:#fff;
-webkit-transition:.3s;
-moz-transition:.3s;
-o-transition:.3s;
-ms-transition:.3s;
transition:.3s
}
#footer_icons>div{
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex
}
#footer_icons img.footer_logo{
border-radius:50%;
width:60px;
height:60px;
margin:0 1rem;
cursor:pointer;
filter:drop-shadow(0 0 12px rgba(150,255,246,.4))!important;
-webkit-transition:all .25s;
-moz-transition:all .25s;
-o-transition:all .25s;
-ms-transition:all .25s;
transition:all .25s
}
#footer_icons img.footer_logo:hover{
filter:drop-shadow(0 0 15px rgba(144,255,246,.7))!important
}
@media screen and (max-width:768px){
#footer_icons img.footer_logo{
display:none
}
#footer_icons a.icon_link{
margin:1rem 20px
}
}
#footer_content,#footer_icons{
margin:auto;
max-width:1220px;
width:97%;
background:rgba(245,249,255,.6)
}
@media screen and (min-width:2000px){
#footer_content,#footer_icons{
max-width:1720px!important
}
}
#footer_content{
border-radius:0 0 12px 12px;
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex;
-webkit-box-pack:justify;
-moz-box-pack:justify;
-o-box-pack:justify;
-ms-flex-pack:justify;
-webkit-justify-content:space-between;
justify-content:space-between;
-webkit-box-lines:multiple;
-moz-box-lines:multiple;
-o-box-lines:multiple;
-webkit-flex-wrap:wrap;
-ms-flex-wrap:wrap;
flex-wrap:wrap;
margin-bottom:2rem;
padding:0 2rem 2rem
}
#footer_content #friend-links-in-footer .footer-title button{
font-size:14px;
color:var(--font-color);
margin-left:5px;
-webkit-transition:.3s;
-moz-transition:.3s;
-o-transition:.3s;
-ms-transition:.3s;
transition:.3s
}
#footer_content #friend-links-in-footer .footer-title button:hover{
color:var(--marcus-blue)
}
@media screen and (max-width:768px){
#footer_content #friend-links-in-footer h3{
padding-left:10px
}
}
#footer_content .footer-group{
min-width:120px
}
#footer_content .footer-title{
color:var(--font-color)
}
#footer_content .footer-links{
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex;
-webkit-box-orient:vertical;
-moz-box-orient:vertical;
-o-box-orient:vertical;
-webkit-flex-direction:column;
-ms-flex-direction:column;
flex-direction:column
}
#footer_content .footer-item{
font-size:1rem;
line-height:1.7;
color:var(--font-color)
}
#footer_content .footer-item:hover{
color:var(--marcus-blue)
}
@media screen and (max-width:768px){
#footer_content{
padding:1rem
}
#footer_content .footer-group{
text-align:center
}
}
#footer-bottom{
padding:1rem;
background:var(--card-bg);
z-index:2;
border-top:1px solid #e3e8f7
}
#footer-bottom a{
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex
}
#footer-bottom a:not(:first-child)::before{
content:'|';
font-size:14px;
line-height:2.45;
margin:0 10px
}
@media screen and (max-width:768px){
#footer-bottom a:not(:first-child)::before{
line-height:2.25;
margin:0 8px
}
}
#footer-bottom a:hover{
color:var(--marcus-blue)
}
#footer-bottom a:hover::before{
color:var(--font-color)
}
#footer-bottom .footer-bottom-content{
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex;
-webkit-box-pack:justify;
-moz-box-pack:justify;
-o-box-pack:justify;
-ms-flex-pack:justify;
-webkit-justify-content:space-between;
justify-content:space-between;
max-width:1220px;
width:100%;
margin:0 auto;
-webkit-box-lines:multiple;
-moz-box-lines:multiple;
-o-box-lines:multiple;
-webkit-flex-wrap:wrap;
-ms-flex-wrap:wrap;
flex-wrap:wrap
}
#footer-bottom .footer-bottom-content *{
font-size:17px;
white-space:nowrap;
color:var(--font-color)
}
@media screen and (min-width:2000px){
#footer-bottom .footer-bottom-content{
max-width:1480px
}
}
#footer-bottom .footer-bottom-left,#footer-bottom .footer-bottom-right{
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex;
-webkit-box-orient:vertical;
-moz-box-orient:vertical;
-o-box-orient:vertical;
-webkit-flex-direction:column;
-ms-flex-direction:column;
flex-direction:column
}
#footer-bottom .footer-bottom-left div,#footer-bottom .footer-bottom-left span,#footer-bottom .footer-bottom-right div,#footer-bottom .footer-bottom-right span{
display:-webkit-box;
display:-moz-box;
display:-webkit-flex;
display:-ms-flexbox;
display:box;
display:flex;
-webkit-box-align:center;
-moz-box-align:center;
-o-box-align:center;
-ms-flex-align:center;
-webkit-align-items:center;
align-items:center
}
#footer-bottom .footer-bottom-right div{
-webkit-box-pack:end;
-moz-box-pack:end;
-o-box-pack:end;
-ms-flex-pack:end;
-webkit-justify-content:flex-end;
justify-content:flex-end
}
@media screen and (max-width:768px){
#footer-bottom{
padding:1rem 0!important
}
#footer-bottom .footer-bottom-content *{
font-size:1rem
}
#footer-bottom .footer-bottom-left,#footer-bottom .footer-bottom-right{
width:100%;
-webkit-box-align:center;
-moz-box-align:center;
-o-box-align:center;
-ms-flex-align:center;
-webkit-align-items:center;
align-items:center
}
}
[data-theme=dark] #footer_icons .icon_link{
background-color:#ececec
}
[data-theme=dark] #footer_icons .icon_link i{
color:#202020
}
[data-theme=dark] #footer_icons .icon_link:hover i{
color:#fff
}
[data-theme=dark] #footer_icons img.footer_logo{
filter:drop-shadow(0 0 12px rgba(255,255,255,.3))!important
}
[data-theme=dark] #footer_icons img.footer_logo:hover{
filter:drop-shadow(0 0 15px rgba(255,255,255,.5))!important
}
[data-theme=dark] #footer_content,[data-theme=dark] #footer_icons{
background:rgba(24,24,30,.5)
}

View File

@@ -586,91 +586,366 @@
}
}
/* 侧边栏的统计栏美化 */
/* ===========================================
极简版权卡片 参考图片重制
亮色 / 暗色 自动切换
=========================================== */
:root {
/* 亮色变量 */
--card-bg: #ffffff;
--card-border: #e5e7eb;
--text-primary: #111827;
--text-secondary: #6b7280;
--link-color: #2563eb;
--link-hover: #3b82f6;
/*https://codepen.io/poojanahelia/pen/Exabvdy*/
#footer {
background-color: rgba(0, 0, 0, 0); /* 修改透明色 */
color: #fff;
padding: 0;
}
[data-theme=dark]{
:root {
/* 暗色变量 */
--card-bg: #111827;
--card-border: #374151;
--text-primary: #f9fafb;
--text-secondary: #9ca3af;
--link-color: #60a5fa;
--link-hover: #93c5fd;
}
#footer .footer-other {
padding: 0;
}
/* 强制暗色模式(加 .dark 到 <html> 或 <body> */
.dark {
--card-bg: #111827;
--card-border: #374151;
--text-primary: #f9fafb;
--text-secondary: #9ca3af;
--link-color: #60a5fa;
--link-hover: #93c5fd;
.footer-copyright{
padding: 0;
}
/* 版权卡片整体 */
.post-copyright {
margin: 2rem 0;
padding: 1.5rem 1.75rem;
background: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: 8px;
font-size: 0.925rem;
line-height: 1.6;
color: var(--text-primary);
.my-footer-logo {
color: white;
}
/* 标题(文章名) */
.post-copyright__title {
font-weight: 700;
font-size: 1.125rem;
margin-bottom: 0.75rem;
color: var(--text-primary);
.my-footer-wave-svg {
height: 50px;
width: 100%;
transform: scale(-1, -1) translateY(-10px); /*;*/
}
/* 链接 */
.post-copyright__link {
color: var(--link-color);
text-decoration: none;
word-break: break-all;
.my-footer-wave-path {
fill: #177ecd;
}
.post-copyright__link:hover {
color: var(--link-hover);
text-decoration: underline;
.my-footer-content {
margin-left: auto;
margin-right: auto;
max-width: 1230px;
padding: 40px 15px 450px;
position: relative;
}
/* 元数据行 */
.post-copyright__meta {
margin-top: 0.5rem;
color: var(--text-secondary);
.my-footer-content-column {
box-sizing: border-box;
float: left;
padding-left: 15px;
padding-right: 15px;
width: 100%;
color: #fff;
}
.post-copyright__meta strong {
color: var(--text-primary);
font-weight: 600;
.my-footer-content-column ul li a {
color: #fff;
text-decoration: none;
}
/* 移动端适配 */
@media (max-width: 600px) {
.post-copyright {
padding: 1.25rem;
font-size: 0.875rem;
}
}
.my-footer-logo-link {
display: inline-block;
}
.my-footer-menu {
margin-top: 15px;
}
.my-footer-menu-name {
color: #fffff2;
font-size: 15px;
font-weight: 900;
letter-spacing: .1em;
line-height: 18px;
margin-bottom: 0;
margin-top: 0;
text-transform: uppercase;
}
.my-footer-menu-list {
list-style: none;
margin-bottom: 0;
margin-top: 10px;
padding-left: 0;
}
.my-footer-menu-list li {
margin-top: 5px;
}
.my-footer-call-to-action-description {
color: #fffff2;
margin-top: 10px;
margin-bottom: 20px;
}
.my-footer-call-to-action-button:hover {
background-color: #fffff2;
color: #00bef0;
}
.button:last-of-type {
margin-right: 0;
}
.my-footer-call-to-action-button {
background-color: #03708c;
border-radius: 21px;
color: #fffff2;
display: inline-block;
font-size: 11px;
font-weight: 900;
letter-spacing: .1em;
line-height: 18px;
padding: 12px 30px;
margin: 0 10px 10px 0;
text-decoration: none;
text-transform: uppercase;
transition: background-color .2s;
cursor: pointer;
position: relative;
}
.my-footer-call-to-action {
margin-top: 17px;
}
.my-footer-call-to-action-title {
color: #fffff2;
font-size: 14px;
font-weight: 900;
letter-spacing: .1em;
line-height: 18px;
margin-bottom: 0;
margin-top: 0;
text-transform: uppercase;
}
.my-footer-call-to-action-link-wrapper {
margin-bottom: 0;
margin-top: 10px;
color: #fff;
text-decoration: none;
}
.my-footer-call-to-action-link-wrapper a {
color: #fff;
text-decoration: none;
}
.my-footer-social-links {
bottom: -1px;
height: 54px;
position: absolute;
right: 0;
width: 236px;
}
.my-footer-social-amoeba-svg {
height: 54px;
left: 0;
display: block;
position: absolute;
top: 0;
width: 236px;
}
.my-footer-social-amoeba-path {
fill: #03708c;
}
.my-footer-social-link.email {
height: 41px;
left: 5px;
top: 14px;
width: 41px;
}
.my-footer-social-link {
display: block;
padding: 10px;
position: absolute;
}
.hidden-link-text {
position: absolute;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
-webkit-clip-path: inset(0px 0px 99.9% 99.9%);
clip-path: inset(0px 0px 99.9% 99.9%);
overflow: hidden;
height: 1px;
width: 1px;
padding: 0;
border: 0;
top: 50%;
}
.my-footer-social-icon-svg {
display: block;
}
.my-footer-social-icon-path {
fill: #fffff2;
transition: fill .2s;
}
.my-footer-social-link.follow {
height: 42px;
left: 124px;
top: 13px;
width: 42px;
}
.my-footer-social-link.rss {
height: 43px;
left: 178px;
top: 10px;
width: 43px;
}
.my-footer-social-link.github {
height: 62px;
left: 54px;
top: -4px;
width: 62px;
}
.my-footer-copyright {
background-color: #03708c;
color: #fff;
padding: 15px 30px;
text-align: center;
}
.my-footer-copyright-wrapper {
margin-left: auto;
margin-right: auto;
max-width: 1200px;
}
.my-footer-copyright-text {
color: #fff;
font-size: 13px;
font-weight: 400;
line-height: 18px;
margin-bottom: 0;
margin-top: 0;
}
.my-footer-copyright-link {
color: #fff;
text-decoration: none;
}
.my-footer-content-div {
background: #177ecd
}
.my-footer-svg-div {
width: 100%;
max-height: 200px;
}
/* Media Query For different screens */
@media (min-width: 320px) and (max-width: 479px) {
/* smartphones, portrait iPhone, portrait 480x320 phones (Android) */
.my-footer-content {
margin-left: auto;
margin-right: auto;
max-width: 1230px;
padding: 40px 15px 649px;
position: relative;
}
/* 不展示logo */
.my-footer-logo {
display: none;
}
}
@media (min-width: 480px) and (max-width: 599px) {
/* smartphones, Android phones, landscape iPhone */
.my-footer-content {
margin-left: auto;
margin-right: auto;
max-width: 1230px;
padding: 40px 15px 738px;
position: relative;
}
.my-footer-logo {
padding-left: 177px; /* Qlogo 稍微偏移一点 */
padding-right: 170px;
}
}
@media (min-width: 600px) and (max-width: 800px) {
/* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */
.my-footer-content {
margin-left: auto;
margin-right: auto;
max-width: 1230px;
padding: 40px 15px 758px;
position: relative;
}
}
@media (min-width: 801px) {
/* tablet, landscape iPad, lo-res laptops ands desktops */
}
@media (min-width: 1025px) {
/* big landscape tablets, laptops, and desktops */
}
@media (min-width: 1281px) {
/* hi-res laptops and desktops */
}
@media (min-width: 760px) {
.my-footer-content {
margin-left: auto;
margin-right: auto;
max-width: 1230px;
padding: 10px 15px 237px;
position: relative;
}
.my-footer-content-column {
/*五列的话 19.99 %*/
width: 24.99%;
}
}
@media (min-width: 568px) {
}
@media (min-width: 600px) and (max-width: 760px) {
/* 在这里编写适用于小屏幕的样式 */
.my-footer-logo {
padding-left: 212px; /* Qlogo 稍微偏移一点 */
padding-right: 204px;
}
}
/* 页脚波浪的颜色 */
[data-theme='dark'] .my-footer-wave-path {
fill: #0f3858;
}
[data-theme='dark'] .my-footer-content-div {
background-color: #0f3858;
}
/* 页脚海底的颜色 */
[data-theme='dark'] .my-footer-copyright {
background-color: #2b3f49;
}
[data-theme='dark'] .my-footer-social-amoeba-path {
fill: #2b3f49;
}