Merge branch 'main' into in-line-fix

This commit is contained in:
Emruz Hossain 2024-12-01 20:03:37 +06:00 committed by GitHub
commit 0c816bc8f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 32 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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');
}
}

View file

@ -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 -->

View 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 -}}