mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Refactor post-body style
This commit is contained in:
parent
760fdc9bd2
commit
d088fd4e2f
@ -1,7 +1,7 @@
|
||||
{%- if theme.follow_me %}
|
||||
|
||||
<div class="followme">
|
||||
<p>{{ __('follow_me.welcome') }}</p>
|
||||
<span>{{ __('follow_me.welcome') }}</span>
|
||||
|
||||
<div class="social-list">
|
||||
{%- for name, value in theme.follow_me %}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
{%- set translation = __('reward.' + name) if builtin.includes(name) else name %}
|
||||
<div>
|
||||
<img src="{{ url_for(image) }}" alt="{{ author }} {{ translation }}">
|
||||
<p>{{ translation }}</p>
|
||||
<span>{{ translation }}</span>
|
||||
</div>
|
||||
{%- endfor %}
|
||||
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
.post-body {
|
||||
font-family: $font-family-posts;
|
||||
word-wrap();
|
||||
|
||||
+desktop-large() {
|
||||
font-size: $font-size-large;
|
||||
}
|
||||
|
||||
+desktop() {
|
||||
text-align: unquote(hexo-config('text_align.desktop'));
|
||||
}
|
||||
@ -35,6 +42,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
.exturl .fa {
|
||||
font-size: $font-size-small;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.image-caption, .figure .caption {
|
||||
color: $grey-dark;
|
||||
font-size: $font-size-small;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
margin: -20px auto 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
iframe, img, video, embed {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
.post-copyright {
|
||||
background: var(--card-bg-color);
|
||||
border-left: 3px solid $red;
|
||||
list-style: none;
|
||||
margin: 2em 0 0;
|
||||
padding: .5em 1em;
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
.post-eof {
|
||||
background: $grey-light;
|
||||
height: 1px;
|
||||
margin: $post-eof-margin-top auto $post-eof-margin-bottom;
|
||||
width: 8%;
|
||||
|
||||
.post-block:last-of-type & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@ -1,25 +1,28 @@
|
||||
if (hexo-config('creative_commons.post')) {
|
||||
.post-copyright {
|
||||
list-style: none;
|
||||
padding: .5em 1em;
|
||||
post-card();
|
||||
}
|
||||
}
|
||||
|
||||
.followme {
|
||||
align-items: center;
|
||||
background: var(--card-bg-color);
|
||||
border-left: 3px solid $red;
|
||||
color: $grey;
|
||||
margin: 2em 0 1em 0;
|
||||
padding: 1em 1.5em;
|
||||
flex-column();
|
||||
text-align: center;
|
||||
post-card();
|
||||
|
||||
.social-list {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
+tablet-mobile() {
|
||||
.social-item {
|
||||
margin: .5em .75em;
|
||||
}
|
||||
}
|
||||
justify-content: center;
|
||||
|
||||
.social-item {
|
||||
margin: .5em 2em;
|
||||
|
||||
+tablet-mobile() {
|
||||
margin: .5em .75em;
|
||||
}
|
||||
}
|
||||
|
||||
.social-link {
|
||||
@ -29,8 +32,6 @@
|
||||
|
||||
.icon {
|
||||
font-size: 1.75em;
|
||||
height: 1.75em;
|
||||
width: 1.75em;
|
||||
}
|
||||
|
||||
.label {
|
||||
|
||||
@ -61,6 +61,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.post-sticky-flag {
|
||||
display: inline-block;
|
||||
transform: rotate(30deg);
|
||||
}
|
||||
|
||||
.posts-expand .post-meta {
|
||||
color: $grey-dark;
|
||||
font-family: $font-family-posts;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
display: flex;
|
||||
gap: 30px;
|
||||
justify-content: space-between;
|
||||
margin-top: 15px;
|
||||
margin-top: 1em;
|
||||
padding: 10px 5px 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
.reward-container {
|
||||
margin: 20px auto;
|
||||
padding: 10px 0;
|
||||
margin: $post-card-margin;
|
||||
padding: 1em 0;
|
||||
text-align: center;
|
||||
width: 90%;
|
||||
|
||||
@ -35,8 +35,12 @@
|
||||
div {
|
||||
display: inline-block;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
}
|
||||
|
||||
if (hexo-config('reward_settings.animation')) {
|
||||
&:hover p {
|
||||
&:hover span {
|
||||
animation: next-roll .1s infinite linear;
|
||||
// The animation may affect :hover of img in dark mode
|
||||
pointer-events: none;
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
.rtl {
|
||||
&.post-body {
|
||||
p, a, h1, h2, h3, h4, h5, h6, li, ul, ol {
|
||||
direction: rtl;
|
||||
font-family: UKIJ Ekran;
|
||||
}
|
||||
}
|
||||
|
||||
&.post-title {
|
||||
font-family: UKIJ Ekran;
|
||||
}
|
||||
}
|
||||
@ -1,29 +1,14 @@
|
||||
.post-body {
|
||||
font-family: $font-family-posts;
|
||||
word-wrap();
|
||||
|
||||
+desktop-large() {
|
||||
font-size: $font-size-large;
|
||||
.rtl {
|
||||
&.post-body {
|
||||
p, a, h1, h2, h3, h4, h5, h6, li, ul, ol {
|
||||
direction: rtl;
|
||||
font-family: UKIJ Ekran;
|
||||
}
|
||||
}
|
||||
|
||||
.exturl .fa {
|
||||
font-size: $font-size-small;
|
||||
margin-left: 4px;
|
||||
&.post-title {
|
||||
font-family: UKIJ Ekran;
|
||||
}
|
||||
|
||||
.image-caption, .figure .caption {
|
||||
color: $grey-dark;
|
||||
font-size: $font-size-small;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
margin: -20px auto 15px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.post-sticky-flag {
|
||||
display: inline-block;
|
||||
transform: rotate(30deg);
|
||||
}
|
||||
|
||||
.post-button {
|
||||
@ -31,6 +16,17 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.post-eof {
|
||||
background: $grey-light;
|
||||
height: 1px;
|
||||
margin: $post-eof-margin-top auto $post-eof-margin-bottom;
|
||||
width: 8%;
|
||||
|
||||
.post-block:last-of-type & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.use-motion {
|
||||
if (hexo-config('motion.transition.post_block')) {
|
||||
.post-block, .pagination, .comments {
|
||||
@ -58,16 +54,12 @@
|
||||
}
|
||||
|
||||
@import 'post-collapse';
|
||||
@import 'post-eof';
|
||||
@import 'post-expand';
|
||||
@import 'post-body';
|
||||
@import 'post-gallery';
|
||||
@import 'post-header';
|
||||
@import 'post-nav';
|
||||
@import 'post-rtl';
|
||||
@import 'post-tags';
|
||||
@import 'post-widgets';
|
||||
@import 'post-reward';
|
||||
|
||||
@import 'post-copyright' if (hexo-config('creative_commons.post'));
|
||||
|
||||
@import 'post-followme' if (hexo-config('follow_me'));
|
||||
|
||||
@ -87,6 +87,12 @@ flex-column() {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
post-card() {
|
||||
background: var(--card-bg-color);
|
||||
border-left: 3px solid $red;
|
||||
margin: $post-card-margin;
|
||||
}
|
||||
|
||||
font-family-icons($icon = '') {
|
||||
if ($icon) {
|
||||
content: $icon;
|
||||
|
||||
@ -278,6 +278,7 @@ $b2t-bg-color = $black-deep;
|
||||
$post-eof-margin-top = 80px; // or 160px for more white space;
|
||||
$post-eof-margin-bottom = 60px; // or 120px for less white space;
|
||||
|
||||
$post-card-margin = 1em auto 0;
|
||||
|
||||
// Note colors
|
||||
// --------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user