refactor: moved to hugo
1
themes/fmartingr/LICENSE
Normal file
|
@ -0,0 +1 @@
|
|||
|
7
themes/fmartingr/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Theme Name
|
||||
|
||||
## Features
|
||||
|
||||
## Installation
|
||||
|
||||
## Configuration
|
5
themes/fmartingr/archetypes/default.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||
date = {{ .Date }}
|
||||
draft = true
|
||||
+++
|
22
themes/fmartingr/assets/css/main.css
Normal file
|
@ -0,0 +1,22 @@
|
|||
body {
|
||||
color: #222;
|
||||
font-family: sans-serif;
|
||||
line-height: 1.5;
|
||||
margin: 1rem;
|
||||
max-width: 768px;
|
||||
}
|
||||
|
||||
header {
|
||||
border-bottom: 1px solid #222;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px solid #222;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #00e;
|
||||
text-decoration: none;
|
||||
}
|
1
themes/fmartingr/assets/js/main.js
Normal file
|
@ -0,0 +1 @@
|
|||
console.log('This site was generated by Hugo.');
|
3
themes/fmartingr/assets/sass/_about.sass
Normal file
|
@ -0,0 +1,3 @@
|
|||
body.home
|
||||
img
|
||||
border-radius: 12px
|
90
themes/fmartingr/assets/sass/_blog.sass
Normal file
|
@ -0,0 +1,90 @@
|
|||
div.article, main.blog
|
||||
.title
|
||||
margin-bottom: 0.3em
|
||||
|
||||
.info
|
||||
*
|
||||
vertical-align: middle
|
||||
|
||||
.Tags
|
||||
ul
|
||||
display: inline-block
|
||||
margin: 0
|
||||
padding: 0
|
||||
list-style: none
|
||||
|
||||
li
|
||||
display: inline
|
||||
margin-right: 0.5em
|
||||
|
||||
.content
|
||||
margin-top: 1em
|
||||
text-align: justify
|
||||
|
||||
img
|
||||
border-radius: 6px
|
||||
display: block
|
||||
margin: 0 auto
|
||||
max-width: 100%
|
||||
|
||||
img
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2)
|
||||
|
||||
video, img
|
||||
max-width: 100%
|
||||
|
||||
li > p
|
||||
margin: 0
|
||||
|
||||
li
|
||||
margin-bottom: 1em
|
||||
|
||||
.highlight
|
||||
pre
|
||||
margin: 0
|
||||
|
||||
blockquote
|
||||
display: block
|
||||
background: #eee
|
||||
font-style: italic
|
||||
padding: 15px 20px 15px 20px
|
||||
font-family: Georgia, serif
|
||||
color: #666
|
||||
text-align: justify
|
||||
|
||||
p
|
||||
margin: 0
|
||||
|
||||
kbd
|
||||
padding: 0.1em 0.6em
|
||||
border: 1px solid #ccc
|
||||
font-size: 11px
|
||||
font-family: Arial,Helvetica,sans-serif
|
||||
background-color: #f7f7f7
|
||||
color: #333
|
||||
-moz-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset
|
||||
-webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset
|
||||
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2),0 0 0 2px #ffffff inset
|
||||
-moz-border-radius: 3px
|
||||
-webkit-border-radius: 3px
|
||||
border-radius: 3px
|
||||
display: inline-block
|
||||
margin: 0 0.1em
|
||||
text-shadow: 0 1px 0 #fff
|
||||
line-height: 1.4
|
||||
white-space: nowrap
|
||||
|
||||
// Spoiler tag
|
||||
|
||||
img.spoiler // Images
|
||||
filter: blur(25px)
|
||||
transition-property: -webkit-filter
|
||||
transition-duration: .2s
|
||||
|
||||
div.spoiler, span.spoiler, section.spoiler, p.spoiler // Text
|
||||
filter: blur(5px)
|
||||
transition-property: -webkit-filter
|
||||
transition-duration: .2s
|
||||
|
||||
.spoiler:hover, .spoiler:focus
|
||||
filter: blur(0px)
|
23
themes/fmartingr/assets/sass/_fonts.sass
Normal file
|
@ -0,0 +1,23 @@
|
|||
@font-face
|
||||
font-family: 'Anonymous Pro'
|
||||
src: url('/fonts/anonymous-pro/AnonymousPro-Regular.ttf')
|
||||
font-weight: normal
|
||||
font-style: normal
|
||||
|
||||
@font-face
|
||||
font-family: 'Anonymous Pro'
|
||||
src: url('/fonts/anonymous-pro/AnonymousPro-Bold.ttf')
|
||||
font-weight: bold
|
||||
font-style: normal
|
||||
|
||||
@font-face
|
||||
font-family: 'Anonymous Pro'
|
||||
src: url('/fonts/anonymous-pro/AnonymousPro-BoldItalic.ttf')
|
||||
font-weight: bold
|
||||
font-style: italic
|
||||
|
||||
@font-face
|
||||
font-family: 'Anonymous Pro'
|
||||
src: url('/fonts/anonymous-pro/AnonymousPro-Italic.ttf')
|
||||
font-weight: normal
|
||||
font-style: italic
|
42
themes/fmartingr/assets/sass/_grid.sass
Normal file
|
@ -0,0 +1,42 @@
|
|||
$pad: 20px
|
||||
|
||||
*
|
||||
+box-sizing(border-box)
|
||||
|
||||
.grid
|
||||
margin: 0 0 $pad 0
|
||||
|
||||
&:after
|
||||
// Or @extend clearfix
|
||||
content: ""
|
||||
display: table
|
||||
clear: both
|
||||
|
||||
[class*='col-']
|
||||
float: left
|
||||
padding-right: $pad
|
||||
|
||||
.grid &:last-of-type
|
||||
padding-right: 0
|
||||
|
||||
.col-2-3
|
||||
width: 66%
|
||||
|
||||
.col-1-3
|
||||
width: 33%
|
||||
|
||||
.col-1-2
|
||||
width: 49%
|
||||
|
||||
.col-1-4
|
||||
width: 24%
|
||||
|
||||
.col-1-8
|
||||
width: 12.5%
|
||||
|
||||
// Opt-in outside padding
|
||||
.grid-pad
|
||||
padding: $pad 0 $pad $pad
|
||||
|
||||
[class*='col-']:last-of-type
|
||||
padding-right: $pad
|
93
themes/fmartingr/assets/sass/_header.sass
Normal file
|
@ -0,0 +1,93 @@
|
|||
|
||||
header
|
||||
display: flex
|
||||
text-align: left
|
||||
line-height: 1.5em
|
||||
padding-bottom: 24px
|
||||
|
||||
.title
|
||||
flex-grow: 1
|
||||
flex-shrink: 1
|
||||
|
||||
*
|
||||
vertical-align: middle
|
||||
|
||||
h1
|
||||
display: inline
|
||||
margin: auto
|
||||
font-size: 1.5em
|
||||
|
||||
.avatar
|
||||
display: inline-block
|
||||
width: 32px
|
||||
border-radius: 12%
|
||||
|
||||
nav
|
||||
flex-grow: 1
|
||||
text-align: right
|
||||
|
||||
ul
|
||||
padding: 0
|
||||
margin: 0
|
||||
transition: display 1s
|
||||
|
||||
li
|
||||
display: inline-block
|
||||
padding-left: 16px
|
||||
vertical-align: middle
|
||||
|
||||
.active
|
||||
font-weight: bold
|
||||
|
||||
.menu-button-toggle-label
|
||||
position: absolute
|
||||
top: 0
|
||||
right: 0
|
||||
height: 1.5em
|
||||
|
||||
svg
|
||||
cursor: pointer
|
||||
vertical-align: middle
|
||||
|
||||
#menu-button-toggle
|
||||
display: none
|
||||
|
||||
&:checked + label
|
||||
.open-button
|
||||
display: none
|
||||
|
||||
.close-button
|
||||
display: block
|
||||
|
||||
&:not(:checked) + label
|
||||
.open-button
|
||||
display: block
|
||||
|
||||
.close-button
|
||||
display: none
|
||||
|
||||
@media ($until-mobile)
|
||||
.menu-button-toggle-label
|
||||
display: none
|
||||
|
||||
@media ($mobile)
|
||||
#menu-button-toggle:checked ~ .main-menu
|
||||
display: block
|
||||
|
||||
header
|
||||
display: block
|
||||
position: relative
|
||||
|
||||
nav
|
||||
width: 100%
|
||||
|
||||
ul
|
||||
display: none
|
||||
text-align: center
|
||||
padding-top: 10px
|
||||
|
||||
li
|
||||
border-top: 1px solid #CCC
|
||||
padding: 10px
|
||||
font-size: 1.5em
|
||||
display: block
|
4
themes/fmartingr/assets/sass/_home.sass
Normal file
|
@ -0,0 +1,4 @@
|
|||
div.home
|
||||
h2
|
||||
margin-top: 1em
|
||||
margin-bottom: 0.2em
|
83
themes/fmartingr/assets/sass/_layout.sass
Normal file
|
@ -0,0 +1,83 @@
|
|||
body
|
||||
font-family: $font-family
|
||||
font-size: $font-size-base
|
||||
line-height: 1.5em
|
||||
padding: 24px
|
||||
background-color: var(--background-color)
|
||||
color: var(--text-color)
|
||||
|
||||
.center
|
||||
margin: 0 auto
|
||||
max-width: 920px
|
||||
|
||||
a
|
||||
text-decoration: underilne
|
||||
color: var(--highlight-color)
|
||||
|
||||
&.no-underline
|
||||
text-decoration: none
|
||||
|
||||
hr
|
||||
border: 0px
|
||||
margin: 1em 0 1em 0
|
||||
border-top: #CCC 1px solid
|
||||
|
||||
p:first-child
|
||||
margin-top: 0
|
||||
|
||||
.text-left
|
||||
text-align: left
|
||||
|
||||
.text-center
|
||||
text-align: center
|
||||
|
||||
.text-right
|
||||
text-align: right
|
||||
|
||||
.text-bold
|
||||
font-weight: bold
|
||||
|
||||
.text-size-small
|
||||
font-size: $font-size-small
|
||||
|
||||
.text-size-base
|
||||
font-size: $font-size-base
|
||||
|
||||
.text-size-normal
|
||||
font-size: $font-size-normal
|
||||
|
||||
.text-size-enormous
|
||||
font-size: $font-size-enormous
|
||||
|
||||
.float-right
|
||||
float: right
|
||||
|
||||
.float-left
|
||||
float: left
|
||||
|
||||
.clearfloat
|
||||
clear: both
|
||||
|
||||
.display-block
|
||||
display: block
|
||||
|
||||
.block-info
|
||||
background-color: lighten($highlight-color, 40%)
|
||||
padding: 12px
|
||||
|
||||
// New
|
||||
.page-content
|
||||
margin: 0 auto
|
||||
flex-direction: row
|
||||
max-width: 980px
|
||||
|
||||
@media ($tablet)
|
||||
display: block
|
||||
width: 100%
|
||||
|
||||
*:target
|
||||
background-color: lighten($highlight-color, 40%)
|
||||
|
||||
footer
|
||||
text-align: center
|
||||
font-size: 0.8em
|
6
themes/fmartingr/assets/sass/_mediaqueries.sass
Normal file
|
@ -0,0 +1,6 @@
|
|||
$desktop: "max-width: 992px"
|
||||
$until-desktop: "min-width: 768px"
|
||||
$tablet: "max-width: 767px"
|
||||
$until-tablet: "min-width: 767px"
|
||||
$mobile: "max-width: 480px"
|
||||
$until-mobile: "min-width: 480px"
|
4
themes/fmartingr/assets/sass/_mixins.sass
Normal file
|
@ -0,0 +1,4 @@
|
|||
=box-sizing($type)
|
||||
-webkit-box-sizing: $type
|
||||
-moz-box-sizing: $type
|
||||
box-sizing: $type
|
5
themes/fmartingr/assets/sass/_pagination.sass
Normal file
|
@ -0,0 +1,5 @@
|
|||
.pagination
|
||||
padding: 0
|
||||
|
||||
li
|
||||
display: inline-block
|
14
themes/fmartingr/assets/sass/_portfolio.sass
Normal file
|
@ -0,0 +1,14 @@
|
|||
.project
|
||||
display: inline-block
|
||||
width: 49%
|
||||
|
||||
img
|
||||
max-height: 250px
|
||||
|
||||
&.project-work-sites
|
||||
width: 24%
|
||||
|
||||
@media ($tablet)
|
||||
.project
|
||||
display: block
|
||||
width: 100% !important
|
18
themes/fmartingr/assets/sass/_table.sass
Normal file
|
@ -0,0 +1,18 @@
|
|||
table
|
||||
margin: 0 0 40px 0
|
||||
width: 100%
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.2)
|
||||
|
||||
th
|
||||
background: var(--highlight-color)
|
||||
color: white
|
||||
font-weight: bold
|
||||
|
||||
tr
|
||||
background: var(--background-color)
|
||||
|
||||
&:nth-of-type(odd)
|
||||
background: var(--background-color-odd)
|
||||
|
||||
td, th
|
||||
padding: 6px
|
32
themes/fmartingr/assets/sass/_variables.sass
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Theme
|
||||
// Light theme
|
||||
$highlight-color: #F04A00
|
||||
$text-color: #111
|
||||
$background-color: #fff
|
||||
$background-color-odd: darken($background-color, 5%)
|
||||
|
||||
// Dark theme
|
||||
$highlight-color-dark: darken($highlight-color, 5%)
|
||||
$text-color-dark: #ddd
|
||||
$background-color-dark: #222
|
||||
$background-color-odd-dark: darken($background-color-dark, 5%)
|
||||
|
||||
// Fonts
|
||||
$font-family: "Anonymous Pro", Menlo, Monaco, "Courier New", monospace
|
||||
$font-size-small: 0.8em
|
||||
$font-size-base: 1.0em
|
||||
$font-size-normal: 1.3em
|
||||
$font-size-enormous: 5em
|
||||
|
||||
\:root
|
||||
--background-color: #{$background-color}
|
||||
--text-color: #{$text-color}
|
||||
--highlight-color: #{$highlight-color}
|
||||
--background-color-odd: #{$background-color-odd}
|
||||
|
||||
@media (prefers-color-scheme: dark)
|
||||
\:root
|
||||
--background-color: #{$background-color-dark}
|
||||
--text-color: #{$text-color-dark}
|
||||
--highlight-color: #{$highlight-color-dark}
|
||||
--background-color-odd: #{$background-color-odd-dark}
|
12
themes/fmartingr/assets/sass/style.sass
Normal file
|
@ -0,0 +1,12 @@
|
|||
@import ./variables
|
||||
@import ./mediaqueries
|
||||
@import ./header
|
||||
@import ./fonts
|
||||
@import ./mixins
|
||||
@import ./grid
|
||||
@import ./layout
|
||||
@import ./blog
|
||||
@import ./home
|
||||
@import ./portfolio
|
||||
@import ./pagination
|
||||
@import ./table
|
9
themes/fmartingr/content/_index.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
+++
|
||||
title = 'Home'
|
||||
date = 2023-01-01T08:00:00-07:00
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat
|
||||
pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim
|
||||
excepteur excepteur pariatur nostrud qui irure ullamco.
|
5
themes/fmartingr/go.mod
Normal file
|
@ -0,0 +1,5 @@
|
|||
module git.nakama.town/fmartingr/fmartingr.com/themes/fmartingr
|
||||
|
||||
go 1.22.3
|
||||
|
||||
require github.com/hugomods/images v0.10.1 // indirect
|
2
themes/fmartingr/go.sum
Normal file
|
@ -0,0 +1,2 @@
|
|||
github.com/hugomods/images v0.10.1 h1:ok3ZUZ63MAcmFuTx2kC5JJ3Sffd420RRW9yO57SFeQA=
|
||||
github.com/hugomods/images v0.10.1/go.mod h1:U6Gwj16LKvk66rOMyGFrnF6f0aV8lT89lqOsckOAjYY=
|
24
themes/fmartingr/hugo.toml
Normal file
|
@ -0,0 +1,24 @@
|
|||
baseURL = 'https://example.org/'
|
||||
languageCode = 'en-us'
|
||||
title = 'My New Hugo Site'
|
||||
|
||||
[[menus.main]]
|
||||
name = 'Home'
|
||||
pageRef = '/'
|
||||
weight = 10
|
||||
|
||||
[[menus.main]]
|
||||
name = 'Posts'
|
||||
pageRef = '/posts'
|
||||
weight = 20
|
||||
|
||||
[[menus.main]]
|
||||
name = 'Tags'
|
||||
pageRef = '/tags'
|
||||
weight = 30
|
||||
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = false
|
||||
min = "0.116.0"
|
||||
|
15
themes/fmartingr/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<html
|
||||
lang="{{ or site.Language.LanguageCode }}"
|
||||
dir="{{ or site.Language.LanguageDirection `ltr` }}"
|
||||
>
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
<header class="center">{{ partial "header.html" . }}</header>
|
||||
<main class="{{ .Section }}">{{ block "main" . }}{{ end }}</main>
|
||||
<hr>
|
||||
<footer class="center">{{ partial "footer.html" . }}</footer>
|
||||
</body>
|
||||
</html>
|
14
themes/fmartingr/layouts/_default/home.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<div class="home center">
|
||||
<h1 class="title">Latest blog posts</h1>
|
||||
{{ range where site.RegularPages "Section" "blog" | first 10 }}
|
||||
<div class="article">
|
||||
<h2 class="text-size-normal"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
<div class="info">
|
||||
{{ partial "svg/calendar-event.svg" (dict "size" 24) }}
|
||||
<span>{{ time.Format "January 2, 2006" .Date }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
19
themes/fmartingr/layouts/_default/list.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{ define "main" }}
|
||||
{{ if ne .Title "Blogs" }}<h1>{{ .Title }}</h1>{{ end }}
|
||||
{{ .Content }}
|
||||
{{ range (.Paginate .Pages 7).Pages }}
|
||||
<div class="artitle {{ $.Param "site_style.container_class" }}">
|
||||
<h2 class="title"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
<div class="info">
|
||||
{{ partial "svg/calendar-event.svg" (dict "size" 24) }}
|
||||
<span>{{ .Date.Format "January 2, 2006" }}</span>
|
||||
</div>
|
||||
<div class="summary content">{{ .Summary }}</div>
|
||||
<p class="text-right"><a href="{{ .RelPermalink }}">Read more »</a></p>
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="center text-center">
|
||||
{{ partial "pagination" . }}
|
||||
</div>
|
||||
|
||||
{{ end }}
|
17
themes/fmartingr/layouts/_default/single.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ define "main" }}
|
||||
<article class="{{ .Params.site_style.container_class | default ($.Param "site_style.container_class") }}">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
{{ if strings.Contains .Section "blog" }}
|
||||
<div class="info">
|
||||
{{ partial "svg/calendar-event.svg" (dict "size" 24) }}
|
||||
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
<div>{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="content">{{ .Content }}</div>
|
||||
</article>
|
||||
{{ end }}
|
3
themes/fmartingr/layouts/partials/analytics.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ if hugo.IsProduction }}
|
||||
<script defer src="{{ .Param "umami.script_url" }}" data-website-id="{{ .Param "umami.website_id" }}"></script>
|
||||
{{ end }}
|
10
themes/fmartingr/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div>My opinions are my own.</div>
|
||||
<div>
|
||||
Created using <a target="_blank" href="https://gohugo.io">Hugo</a> |
|
||||
<a target="_blank" href="https://git.nakama.town/fmartingr/fmartingr.com"
|
||||
>Source code</a
|
||||
>
|
||||
| <a href="/blog/index.xml">RSS Feed</a> |
|
||||
<a target="_blank" href="/about">About me</a>
|
||||
</div>
|
||||
<div>Licensed under <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/?ref=chooser-v1" target="_blank">CC BY-NC-SA 4.0</a></div>
|
17
themes/fmartingr/layouts/partials/head.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>
|
||||
{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title
|
||||
site.Title }}{{ end }}
|
||||
</title>
|
||||
{{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }}
|
||||
<link rel="icon" href="/static/images/favicon.ico" />
|
||||
<!-- Mobile -->
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="MobileOptimized" content="320" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
|
||||
/>
|
||||
<meta http-equiv="cleartype" content="on" />
|
||||
{{ partial "analytics.html" . }}
|
9
themes/fmartingr/layouts/partials/head/css.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }} {{ with
|
||||
resources.Get "sass/style.sass" | toCSS $opts | minify | fingerprint }}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="{{ .RelPermalink }}"
|
||||
integrity="{{ .Data.Integrity }}"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
{{ end }}
|
12
themes/fmartingr/layouts/partials/head/js.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{- with resources.Get "js/main.js" }}
|
||||
{{- if eq hugo.Environment "development" }}
|
||||
{{- with . | js.Build }}
|
||||
<script src="{{ .RelPermalink }}"></script>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $opts := dict "minify" true }}
|
||||
{{- with . | js.Build $opts | fingerprint }}
|
||||
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
5
themes/fmartingr/layouts/partials/header.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="title">
|
||||
<img class="avatar" src="/images/avatar.jpg?width=32px" />
|
||||
<h1>Felipe Martín</h1>
|
||||
</div>
|
||||
<nav>{{ partial "menu.html" (dict "menuID" "main" "page" .) }}</nav>
|
58
themes/fmartingr/layouts/partials/menu.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
{{- /*
|
||||
Renders a menu for the given menu ID.
|
||||
|
||||
@context {page} page The current page.
|
||||
@context {string} menuID The menu ID.
|
||||
|
||||
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
||||
*/}}
|
||||
|
||||
{{- $page := .page }}
|
||||
{{- $menuID := .menuID }}
|
||||
|
||||
{{- with index site.Menus $menuID }}
|
||||
<input id="menu-button-toggle" type="checkbox" />
|
||||
<label class="menu-button-toggle-label" for="menu-button-toggle">
|
||||
<div class="open-button">
|
||||
{{ partial "svg/menu-2.svg" }}
|
||||
</div>
|
||||
<div class="close-button">
|
||||
{{ partial "svg/x.svg" }}
|
||||
</div>
|
||||
</label>
|
||||
<ul class="main-menu">
|
||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
|
||||
{{- define "partials/inline/menu/walk.html" }}
|
||||
{{- $page := .page }}
|
||||
{{- range .menuEntries }}
|
||||
{{- $attrs := dict "href" .URL }}
|
||||
{{- if $page.IsMenuCurrent .Menu . }}
|
||||
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
|
||||
{{- else if $page.HasMenuCurrent .Menu .}}
|
||||
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
|
||||
{{- end }}
|
||||
{{- $name := .Name }}
|
||||
{{- with .Identifier }}
|
||||
{{- with T . }}
|
||||
{{- $name = . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<li>
|
||||
<a
|
||||
{{- range $k, $v := $attrs }}
|
||||
{{- with $v }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
>{{ $name }}</a>
|
||||
{{- with .Children }}
|
||||
<ul>
|
||||
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
154
themes/fmartingr/layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,154 @@
|
|||
{{- $validFormats := slice "default" "terse" }}
|
||||
|
||||
{{- $msg1 := "When passing a map to the internal pagination template, one of the elements must be named 'page', and it must be set to the context of the current page." }}
|
||||
{{- $msg2 := "The 'format' specified in the map passed to the internal pagination template is invalid. Valid choices are: %s." }}
|
||||
|
||||
{{- $page := . }}
|
||||
{{- $format := "terse" }}
|
||||
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- with .page }}
|
||||
{{- $page = . }}
|
||||
{{- else }}
|
||||
{{- errorf $msg1 }}
|
||||
{{- end }}
|
||||
{{- with .format }}
|
||||
{{- $format = lower . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if in $validFormats $format }}
|
||||
{{- if gt $page.Paginator.TotalPages 1 }}
|
||||
<ul class="pagination pagination-{{ $format }}">
|
||||
{{- partial (printf "partials/inline/pagination/%s" $format) $page }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- errorf $msg2 (delimit $validFormats ", ") }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Format: default
|
||||
{{/* --------------------------------------------------------------------- */}}
|
||||
{{- define "partials/inline/pagination/default" }}
|
||||
{{- with .Paginator }}
|
||||
{{- $currentPageNumber := .PageNumber }}
|
||||
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="First" class="page-link" role="button"><span aria-hidden="true">««</span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="First" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">««</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Previous" class="page-link" role="button"><span aria-hidden="true">«</span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="Previous" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">«</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- $slots := 5 }}
|
||||
{{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }}
|
||||
{{- $end := math.Min .TotalPages (sub (add $start $slots) 1) }}
|
||||
{{- if lt (add (sub $end $start) 1) $slots }}
|
||||
{{- $start = math.Max 1 (add (sub $end $slots) 1) }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $k := seq $start $end }}
|
||||
{{- if eq $.Paginator.PageNumber $k }}
|
||||
<li class="page-item active">
|
||||
<a aria-current="page" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item">
|
||||
<a href="{{ (index $.Paginator.Pagers (sub $k 1)).URL }}" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Next }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Next" class="page-link" role="button"><span aria-hidden="true">»</span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="Next" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">»</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Last" class="page-link" role="button"><span aria-hidden="true">»»</span></a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item disabled">
|
||||
<a aria-disabled="true" aria-label="Last" class="page-link" role="button" tabindex="-1"><span aria-hidden="true">»»</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Format: terse
|
||||
{{/* --------------------------------------------------------------------- */}}
|
||||
{{- define "partials/inline/pagination/terse" }}
|
||||
{{- with .Paginator }}
|
||||
{{- $currentPageNumber := .PageNumber }}
|
||||
|
||||
{{- with .First }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="First" class="page-link" role="button"><span aria-hidden="true">««</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Prev }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Previous" class="page-link" role="button"><span aria-hidden="true">«</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- $slots := 3 }}
|
||||
{{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }}
|
||||
{{- $end := math.Min .TotalPages (sub (add $start $slots) 1) }}
|
||||
{{- if lt (add (sub $end $start) 1) $slots }}
|
||||
{{- $start = math.Max 1 (add (sub $end $slots) 1) }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $k := seq $start $end }}
|
||||
{{- if eq $.Paginator.PageNumber $k }}
|
||||
<li class="page-item active">
|
||||
<a aria-current="page" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a>
|
||||
</li>
|
||||
{{- else }}
|
||||
<li class="page-item">
|
||||
<a href="{{ (index $.Paginator.Pagers (sub $k 1)).URL }}" aria-label="Page {{ $k }}" class="page-link" role="button">{{ $k }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Next }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Next" class="page-link" role="button"><span aria-hidden="true">»</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- with .Last }}
|
||||
{{- if ne $currentPageNumber .PageNumber }}
|
||||
<li class="page-item">
|
||||
<a href="{{ .URL }}" aria-label="Last" class="page-link" role="button"><span aria-hidden="true">»»</span></a>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
19
themes/fmartingr/layouts/partials/svg/calendar-event.svg
Normal file
|
@ -0,0 +1,19 @@
|
|||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="{{ .size | default 24 }}"
|
||||
height="{{ .size | default 24 }}"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-calendar-event"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M4 5m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" />
|
||||
<path d="M16 3l0 4" />
|
||||
<path d="M8 3l0 4" />
|
||||
<path d="M4 11l16 0" />
|
||||
<path d="M8 15h2v2h-2z" />
|
||||
</svg>
|
After Width: | Height: | Size: 581 B |
17
themes/fmartingr/layouts/partials/svg/home-2.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="{{ .size | default 24 }}"
|
||||
height="{{ .size | default 24 }}"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-home-2"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M5 12l-2 0l9 -9l9 9l-2 0" />
|
||||
<path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" />
|
||||
<path d="M10 12h4v4h-4z" />
|
||||
</svg>
|
After Width: | Height: | Size: 502 B |
17
themes/fmartingr/layouts/partials/svg/menu-2.svg
Normal file
|
@ -0,0 +1,17 @@
|
|||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="{{ .size | default 24 }}"
|
||||
height="{{ .size | default 24 }}"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-menu-2"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M4 6l16 0" />
|
||||
<path d="M4 12l16 0" />
|
||||
<path d="M4 18l16 0" />
|
||||
</svg>
|
After Width: | Height: | Size: 451 B |
18
themes/fmartingr/layouts/partials/svg/tags.svg
Normal file
|
@ -0,0 +1,18 @@
|
|||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="{{ .size | default 24 }}"
|
||||
height="{{ .size | default 24 }}"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-tags"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M3 8v4.172a2 2 0 0 0 .586 1.414l5.71 5.71a2.41 2.41 0 0 0 3.408 0l3.592 -3.592a2.41 2.41 0 0 0 0 -3.408l-5.71 -5.71a2 2 0 0 0 -1.414 -.586h-4.172a2 2 0 0 0 -2 2z" />
|
||||
<path d="M18 19l1.592 -1.592a4.82 4.82 0 0 0 0 -6.816l-4.592 -4.592" />
|
||||
<path d="M7 10h-.01" />
|
||||
</svg>
|
After Width: | Height: | Size: 653 B |
16
themes/fmartingr/layouts/partials/svg/x.svg
Normal file
|
@ -0,0 +1,16 @@
|
|||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="{{ .size | default 24 }}"
|
||||
height="{{ .size | default 24 }}"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="icon icon-tabler icons-tabler-outline icon-tabler-x"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M18 6l-12 12" />
|
||||
<path d="M6 6l12 12" />
|
||||
</svg>
|
After Width: | Height: | Size: 423 B |
23
themes/fmartingr/layouts/partials/terms.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{- /*
|
||||
For a given taxonomy, renders a list of terms assigned to the page.
|
||||
|
||||
@context {page} page The current page.
|
||||
@context {string} taxonomy The taxonomy.
|
||||
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
*/}}
|
||||
|
||||
{{- $page := .page }}
|
||||
{{- $taxonomy := .taxonomy }}
|
||||
|
||||
{{- with $page.GetTerms $taxonomy }}
|
||||
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||
<div class="{{ $label }}">
|
||||
{{ if ne $label "Tags" }}<div>{{ $label }}:</div>{{ else }}{{ partial "svg/tags.svg" }}{{ end }}
|
||||
<ul>
|
||||
{{- range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ if eq $label "Tags" }}#{{ end }}{{ .Title | lower }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end }}
|
0
themes/fmartingr/layouts/shortcodes/icon.html
Normal file
BIN
themes/fmartingr/static/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
themes/fmartingr/static/fonts/andada-bold-webfont.woff
Normal file
BIN
themes/fmartingr/static/fonts/andada-bold-webfont.woff2
Normal file
BIN
themes/fmartingr/static/fonts/andada-bolditalic-webfont.woff
Normal file
BIN
themes/fmartingr/static/fonts/andada-bolditalic-webfont.woff2
Normal file
BIN
themes/fmartingr/static/fonts/andada-italic-webfont.woff
Normal file
BIN
themes/fmartingr/static/fonts/andada-italic-webfont.woff2
Normal file
BIN
themes/fmartingr/static/fonts/andada-regular-webfont.woff
Normal file
BIN
themes/fmartingr/static/fonts/andada-regular-webfont.woff2
Normal file
BIN
themes/fmartingr/static/images/avatar.jpg
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
themes/fmartingr/static/images/favicon.ico
Normal file
After Width: | Height: | Size: 1.4 KiB |
13
themes/fmartingr/theme.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
name = 'fmartingr.com'
|
||||
license = 'GPLv2'
|
||||
licenselink = 'https://github.com/fmartingr/fmartingr.com/LICENSE'
|
||||
description = 'Personal blog theme for my site'
|
||||
|
||||
homepage = 'https://git.nakama.town/fmartingr/fmartingr.com/themes/fmartingr'
|
||||
|
||||
tags = ['blog', 'company']
|
||||
features = ['some', 'awesome', 'features']
|
||||
|
||||
[author]
|
||||
name = 'Felipe Martin'
|
||||
homepage = 'https://fmartingr.com'
|