added data/socials to manage social links inside templates. General cleanup of the...
authordanix <danix@danix.xyz>
Thu, 26 Jan 2023 18:38:50 +0000 (19:38 +0100)
committerdanix <danix@danix.xyz>
Thu, 26 Jan 2023 18:38:50 +0000 (19:38 +0100)
assets/sass/main.scss
data/socials.json [new file with mode: 0644]
layouts/index-baseof.html
layouts/partials/funcs/favicon.html
layouts/partials/head.html
layouts/partials/home-social-links.html [new file with mode: 0644]

index 3ea3c2d..84d9fce 100644 (file)
@@ -1,3 +1,9 @@
 body {
-       background-color: #303030;;
+       background-color: #dadada;;
+       header#masthead {
+               background-color: #656565;
+       }
+       footer#colophon {
+               background-color: #656565;
+       }
 }
\ No newline at end of file
diff --git a/data/socials.json b/data/socials.json
new file mode 100644 (file)
index 0000000..576bcba
--- /dev/null
@@ -0,0 +1,24 @@
+{
+       "sites": [
+               {
+                       "name": "twitter",
+                       "url": "https://twitter.com",
+                       "user": "danixland"
+               },
+               {
+                       "name": "reddit",
+                       "url": "https://reddit.com/u",
+                       "user": "danixland"
+               },
+               {
+                       "name": "instagram",
+                       "url": "https://www.instagram.com",
+                       "user": "danixland"
+               },
+               {
+                       "name": "facebook",
+                       "url": "https://www.facebook.com",
+                       "user": "danixland"
+               }
+       ]
+}
index 3f38b14..6889e6f 100644 (file)
@@ -11,9 +11,8 @@
                                                {{- block "home-main" . }}{{- end }}
                                        </main>
                                </div>
-                               <div id="secondary" class="related-content">
-                                       {{- partial "home-latest-posts.html" . -}}
-                                       {{- partial "tag-cloud.html" . -}}
+                               <div id="secondary" class="home-links">
+                                       {{ partial "home-social-links.html" . }}
                                </div>
                        </div>
                        {{- partial "footer.html" . -}}
index 19bc0c3..ede85b0 100644 (file)
@@ -1,7 +1,14 @@
-<meta name="theme-color" content="#ffeb3b">
-<meta name="msapplication-navbutton-color" content="#ffeb3b">
-<meta name="apple-mobile-web-app-capable" content="yes">
-<meta name="apple-mobile-web-app-status-bar-style" content="black">
+       <meta name="theme-color" content="#ffeb3b">
+       <meta name="msapplication-navbutton-color" content="#ffeb3b">
+       <meta name="apple-mobile-web-app-capable" content="yes">
+       <meta name="apple-mobile-web-app-status-bar-style" content="black">
 
-<link rel="icon" sizes="192x192" href='{{ "/assets/img/icon.png" | absURL }}'>
-<link rel="apple-touch-icon" href='{{ "/assets/img/icon.png" | absURL }}'>
+{{ range $i := .Site.Params.faviconSizes }} 
+       {{ $favicon := resources.Get "img/icon.png" }} 
+       {{ $image := $favicon.Resize (printf "%dx%d CatmullRom" $i $i) }}
+       <link rel="icon" type="image/png" sizes="{{$i}}x{{$i}}" href="{{ $image.Permalink }}" />
+{{ end }} 
+{{ with resources.Get "img/icon.png" }} 
+       {{ $image := .Resize "180x CatmullRom" }}
+       <link rel="apple-touch-icon" sizes="180x180" href="{{ $image.Permalink }}" />
+{{ end }}
index 477d463..4c451a9 100644 (file)
@@ -3,12 +3,12 @@
     <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="profile" href="https://gmpg.org/xfn/11">
 
-       {{ $main_style := resources.Get "sass/main.scss" | resources.toCSS }}
-       <link rel="stylesheet" href="{{ $main_style.RelPermalink }}">
+       {{ $style_options := (dict "targetPath" "css/style.css" "outputStyle" "compressed" "transpiler" "dartsass" "enableSourceMap" (not hugo.IsProduction)) }}
+       {{ $style := resources.Get "sass/main.scss" | resources.ToCSS $style_options }}
 
 
-<!--   <link rel="stylesheet" href="{{ "assets/css/dagreynix_fonts.css" | absURL }}">
-       <link rel="stylesheet" href="{{ "assets/css/dagreynix.css" | absURL }}"> -->
+       <link rel="stylesheet" href="{{ "assets/css/dagreynix_fonts.css" | absURL }}">
+       <link rel="stylesheet" href="{{ $style.RelPermalink }}">
        {{ partial "funcs/favicon.html" . }}
        <link rel="canonical" href="{{ .Permalink }}">
 
diff --git a/layouts/partials/home-social-links.html b/layouts/partials/home-social-links.html
new file mode 100644 (file)
index 0000000..cef1f3a
--- /dev/null
@@ -0,0 +1,10 @@
+<div id="home-social-links">
+       <h3 class="text-only">my socials</h3>
+       <ul>
+               {{ range site.Data.socials.sites }}
+                       <li>
+                               <a href="{{ .url }}/{{ .user }}">{{ .name }}</a>
+                       </li>
+               {{ end }}
+       </ul>
+</div>