diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..854fa32 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +public/ +resources/ +*.lock diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..9d23286 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,166 @@ +--- +title: start +--- + +## About + +{{< icon "chat" >}} benjamin@tinytechbureau.com
+{{< icon "feed" >}} RSS feed
+{{< icon "fan" >}} Follow on the Fediverse + +Tiny Tech Bureau produces sustainable and creative tech solutions based on open-source components. + +We've learned that reducing the size of tech solutions, in turn reduces their complexity and harmfulness. We're critical that tech is the answer to all problems, and therefore we're a very trustworthy consultancy partner for building such solutions. We can produce end-to-end solutions: From designing and planning your project — to crafting digital tools and products that fit your users and your workflows, using our expertise with a durable open source tech stack. + +*We* are me, [Benjamin Balder Bach](https://overtag.dk/), and any freelance friends that I work with in this new setting. + +## Values and methods {{< icon "bulb" >}} + +If you like reading, here are some principles and visions that we work with: + +
+
+ + + + +
+When building a solution with tech, firstly analyze the present situation to understand how it works and what solutions are already in place. We want to learn from this and inform the next solution. + +In many ways, like doctors take a hippocratic oath, technology workers can also pledge that they a) will not build a hammer and then look for nails, we will take an approach whereby the needs are understood firstly and b) we will use our knowledge of data, security and access to enforce the rights of users in an ethical way. +
+ +
+
+ + + +
+The sensitivity of the do no harm principle extends into understanding the meaning that technology has to users. Firstly, we build it based on their needs, secondly we test it with them to get their acceptance. Adding technological layers can easily be a tempting ride whereby unnecessary data and procedures are added. In programming, we apply the principle of YAGNI (you aren't going to need it), same principle is relevant when we build a user experience. + +It's much like Occam's Razor, the less we assume about our user's needs, the more likely we are to have identified the correct solution, as in the combination of user experience and technology stack that's most efficient on both a short and long term. + +But when we look for simplicity and meaning, we need to be aware that users are different and social interactions can be complex. This doesn't mean necessarily that Occam's Razor isn't true, but we need to account for everything. Or as Einstein said: Everything should be made as simple as possible, but not simpler. + +
+ +
+
+ + + +
+Open Source contains a moral of giving back. It's not that we need to give away useless source code or expose sensitive data, but more that we understand that the tools we are given for free, obliges us to take part in something bigger. + +As a publicly owned entity, this has become an overall thinking that includes using the enormous capacity of the public sector to participate in Open Source. In fact, this is already known to be beneficial to build sovereign systems and as an economically superiour model. On all levels of the public sector, it makes sense + +
+ +
+
+ + + +
+ +As one of the many concepts that have evolved in the push for more Public Code, is the Open Source stewardship. As much as we believe in sharing code, we believe in sharing experiences. The idea of stewarding open source, is not one of being in power or control. It's based on principles of taking responsibility to make sure that a project uses existing experiences and tools to emerge. + +Once the strategy is in place, software designers and developers can benefit from guidance at the inception of their project and along the way. We want more than just a LICENSE file in the repository. We want documentation, stakeholders and community around the project that can ensure its sustainability. + +
+ +
+
+ + + + +
+ +Code and technology indeed withers over time when it isn't cared for. Software projects build up technical debt naturally, and the question is when that technical debt becomes an existential threat. + +One of the reasons for minimizing a tech stack or being fairly skeptic about technologies is to ensure the longevity of software. A great software platform doesn't look outdated a few years down the road. You know that if you have used software with a very strong and relevant concept. + +
+ +
+
+ + + + +
+ +Sharing contexts means to take part in the world of users and other stakeholders. + +There are several reasons why it makes sense for developers and designers to share as much context as possible with other stakeholders, especially users. Firstly, it makes developers able to become designers and make more qualified proposals. But secondly, it also helps to prioritize in harmony. +
+ +
+
+ + + + +
+ +The idea of "rapid development" has a long historical run-way, leading up to ideas like "ship early, ship often", agile programming methodologies etc. +
+ + +
+
+ +## Tools: The technical concept + +In order to build and deliver something that aligns with our methods, we *currently* use: + +* Django [^1] and Python +* Wagtail CMS [^2] +* Static site generators (Hugo[^3] and Sphinx) +* CSS and SCSS +* Minimal JavaScript (such as htmx[^4]) +* Containerization for development setups and testing +* Pytest [^5] +* FastAPI [^6], django-ninja [^7] +* CI for testing and linting + +The general idea is to always align with what we perceive as the best practices to reach our vision. Using the flexibility of such a stack, you can develop any website or web app at small or large scale. + +Having a test strategy is important. And a CI version of testing is crucial to guarantee correctness and allow a fast path to changes. However, we also see testing as something that needs careful crafting - tests need to be meaningful in all aspects of a solution. + +If you're familiar with other tech stacks, you'll notice the absence of containerized deployment and big JavaScript frameworks. These add the kind of complexity to a project that will make it expensive to bootstrap and maintain over a longer period of time. + +[^1]: https://djangoproject.com +[^2]: https://wagtail.org +[^3]: https://gohugo.io/ +[^4]: https://htmx.org/ +[^5]: https://pytest.org/ +[^6]: https://fastapi.tiangolo.com/ +[^7]: https://django-ninja.dev/ \ No newline at end of file diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..a4f186f --- /dev/null +++ b/hugo.toml @@ -0,0 +1,30 @@ +baseURL = 'https://tinytechbureau.com/' +languageCode = 'en-us' +title = 'Tiny Tech Bureau' + +theme = 'ttb' + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true + +[[menus.main]] +name = 'About' +pageRef = '/' +weight = 10 + +[[menus.main]] +name = 'Solutions' +pageRef = '/projects' +weight = 20 + +[[menus.main]] +name = 'Blog' +pageRef = '/blog' +weight = 30 + +[module] + [module.hugoVersion] + extended = true + min = "0.116.0" diff --git a/static/img/icons/bulb.svg b/static/img/icons/bulb.svg new file mode 100644 index 0000000..4cc2c29 --- /dev/null +++ b/static/img/icons/bulb.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + diff --git a/static/img/icons/chat.svg b/static/img/icons/chat.svg new file mode 100644 index 0000000..8dff03a --- /dev/null +++ b/static/img/icons/chat.svg @@ -0,0 +1,45 @@ + + + + + + + + + diff --git a/static/img/icons/cursor.svg b/static/img/icons/cursor.svg new file mode 100644 index 0000000..6933a9e --- /dev/null +++ b/static/img/icons/cursor.svg @@ -0,0 +1,48 @@ + + + + + + + + + + diff --git a/static/img/icons/expand.svg b/static/img/icons/expand.svg new file mode 100644 index 0000000..6fa97f4 --- /dev/null +++ b/static/img/icons/expand.svg @@ -0,0 +1,48 @@ + + + + + + + + + + diff --git a/static/img/icons/fan.svg b/static/img/icons/fan.svg new file mode 100644 index 0000000..695da3a --- /dev/null +++ b/static/img/icons/fan.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + diff --git a/static/img/icons/feed.svg b/static/img/icons/feed.svg new file mode 100644 index 0000000..d990e34 --- /dev/null +++ b/static/img/icons/feed.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + diff --git a/static/img/icons/popout.svg b/static/img/icons/popout.svg new file mode 100644 index 0000000..21788a5 --- /dev/null +++ b/static/img/icons/popout.svg @@ -0,0 +1,52 @@ + + diff --git a/static/img/logo.svg b/static/img/logo.svg new file mode 100644 index 0000000..0bd5732 --- /dev/null +++ b/static/img/logo.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/ttb/LICENSE b/themes/ttb/LICENSE new file mode 100644 index 0000000..8aa2645 --- /dev/null +++ b/themes/ttb/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [year] [fullname] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/themes/ttb/README.md b/themes/ttb/README.md new file mode 100644 index 0000000..7cec74e --- /dev/null +++ b/themes/ttb/README.md @@ -0,0 +1,7 @@ +# Theme Name + +## Features + +## Installation + +## Configuration diff --git a/themes/ttb/archetypes/default.md b/themes/ttb/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/themes/ttb/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/themes/ttb/assets/css/main.css b/themes/ttb/assets/css/main.css new file mode 100644 index 0000000..166ade9 --- /dev/null +++ b/themes/ttb/assets/css/main.css @@ -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; +} diff --git a/themes/ttb/assets/js/main.js b/themes/ttb/assets/js/main.js new file mode 100644 index 0000000..e2aac52 --- /dev/null +++ b/themes/ttb/assets/js/main.js @@ -0,0 +1 @@ +console.log('This site was generated by Hugo.'); diff --git a/themes/ttb/assets/scss/_collapsible.scss b/themes/ttb/assets/scss/_collapsible.scss new file mode 100644 index 0000000..4810f46 --- /dev/null +++ b/themes/ttb/assets/scss/_collapsible.scss @@ -0,0 +1,48 @@ +.collapsible-bar { + margin: 10px 0; + .collapsible-title + { + display: block; + cursor: pointer; + h3 { + margin: 0; + } + } + .collapsible-content { + transition: opacity 0.5s ease-out; + opacity: 0; + height: 0; + overflow: hidden; + p:last-child { + margin-bottom: 0; + } + } + > input[type=checkbox], + > input[type=radio] + { + display: none; + } + > input[type=checkbox]:checked ~ .collapsible-content, + > input[type=radio]:checked ~ .collapsible-content + { + display: block; + opacity: 1; + height: auto; + } +} + +.collapsible-bar-show-input +{ + > input[type=checkbox], + > input[type=radio] + { + display: inline-block; + float: left; + margin: 14px 10px; + } + > input[type=checkbox]:checked ~ .collapsible-content, + > input[type=radio]:checked ~ .collapsible-content + { + display: block; + } +} diff --git a/themes/ttb/assets/scss/_icons.scss b/themes/ttb/assets/scss/_icons.scss new file mode 100644 index 0000000..950d630 --- /dev/null +++ b/themes/ttb/assets/scss/_icons.scss @@ -0,0 +1,36 @@ +$base-url: "/img/icons"; + +/* icons */ +.icon { + width: 24px; + height: 24px; + display: inline-block; + vertical-align: middle; + margin: 2px; + background-size: contain; + background-position: center; + background-repeat: no-repeat; + &-cursor{ + background-image: url($base-url + "/cursor.svg"); + } + &-expand{ + background-image: url($base-url + "/expand.svg"); + } + &-feed{ + background-image: url($base-url + "/feed.svg"); + } + &-bulb{ + background-image: url($base-url + "/bulb.svg"); + } + &-chat{ + background-image: url($base-url + "/chat.svg"); + } + &-fan{ + background-image: url($base-url + "/fan.svg"); + } +} + +.button .icon { + margin-left: 5px; + margin-right: 0; +} diff --git a/themes/ttb/assets/scss/style.scss b/themes/ttb/assets/scss/style.scss new file mode 100644 index 0000000..7f061b4 --- /dev/null +++ b/themes/ttb/assets/scss/style.scss @@ -0,0 +1,25 @@ +@import "collapsible"; +@import "icons"; + +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; +} diff --git a/themes/ttb/content/_index.md b/themes/ttb/content/_index.md new file mode 100644 index 0000000..652623b --- /dev/null +++ b/themes/ttb/content/_index.md @@ -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. diff --git a/themes/ttb/content/posts/_index.md b/themes/ttb/content/posts/_index.md new file mode 100644 index 0000000..e7066c0 --- /dev/null +++ b/themes/ttb/content/posts/_index.md @@ -0,0 +1,7 @@ ++++ +title = 'Posts' +date = 2023-01-01T08:30:00-07:00 +draft = false ++++ + +Tempor est exercitation ad qui pariatur quis adipisicing aliquip nisi ea consequat ipsum occaecat. Nostrud consequat ullamco laboris fugiat esse esse adipisicing velit laborum ipsum incididunt ut enim. Dolor pariatur nulla quis fugiat dolore excepteur. Aliquip ad quis aliqua enim do consequat. diff --git a/themes/ttb/content/posts/post-1.md b/themes/ttb/content/posts/post-1.md new file mode 100644 index 0000000..3e3fc6b --- /dev/null +++ b/themes/ttb/content/posts/post-1.md @@ -0,0 +1,10 @@ ++++ +title = 'Post 1' +date = 2023-01-15T09:00:00-07:00 +draft = false +tags = ['red'] ++++ + +Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem. + +Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do. diff --git a/themes/ttb/content/posts/post-2.md b/themes/ttb/content/posts/post-2.md new file mode 100644 index 0000000..22b8287 --- /dev/null +++ b/themes/ttb/content/posts/post-2.md @@ -0,0 +1,10 @@ ++++ +title = 'Post 2' +date = 2023-02-15T10:00:00-07:00 +draft = false +tags = ['red','green'] ++++ + +Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia. + +Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud. diff --git a/themes/ttb/content/posts/post-3/bryce-canyon.jpg b/themes/ttb/content/posts/post-3/bryce-canyon.jpg new file mode 100644 index 0000000..9a923be Binary files /dev/null and b/themes/ttb/content/posts/post-3/bryce-canyon.jpg differ diff --git a/themes/ttb/content/posts/post-3/index.md b/themes/ttb/content/posts/post-3/index.md new file mode 100644 index 0000000..ca42a66 --- /dev/null +++ b/themes/ttb/content/posts/post-3/index.md @@ -0,0 +1,12 @@ ++++ +title = 'Post 3' +date = 2023-03-15T11:00:00-07:00 +draft = false +tags = ['red','green','blue'] ++++ + +Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat. + +![Bryce Canyon National Park](bryce-canyon.jpg) + +Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt. diff --git a/themes/ttb/hugo.toml b/themes/ttb/hugo.toml new file mode 100644 index 0000000..1fc5637 --- /dev/null +++ b/themes/ttb/hugo.toml @@ -0,0 +1,23 @@ +baseURL = 'https://tinytechbureau.com/' +languageCode = 'en-us' +title = 'Tiny Tech Bureau' + +[[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 = true + min = "0.116.0" diff --git a/themes/ttb/layouts/_default/baseof.html b/themes/ttb/layouts/_default/baseof.html new file mode 100644 index 0000000..ce9613a --- /dev/null +++ b/themes/ttb/layouts/_default/baseof.html @@ -0,0 +1,17 @@ + + + + {{ partial "head.html" . }} + + +
+ {{ partial "header.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+ + + diff --git a/themes/ttb/layouts/_default/home.html b/themes/ttb/layouts/_default/home.html new file mode 100644 index 0000000..0df6597 --- /dev/null +++ b/themes/ttb/layouts/_default/home.html @@ -0,0 +1,7 @@ +{{ define "main" }} + {{ .Content }} + {{ range site.RegularPages }} +

{{ .LinkTitle }}

+ {{ .Summary }} + {{ end }} +{{ end }} diff --git a/themes/ttb/layouts/_default/list.html b/themes/ttb/layouts/_default/list.html new file mode 100644 index 0000000..50fc92d --- /dev/null +++ b/themes/ttb/layouts/_default/list.html @@ -0,0 +1,8 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ .Summary }} + {{ end }} +{{ end }} diff --git a/themes/ttb/layouts/_default/single.html b/themes/ttb/layouts/_default/single.html new file mode 100644 index 0000000..7e286c8 --- /dev/null +++ b/themes/ttb/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} +

{{ .Title }}

+ + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + + {{ .Content }} + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +{{ end }} diff --git a/themes/ttb/layouts/partials/footer.html b/themes/ttb/layouts/partials/footer.html new file mode 100644 index 0000000..3dcdc82 --- /dev/null +++ b/themes/ttb/layouts/partials/footer.html @@ -0,0 +1,2 @@ +

Contents licensed under CC BY-SA 4.0

+

Icons by Sasha Tikhonov from Noun Project (CC BY 3.0)

\ No newline at end of file diff --git a/themes/ttb/layouts/partials/head.html b/themes/ttb/layouts/partials/head.html new file mode 100644 index 0000000..03bef31 --- /dev/null +++ b/themes/ttb/layouts/partials/head.html @@ -0,0 +1,14 @@ + + +{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} +{{ with .Site.Params.description }}{{ end }} +{{ with .Site.Params.author }}{{ end }} +{{ template "_internal/twitter_cards.html" . }} +{{ template "_internal/opengraph.html" . }} + +{{ partialCached "head/css.html" . }} +{{ partialCached "head/js.html" . }} + + {{ with .OutputFormats.Get "RSS" -}} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{- end }} diff --git a/themes/ttb/layouts/partials/head/css.html b/themes/ttb/layouts/partials/head/css.html new file mode 100644 index 0000000..43cdd35 --- /dev/null +++ b/themes/ttb/layouts/partials/head/css.html @@ -0,0 +1,11 @@ +{{- with resources.Get "scss/style.scss" }} + {{ $style := . | resources.ToCSS | resources.Minify | resources.Fingerprint }} + {{- if eq hugo.Environment "development" }} + + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} + diff --git a/themes/ttb/layouts/partials/head/js.html b/themes/ttb/layouts/partials/head/js.html new file mode 100644 index 0000000..18fe842 --- /dev/null +++ b/themes/ttb/layouts/partials/head/js.html @@ -0,0 +1,12 @@ +{{- with resources.Get "js/main.js" }} + {{- if eq hugo.Environment "development" }} + {{- with . | js.Build }} + + {{- end }} + {{- else }} + {{- $opts := dict "minify" true }} + {{- with . | js.Build $opts | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} diff --git a/themes/ttb/layouts/partials/header.html b/themes/ttb/layouts/partials/header.html new file mode 100644 index 0000000..a737560 --- /dev/null +++ b/themes/ttb/layouts/partials/header.html @@ -0,0 +1,6 @@ + +{{ partial "menu.html" (dict "menuID" "main" "page" .) }} diff --git a/themes/ttb/layouts/partials/menu.html b/themes/ttb/layouts/partials/menu.html new file mode 100644 index 0000000..749fe0a --- /dev/null +++ b/themes/ttb/layouts/partials/menu.html @@ -0,0 +1,53 @@ +{{- /* +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 }} + +

Navigate

+{{- with index site.Menus $menuID }} + + +{{- 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 }} +
  • + {{ $name }} + {{- with .Children }} + + {{- end }} +
  • + {{- end }} +{{- end }} diff --git a/themes/ttb/layouts/partials/terms.html b/themes/ttb/layouts/partials/terms.html new file mode 100644 index 0000000..8a6ebec --- /dev/null +++ b/themes/ttb/layouts/partials/terms.html @@ -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 }} +
    +
    {{ $label }}:
    + +
    +{{- end }} diff --git a/themes/ttb/layouts/shortcodes/icon.html b/themes/ttb/layouts/shortcodes/icon.html new file mode 100644 index 0000000..29673f7 --- /dev/null +++ b/themes/ttb/layouts/shortcodes/icon.html @@ -0,0 +1,5 @@ +{{- if (.Get 1) -}} + +{{- else -}} + +{{- end -}} \ No newline at end of file diff --git a/themes/ttb/static/favicon.ico b/themes/ttb/static/favicon.ico new file mode 100644 index 0000000..67f8b77 Binary files /dev/null and b/themes/ttb/static/favicon.ico differ diff --git a/themes/ttb/theme.toml b/themes/ttb/theme.toml new file mode 100644 index 0000000..3ba3164 --- /dev/null +++ b/themes/ttb/theme.toml @@ -0,0 +1,31 @@ +name = 'Theme name' +license = 'MIT' +licenselink = 'https://github.com/owner/repo/LICENSE' +description = 'Theme description' + +# The home page of the theme, where the source can be found +homepage = 'https://github.com/owner/repo' + +# If you have a running demo of the theme +demosite = 'https://owner.github.io/repo' + +# Taxonomy terms +tags = ['blog', 'company'] +features = ['some', 'awesome', 'features'] + +# If the theme has multiple authors +authors = [ + {name = 'Name of author', homepage = 'Website of author'}, + {name = 'Name of author', homepage = 'Website of author'} +] + +# If the theme has a single author +[author] + name = 'Your name' + homepage = 'Your website' + +# If porting an existing theme +[original] + author = 'Name of original author' + homepage = 'Website of original author' + repo = 'https://github.com/owner/repo'