From 1b2b0040b408923b67c4deb2efb1f90fddcca5ba Mon Sep 17 00:00:00 2001 From: Triccsr Date: Fri, 26 Apr 2024 22:09:19 +0800 Subject: [PATCH] Display sidebar on mobile for Pisces and Gemini (#710) Co-authored-by: Mimi <1119186082@qq.com> --- _config.yml | 16 +- layout/_partials/widgets.njk | 2 +- layout/_scripts/index.njk | 4 + scripts/filters/minify.js | 4 + source/css/_common/outline/sidebar/index.styl | 109 +++++++++++++ .../outline/sidebar/sidebar-toggle.styl | 4 +- source/css/_common/scaffolding/toggles.styl | 4 +- source/css/_mixins.styl | 21 +-- source/css/_schemes/Muse/_sidebar.styl | 147 +++--------------- source/css/_schemes/Pisces/_header.styl | 2 +- source/css/_schemes/Pisces/_layout.styl | 8 +- source/css/_schemes/Pisces/_sidebar.styl | 138 ++++++++-------- source/css/_variables/Muse.styl | 3 - source/css/_variables/Pisces.styl | 4 +- source/css/_variables/base.styl | 3 + source/js/schemes/muse.js | 48 ------ source/js/sidebar.js | 50 ++++++ 17 files changed, 293 insertions(+), 274 deletions(-) create mode 100644 source/js/sidebar.js diff --git a/_config.yml b/_config.yml index 3e8c96c..a4f27bf 100644 --- a/_config.yml +++ b/_config.yml @@ -117,16 +117,18 @@ menu_settings: # --------------------------------------------------------------- sidebar: - # Sidebar Position. + # Sidebar position. Available values: left | right position: left - #position: right - # Manual define the sidebar width. If commented, will be default for: - # Muse | Mist: 320 - # Pisces | Gemini: 240 - #width: 300 + # Sidebar width. + # Applicable to Muse | Mist and mobile of Pisces | Gemini. + width_expanded: 320 + # Applicable to desktop of Pisces | Gemini. + width_dual_column: 240 - # Sidebar Display (only for Muse | Mist), available values: + # Sidebar display. + # Applicable to Muse | Mist and mobile of Pisces | Gemini. + # Available values: # - post expand on posts automatically. Default. # - always expand for all pages automatically. # - hide expand only when click on the sidebar toggle icon. diff --git a/layout/_partials/widgets.njk b/layout/_partials/widgets.njk index 4e5b2d3..b312d0a 100644 --- a/layout/_partials/widgets.njk +++ b/layout/_partials/widgets.njk @@ -1,6 +1,6 @@ {# Widgets with fixed position #} -{%- if theme.sidebar.display !== 'remove' and (theme.scheme === 'Muse' or theme.scheme === 'Mist') %} +{%- if theme.sidebar.display !== 'remove' %}