Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ taxonomies = [
[markdown.highlighting]
error_on_missing_language = false
style = "inline"
light_theme = "min-light"
light_theme = "one-light"
dark_theme = "material-theme-darker"

[extra]
Expand All @@ -39,6 +39,7 @@ on_this_page = "On This Page"
categories = "Categories:"
footer_msg = "Unless specified, works on this wiki are licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/?ref=chooser-v1)."
info = "Info"
tips = "Tips"
warning = "Warning"
danger = "Danger"
success = "Success"
Expand All @@ -58,6 +59,7 @@ on_this_page = "本页内容"
categories = "类别:"
footer_msg = "除非另行声明,此 Wiki 的内容采用 [知识共享署名 4.0 国际许可协议](https://creativecommons.org/licenses/by/4.0/) 进行许可。"
info = "信息"
tips = "提示"
warning = "警告"
danger = "危险"
success = "成功"
15 changes: 5 additions & 10 deletions sass/_color.sass
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ blockquote

del
color: #979593

code
background-color: #f3f2f1

pre
code
// So we can see non-colored text
color: #c0c5ce
background-color: transparent
kbd
box-shadow: 0px 1px 2px 0px #444
border: 1px solid #a5a5a5
background: #eee

table
border-color: #a19f9d
Expand Down Expand Up @@ -75,7 +70,7 @@ article
.card.success
color: #498205
fill: #498205
.card.info
.card.info, .card.tips
color: #0078d4
fill: #0078d4
.card.warning
Expand Down
8 changes: 5 additions & 3 deletions sass/_color_dark.sass
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
blockquote
color: #e1dfdd

code
background-color: #323130
kbd
box-shadow: 0px 1px 0 1px #888
border: 1px solid #ccc
background: #222

table
border-color: #c8c6c4
Expand All @@ -52,7 +54,7 @@
.card.success
fill: #00ad56
color: #00ad56
.card.info
.card.info, .card.tips
fill: #00b7c3
color: #00b7c3
.card.warning
Expand Down
3 changes: 1 addition & 2 deletions sass/_components.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
.header
margin-bottom: .25em
font-size: 1.2em
font-weight: 600
font-family: $sansSerifFonts
font-weight: 700
text-transform: capitalize
// To align them
display: flex
Expand Down
15 changes: 15 additions & 0 deletions sass/_main.sass
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,18 @@ footer
line-height: 2.6rem
text-align: center

img
max-width: 40rem

kbd
display: inline-block
font-family: sans-serif
font-size: 8pt
border-radius: 4px
cursor: default
line-height: 1
margin: 0 0.5rem
padding: 3px 6px
position: relative
top: -3px
user-select: none
4 changes: 0 additions & 4 deletions sass/_typography.sass
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ pre
overflow-x: auto
padding: 1rem
line-height: 1.2
code
// So we can see non-colored text
color: #c0c5ce
background-color: transparent

// Table formatting
table
Expand Down
2 changes: 1 addition & 1 deletion templates/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1 id="title">{{ section.title }}</h1>
</a>
{% endfor %}

{% set pages = section.pages | sort(attribute="title") %}
{% set pages = section.pages %}
{% for post in pages %}
<a href="{{ post.permalink }}">{{ post.title }}</a>
{% endfor %}
Expand Down
10 changes: 9 additions & 1 deletion templates/shortcodes/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@
{% set icon = "<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Warning</title><path d='M85.57 446.25h340.86a32 32 0 0028.17-47.17L284.18 82.58c-12.09-22.44-44.27-22.44-56.36 0L57.4 399.08a32 32 0 0028.17 47.17z' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M250.26 195.39l5.74 122 5.73-121.95a5.74 5.74 0 00-5.79-6h0a5.74 5.74 0 00-5.68 5.95z' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M256 397.25a20 20 0 1120-20 20 20 0 01-20 20z'/></svg>" %}
{% elif type == "danger" %}
{% set icon = "<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Nuclear</title><path d='M258.9 48C141.92 46.42 46.42 141.92 48 258.9c1.56 112.19 92.91 203.54 205.1 205.1 117 1.6 212.48-93.9 210.88-210.88C462.44 140.91 371.09 49.56 258.9 48zM429 239.92l-93.08-.1a2 2 0 01-1.95-1.57 80.08 80.08 0 00-27.44-44.17 2 2 0 01-.54-2.43l41.32-83.43a2 2 0 012.87-.81A176.2 176.2 0 01431 237.71a2 2 0 01-2 2.21zm-220.8 20.46a48 48 0 1143.42 43.42 48 48 0 01-43.42-43.42zm-43.55-152.16L206 191.65a2 2 0 01-.54 2.43A80.08 80.08 0 00178 238.25a2 2 0 01-2 1.57l-93.08.1a2 2 0 01-2-2.21 176.2 176.2 0 0180.82-130.3 2 2 0 012.91.81zm-.37 295.34l56.31-74.09a2 2 0 012.43-.6 79.84 79.84 0 0066 0 2 2 0 012.43.6l56.31 74.09a2 2 0 01-.54 2.92 175.65 175.65 0 01-182.36 0 2 2 0 01-.58-2.92z'/></svg>" %}
{% elif type == "tips" %}
{% set icon = "<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M304 384v-24c0-29 31.54-56.43 52-76 28.84-27.57 44-64.61 44-108 0-80-63.73-144-144-144a143.6 143.6 0 00-144 144c0 41.84 15.81 81.39 44 108 20.35 19.21 52 46.7 52 76v24M224 480h64M208 432h96M256 384V256' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/><path d='M294 240s-21.51 16-38 16-38-16-38-16' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'/></svg>" %}
{% else %}
{% set icon = "<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><title>Information Circle</title><path d='M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184 184-82.39 184-184S349.61 64 248 64z' fill='none' stroke='currentColor' stroke-miterlimit='10' stroke-width='32'/><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='32' d='M220 220h32v116'/><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-miterlimit='10' stroke-width='32' d='M208 340h88'/><path d='M248 130a26 26 0 1026 26 26 26 0 00-26-26z'/></svg>" %}
{% endif %}

<div class="card {{ type }}">
<div class="header">
<div class="symbol">{{ icon | safe }}</div>
<span>{{ trans(key=type) }}</span>
<span>
{% if title %}
{{ title }}
{% else %}
{{ trans(key=type, lang=lang) }}
{% endif %}
</span>
</div>
<div class="content">
{{ body | markdown(inline=true) | safe }}
Expand Down
Loading