From 820ba62e9e939090523a7077d01d01bd78ec84eb Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 17 Mar 2023 01:17:06 +0800 Subject: [PATCH] fix: notch status bar doesn't match theme color (#918) Resolves #918 --- _includes/head.html | 35 +++++++++++++++--------------- _sass/addon/commons.scss | 4 +++- _sass/colors/dark-typography.scss | 3 +-- _sass/colors/light-typography.scss | 3 +-- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index 7b87825..edec4b1 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,13 +1,17 @@ - + - + + + + + {% if page.layout == 'home' or page.layout == 'post' %} - {% if site.google_analytics.pv.proxy_endpoint %} {% endif %} @@ -15,7 +19,6 @@ {% if site.google_analytics.pv.cache_path %} {% endif %} - {% endif %} {% capture seo_tags %} @@ -40,40 +43,34 @@ {% endif %} {% assign seo_tags = seo_tags | replace: target, replacement %} - {% endunless %} - {% endif %} {{ seo_tags }} - {%- unless page.layout == "home" -%} - {{ page.title | append: " | "}} - {%- endunless -%} + {%- unless page.layout == 'home' -%} + {{ page.title | append: ' | ' }} + {%- endunless -%} {{ site.title }} {% include favicons.html %} {% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %} - {% else %} - {% for cdn in site.data.assets[origin].cdns %} {% endfor %} - {% endif %} - {% if jekyll.environment == 'production' - and site.google_analytics.id != empty and site.google_analytics.id %} + {% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %} @@ -82,7 +79,11 @@ {% if site.google_analytics.pv.proxy_endpoint %} {% assign proxy_url = site.google_analytics.pv.proxy_endpoint - | replace: "https://", "" | split: "/" | first | prepend: "https://" %} + | replace: 'https://', '' + | split: '/' + | first + | prepend: 'https://' + %} {% endif %} diff --git a/_sass/addon/commons.scss b/_sass/addon/commons.scss index 0fa399d..9407257 100644 --- a/_sass/addon/commons.scss +++ b/_sass/addon/commons.scss @@ -29,7 +29,9 @@ html { } body { - background: var(--body-bg); + background: var(--main-bg); + padding: env(safe-area-inset-top) env(safe-area-inset-right) + env(safe-area-inset-bottom) env(safe-area-inset-left); color: var(--text-color); -webkit-font-smoothing: antialiased; font-family: 'Source Sans Pro', 'Microsoft Yahei', sans-serif; diff --git a/_sass/colors/dark-typography.scss b/_sass/colors/dark-typography.scss index 13ad156..8db9c41 100644 --- a/_sass/colors/dark-typography.scss +++ b/_sass/colors/dark-typography.scss @@ -4,9 +4,8 @@ @mixin dark-scheme { /* Framework color */ - --body-bg: var(--main-bg); - --mask-bg: rgb(68, 69, 70); --main-bg: rgb(27, 27, 30); + --mask-bg: rgb(68, 69, 70); --main-border-color: rgb(44, 45, 45); /* Common color */ diff --git a/_sass/colors/light-typography.scss b/_sass/colors/light-typography.scss index 5951609..d2383af 100644 --- a/_sass/colors/light-typography.scss +++ b/_sass/colors/light-typography.scss @@ -4,9 +4,8 @@ @mixin light-scheme { /* Framework color */ - --body-bg: #fafafa; - --mask-bg: #c1c3c5; --main-bg: white; + --mask-bg: #c1c3c5; --main-border-color: #f3f3f3; /* Common color */