This commit is contained in:
xaoxuu 2022-10-23 01:05:16 +08:00
parent 429de4ecfd
commit 1021e87769
6 changed files with 31 additions and 35 deletions

View File

@ -90,21 +90,22 @@ function div_photo() {
var el = ''; var el = '';
el += '<div class="cover">'; el += '<div class="cover">';
el += '<img src="' + post.cover + '"/>'; el += '<img src="' + post.cover + '"/>';
if (post.cover_info) { let info = post.cover_info;
if (info) {
el += '<div class="cover-info"'; el += '<div class="cover-info"';
if (post.cover_info.meta) { if (info.meta) {
el += 'position="top">'; el += 'position="top">';
} else { } else {
el += 'position="bottom">'; el += 'position="bottom">';
} }
if (post.cover_info.meta) { if (info.meta) {
el += '<div class="cap">' + post.cover_info.meta + '</div>'; el += '<div class="cap">' + info.meta + '</div>';
} }
if (post.cover_info.title) { if (info.title) {
el += '<div class="title">' + post.cover_info.title + '</div>'; el += '<div class="title">' + info.title + '</div>';
} }
if (post.cover_info.subtitle) { if (info.subtitle) {
el += '<div class="cap">' + post.cover_info.subtitle + '</div>'; el += '<div class="cap">' + info.subtitle + '</div>';
} }
el += '</div>'; el += '</div>';

View File

@ -21,7 +21,7 @@ function layoutTitle(main, url, sub) {
} }
function layoutDiv() { function layoutDiv() {
var el = ''; var el = '';
if (page.layout == 'wiki' && proj && proj.index != false) { if (page.layout == 'wiki') {
el += '<div class="logo-wrap wiki">'; el += '<div class="logo-wrap wiki">';
// all products // all products
el += '<a style="filter: grayscale(100%)" class="wiki-home cap" href="' + url_for(config.wiki_dir) + '">'; el += '<a style="filter: grayscale(100%)" class="wiki-home cap" href="' + url_for(config.wiki_dir) + '">';

View File

@ -28,7 +28,7 @@ h6
.post-list .post-list
.post-title .post-title
font-weight: 500 font-weight: 500
margin: .75rem 0 .5rem margin: .75rem 0
line-height: 1.2 line-height: 1.2
font-size: $fs-h3 font-size: $fs-h3
border-bottom: none border-bottom: none

View File

@ -81,7 +81,7 @@
img img
width: 100% width: 100%
.cover-info .cover-info
padding: 1rem padding: 1.5rem 1rem
position: absolute position: absolute
line-height: 1.2 line-height: 1.2
width: 'calc(100% - %s * 2)' % 1rem width: 'calc(100% - %s * 2)' % 1rem
@ -89,10 +89,10 @@
color: white color: white
&[position=top] &[position=top]
top: 0 top: 0
background-image: linear-gradient(rgba(0,0,0,0.4),rgba(0,0,0,0.3),rgba(0,0,0,0)) background-image: linear-gradient(rgba(0,0,0,0.3),rgba(0,0,0,0.2),rgba(0,0,0,0))
&[position=bottom] &[position=bottom]
bottom: 0 bottom: 0
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.3),rgba(0,0,0,0.4)) background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2),rgba(0,0,0,0.3))
div+div div+div
margin-top: 8px margin-top: 8px
@media screen and (max-width: $device-mobile) @media screen and (max-width: $device-mobile)

View File

@ -6,7 +6,7 @@
display flex display flex
justify-content: center justify-content: center
flex-wrap: wrap flex-wrap: wrap
margin: 1.5rem 0 3rem margin: 1.5rem 0
img img
object-fit: contain object-fit: contain
>img >img
@ -27,27 +27,16 @@
.about-body .about-body
>p >p
line-height: 1.5 line-height: 1.5
.tag-plugin.navbar:last-child &:first-child
text-align: center margin-top: 2.5rem
nav.cap p+.tag-plugin.navbar .cap
margin-top: 1rem margin-top: 1rem
background: var(--card)
box-shadow: $boxshadow-button
a
color: var(--text-p2)
&:hover
background: var(--block)
&.active
background: var(--block)
box-shadow: none
color: var(--text-p1)
.about-header+.about-body .about-header+.about-body
margin-top: 1.5rem margin-top: 2rem
@media screen and (max-width: $device-mobile) @media screen and (max-width: $device-mobile)
.tag-plugin.about .tag-plugin.about
padding: 1.5rem 1rem padding: 2rem 1rem
.about-header .about-header
margin: 2.5rem 0 3rem
p p
width 100% width 100%

View File

@ -1,16 +1,22 @@
.md .tag-plugin.navbar .md .tag-plugin.navbar
text-align: center
nav.cap nav.cap
margin: 0 margin: 0
padding: 1px padding: 1px
background: var(--block) background: var(--card)
box-shadow: $boxshadow-button
border-radius: 6px border-radius: 6px
display: inline-flex display: inline-flex
max-width: 100% max-width: 100%
a a
margin: 1px margin: 1px
padding: 0.25em 0.75rem padding: 0.25em 0.75rem
color: var(--text-p2)
&:after &:after
display: none display: none
&:hover,&.active &:hover
background: var(--card) background: var(--block)
color: var(--text-p1) &.active
background: var(--block)
box-shadow: none
color: var(--text-p1)