This commit is contained in:
xaoxuu 2022-10-29 23:10:23 +08:00
parent 7fae27c5c7
commit a8ca8a9a5b
3 changed files with 8 additions and 7 deletions

View File

@ -3,7 +3,8 @@ const obj = {
image: post['cover'], image: post['cover'],
title: post['cover-title'], title: post['cover-title'],
cat: post['cover-cat'], cat: post['cover-cat'],
subtitle: post['cover-subtitle'] subtitle: post['cover-subtitle'],
color: post['cover-text-color']
}; };
function div_default() { function div_default() {
var el = ''; var el = '';
@ -98,6 +99,9 @@ function div_photo() {
el += '<img src="' + obj.image + '"/>'; el += '<img src="' + obj.image + '"/>';
if (obj.title || obj.cat || obj.subtitle) { if (obj.title || obj.cat || obj.subtitle) {
el += '<div class="cover-info"'; el += '<div class="cover-info"';
if (obj.color) {
el += 'style="color:' + obj.color + '"';
}
if (obj.cat) { if (obj.cat) {
el += 'position="top">'; el += 'position="top">';
} else { } else {

View File

@ -12,7 +12,7 @@ function layoutDiv() {
} }
el += '<div class="widget-body fs14">'; el += '<div class="widget-body fs14">';
el += '<div class="tag-plugin timeline stellar-timeline-api"'; el += '<div class="tag-plugin timeline stellar-timeline-api"';
['api', 'user'].forEach(key => { ['api', 'user', 'hide'].forEach(key => {
if (item[key]) { if (item[key]) {
el += ' ' + key + '="' + item[key] + '"'; el += ' ' + key + '="' + item[key] + '"';
} }

View File

@ -105,19 +105,16 @@
position: absolute position: absolute
line-height: 1.2 line-height: 1.2
width: 'calc(100% - %s * 2)' % 1rem width: 'calc(100% - %s * 2)' % 1rem
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) color: var(--text-p0)
color: white
&[position=top] &[position=top]
top: 0 top: 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.2),rgba(0,0,0,0.3))
div+div div+div
margin-top: 4px margin-top: 4px
.cap .cap
color: white
font-size: $fs-13 font-size: $fs-13
color: unset
.title .title
font-weight: 500 font-weight: 500
font-size: $fs-h3 font-size: $fs-h3