Skip to content

Commit

Permalink
fix js loading bug & improve style
Browse files Browse the repository at this point in the history
  • Loading branch information
feeshy committed May 11, 2024
1 parent 1bff03b commit c1f6b17
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

{% feed_meta %}

<script type="text/javascript" src="{{ site.baseurl }}/assets/js/main.js" async></script>
<script type="text/javascript" src="{{ site.baseurl }}/assets/js/main.js" defer></script>

{%- if page.custom_js -%}
{%- for js_url in page.custom_js -%}
<script type="text/javascript" src="{{ js_url }}" async></script>
<script type="text/javascript" src="{{ js_url }}" defer></script>
{%- endfor -%}
{%- endif -%}

Expand Down
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<main class="page-content" aria-label="Content">
<header>
{%-if site.show_logo-%}
<h1 style="display: inline-flex; flex-direction: row; align-items: center;"><img src="{{ site.favicon.svg | relative_url }}" style="height:1.5em; width: 1.5em;"> {{ site.title }}</h1>
<h1 style="display: inline-flex; flex-direction: row; align-items: center;"><img src="{{ site.favicon.svg | relative_url }}" style="height:1.5em; width: 1.5em;">&nbsp;{{ site.title }}</h1>
{%-else-%}
<h1>{{ site.title }}</h1>
{%-endif-%}
Expand Down
2 changes: 2 additions & 0 deletions _sass/color-scheme.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
html { color-scheme: light dark; }

@media (prefers-color-scheme: light) {
body { background-color: white; color: black; }
td { border-color: white; }
Expand Down
2 changes: 1 addition & 1 deletion _sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ html {
body {
margin: 0;
position: relative;
min-height: 100vh;
min-height: 100%;
overflow-wrap: break-word;
}

Expand Down
2 changes: 1 addition & 1 deletion assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// register service worker

if ('serviceWorker' in navigator) {
if (navigator.serviceWorker) {
navigator.serviceWorker.register('/service-worker.js');
}

Expand Down

0 comments on commit c1f6b17

Please sign in to comment.