Contact theme styles

This commit is contained in:
Cotes Chung 2021-01-23 13:20:58 +08:00
parent 28f36bee23
commit b7266aceac
20 changed files with 78 additions and 140 deletions

View file

@ -175,7 +175,6 @@ defaults:
url: / url: /
sass: sass:
sass_dir: /assets/css
style: compressed style: compressed
compress_html: compress_html:

View file

@ -6,21 +6,9 @@
MIT Licensed MIT Licensed
--> -->
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
{% if page.layout == 'category' or page.layout == 'tag' %}
{% assign style = 'category-tag' %}
{% else %}
{% assign style = page.layout %}
{% endif %}
{% assign src = style | prepend: '/assets/css/' | append: '.css' | relative_url %}
<link rel="preload" href="{{ src }}" as="style">
<link rel="stylesheet" href="{{ src }}">
{% if page.layout == 'post' %}
{% if site.toc and page.toc %} {% if site.toc and page.toc %}
<link rel="preload" as="style" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}"> <link rel="stylesheet"
<link rel="stylesheet" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}" /> href="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.css">
{% endif %}
{% endif %} {% endif %}

View file

@ -1,19 +1,8 @@
/* /*
* The main styles. The common styles
* v2.0
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2018-2019 Cotes Chung
* MIT Licensed
*/ */
@import "_addon/module";
@import "_addon/variables";
@import "_colors/light-typography";
@import "_colors/dark-typography";
@import url('https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Lato&family=Source+Sans+Pro:wght@400;600;900&display=swap');
@mixin mode-toggle($dark-mode: false) { @mixin mode-toggle($dark-mode: false) {
@if $dark-mode { @if $dark-mode {
@include dark-scheme; @include dark-scheme;
@ -60,7 +49,7 @@ body {
/*--- sidebar layout ---*/ /*--- sidebar layout ---*/
$tab-count: {{ site.tabs | size | plus: 1 }}; // plus 1 for home tab $tab-count: 5 !default;
$sidebar-display: "sidebar-display"; $sidebar-display: "sidebar-display";
@ -718,10 +707,10 @@ kbd {
} }
a { a {
@at-root p>#{&} { p > & {
@extend %link-color; @extend %link-color;
} }
@at-root span>#{&} { span > & {
@extend %link-color; @extend %link-color;
} }
.post-preview & { .post-preview & {

View file

@ -6,8 +6,8 @@
* MIT Licensed * MIT Licensed
*/ */
@import "_colors/light-syntax"; @import "colors/light-syntax";
@import "_colors/dark-syntax"; @import "colors/dark-syntax";
html:not([mode]), html:not([mode]),
html[mode=light] { html[mode=light] {

View file

@ -1,9 +1,5 @@
/*! /*
* The syntax dark mode styles. * The syntax dark mode styles.
* v2.0
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2018-2019 Cotes Chung
* MIT Licensed
*/ */
@mixin dark-syntax { @mixin dark-syntax {

View file

@ -1,9 +1,5 @@
/*! /*
* The main dark mode styles * The main dark mode styles
* v2.0
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2018-2019 Cotes Chung
* MIT Licensed
*/ */
@mixin dark-scheme { @mixin dark-scheme {

View file

@ -1,9 +1,5 @@
/*! /*
* The syntax light mode code snippet colors. * The syntax light mode code snippet colors.
* v2.1
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2020 Cotes Chung
* MIT Licensed
*/ */
@mixin light-syntax { @mixin light-syntax {

View file

@ -1,9 +1,5 @@
/*! /*
* The syntax light mode typography colors * The syntax light mode typography colors
* v2.1
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2020 Cotes Chung
* MIT Licensed
*/ */
@mixin light-scheme { @mixin light-scheme {

View file

@ -0,0 +1,23 @@
/*
* The main styles
*
* v2.7.2
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2021 Cotes Chung
* MIT Licensed
*/
@import "colors/light-typography";
@import "colors/dark-typography";
@import "addon/module";
@import "addon/variables";
@import 'addon/syntax';
@import "addon/commons";
@import "layout/home";
@import "layout/post";
@import "layout/tags";
@import "layout/archives";
@import "layout/categories";
@import "layout/category-tag";

View file

@ -1,13 +1,6 @@
--- /*
# Style for Archives Style for Archives
# v2.0 */
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---
{% include_relative _addon/main.scss %}
%date-timeline { %date-timeline {
content: ""; content: "";

View file

@ -1,13 +1,6 @@
--- /*
# Style for Tab Categories Style for Tab Categories
# v2.0 */
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---
{% include_relative _addon/main.scss %}
%category-icon-color { %category-icon-color {
color: gray; color: gray;

View file

@ -1,13 +1,6 @@
--- /*
# Style for page Category and Tag Style for page Category and Tag
# v2.0 */
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---
{% include_relative _addon/main.scss %}
#page-category, #page-tag { #page-category, #page-tag {
ul > li { ul > li {

View file

@ -1,12 +1,6 @@
--- /*
# Style for Homepage Style for Homepage
# v2.0 */
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---
{% include_relative _addon/main.scss %}
#post-list { #post-list {
margin-top: 1rem; margin-top: 1rem;

View file

@ -1,17 +1,9 @@
--- /*
# Post-specific style Post-specific style
# v2.0 */
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---
$prompt-older: 'older'!default; // "{{ site.data.label.post.button.previous }}";
{% include_relative _addon/main.scss %} $prompt-newer: 'newer'!default; // "{{ site.data.label.post.button.next }}";
{% include_relative _addon/syntax.scss %}
$prompt-older: "{{ site.data.label.post.button.previous }}";
$prompt-newer: "{{ site.data.label.post.button.next }}";
@mixin btn-sharing-color($light-color, $important: false) { @mixin btn-sharing-color($light-color, $important: false) {
@if $important { @if $important {
@ -34,15 +26,17 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
padding-right: $pr; padding-right: $pr;
} }
.post .post-meta { #post-wrapper .post-meta {
> div:nth-child(2) { > div:nth-child(2) {
> span:not(:first-child)::before { > span:not(:first-child)::before {
@include dot; @include dot;
} }
} }
#pv::after { #pv::after {
content: " views"; content: " views";
} }
.readtime::after { .readtime::after {
content: " read"; content: " read";
} }
@ -331,7 +325,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
} }
@media all and (min-width: 768px) { @media all and (min-width: 768px) {
.post { #post-wrapper {
.post-meta { .post-meta {
>div:not(:first-child)::before { >div:not(:first-child)::before {
@include dot(0.5rem, 0.2rem); @include dot(0.5rem, 0.2rem);

View file

@ -1,13 +1,6 @@
--- /*
# Styles for Tab Tags Styles for Tab Tags
# v2.0 */
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---
{% include_relative _addon/main.scss %}
.tag { .tag {
border-radius: 0.7em; border-radius: 0.7em;

View file

@ -1,4 +0,0 @@
/*!
* Bootstrap Table of Contents v1.0.1 (http://afeld.github.io/bootstrap-toc/)
* Copyright 2015 Aidan Feldman
* Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */nav[data-toggle=toc] .nav>li>a{display:block;padding:4px 20px;font-size:13px;font-weight:500;color:#767676}nav[data-toggle=toc] .nav>li>a:focus,nav[data-toggle=toc] .nav>li>a:hover{padding-left:19px;color:#563d7c;text-decoration:none;background-color:transparent;border-left:1px solid #563d7c}nav[data-toggle=toc] .nav-link.active,nav[data-toggle=toc] .nav-link.active:focus,nav[data-toggle=toc] .nav-link.active:hover{padding-left:18px;font-weight:700;color:#563d7c;background-color:transparent;border-left:2px solid #563d7c}nav[data-toggle=toc] .nav-link+ul{display:none;padding-bottom:10px}nav[data-toggle=toc] .nav .nav>li>a{padding-top:1px;padding-bottom:1px;padding-left:30px;font-size:12px;font-weight:400}nav[data-toggle=toc] .nav .nav>li>a:focus,nav[data-toggle=toc] .nav .nav>li>a:hover{padding-left:29px}nav[data-toggle=toc] .nav .nav>li>.active,nav[data-toggle=toc] .nav .nav>li>.active:focus,nav[data-toggle=toc] .nav .nav>li>.active:hover{padding-left:28px;font-weight:500}nav[data-toggle=toc] .nav-link.active+ul{display:block}

View file

@ -1,10 +0,0 @@
---
# The default style for layout Page
# v2.2
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2020 Cotes Chung
# MIT License
---
{% include_relative _addon/main.scss %}
{% include_relative _addon/syntax.scss %}

9
assets/css/style.scss Normal file
View file

@ -0,0 +1,9 @@
---
---
$tab-count: {{ site.tabs | size | plus: 1 }}; // plus 1 for home tab
$prompt-older: "{{ site.data.label.post.button.previous }}";
$prompt-newer: "{{ site.data.label.post.button.next }}";
@import "jekyll-theme-chirpy";