Skip to content

Commit

Permalink
fix: notch status bar doesn't match theme color (cotes2020#918)
Browse files Browse the repository at this point in the history
Resolves cotes2020#918
  • Loading branch information
cotes2020 authored and gudtldn committed Jul 26, 2024
1 parent e2e9f5e commit 542aa0d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
36 changes: 18 additions & 18 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<!--
The Head
-->
<!-- The Head -->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="naver-site-verification" content="4819ac19856c19cacd48873d953d6795085f6cd9">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta
name="viewport"
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
>

{% if page.layout == 'home' or page.layout == 'post' %}

{% if site.google_analytics.pv.proxy_endpoint %}
<meta name="pv-proxy-endpoint" content="{{ site.google_analytics.pv.proxy_endpoint }}">
{% endif %}

{% if site.google_analytics.pv.cache_path %}
<meta name="pv-cache-path" content="{{ site.google_analytics.pv.cache_path | relative_url }}">
{% endif %}

{% endif %}

{% capture seo_tags %}
Expand All @@ -41,40 +43,34 @@
{% endif %}

{% assign seo_tags = seo_tags | replace: target, replacement %}

{% endunless %}

{% endif %}

{{ seo_tags }}

<title>
{%- unless page.layout == "home" -%}
{{ page.title | append: " | "}}
{%- endunless -%}
{%- unless page.layout == 'home' -%}
{{ page.title | append: ' | ' }}
{%- endunless -%}
{{ site.title }}
</title>

{% include favicons.html %}

{% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %}

<link href="{{ site.data.assets[origin].webfonts | relative_url }}" rel="stylesheet">

{% else %}

{% for cdn in site.data.assets[origin].cdns %}
<link rel="preconnect" href="{{ cdn.url }}" {{ cdn.args }}>
<link rel="dns-prefetch" href="{{ cdn.url }}" {{ cdn.args }}>
{% endfor %}

<link rel="stylesheet" href="{{ site.data.assets[origin].webfonts | relative_url }}">

{% endif %}

<!-- GA -->
{% 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 %}
<link rel="preconnect" href="https://www.google-analytics.com" crossorigin="use-credentials">
<link rel="dns-prefetch" href="https://www.google-analytics.com">

Expand All @@ -83,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://'
%}
<link rel="preconnect" href="{{ proxy_url }}" crossorigin="use-credentials">
<link rel="dns-prefetch" href="{{ proxy_url }}">
{% endif %}
Expand Down
4 changes: 3 additions & 1 deletion _sass/addon/commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions _sass/colors/dark-typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions _sass/colors/light-typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 542aa0d

Please sign in to comment.