chore: refactor styles to fit hexo-component-inferno 0.10
parent
0587d69c4b
commit
0856a59d7f
|
@ -5,6 +5,33 @@ $article-font-size ?= 1.1rem
|
||||||
|
|
||||||
article
|
article
|
||||||
&.media
|
&.media
|
||||||
|
color: $text-light
|
||||||
|
|
||||||
|
a
|
||||||
|
color: inherit
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $primary
|
||||||
|
|
||||||
|
.image
|
||||||
|
width: 64px
|
||||||
|
height: 64px
|
||||||
|
|
||||||
|
img
|
||||||
|
object-fit: cover
|
||||||
|
width: 100%
|
||||||
|
height: 100%
|
||||||
|
|
||||||
|
.title
|
||||||
|
@extend .is-size-6
|
||||||
|
margin-bottom: .25em
|
||||||
|
|
||||||
|
.date, .categories
|
||||||
|
@extend .is-size-7
|
||||||
|
|
||||||
|
.categories
|
||||||
|
@extend .is-uppercase
|
||||||
|
|
||||||
.media-content
|
.media-content
|
||||||
color: $text-light
|
color: $text-light
|
||||||
|
|
||||||
|
@ -60,10 +87,11 @@ article
|
||||||
footer
|
footer
|
||||||
strong + cite
|
strong + cite
|
||||||
margin-left: .5em
|
margin-left: .5em
|
||||||
|
|
||||||
.message.message-immersive
|
.message.message-immersive
|
||||||
border-radius: 0
|
border-radius: 0
|
||||||
margin: 0 0-($card-content-padding) $card-content-padding 0-($card-content-padding)
|
margin: 0 0 - $card-content-padding $card-content-padding 0 - $card-content-padding
|
||||||
|
|
||||||
.message-body
|
.message-body
|
||||||
border: none
|
border: none
|
||||||
|
|
||||||
|
@ -116,7 +144,7 @@ article
|
||||||
content: '\f25e'
|
content: '\f25e'
|
||||||
font-size: 200px
|
font-size: 200px
|
||||||
font-family: 'Font Awesome 5 Brands'
|
font-family: 'Font Awesome 5 Brands'
|
||||||
opacity: 0.1
|
opacity: .1
|
||||||
|
|
||||||
.level-left
|
.level-left
|
||||||
flex-wrap: wrap
|
flex-wrap: wrap
|
||||||
|
@ -130,7 +158,7 @@ article
|
||||||
@extend .mb-1
|
@extend .mb-1
|
||||||
|
|
||||||
a
|
a
|
||||||
@extend .size-small, .has-text-grey
|
@extend .is-size-7, .has-text-grey
|
||||||
|
|
||||||
.licensing-meta
|
.licensing-meta
|
||||||
.level-item
|
.level-item
|
||||||
|
@ -144,8 +172,8 @@ article
|
||||||
vertical-align: bottom
|
vertical-align: bottom
|
||||||
|
|
||||||
h6
|
h6
|
||||||
@extend .size-small
|
@extend .is-size-7
|
||||||
|
|
||||||
a
|
a
|
||||||
color: inherit
|
color: inherit
|
||||||
|
|
||||||
|
@ -156,6 +184,7 @@ a
|
||||||
flex-shrink: 1
|
flex-shrink: 1
|
||||||
word-wrap: break-word
|
word-wrap: break-word
|
||||||
white-space: normal
|
white-space: normal
|
||||||
|
|
||||||
&.article-nav-next
|
&.article-nav-next
|
||||||
span
|
span
|
||||||
text-align: right
|
text-align: right
|
||||||
|
|
|
@ -9,6 +9,9 @@ $body-background-color ?= #f7f7f7
|
||||||
$family-sans-serif ?= Ubuntu, Roboto, 'Open Sans', 'Microsoft YaHei', sans-serif
|
$family-sans-serif ?= Ubuntu, Roboto, 'Open Sans', 'Microsoft YaHei', sans-serif
|
||||||
$family-code ?= 'Source Code Pro', monospace, 'Microsoft YaHei'
|
$family-code ?= 'Source Code Pro', monospace, 'Microsoft YaHei'
|
||||||
|
|
||||||
|
$size-7 ?= .85rem
|
||||||
|
$size-small ?= .75rem
|
||||||
|
|
||||||
$primary ?= $blue
|
$primary ?= $blue
|
||||||
$custom-colors ?= {
|
$custom-colors ?= {
|
||||||
grey-lightest: {
|
grey-lightest: {
|
||||||
|
|
|
@ -5,6 +5,15 @@ $donate-qrcode-max-width ?= 280px
|
||||||
$donate-qrcode-shadow ?= $card-shadow
|
$donate-qrcode-shadow ?= $card-shadow
|
||||||
$donate-qrcode-box-radius ?= $card-radius
|
$donate-qrcode-box-radius ?= $card-radius
|
||||||
|
|
||||||
|
$donate-button-colors ?= {
|
||||||
|
'afdian': rgb(136, 95, 217),
|
||||||
|
'alipay': rgb(0, 160, 232),
|
||||||
|
'buymeacoffee': rgb(255, 221, 0),
|
||||||
|
'paypal': rgb(254, 183, 0),
|
||||||
|
'patreon': rgb(255, 66, 77),
|
||||||
|
'wechat': rgb(26, 173, 25),
|
||||||
|
}
|
||||||
|
|
||||||
.donate
|
.donate
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
|
@ -32,3 +41,18 @@ $donate-qrcode-box-radius ?= $card-radius
|
||||||
&:last-child:not(:first-child)
|
&:last-child:not(:first-child)
|
||||||
.qrcode
|
.qrcode
|
||||||
right: -.75rem
|
right: -.75rem
|
||||||
|
|
||||||
|
for $name, $color in $donate-button-colors
|
||||||
|
&[data-type={'"' + $name + '"'}]
|
||||||
|
color: findColorInvert($color)
|
||||||
|
background-color: $color
|
||||||
|
border-color: transparent
|
||||||
|
|
||||||
|
&:active
|
||||||
|
background-color: darken($color, 5%)
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
background-color: darken($color, 2.5%)
|
||||||
|
|
||||||
|
&:focus:not(:active)
|
||||||
|
box-shadow: 0 0 0 .125em rgba($color, .25)
|
||||||
|
|
|
@ -138,15 +138,6 @@ for n in (0 .. 5)
|
||||||
&:hover
|
&:hover
|
||||||
color: $primary !important
|
color: $primary !important
|
||||||
|
|
||||||
/* ---------------------------------
|
|
||||||
* Font helpers
|
|
||||||
* --------------------------------- */
|
|
||||||
.size-small
|
|
||||||
font-size: .85rem !important
|
|
||||||
|
|
||||||
.line-height-inherit
|
|
||||||
line-height: inherit !important
|
|
||||||
|
|
||||||
/* ---------------------------------
|
/* ---------------------------------
|
||||||
* Image helpers
|
* Image helpers
|
||||||
* --------------------------------- */
|
* --------------------------------- */
|
||||||
|
|
|
@ -6,6 +6,9 @@ $pagination-background-color ?= $button-background-color
|
||||||
$post-navigation-fg ?= $grey
|
$post-navigation-fg ?= $grey
|
||||||
|
|
||||||
.pagination
|
.pagination
|
||||||
|
@extend .pagination.is-centered
|
||||||
|
margin-top: 1.5rem
|
||||||
|
|
||||||
.pagination-link,
|
.pagination-link,
|
||||||
.pagination-ellipsis,
|
.pagination-ellipsis,
|
||||||
.pagination-previous,
|
.pagination-previous,
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
.widget
|
||||||
|
.menu-list
|
||||||
|
li
|
||||||
|
ul
|
||||||
|
margin-right: 0
|
||||||
|
|
||||||
|
.level
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
|
.level-left, .level-right, .level-item
|
||||||
|
flex-shrink: 1
|
||||||
|
|
||||||
|
.level-left, .level-right
|
||||||
|
align-items: flex-start
|
||||||
|
|
||||||
|
.tag
|
||||||
|
background: $light-grey
|
||||||
|
color: $white-invert
|
||||||
|
|
||||||
|
.tags
|
||||||
|
.tag:first-child
|
||||||
|
background: $primary
|
||||||
|
color: $primary-invert
|
||||||
|
|
||||||
|
.tag:last-child
|
||||||
|
background: $light-grey
|
||||||
|
color: $white-invert
|
|
@ -40,7 +40,7 @@ module.exports = class extends Component {
|
||||||
</div> : null}
|
</div> : null}
|
||||||
{/* Metadata */}
|
{/* Metadata */}
|
||||||
<article class={`card-content article${'direction' in page ? ' ' + page.direction : ''}`} role="article">
|
<article class={`card-content article${'direction' in page ? ' ' + page.direction : ''}`} role="article">
|
||||||
{page.layout !== 'page' ? <div class="article-meta size-small is-uppercase level is-mobile">
|
{page.layout !== 'page' ? <div class="article-meta is-size-7 is-uppercase level is-mobile">
|
||||||
<div class="level-left">
|
<div class="level-left">
|
||||||
{/* Creation Date */}
|
{/* Creation Date */}
|
||||||
{page.date && <span class="level-item" dangerouslySetInnerHTML={{
|
{page.date && <span class="level-item" dangerouslySetInnerHTML={{
|
||||||
|
@ -89,14 +89,14 @@ module.exports = class extends Component {
|
||||||
{!index && article && article.licenses && Object.keys(article.licenses)
|
{!index && article && article.licenses && Object.keys(article.licenses)
|
||||||
? <ArticleLicensing.Cacheable page={page} config={config} helper={helper} /> : null}
|
? <ArticleLicensing.Cacheable page={page} config={config} helper={helper} /> : null}
|
||||||
{/* Tags */}
|
{/* Tags */}
|
||||||
{!index && page.tags && page.tags.length ? <div class="article-tags size-small mb-4">
|
{!index && page.tags && page.tags.length ? <div class="article-tags is-size-7 mb-4">
|
||||||
<span class="mr-2">#</span>
|
<span class="mr-2">#</span>
|
||||||
{page.tags.map(tag => {
|
{page.tags.map(tag => {
|
||||||
return <a class="link-muted mr-2" rel="tag" href={url_for(tag.path)}>{tag.name}</a>;
|
return <a class="link-muted mr-2" rel="tag" href={url_for(tag.path)}>{tag.name}</a>;
|
||||||
})}
|
})}
|
||||||
</div> : null}
|
</div> : null}
|
||||||
{/* "Read more" button */}
|
{/* "Read more" button */}
|
||||||
{index && page.excerpt ? <a class="article-more button is-small size-small" href={`${url_for(page.link || page.path)}#more`}>{__('article.more')}</a> : null}
|
{index && page.excerpt ? <a class="article-more button is-small is-size-7" href={`${url_for(page.link || page.path)}#more`}>{__('article.more')}</a> : null}
|
||||||
{/* Share button */}
|
{/* Share button */}
|
||||||
{!index ? <Share config={config} page={page} helper={helper} /> : null}
|
{!index ? <Share config={config} page={page} helper={helper} /> : null}
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Footer extends Component {
|
||||||
<a class="footer-logo is-block mb-2" href={siteUrl}>
|
<a class="footer-logo is-block mb-2" href={siteUrl}>
|
||||||
{footerLogo}
|
{footerLogo}
|
||||||
</a>
|
</a>
|
||||||
<p class="size-small">
|
<p class="is-size-7">
|
||||||
<span dangerouslySetInnerHTML={{ __html: `© ${siteYear} ${author || siteTitle}` }}></span>
|
<span dangerouslySetInnerHTML={{ __html: `© ${siteYear} ${author || siteTitle}` }}></span>
|
||||||
Powered by <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a> &
|
Powered by <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a> &
|
||||||
<a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a>
|
<a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a>
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Profile extends Component {
|
||||||
followTitle,
|
followTitle,
|
||||||
socialLinks
|
socialLinks
|
||||||
} = this.props;
|
} = this.props;
|
||||||
return <div class="card widget">
|
return <div class="card widget" data-type="profile">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<nav class="level">
|
<nav class="level">
|
||||||
<div class="level-item has-text-centered flex-shrink-1">
|
<div class="level-item has-text-centered flex-shrink-1">
|
||||||
|
@ -37,7 +37,7 @@ class Profile extends Component {
|
||||||
<figure class="image is-128x128 mx-auto mb-2">
|
<figure class="image is-128x128 mx-auto mb-2">
|
||||||
<img class={'avatar' + (avatarRounded ? ' is-rounded' : '')} src={avatar} alt={author} />
|
<img class={'avatar' + (avatarRounded ? ' is-rounded' : '')} src={avatar} alt={author} />
|
||||||
</figure>
|
</figure>
|
||||||
{author ? <p class="title is-size-4 is-block line-height-inherit">{author}</p> : null}
|
{author ? <p class="title is-size-4 is-block" style={{'line-height': 'inherit'}}>{author}</p> : null}
|
||||||
{authorTitle ? <p class="is-size-6 is-block">{authorTitle}</p> : null}
|
{authorTitle ? <p class="is-size-6 is-block">{authorTitle}</p> : null}
|
||||||
{location ? <p class="is-size-6 is-flex justify-content-center">
|
{location ? <p class="is-size-6 is-flex justify-content-center">
|
||||||
<i class="fas fa-map-marker-alt mr-1"></i>
|
<i class="fas fa-map-marker-alt mr-1"></i>
|
||||||
|
|
|
@ -258,10 +258,6 @@ article.article
|
||||||
.article-licensing
|
.article-licensing
|
||||||
background: $black-ter
|
background: $black-ter
|
||||||
|
|
||||||
.licensing-title
|
|
||||||
a
|
|
||||||
@extend .size-small, .has-text-grey
|
|
||||||
|
|
||||||
.content
|
.content
|
||||||
blockquote
|
blockquote
|
||||||
background: transparent
|
background: transparent
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
@import '../../include/style/timeline'
|
@import '../../include/style/timeline'
|
||||||
@import '../../include/style/search'
|
@import '../../include/style/search'
|
||||||
@import '../../include/style/codeblock'
|
@import '../../include/style/codeblock'
|
||||||
|
@import '../../include/style/widget'
|
||||||
@import '../../include/style/donate'
|
@import '../../include/style/donate'
|
||||||
@import '../../include/style/plugin'
|
@import '../../include/style/plugin'
|
||||||
@import '../../include/style/responsive'
|
@import '../../include/style/responsive'
|
||||||
|
|
Loading…
Reference in New Issue