💄 Support more of analytics engine such as baidu, google, busuanzi and so on, then add new web information widget. close #19
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
{{- if isset .Site.Params.analytics "laid" }}
|
||||
{{ partial "_thirdparty/analytics/51la.html" . }}
|
||||
{{- end }}
|
||||
{{- if isset .Site.Params.analytics "baidu" }}
|
||||
{{ partial "_thirdparty/analytics/baidu.html" . }}
|
||||
{{- end }}
|
||||
{{- if isset .Site.Params.analytics "google" }}
|
||||
{{ partial "_thirdparty/analytics/google.html" . }}
|
||||
{{- end }}
|
||||
{{- if isset .Site.Params.analytics "busuanzi" }}
|
||||
{{ partial "_thirdparty/analytics/busuanzi.html" . }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css">
|
||||
<!-- NexT theme css style -->
|
||||
{{- $scssVars := resources.Get "css/_sitevars.scss"}}
|
||||
{{- $scssVars = $scssVars | resources.ExecuteAsTemplate "sitevars.scss" . }}
|
||||
{{- $scssMain := resources.Get "css/main.scss" }}
|
||||
{{- $scss := slice $scssVars $scssMain | resources.Concat "css/main.scss" }}
|
||||
{{- $css := $scss | toCSS (dict "targetPath" "/css/main_new.css" "outputStyle" "expanded") }}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
|
||||
{{- $scheme := lower .Site.Params.scheme }}
|
||||
{{- $styleScheme := (printf "css/%s/style.css" $scheme) }}
|
||||
<link rel="stylesheet" href="/css/{{ $scheme }}/main.css">
|
||||
{{- $style := resources.Get $styleScheme | resources.ExecuteAsTemplate $styleScheme . }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
<link rel="stylesheet" href="/css/hover.css">
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2,19 +2,10 @@
|
||||
{{- $cssRes := .Site.Data.resources.css }}
|
||||
{{- $vendor := .Site.Params.vendors.plugins }}
|
||||
{{- $router := .Scratch.Get "router" }}
|
||||
{{ $cssFmt := "%s/%s@%s/%s" }}
|
||||
|
||||
{{- range $css := $cssRes }}
|
||||
{{- $npm := $css.name }}
|
||||
{{- $file := $css.file }}
|
||||
{{- if eq $vendor "cdnjs" }}
|
||||
{{- with $css.alias }}
|
||||
{{- $npm = . }}
|
||||
{{- end }}
|
||||
{{- $file = replaceRE `(dist|lib|source\/js)\/` "" $css.file }}
|
||||
{{- $cssFmt = "%s/%s/%s/%s" }}
|
||||
{{- end }}
|
||||
{{- $pluginCSS := printf $cssFmt $router $npm $css.version $file }}
|
||||
<link type="text/css" rel="stylesheet" href="{{ $pluginCSS }}" />
|
||||
{{ $pluginCss := partial "_funs/get_res.html" (dict "res" . "vendor" $vendor "router" $router) }}
|
||||
<link type="text/css" rel="stylesheet" href="{{ $pluginCss }}" />
|
||||
{{- end }}
|
||||
|
||||
<!-- Main Style file -->
|
||||
|
||||
Reference in New Issue
Block a user