diff --git a/config.toml b/config.toml index 5e543a39..b7aee15c 100644 --- a/config.toml +++ b/config.toml @@ -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] @@ -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" @@ -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 = "成功" diff --git a/sass/_color.sass b/sass/_color.sass index 5863e578..43e410d0 100644 --- a/sass/_color.sass +++ b/sass/_color.sass @@ -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 @@ -75,7 +70,7 @@ article .card.success color: #498205 fill: #498205 -.card.info +.card.info, .card.tips color: #0078d4 fill: #0078d4 .card.warning diff --git a/sass/_color_dark.sass b/sass/_color_dark.sass index 19a468b8..a035512b 100644 --- a/sass/_color_dark.sass +++ b/sass/_color_dark.sass @@ -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 @@ -52,7 +54,7 @@ .card.success fill: #00ad56 color: #00ad56 - .card.info + .card.info, .card.tips fill: #00b7c3 color: #00b7c3 .card.warning diff --git a/sass/_components.sass b/sass/_components.sass index b3ba328d..c93fd348 100644 --- a/sass/_components.sass +++ b/sass/_components.sass @@ -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 diff --git a/sass/_main.sass b/sass/_main.sass index 6c4f6453..b412f831 100644 --- a/sass/_main.sass +++ b/sass/_main.sass @@ -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 diff --git a/sass/_typography.sass b/sass/_typography.sass index 887d74ca..b293e85c 100644 --- a/sass/_typography.sass +++ b/sass/_typography.sass @@ -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 diff --git a/templates/section.html b/templates/section.html index 6d705113..a67ccaaa 100644 --- a/templates/section.html +++ b/templates/section.html @@ -66,7 +66,7 @@

{{ section.title }}

{% endfor %} - {% set pages = section.pages | sort(attribute="title") %} + {% set pages = section.pages %} {% for post in pages %} {{ post.title }} {% endfor %} diff --git a/templates/shortcodes/card.html b/templates/shortcodes/card.html index 4d53ba4f..30efa5dd 100644 --- a/templates/shortcodes/card.html +++ b/templates/shortcodes/card.html @@ -6,6 +6,8 @@ {% set icon = "Warning" %} {% elif type == "danger" %} {% set icon = "Nuclear" %} +{% elif type == "tips" %} +{% set icon = "" %} {% else %} {% set icon = "Information Circle" %} {% endif %} @@ -13,7 +15,13 @@
{{ icon | safe }}
- {{ trans(key=type) }} + + {% if title %} + {{ title }} + {% else %} + {{ trans(key=type, lang=lang) }} + {% endif %} +
{{ body | markdown(inline=true) | safe }}