fix(*): minor layout and style fixes

- allow empty profile social_links
- fix code block font size on iOS safari
This commit is contained in:
ppoffice 2020-04-12 14:20:49 -04:00
parent 077780c993
commit d0184c21bb
5 changed files with 18 additions and 12 deletions

View File

@ -43,7 +43,7 @@ blog feature-rich and powerful.
<th><a href="https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search/">Search</a></th> <th><a href="https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search/">Search</a></th>
<th><a href="https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share/">Share</a></th> <th><a href="https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share/">Share</a></th>
<th><a href="https://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/">Widgets</a></th> <th><a href="https://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/">Widgets</a></th>
<th><a href="https://blog.zhangruipeng.me/hexo-theme-icarus/categories/Plugins/General/">Other Plugins</a></th> <th><a href="https://blog.zhangruipeng.me/hexo-theme-icarus/categories/Plugins/">Other Plugins</a></th>
</tr> </tr>
<tr> <tr>
<td>Changyan</td> <td>Changyan</td>

View File

@ -1,7 +1,7 @@
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"$id": "/common/plugins.json", "$id": "/common/plugins.json",
"description": "Plugin configurations", "description": "Plugin configurations\nhttps://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/",
"type": "object", "type": "object",
"properties": { "properties": {
"animejs": { "animejs": {

View File

@ -58,3 +58,9 @@ $colors = merge($colors, $custom-colors)
@import bulma-stylus-root + '/form/_all' @import bulma-stylus-root + '/form/_all'
@import bulma-stylus-root + '/grid/_all' @import bulma-stylus-root + '/grid/_all'
@import bulma-stylus-root + '/layout/_all' @import bulma-stylus-root + '/layout/_all'
html
-webkit-text-size-adjust: 100%
-moz-text-size-adjust: 100%
-ms-text-size-adjust: 100%
text-size-adjust: 100%

View File

@ -16,16 +16,16 @@
width: $desktop - 2 * $gap width: $desktop - 2 * $gap
+tablet() +tablet()
.column-main, .column-left, .column-right, .column-right-shadow .is-sticky
&.is-sticky
align-self: flex-start
position: -webkit-sticky position: -webkit-sticky
position: sticky position: sticky
top: .75rem
.column-right-shadow
&.is-sticky
top: 1.5rem top: 1.5rem
z-index: 99
.column-main, .column-left, .column-right, .column-right-shadow
&.is-sticky
top: .75rem
align-self: flex-start
+mobile() +mobile()
.section .section

View File

@ -75,7 +75,7 @@ class Profile extends Component {
{followLink ? <div class="level"> {followLink ? <div class="level">
<a class="level-item button is-primary is-rounded" href={followLink} target="_blank" rel="noopener">{followTitle}</a> <a class="level-item button is-primary is-rounded" href={followLink} target="_blank" rel="noopener">{followTitle}</a>
</div> : null} </div> : null}
{this.renderSocialLinks(socialLinks)} {socialLinks ? this.renderSocialLinks(socialLinks) : null}
</div> </div>
</div>; </div>;
} }
@ -109,7 +109,7 @@ Profile.Cacheable = cacheComponent(Profile, 'widget.profile', props => {
const categoryCount = site.categories.filter(category => category.length).length; const categoryCount = site.categories.filter(category => category.length).length;
const tagCount = site.tags.filter(tag => tag.length).length; const tagCount = site.tags.filter(tag => tag.length).length;
const socialLinks = Object.keys(social_links).map(name => { const socialLinks = social_links ? Object.keys(social_links).map(name => {
const link = social_links[name]; const link = social_links[name];
if (typeof link === 'string') { if (typeof link === 'string') {
return { return {
@ -122,7 +122,7 @@ Profile.Cacheable = cacheComponent(Profile, 'widget.profile', props => {
url: url_for(link.url), url: url_for(link.url),
icon: link.icon icon: link.icon
}; };
}); }) : null;
return { return {
avatar: getAvatar(), avatar: getAvatar(),