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
|
||||
steps:
|
||||
- name: Checkout to latest commit
|
||||
uses: actions/checkout@v4.2.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Node
|
||||
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:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.2.1
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- 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
|
||||
steps:
|
||||
# checkout to the commit that has been pushed
|
||||
- uses: actions/checkout@v4.2.1
|
||||
- uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
|
@ -35,7 +35,7 @@ jobs:
|
|||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.1
|
||||
- uses: actions/checkout@v4.2.2
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
|
@ -78,6 +78,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# checkout to latest commit
|
||||
- uses: actions/checkout@v4.2.1
|
||||
- uses: actions/checkout@v4.2.2
|
||||
# run markdown linter
|
||||
- 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');
|
||||
&:focus {
|
||||
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 }}
|
||||
<!-- Google Analytics -->
|
||||
{{ with .google }}
|
||||
{{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }}
|
||||
{{ $analyticsConfig := dict (slice "Site" "Config" "Services" "GoogleAnalytics" "ID") .id }}
|
||||
{{ template "_internal/google_analytics.html" (merge $privacyConfig $analyticsConfig) }}
|
||||
{{ partial "google_analytics.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<!-- 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