diff options
Diffstat (limited to 'themes')
| -rwxr-xr-x | themes/simple/layouts/_default/list.html | 7 | ||||
| -rwxr-xr-x | themes/simple/layouts/_default/single.html | 4 | ||||
| -rwxr-xr-x | themes/simple/layouts/partials/comments.html | 2 | ||||
| -rwxr-xr-x | themes/simple/layouts/partials/footer.html | 37 | ||||
| -rwxr-xr-x | themes/simple/layouts/partials/head.html | 4 | ||||
| -rwxr-xr-x | themes/simple/layouts/partials/tailwind.html | 14 |
6 files changed, 62 insertions, 6 deletions
diff --git a/themes/simple/layouts/_default/list.html b/themes/simple/layouts/_default/list.html index 04589cb..2e66b0d 100755 --- a/themes/simple/layouts/_default/list.html +++ b/themes/simple/layouts/_default/list.html | |||
| @@ -10,7 +10,12 @@ | |||
| 10 | {{ range (where .Site.RegularPages "Section" "posts") }} | 10 | {{ range (where .Site.RegularPages "Section" "posts") }} |
| 11 | <li class="mb-5"> | 11 | <li class="mb-5"> |
| 12 | <time class="block text-gray-400 font-medium text-xs">{{ .Date.Format "Monday Jan 2, 2006" }}</time> | 12 | <time class="block text-gray-400 font-medium text-xs">{{ .Date.Format "Monday Jan 2, 2006" }}</time> |
| 13 | <a href="{{.Permalink}}" itemprop="url" class="hover:bg-yellow-100">{{.Title}}</a> | 13 | <a href="/{{.Params.url}}" itemprop="url" class="hover:bg-yellow-100"> |
| 14 | {{ if .Params.draft }} | ||
| 15 | <span class="bg-orange-600 text-white px-1.5">Draft</span> | ||
| 16 | {{ end }} | ||
| 17 | {{.Title}} | ||
| 18 | </a> | ||
| 14 | </li> | 19 | </li> |
| 15 | {{end}} | 20 | {{end}} |
| 16 | </ul> | 21 | </ul> |
diff --git a/themes/simple/layouts/_default/single.html b/themes/simple/layouts/_default/single.html index e8f27d1..c8e786a 100755 --- a/themes/simple/layouts/_default/single.html +++ b/themes/simple/layouts/_default/single.html | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | <!-- Read more --> | 34 | <!-- Read more --> |
| 35 | {{ if in .Type "posts" }} | 35 | {{ if in .Type "posts" }} |
| 36 | <section> | 36 | <section> |
| 37 | <h1 class="text-2xl font-bold mb-6">Read more from this site</h1> | 37 | <h2 class="text-2xl font-bold mb-6">Read more from this site</h2> |
| 38 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12"> | 38 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12"> |
| 39 | <meta itemprop="name" content="Article list"> | 39 | <meta itemprop="name" content="Article list"> |
| 40 | <ul> | 40 | <ul> |
| @@ -42,7 +42,7 @@ | |||
| 42 | {{ range $randomPosts }} | 42 | {{ range $randomPosts }} |
| 43 | <li class="mb-6"> | 43 | <li class="mb-6"> |
| 44 | <time class="block text-gray-400 font-medium text-xs">{{ .Date.Format "Mon Jan 2, 2006" }}</time> | 44 | <time class="block text-gray-400 font-medium text-xs">{{ .Date.Format "Mon Jan 2, 2006" }}</time> |
| 45 | <a href="{{.Permalink}}" itemprop="url" class="hover:bg-yellow-100 font-medium">{{.Title}}</a> | 45 | <a href="/{{.Params.url}}" itemprop="url" class="hover:bg-yellow-100 font-medium">{{.Title}}</a> |
| 46 | <p class="text-gray-600 text-sm">{{.Summary}}</p> | 46 | <p class="text-gray-600 text-sm">{{.Summary}}</p> |
| 47 | </li> | 47 | </li> |
| 48 | {{end}} | 48 | {{end}} |
diff --git a/themes/simple/layouts/partials/comments.html b/themes/simple/layouts/partials/comments.html index 7978917..70b1d94 100755 --- a/themes/simple/layouts/partials/comments.html +++ b/themes/simple/layouts/partials/comments.html | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | <section class="comments"> | 1 | <section class="comments"> |
| 2 | <h2 class="text-xl font-bold mb-2">Leave a comment</h2> | ||
| 2 | <p class="mb-4">You can write me an email at <a href="mailto:m@mitjafelicijan.com" class="underline hover:bg-yellow-100">m@mitjafelicijan.com</a> or comment bellow.</p> | 3 | <p class="mb-4">You can write me an email at <a href="mailto:m@mitjafelicijan.com" class="underline hover:bg-yellow-100">m@mitjafelicijan.com</a> or comment bellow.</p> |
| 3 | <div id="comment-section"></div> | 4 | <div id="comment-section"></div> |
| 4 | 5 | ||
| 5 | <script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script> | 6 | <script type="text/javascript" src="https://latest.cactus.chat/cactus.js"></script> |
| 6 | <link rel="stylesheet" href="_https://latest.cactus.chat/style.css" type="text/css"> | ||
| 7 | 7 | ||
| 8 | <script> | 8 | <script> |
| 9 | window.addEventListener('load', () => { | 9 | window.addEventListener('load', () => { |
diff --git a/themes/simple/layouts/partials/footer.html b/themes/simple/layouts/partials/footer.html index 95a1771..72252c7 100755 --- a/themes/simple/layouts/partials/footer.html +++ b/themes/simple/layouts/partials/footer.html | |||
| @@ -6,10 +6,45 @@ | |||
| 6 | </p> | 6 | </p> |
| 7 | </footer> | 7 | </footer> |
| 8 | 8 | ||
| 9 | <!-- katex math library --> | 9 | <!-- KaTeX math library --> |
| 10 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css" integrity="sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn" crossorigin="anonymous"> | 10 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css" integrity="sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn" crossorigin="anonymous"> |
| 11 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js" integrity="sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8" crossorigin="anonymous"></script> | 11 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js" integrity="sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8" crossorigin="anonymous"></script> |
| 12 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> | 12 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js" integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> |
| 13 | 13 | ||
| 14 | <!-- Fathom - beautiful, simple website analytics --> | 14 | <!-- Fathom - beautiful, simple website analytics --> |
| 15 | <script src="https://cdn.usefathom.com/script.js" data-site="XHQARKXP" defer></script> | 15 | <script src="https://cdn.usefathom.com/script.js" data-site="XHQARKXP" defer></script> |
| 16 | |||
| 17 | <!-- Lazy loading of iframes --> | ||
| 18 | <script> | ||
| 19 | window.addEventListener('load', () => { | ||
| 20 | const iframes = document.querySelectorAll('.ll-iframe'); | ||
| 21 | |||
| 22 | if (iframes) { | ||
| 23 | iframes.forEach(iframe => { | ||
| 24 | iframe.addEventListener('click', (evt) => { | ||
| 25 | // If there are no elements yet in the target element add iframe. | ||
| 26 | if (!evt.target.dataset.alreadyLoaded) { | ||
| 27 | // Setting this element as already loaded so it doesn't | ||
| 28 | // attempt to load it again. | ||
| 29 | evt.target.dataset.alreadyLoaded = true; | ||
| 30 | |||
| 31 | // Clearing up all existing elements inside of the target one. | ||
| 32 | evt.target.innerHTML = ''; | ||
| 33 | evt.target.classList.add('empty'); | ||
| 34 | evt.target.classList.add('border-0'); | ||
| 35 | |||
| 36 | // Creating iframe DOM element. | ||
| 37 | const iframeElement = document.createElement('iframe'); | ||
| 38 | iframeElement.classList.add('w-full'); | ||
| 39 | iframeElement.classList.add('h-full'); | ||
| 40 | iframeElement.classList.add('rounded'); | ||
| 41 | iframeElement.src = evt.target.dataset.src; | ||
| 42 | |||
| 43 | // Appending iframe as a child of current element. | ||
| 44 | evt.target.appendChild(iframeElement); | ||
| 45 | } | ||
| 46 | }); | ||
| 47 | }); | ||
| 48 | } | ||
| 49 | }); | ||
| 50 | </script> | ||
diff --git a/themes/simple/layouts/partials/head.html b/themes/simple/layouts/partials/head.html index b79a030..9499df6 100755 --- a/themes/simple/layouts/partials/head.html +++ b/themes/simple/layouts/partials/head.html | |||
| @@ -5,7 +5,9 @@ | |||
| 5 | <link rel="alternate" type="application/rss+xml" href="/index.xml" title="{{ .Site.Author.name }}"> | 5 | <link rel="alternate" type="application/rss+xml" href="/index.xml" title="{{ .Site.Author.name }}"> |
| 6 | <link rel="alternate" type="application/rss+xml" href="/yap/feed.xml" title="Microblog - {{ .Site.Author.name }}"> | 6 | <link rel="alternate" type="application/rss+xml" href="/yap/feed.xml" title="Microblog - {{ .Site.Author.name }}"> |
| 7 | 7 | ||
| 8 | <link rel="icon" type="image/gif" href="/general/favicon.gif" /> | 8 | <link |
| 9 | href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd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="image/x-icon" /> | ||
| 9 | 11 | ||
| 10 | <title>{{.Title}}</title> | 12 | <title>{{.Title}}</title> |
| 11 | <meta name="description" content="{{ .Site.Params.description }}" /> | 13 | <meta name="description" content="{{ .Site.Params.description }}" /> |
diff --git a/themes/simple/layouts/partials/tailwind.html b/themes/simple/layouts/partials/tailwind.html index 616ab3a..b6fd763 100755 --- a/themes/simple/layouts/partials/tailwind.html +++ b/themes/simple/layouts/partials/tailwind.html | |||
| @@ -101,6 +101,20 @@ | |||
| 101 | @apply my-10; | 101 | @apply my-10; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | /* Lazy loading of iframes */ | ||
| 105 | article.single .ll-iframe { | ||
| 106 | @apply bg-gray-100 rounded; | ||
| 107 | } | ||
| 108 | |||
| 109 | article.single .ll-iframe::before { | ||
| 110 | @apply h-full flex border-2 border-gray-300 rounded justify-center items-center font-medium text-sm cursor-pointer animate-pulse; | ||
| 111 | content: 'Click here to load resource…'; | ||
| 112 | } | ||
| 113 | |||
| 114 | article.single .ll-iframe.empty::before { | ||
| 115 | content: none; | ||
| 116 | } | ||
| 117 | |||
| 104 | /* Cactus Comments */ | 118 | /* Cactus Comments */ |
| 105 | .comments img { | 119 | .comments img { |
| 106 | max-width: auto !important; | 120 | max-width: auto !important; |
