about summary refs log tree commit diff
path: root/themes/researcher/layouts
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-31 21:01:40 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-31 21:03:54 +0200
commitce4943e8bf7b11fd174fe62e258dd827ca03d238 (patch)
tree5d009eed0a8f8826cb9126ca8962e7e40bd2291f /themes/researcher/layouts
parentConfig: Enable robots.txt (diff)
downloadbaitinq.ml-ce4943e8bf7b11fd174fe62e258dd827ca03d238.tar.gz
baitinq.ml-ce4943e8bf7b11fd174fe62e258dd827ca03d238.tar.bz2
baitinq.ml-ce4943e8bf7b11fd174fe62e258dd827ca03d238.zip
Add blog and projects template
Diffstat (limited to 'themes/researcher/layouts')
-rw-r--r--themes/researcher/layouts/404.html6
-rw-r--r--themes/researcher/layouts/_default/baseof.html14
-rw-r--r--themes/researcher/layouts/_default/list.html10
-rw-r--r--themes/researcher/layouts/_default/single.html5
-rw-r--r--themes/researcher/layouts/index.html5
-rw-r--r--themes/researcher/layouts/partials/footer.html15
-rw-r--r--themes/researcher/layouts/partials/head.html27
-rw-r--r--themes/researcher/layouts/partials/header.html24
-rw-r--r--themes/researcher/layouts/partials/math.html17
-rw-r--r--themes/researcher/layouts/shortcodes/math.html8
10 files changed, 131 insertions, 0 deletions
diff --git a/themes/researcher/layouts/404.html b/themes/researcher/layouts/404.html
new file mode 100644
index 0000000..163dae0
--- /dev/null
+++ b/themes/researcher/layouts/404.html
@@ -0,0 +1,6 @@
+{{ define "main" }}
+<div class="container">
+    <h1>404 Error</h1>
+    <p>Page does not exist.</p>
+</div>
+{{ end }}
diff --git a/themes/researcher/layouts/_default/baseof.html b/themes/researcher/layouts/_default/baseof.html
new file mode 100644
index 0000000..237c540
--- /dev/null
+++ b/themes/researcher/layouts/_default/baseof.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.Params.lang }}">
+    {{- partial "head.html" . -}}
+    {{ if or (.Params.math) (.Site.Params.math) }}
+        {{- partial "math.html" . -}}
+    {{ end }}
+    <body>
+        {{- partial "header.html" . -}}
+        <div id="content">
+        {{- block "main" . }}{{- end }}
+        </div>
+        {{- partial "footer.html" . -}}
+    </body>
+</html>
diff --git a/themes/researcher/layouts/_default/list.html b/themes/researcher/layouts/_default/list.html
new file mode 100644
index 0000000..b061a6b
--- /dev/null
+++ b/themes/researcher/layouts/_default/list.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+<div class="container">
+    <h1>{{ .Title }}</h1>
+    <ul>
+        {{ range .Pages }}
+            <li><a href="{{ .Permalink }}">{{ if not .Params.notshowthedate }} {{ .Date.Format "2006-01-02" }} | {{ end }} {{ .Title }}</a></li>
+	{{ end }}
+    </ul>
+</div>
+{{ end }}
diff --git a/themes/researcher/layouts/_default/single.html b/themes/researcher/layouts/_default/single.html
new file mode 100644
index 0000000..2bc2b1e
--- /dev/null
+++ b/themes/researcher/layouts/_default/single.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+<div class="container">
+    {{ .Content }}
+</div>
+{{ end }}
diff --git a/themes/researcher/layouts/index.html b/themes/researcher/layouts/index.html
new file mode 100644
index 0000000..2bc2b1e
--- /dev/null
+++ b/themes/researcher/layouts/index.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+<div class="container">
+    {{ .Content }}
+</div>
+{{ end }}
diff --git a/themes/researcher/layouts/partials/footer.html b/themes/researcher/layouts/partials/footer.html
new file mode 100644
index 0000000..b027256
--- /dev/null
+++ b/themes/researcher/layouts/partials/footer.html
@@ -0,0 +1,15 @@
+<div id="footer" class="mb-5">
+    <hr>
+    {{ if .Site.Params.socialIcons }}
+    <div class="container text-center">
+        {{ range $item := .Site.Params.socialIcons }}
+            <a href="{{ $item.url }}" class="{{ $item.icon }} fa-1x" title="{{ $item.title }}"></a>
+        {{ end }}
+    </div>
+    {{ end }}
+    {{ with .Site.Params.footer }}
+        <div class="container text-center">
+            <a href="{{ .url | absURL }}" title="{{ .text }}"><small>{{ .text }}</small></a>
+        </div>
+    {{ end }}
+</div>
diff --git a/themes/researcher/layouts/partials/head.html b/themes/researcher/layouts/partials/head.html
new file mode 100644
index 0000000..df307bb
--- /dev/null
+++ b/themes/researcher/layouts/partials/head.html
@@ -0,0 +1,27 @@
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+    <title>{{ .Title }}</title>
+    <meta name="description" content="{{ .Site.Params.description }}">
+    <meta name="author" content='{{ .Site.Params.author }}'>
+
+    <link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet">
+    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous">
+
+    {{ $style := resources.Get "sass/researcher.scss" | resources.ExecuteAsTemplate "sass/researcher.scss" . | toCSS | minify }}
+    <link rel="stylesheet" href="{{ $style.RelPermalink }}">
+
+    {{ with .Site.Params.favicon }}
+        <link rel="icon" type="image/ico" href="{{ . | absURL }}">
+    {{ end }}
+
+    {{ with .OutputFormats.Get "rss" -}}
+        {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+    {{ end -}}
+
+    {{ if not .Site.IsServer }}
+        {{ template "_internal/google_analytics.html" . }}
+    {{ end }}
+</head>
diff --git a/themes/researcher/layouts/partials/header.html b/themes/researcher/layouts/partials/header.html
new file mode 100644
index 0000000..b017ee2
--- /dev/null
+++ b/themes/researcher/layouts/partials/header.html
@@ -0,0 +1,24 @@
+<div class="container mt-5">
+    <nav class="navbar navbar-expand-sm flex-column flex-sm-row text-nowrap p-0">
+        <a class="navbar-brand mx-0 mr-sm-auto" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
+          {{ with .Site.Params.logo }}
+            <img src="{{ . | absURL }}" alt="logo">
+          {{ end }}
+          {{ .Site.Title }}
+        </a>
+        <div class="navbar-nav flex-row flex-wrap justify-content-center">
+            {{ with .Site.Menus.main }}
+                {{ $navbar_len := len . }}
+                {{ range $i, $nav_item := . }}
+                    <a class="nav-item nav-link" href="{{ $nav_item.URL }}" title="{{ $nav_item.Name }}">
+                        {{ $nav_item.Pre }}{{ $nav_item.Name }}{{ $nav_item.Post }}
+                    </a>
+                    {{ if ne (add $i 1) $navbar_len }}
+                        <span class="nav-item navbar-text mx-1">/</span>
+                    {{ end }}
+                {{ end }}
+            {{ end }}
+        </div>
+    </nav>
+</div>
+<hr>
diff --git a/themes/researcher/layouts/partials/math.html b/themes/researcher/layouts/partials/math.html
new file mode 100644
index 0000000..19c0502
--- /dev/null
+++ b/themes/researcher/layouts/partials/math.html
@@ -0,0 +1,17 @@
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
+
+<!-- Script to enable inline math expressions -->
+<script>
+    document.addEventListener("DOMContentLoaded", function() {
+        renderMathInElement(document.body, {
+            delimiters: [
+                {left: "$$", right: "$$", display: true},
+                {left: "\\[", right: "\\]", display: true},
+                {left: "$", right: "$", display: false},
+                {left: "\\(", right: "\\)", display: false}
+            ]
+        });
+    });
+</script>
diff --git a/themes/researcher/layouts/shortcodes/math.html b/themes/researcher/layouts/shortcodes/math.html
new file mode 100644
index 0000000..a429888
--- /dev/null
+++ b/themes/researcher/layouts/shortcodes/math.html
@@ -0,0 +1,8 @@
+{{ if or (hasPrefix .Inner "\n") (hasPrefix .Inner "<p>") }}
+    $$
+    {{ $inner := trim (.Inner | htmlUnescape) "$\n " }}
+    {{- replace $inner "\n" " " -}}
+    $$
+{{ else }}
+    ${{- trim (.Inner | htmlUnescape) "$\n " -}}$
+{{ end }}