Skip to content

Commit

Permalink
Contact theme styles
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Jan 24, 2021
1 parent 28f36be commit b7266ac
Show file tree
Hide file tree
Showing 20 changed files with 78 additions and 140 deletions.
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ defaults:
url: /

sass:
sass_dir: /assets/css
style: compressed

compress_html:
Expand Down
20 changes: 4 additions & 16 deletions _includes/css-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,9 @@
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 %}
<link rel="preload" as="style" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/lib/bootstrap-toc.min.css' | relative_url }}" />
{% endif %}
{% if site.toc and page.toc %}
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/afeld/[email protected]/dist/bootstrap-toc.min.css">
{% endif %}
19 changes: 4 additions & 15 deletions assets/css/_addon/main.scss → _sass/addon/commons.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
/*
* The main styles.
* v2.0
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2018-2019 Cotes Chung
* MIT Licensed
The common styles
*/

@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');


@mixin mode-toggle($dark-mode: false) {
@if $dark-mode {
@include dark-scheme;
Expand Down Expand Up @@ -60,7 +49,7 @@ body {

/*--- sidebar layout ---*/

$tab-count: {{ site.tabs | size | plus: 1 }}; // plus 1 for home tab
$tab-count: 5 !default;

$sidebar-display: "sidebar-display";

Expand Down Expand Up @@ -718,10 +707,10 @@ kbd {
}

a {
@at-root p>#{&} {
p > & {
@extend %link-color;
}
@at-root span>#{&} {
span > & {
@extend %link-color;
}
.post-preview & {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions assets/css/_addon/syntax.scss → _sass/addon/syntax.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* MIT Licensed
*/

@import "_colors/light-syntax";
@import "_colors/dark-syntax";
@import "colors/light-syntax";
@import "colors/dark-syntax";

html:not([mode]),
html[mode=light] {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/*!
* The syntax dark mode styles.
* v2.0
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2018-2019 Cotes Chung
* MIT Licensed
*/
/*
* The syntax dark mode styles.
*/

@mixin dark-syntax {
/* ----- My styles ------ */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/*!
* The main dark mode styles
* v2.0
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2018-2019 Cotes Chung
* MIT Licensed
*/
/*
* The main dark mode styles
*/

@mixin dark-scheme {
/* framework */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/*!
* The syntax light mode code snippet colors.
* v2.1
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2020 Cotes Chung
* MIT Licensed
*/
/*
* The syntax light mode code snippet colors.
*/

@mixin light-syntax {
/* see: <https://raw.githubusercontent.com/jwarby/pygments-css/master/github.css> */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/*!
* The syntax light mode typography colors
* v2.1
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2020 Cotes Chung
* MIT Licensed
*/
/*
* The syntax light mode typography colors
*/

@mixin light-scheme {
/* Common */
Expand Down
23 changes: 23 additions & 0 deletions _sass/jekyll-theme-chirpy.scss
Original file line number Diff line number Diff line change
@@ -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";
13 changes: 3 additions & 10 deletions assets/css/archives.scss → _sass/layout/archives.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
---
# Style for Archives
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---


{% include_relative _addon/main.scss %}
/*
Style for Archives
*/

%date-timeline {
content: "";
Expand Down
13 changes: 3 additions & 10 deletions assets/css/categories.scss → _sass/layout/categories.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
---
# Style for Tab Categories
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---


{% include_relative _addon/main.scss %}
/*
Style for Tab Categories
*/

%category-icon-color {
color: gray;
Expand Down
13 changes: 3 additions & 10 deletions assets/css/category-tag.scss → _sass/layout/category-tag.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
---
# 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 %}
/*
Style for page Category and Tag
*/

#page-category, #page-tag {
ul > li {
Expand Down
12 changes: 3 additions & 9 deletions assets/css/home.scss → _sass/layout/home.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
---
# Style for Homepage
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---

{% include_relative _addon/main.scss %}
/*
Style for Homepage
*/

#post-list {
margin-top: 1rem;
Expand Down
24 changes: 9 additions & 15 deletions assets/css/post.scss → _sass/layout/post.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
---
# Post-specific style
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---
/*
Post-specific style
*/


{% include_relative _addon/main.scss %}
{% include_relative _addon/syntax.scss %}

$prompt-older: "{{ site.data.label.post.button.previous }}";
$prompt-newer: "{{ site.data.label.post.button.next }}";
$prompt-older: 'older'!default; // "{{ site.data.label.post.button.previous }}";
$prompt-newer: 'newer'!default; // "{{ site.data.label.post.button.next }}";

@mixin btn-sharing-color($light-color, $important: false) {
@if $important {
Expand All @@ -34,15 +26,17 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
padding-right: $pr;
}

.post .post-meta {
#post-wrapper .post-meta {
> div:nth-child(2) {
> span:not(:first-child)::before {
@include dot;
}
}

#pv::after {
content: " views";
}

.readtime::after {
content: " read";
}
Expand Down Expand Up @@ -331,7 +325,7 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
}

@media all and (min-width: 768px) {
.post {
#post-wrapper {
.post-meta {
>div:not(:first-child)::before {
@include dot(0.5rem, 0.2rem);
Expand Down
13 changes: 3 additions & 10 deletions assets/css/tags.scss → _sass/layout/tags.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
---
# Styles for Tab Tags
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2019 Cotes Chung
# MIT License
---


{% include_relative _addon/main.scss %}
/*
Styles for Tab Tags
*/

.tag {
border-radius: 0.7em;
Expand Down
4 changes: 0 additions & 4 deletions assets/css/lib/bootstrap-toc.min.css

This file was deleted.

10 changes: 0 additions & 10 deletions assets/css/page.scss

This file was deleted.

9 changes: 9 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit b7266ac

Please sign in to comment.