2022-06-18 19:53:09 +08:00
|
|
|
// CSS Style Guide : https://codeguide.co/#css
|
2022-05-22 12:58:27 +08:00
|
|
|
// All variables from site's config content.
|
2022-05-31 21:50:35 +08:00
|
|
|
{{- $P := .Site.Params }}
|
2022-05-22 12:58:27 +08:00
|
|
|
// Base
|
2022-06-18 19:53:09 +08:00
|
|
|
$scheme : {{ $P.scheme }};
|
|
|
|
$darkmode : {{ $P.darkmode }};
|
2022-05-21 17:47:26 +08:00
|
|
|
|
2022-06-18 19:53:09 +08:00
|
|
|
$body_scrollbar_overlay : {{ $P.bodyScrollbar.overlay }};
|
|
|
|
$body_scrollbar_stable : {{ $P.bodyScrollbar.stable }};
|
|
|
|
$mermaid_enable : {{ $P.mermaid.enable }};
|
|
|
|
$mobile_layout_economy : {{ $P.mobileLayoutEconomy }};
|
|
|
|
$theme_color_dark : {{ $P.themeColor.dark }};
|
|
|
|
$theme_color_light : {{ $P.themeColor.light }};
|
2022-05-21 17:47:26 +08:00
|
|
|
|
2022-05-22 12:58:27 +08:00
|
|
|
// Header
|
2022-06-18 19:53:09 +08:00
|
|
|
$bookmark_color : {{ $P.bookmark.color }};
|
|
|
|
$bookmark_enable : {{ $P.bookmark.enable }};
|
|
|
|
$github_banner_enable : {{ $P.githubBanner.enable }};
|
|
|
|
$menu_settings_badges : {{ $P.menuSets.badges }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Footer
|
2022-06-18 19:53:09 +08:00
|
|
|
$footer_icon_color : {{ $P.footer.icon.color }};
|
|
|
|
$footer_icon_animated : {{ $P.footer.icon.animated }};
|
|
|
|
$footer_beian_enable : {{ $P.footer.beian.enable }};
|
|
|
|
$footer_vendors_enable : {{ isset $P.footer "vendors" }};
|
2022-06-21 09:19:12 +08:00
|
|
|
{{ with $P.footer.vendors }}
|
|
|
|
{{ $width := slice "start" }}
|
|
|
|
{{ range .list }}
|
|
|
|
{{ if .image }}
|
|
|
|
{{ $width = $width | append .image.width }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ printf "$footer_vendors_imgs_width:%s;" (delimit (after 1 $width) ", ") }}
|
|
|
|
{{ end }}
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Counter
|
2022-06-18 19:53:09 +08:00
|
|
|
$busuanzi_enable : {{ $P.busuanzi.enable }};
|
|
|
|
$busuanzi_visitors : {{ $P.busuanzi.visitors }};
|
|
|
|
$busuanzi_views : {{ $P.busuanzi.views }};
|
|
|
|
$busuanzi_post_views : {{ $P.busuanzi.postViews }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Font
|
2022-06-18 19:53:09 +08:00
|
|
|
$font_enable : {{ $P.font.enable }};
|
|
|
|
$font_global_size : {{ default $P.font.global.size 1 }};
|
|
|
|
$font_headings_size : {{ default $P.font.headings.size 1.625 }};
|
|
|
|
$font_title_size : {{ default $P.font.title.size 1.375 }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Code & Code blocks
|
|
|
|
// TODO find the configure variable
|
2022-06-21 14:55:07 +08:00
|
|
|
$highlight_dark_background : #1c1b1b;
|
|
|
|
$highlight_dark_foreground : #fff;
|
|
|
|
$highlight_light_background : #fff;
|
|
|
|
$highlight_light_foreground : #555;
|
2022-05-22 12:58:27 +08:00
|
|
|
|
2022-06-18 19:53:09 +08:00
|
|
|
$codeblock_copy_btn_style : {{ $P.codeblock.copyBtn.style }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Sidebar
|
2022-06-18 19:53:09 +08:00
|
|
|
$sidebar_offset : {{ $P.sidebar.offset }};
|
|
|
|
$sidebar_padding : {{ $P.sidebar.padding }};
|
|
|
|
$sidebar_position : {{ $P.sidebar.position }};
|
|
|
|
$sidebar_width : {{ $P.sidebar.width }};
|
|
|
|
|
|
|
|
$motion_enable : {{ $P.motion.enable }};
|
|
|
|
$motion_transition_sidebar : {{ $P.motion.transition.sidebar }};
|
|
|
|
|
|
|
|
$back2top_enable : {{ $P.backTop.enable }};
|
|
|
|
$back2top_scrollpercent : {{ $P.backTop.scrollpercent }};
|
|
|
|
$back2top_sidebar : {{ $P.backTop.sidebar }};
|
|
|
|
|
|
|
|
$avatar_rotated : {{ $P.avatar.rotated }};
|
|
|
|
$avatar_rounded : {{ $P.avatar.rounded }};
|
|
|
|
$avatar_rounded : {{ $P.avatar.rounded }};
|
|
|
|
$site_state : {{ $P.siteState }};
|
|
|
|
$social_icons_only : {{ $P.socialIcons.iconsOnly }};
|
|
|
|
$social_icons_transition : {{ $P.socialIcons.transition }};
|
|
|
|
$links_settings_layout : {{ $P.linksSets.layout }};
|
|
|
|
$toc_enable : {{ $P.toc.enable }};
|
|
|
|
$toc_expand_all : {{ $P.toc.expandAll }};
|
|
|
|
$toc_wrap : {{ $P.toc.wrap }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Posts
|
2022-06-18 19:53:09 +08:00
|
|
|
$creative_commons_post : {{ $P.creativeCommons.post }};
|
|
|
|
$follow_me : {{ isset $P "followme" }};
|
|
|
|
$motion_trans_coll_header : {{ $P.motion.transition.collHeader }};
|
|
|
|
$motion_trans_post_block : {{ $P.motion.transition.postBlock }};
|
|
|
|
$motion_trans_post_body : {{ $P.motion.transition.postBody }};
|
|
|
|
$motion_trans_post_header : {{ $P.motion.transition.postHeader }};
|
|
|
|
$post_edit_enable : {{ $P.postEdit.enable }};
|
|
|
|
$post_meta_item_text : {{ $P.postMeta.itemText }};
|
|
|
|
$reward_settings_animation : {{ $P.rewardSets.animation }};
|
|
|
|
$post_end_tag_icon : {{ $P.postFooter.tagIcon }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// TODO find the paramters
|
2022-06-18 19:53:09 +08:00
|
|
|
$text_align_desktop : {{ $P.textAlign.desktop }};
|
|
|
|
$text_align_mobile : {{ $P.textAlign.mobile }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Note
|
2022-06-18 19:53:09 +08:00
|
|
|
$note_icons : {{ $P.note.icons }};
|
|
|
|
$note_light_bg_offset : {{ $P.note.lightBgOffset }};
|
|
|
|
$note_style : {{ $P.note.style }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Tabs
|
2022-06-18 19:53:09 +08:00
|
|
|
$tabs_transition_labels : {{ $P.tabs.transition.labels }};
|
|
|
|
$tabs_transition_tabs : {{ $P.tabs.transition.tabs }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Reading progress bar
|
2022-06-18 19:53:09 +08:00
|
|
|
$reading_progress_start : {{ $P.readingProgress.start }};
|
|
|
|
$reading_progress_color : {{ $P.readingProgress.color }};
|
|
|
|
$reading_progress_enable : {{ $P.readingProgress.enable }};
|
|
|
|
$reading_progress_height : {{ $P.readingProgress.height }};
|
|
|
|
$reading_progress_position : {{ $P.readingProgress.position }};
|
|
|
|
$reading_progress_reversed : {{ $P.readingProgress.reversed }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Thirdparty
|
2022-06-18 19:53:09 +08:00
|
|
|
$math_mathjax_enable : {{ $P.math.mathjax.enable }};
|
|
|
|
$related_posts_enable : {{ $P.relatedPosts.enable }};
|
|
|
|
$pdf_enable : {{ $P.pdf.enable }};
|
|
|
|
$pdf_height : {{ $P.pdf.height }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Search engine
|
2022-06-18 19:53:09 +08:00
|
|
|
$algolia_search_enable : {{ $P.algoliaSearch.enable }};
|
|
|
|
$local_search_enable : {{ $P.localSearch.enable }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Online IM
|
2022-06-18 19:53:09 +08:00
|
|
|
$gitalk_enable : {{ $P.gitalk.enable }};
|
|
|
|
$gitter_enable : {{ $P.gitter.enable }};
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
// Comment
|
2022-06-18 19:53:09 +08:00
|
|
|
$disqusjs_enable : {{ $P.disqusjs.enable }};
|
|
|
|
$livere_enable : {{ $P.livere.enable }};
|
|
|
|
$utterances_enable : {{ $P.utterances.enable }};
|
|
|
|
$waline_enable : {{ $P.waline.enable }};
|
2022-06-05 21:35:40 +08:00
|
|
|
{{- with .Site.Params.comments }}
|
2022-06-18 19:53:09 +08:00
|
|
|
{{- $tce := and (isset . "nav") (and .storage (gt (len .nav) 1)) }}
|
|
|
|
$two_comments_enable : {{ $tce }};
|
2022-06-05 21:35:40 +08:00
|
|
|
{{- if $tce }}
|
2022-06-18 19:53:09 +08:00
|
|
|
{{- $sortNav := sort .nav "weight" }}
|
|
|
|
$two_comments_actived : {{ .active }};
|
|
|
|
$first_comment_color : {{ (index $sortNav 0).color }};
|
|
|
|
$first_comment_name : {{ lower (index $sortNav 0).name }};
|
|
|
|
$second_comment_color : {{ (index $sortNav 1).color }};
|
|
|
|
$second_comment_name : {{ lower (index $sortNav 1).name }};
|
2022-06-05 21:35:40 +08:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2022-05-22 12:58:27 +08:00
|
|
|
|
|
|
|
//
|
2022-05-21 17:47:26 +08:00
|
|
|
// Variables Layer
|
|
|
|
// --------------------------------------------------
|
|
|
|
@import '_variables/base';
|
2022-05-31 21:50:35 +08:00
|
|
|
{{ printf "/* %s Scheme Style */" $P.scheme }}
|
|
|
|
{{ printf "@import '_variables/%s';" $P.scheme }}
|
2022-05-22 12:58:27 +08:00
|
|
|
// TODO
|
2022-05-21 18:43:01 +08:00
|
|
|
//@import 'theme.injects.variable';
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
// Mixins Layer
|
|
|
|
// --------------------------------------------------
|
|
|
|
@import '_mixins';
|
2022-05-22 12:58:27 +08:00
|
|
|
// TODO
|
2022-05-21 18:43:01 +08:00
|
|
|
//@import 'theme.injects.mixin';
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
// Dark mode colors
|
|
|
|
// --------------------------------------------------
|
|
|
|
@import '_colors';
|
|
|
|
|
|
|
|
// Common Layer
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Scaffolding
|
2022-05-21 20:48:41 +08:00
|
|
|
@import '_common/scaffolding';
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
// Layout
|
2022-05-21 20:34:09 +08:00
|
|
|
@import '_common/outline';
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
// Components
|
2022-05-21 19:18:19 +08:00
|
|
|
@import '_common/components';
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
// Schemes Layer
|
|
|
|
// --------------------------------------------------
|
2022-05-31 21:50:35 +08:00
|
|
|
{{ printf "@import '_schemes/%s/';" $P.scheme }}
|
2022-05-21 17:47:26 +08:00
|
|
|
|
|
|
|
// Custom Layer
|
2022-05-22 12:58:27 +08:00
|
|
|
// TODO
|
2022-05-21 17:47:26 +08:00
|
|
|
// --------------------------------------------------
|
2022-05-21 18:43:01 +08:00
|
|
|
// @import 'theme.injects.style';
|