From f4bb77e0a03f0b5f1066f92d8e06896632e2d1c8 Mon Sep 17 00:00:00 2001 From: Tibor Bodecs Date: Wed, 3 Sep 2025 18:50:13 +0200 Subject: [PATCH 01/13] basic structure --- contents/[home]/index.md | 8 - contents/[home]/index.yml | 157 ++++++++++++++++++ site.yml | 5 +- templates/default/assets/css/theme.css | 92 +++++++++++ templates/default/views/html.mustache | 65 +++++++- templates/default/views/pages/home.mustache | 166 +++++++++++++++++++- 6 files changed, 480 insertions(+), 13 deletions(-) delete mode 100644 contents/[home]/index.md create mode 100644 contents/[home]/index.yml diff --git a/contents/[home]/index.md b/contents/[home]/index.md deleted file mode 100644 index 725aef6..0000000 --- a/contents/[home]/index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -#title: "" -description: "" -views: - html: pages.home ---- - -# Learn To Code Using Swift \ No newline at end of file diff --git a/contents/[home]/index.yml b/contents/[home]/index.yml new file mode 100644 index 0000000..b3a1f78 --- /dev/null +++ b/contents/[home]/index.yml @@ -0,0 +1,157 @@ +#title: "" +description: "" +views: + html: pages.home + +hero: + title: "Learn To Code Using Swift" + subtitle: "The absolute beginner's programming book" + buttons: + primary: + label: "Get the book for $49" + url: "https://theswiftdev.gumroad.com/l/learn-to-code-using-swift" + secondary: + label: "Download sample" + url: "" + features: + - label: "14(+2) chapters" + icon: "" + - label: "700+ pages" + icon: "" + - label: "350+ exercises" + icon: "" + +highlights: + title: "Why you'll love this book" + sections: + - title: "Beginner friendly" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem. " + - title: "Foundational" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem. " + - title: "Practical" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem. " + - title: "Fresh – and will be" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem. " + + +beta: + caption: "Now available in beta" + title: "Learn to code with rock solid foundations" + + list: + - title: "Learn Swift on any computer" + description: "Teaching you the Swift language itself – so you can start coding on Windows, Linux or any laptop you already own" + - title: "Practice and theory hand in hand" + description: "Gain confidence and hands-on experience by hundreds of exercises and mini projects" + - title: "Teaches essential skills in the age of LLMs" + description: "Be strong with algorithmical thinking and reasoning skills. Don't be misguided by AI, leverage it for your needs as an expert" + buttons: + primary: + label: "Get the book for $49" + url: "https://theswiftdev.gumroad.com/l/learn-to-code-using-swift" + secondary: + label: "Download sample" + url: "" + +testimonials: + title: "What readers say about it" + quotes: + - quote: "Finally a book that doesn't assume any prior knowledge and teaches everything." + name: "Name" + - quote: "Finally a book that doesn't assume any prior knowledge and teaches everything." + name: "Name" + - quote: "Finally a book that doesn't assume any prior knowledge and teaches everything." + name: "Name" + - quote: "Finally a book that doesn't assume any prior knowledge and teaches everything." + name: "Name" + + +authors: + title: "Meet the authors" + subtitle: "Tibor Bödecs & Kitti Bödecs" + tibor: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + kitti: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + summary: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + +outline: + title: "What's inside the book" + + chapters: + - title: "Getting started" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + lessons: + - "Introduction" + - "Command line" + - "Swift" + - "Programming" + - "IDE" + - title: "Getting started" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + lessons: + - title: "Introduction" + - title: "Command line" + - title: "Swift" + - title: "Programming" + - title: "IDE" + - title: "Getting started" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + lessons: + - title: "Introduction" + - title: "Command line" + - title: "Swift" + - title: "Programming" + - title: "IDE" + +callout: + title: "Make your first step to programming for the early-bird price now" + subtitle: "Clear explanations and step-by-step progress" + buttons: + primary: + label: "Get the book for $49" + url: "https://theswiftdev.gumroad.com/l/learn-to-code-using-swift" + secondary: + label: "Download sample" + url: "" + note: "14 day money-back guarantee" + +faq: + title: "Questions? Look here." + items: + - question: "Lorem ipsum" + answer: "dolor sit amet" + - question: "Lorem ipsum" + answer: "dolor sit amet" + - question: "Lorem ipsum" + answer: "dolor sit amet" + - question: "Lorem ipsum" + answer: "dolor sit amet" + +ask: + title: "Ask us" + subtitle: "We'd love to hear from you" + channels: + - title: "Join us on Discord" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + icons: + - link: "Discord" + - title: "Follow us on X, Bluesky and Mastodon" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + icons: + - link: "X" + - link: "Bluesky" + - link: "Mastodon" + - title: "Prefer to drop an email?" + description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut laoreet posuere, nulla urna malesuada odio, nec dapibus sapien risus vitae lorem." + icons: + +cta: + title: "Start coding with Swift" + subtitle: "Start coding with Swift" + buttons: + primary: + label: "Get the book for $49" + url: "https://theswiftdev.gumroad.com/l/learn-to-code-using-swift" + secondary: + label: "Download sample" + url: "" + note: "14 day money-back guarantee" diff --git a/site.yml b/site.yml index 9e8731b..72d1010 100644 --- a/site.yml +++ b/site.yml @@ -11,4 +11,7 @@ navigation: - label: "FAQ" url: "/#faq" - label: "Contact" - url: "/#contact" \ No newline at end of file + url: "/#contact" + +footer: + \ No newline at end of file diff --git a/templates/default/assets/css/theme.css b/templates/default/assets/css/theme.css index ecfa910..8722419 100644 --- a/templates/default/assets/css/theme.css +++ b/templates/default/assets/css/theme.css @@ -269,3 +269,95 @@ h1 { .grid .prev p.link, .grid .next p.link { margin-top: 0; } + + +#navigation { + margin-top: 16px; + overflow: hidden; + border-bottom: 3px solid var(--background-color-1); +} +#navigation > a { + display: block; + line-height: 0; + padding: 8px; + text-align: center; +} +#navigation > a img { + height: 44px; + width: auto; +} +#navigation nav svg { + width: 24px; + height: 24px; +} +#navigation #primary-menu-button { + display: none; +} +#navigation #primary-menu-button + label { + position: absolute; + top: 22px; + left: 0; + margin: 0; + line-height: 0; + padding: 12px; +} +#navigation #primary-menu-button + label:hover { + cursor: pointer; +} +#navigation .menu-items { + max-height: 0px; + transition: max-height .3s ease-in-out 0s; + margin-top: 6px; +} +#navigation .menu-items a { + display: block; + padding: 16px; + border-top: 0.5px solid var(--background-color-1); + color: var(--text-color); +} +#navigation .menu-items a:hover { + color: var(--link-color-hover) +} +#navigation input:checked ~ .menu-items { + max-height: 999px; +} +#navigation line { + transition: transform .3s ease-in-out 0s; + transform-origin: 50% 50%; +} +#navigation input:checked ~ label line:nth-child(1) { + transform: translateX(-50px); +} +#navigation input:checked ~ label line:nth-child(2) { + transform: rotate(45deg) translateY(6px); +} +#navigation input:checked ~ label line:nth-child(3) { + transform: rotate(-45deg) translateY(-6px); +} +@media screen and (min-width: 600px) { + #navigation { + display: grid; + grid-template-columns: auto 1fr; + } + #navigation > a { + grid-column: span 1; + } + #navigation nav { + overflow: hidden; + grid-column: span 1; + } + #primary-menu-button ~ label { + display: none; + } + #navigation nav .menu-items { + display: block; + max-height: none; + text-align: right; + padding: 8px; + } + #navigation nav .menu-items a { + padding: 8px; + display: inline-block; + border: none; + } +} diff --git a/templates/default/views/html.mustache b/templates/default/views/html.mustache index 5532b39..fb72b83 100644 --- a/templates/default/views/html.mustache +++ b/templates/default/views/html.mustache @@ -39,11 +39,74 @@ + + +
{{$main}}{{/main}}
-