update theme

This commit is contained in:
thisLight 2020-12-28 10:04:32 +08:00
parent 8f9e26b0db
commit 5b3c45910d
5 changed files with 126 additions and 6 deletions

View file

@ -14,6 +14,8 @@ stylesheets:
- /css/cmd.css
- /materialize/css/materialize.css
- /css/materialdesignicons.min.css
- /css/entry.css
- /css/xcode.css
# scripts loaded in the end of the body
scripts:

View file

@ -24,7 +24,7 @@
<div class="card-content">
{{ PostTags(post) }}
{% if post.excerpt != "" %}
<p>{{ post.excerpt }}</p>
<p class="entry">{{ post.excerpt }}</p>
{% endif %}
</div>
{% endif %}
@ -34,7 +34,7 @@
{% else %}
<div class="card-content">
<a href="{% if post.link %}{{ post.link }}{% else %}{{ url_for(post.path) }}{% endif %}" {%if post.link%}target="_blank"{%endif%}><span class="card-title">{% if (post.title != '' && post.title !== null && post.title !== undefined) %}{{ post.title }}{% else %}{{ post.path }}{% endif %}</span></a>
<p>{{ post.excerpt }}</p>
<p class="entry">{{ post.excerpt }}</p>
{{ PostTags(post) }}
</div>
{% endif %}
@ -48,11 +48,11 @@
<div class="card">
<div class="row" style="margin-bottom: 0" >
{% if email %}
<div class="col" style="padding: 12px">
<div class="col" style="padding: 12px; padding-left: 20px;">
<img class="circle responsive-img" src="{{ gravatar(email) }}" async />
</div>
{% else %}
<div class="col" style="padding: 12px">
<div class="col" style="padding: 12px; padding-left: 20px;">
<img class="circle responsive-img" src="{{ gravatar('example@foo.bar') }}" />
</div>
{% endif %}
@ -67,7 +67,7 @@
{% endmacro %}
{% macro TagPanel(tags) %}
<div class="card-panel">
<div class="card-panel" style="padding-top: 12px;">
<h5>All Tags</h5>
{% for tag in tags %}
<a href="{{ url_for(tag.path)}}"><div class="chip">

View file

@ -1,5 +1,15 @@
{% extends 'includes/layout.swig' %}
{% macro PostTags(post) %}
<div>
{% for k in Object.keys(post.tags.data) %}
<a href="{{ url_for(post.tags.data[k].path)}}"><div class="chip">
{{post.tags.data[k].name}}
</div></a>
{% endfor %}
</div>
{% endmacro %}
{% macro Gallery(photos) %}
<div class="row">
<div class="col">
@ -21,10 +31,11 @@
<div class="col" style="padding-left:0;"><span class="mdi mdi-account">{{config.author}}</span></div>
<div class="col"><span class="mdi mdi-clock">{{date(page.date, 'YYYY/M/D')}}</span></div>
</div>
{{ PostTags(page) }}
{% if page.photos && page.photos.length > 0%}
{{Gallery(page.photos)}}
{% endif %}
<div class="flow-text">
<div class="flow-text entry">
{% autoescape false %}{{ page.content }}{% endautoescape %}
</div>
</div>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,106 @@
/*
XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
Ported to Hexo highlight.js system by Rubicon <l1589002388@gmail.com>
*/
.highlight {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fff;
color: black;
}
/* Gray DOCTYPE selectors like WebKit */
.code .xml .meta {
color: #c0c0c0;
}
.code .comment,
.code .quote {
color: #007400;
}
.code .tag,
.code .attribute,
.code .keyword,
.code .selector-tag,
.code .literal,
.code .name {
color: #aa0d91;
}
.code .variable,
.code .template-variable {
color: #3F6E74;
}
.code .code,
.code .string,
.code .meta-string {
color: #c41a16;
}
.code .regexp,
.code .link {
color: #0E0EFF;
}
.code .title,
.code .symbol,
.code .bullet,
.code .number {
color: #1c00cf;
}
.code .section,
.code .meta {
color: #643820;
}
.code .class .title,
.code .type,
.code .built_in,
.code .builtin-name,
.code .params {
color: #5c2699;
}
.code .attr {
color: #836C28;
}
.code .subst {
color: #000;
}
.code .formula {
background-color: #eee;
font-style: italic;
}
.code .addition {
background-color: #baeeba;
}
.code .deletion {
background-color: #ffc8bd;
}
.code .selector-id,
.code .selector-class {
color: #9b703f;
}
.code .doctag,
.code .strong {
font-weight: bold;
}
.code .emphasis {
font-style: italic;
}