Merge branch 'main' into in-line-fix
This commit is contained in:
commit
0c816bc8f7
6 changed files with 32 additions and 8 deletions
2
.github/workflows/autoprefixer.yml
vendored
2
.github/workflows/autoprefixer.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to latest commit
|
- name: Checkout to latest commit
|
||||||
uses: actions/checkout@v4.2.1
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4.2.1
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|
6
.github/workflows/pull-request.yml
vendored
6
.github/workflows/pull-request.yml
vendored
|
@ -10,7 +10,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# checkout to the commit that has been pushed
|
# checkout to the commit that has been pushed
|
||||||
- uses: actions/checkout@v4.2.1
|
- uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
@ -35,7 +35,7 @@ jobs:
|
||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.1
|
- uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
@ -78,6 +78,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# checkout to latest commit
|
# checkout to latest commit
|
||||||
- uses: actions/checkout@v4.2.1
|
- uses: actions/checkout@v4.2.2
|
||||||
# run markdown linter
|
# run markdown linter
|
||||||
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
|
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
|
||||||
|
|
|
@ -97,6 +97,10 @@ html[data-theme='dark'] {
|
||||||
background-color: get-dark-color('bg-primary');
|
background-color: get-dark-color('bg-primary');
|
||||||
&:focus {
|
&:focus {
|
||||||
background-color: get-dark-color('bg-secondary');
|
background-color: get-dark-color('bg-secondary');
|
||||||
|
color: get-dark-color('text-color');
|
||||||
|
}
|
||||||
|
&::placeholder {
|
||||||
|
color: get-dark-color('muted-text-color');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
{{ with .services }}
|
{{ with .services }}
|
||||||
<!-- Google Analytics -->
|
<!-- Google Analytics -->
|
||||||
{{ with .google }}
|
{{ with .google }}
|
||||||
{{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }}
|
{{ partial "google_analytics.html" . }}
|
||||||
{{ $analyticsConfig := dict (slice "Site" "Config" "Services" "GoogleAnalytics" "ID") .id }}
|
|
||||||
{{ template "_internal/google_analytics.html" (merge $privacyConfig $analyticsConfig) }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Counter.dev -->
|
<!-- Counter.dev -->
|
||||||
|
|
22
layouts/partials/google_analytics.html
Normal file
22
layouts/partials/google_analytics.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{{ if site.Params.features.analytics.enabled }}
|
||||||
|
{{- with site.Params.features.analytics.services.google.id }}
|
||||||
|
{{- if strings.HasPrefix (lower .) "ua-" }}
|
||||||
|
{{- warnf "Google Analytics 4 (GA4) replaced Google Universal Analytics (UA) effective 1 July 2023. See https://support.google.com/analytics/answer/11583528. Create a GA4 property and data stream, then replace the Google Analytics ID in your site configuration with the new value." }}
|
||||||
|
{{- else }}
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
|
||||||
|
<script>
|
||||||
|
var doNotTrack = false;
|
||||||
|
if ({{ site.Params.features.analytics.services.google.respectDoNotTrack }}) {
|
||||||
|
var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
|
||||||
|
var doNotTrack = (dnt == "1" || dnt == "yes");
|
||||||
|
}
|
||||||
|
if (!doNotTrack) {
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
gtag('config', '{{ . }}');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
Loading…
Add table
Add a link
Reference in a new issue