Skip to content

Commit

Permalink
chore: move 0.1.0 as latest to see changes when 1.0.0 is generated
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Gusman committed Jun 22, 2023
1 parent 6fb4d84 commit b5cd8c1
Show file tree
Hide file tree
Showing 16 changed files with 457 additions and 0 deletions.
5 changes: 5 additions & 0 deletions versions/latest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.hugo_build.lock
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
5 changes: 5 additions & 0 deletions versions/latest/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
serve:
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static -p 1313:1313 klakegg/hugo:0.111.3 server

build:
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static klakegg/hugo:0.111.3
30 changes: 30 additions & 0 deletions versions/latest/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
baseURL: "https://devsparks.goooseman.dev"
languageCode: "en-us"
title: "DevSparks Blog"
theme: "devsparks"
relativeUrls: true

module:
mounts:
- source: "../../content"
target: "content"
- source: "../../static"
target: "static"

params:
dateFormat: "January 2, 2006"

menu:
main:
- name: "Hacks"
weight: 10
identifier: "hacks"
url: '/'
- name: "About"
weight: 20
identifier: "about"
url: '/about/'
- name: "GitHub"
weight: 30
identifier: "github"
url: 'https://github.com/goooseman/devsparks-blog'
7 changes: 7 additions & 0 deletions versions/latest/shared_dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
the app is: DevSparks Blog Specification

the files we have decided to generate are: Makefile, .gitignore, config.yaml, themes/devsparks/layouts/_default/baseof.html, themes/devsparks/layouts/_default/list.html, themes/devsparks/layouts/_default/single.html, themes/devsparks/layouts/shortcodes/hackermans-tip.html, themes/devsparks/layouts/shortcodes/padawans-playground.html, themes/devsparks/static/css/main.css, themes/devsparks/static/css/syntax-highlighting.css, themes/devsparks/static/css/theme-light.css, themes/devsparks/static/css/theme-dark.css, themes/devsparks/static/js/theme.js, themes/devsparks/static/js/footer-image.js, themes/devsparks/static/js/remark42.js

Now that we have a list of files, we need to understand what dependencies they share.
Please name and briefly describe what is shared between the files we are generating, including exported variables, data schemas, id names of every DOM elements that javascript functions will use, message names, and function names.
Exclusively focus on the names of the shared dependencies, and do not add any other explanation.
47 changes: 47 additions & 0 deletions versions/latest/themes/devsparks/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Title }}</title>
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/syntax-highlighting.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/theme-light.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/theme-dark.css" | relURL }}">
</head>
<body class="body__theme__light">
<header class="layout__header">
<nav>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="{{ if or (eq $currentPage.RelPermalink .URL) (eq $currentPage.Section .Identifier) }}layout__link__active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
<nav>
<a href="https://github.com/goooseman/devsparks-blog">GitHub</a>
<a href="https://github.com/goooseman/devsparks-blog/issues/new?title=DevSparks+Feedback&body=I+found+something+wrong+on+this+page%3A%0A%0A++{{ .Permalink }}%0A%0A++Here%27s+what+it+is%3A">Fix typo</a>
<button id="theme-switch" class="header__theme_switch" aria-label="{{ if eq .Site.Params.theme "dark" }}Switch to light theme{{ else }}Switch to dark theme{{ end }}">
{{ if eq .Site.Params.theme "dark" }}🌞{{ else }}🌒{{ end }}
</button>
</nav>
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
<div class="footer__container">
<img id="footer-image-human" class="footer__author-photo" src="/human.png" srcset="/human.png 1x, /[email protected] 2x" alt="Author Photo">
<img id="footer-image-robot" class="footer__author-photo" src="/robot.png" srcset="/robot.png 1x, /[email protected] 2x" alt="Author Photo">
<p class="footer__about_text">Hello, I'm Alex.<br />
Welcome to DevSparks, a cosy corner of the web where code meets fun. I've always believed that the best way to learn is
by doing, and the best way to do is by having fun. That's why I've created DevSparks - to share the joy and the power of
development with you.<br />
Here, you'll find bite-sized lifehacks about everything from CLI power usage to git tricks, all crafted with a dash of
humor and a bucketload of passion.<br />
So grab a cup of coffee, get comfy, and let's explore the incredible world of coding together!</p>
</div>
</footer>
<script src="{{ "js/theme.js" | relURL }}" defer></script>
<script src="{{ "js/footer-image.js" | relURL }}" defer></script>
</body>
</html>
25 changes: 25 additions & 0 deletions versions/latest/themes/devsparks/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ define "main" }}
{{ if eq .Title "Hacks" }}
<h1>{{ .Title }}</h1>
{{ else }}
<h1>{{ .Title }}</h1>
{{ end }}
{{ range (where .Site.RegularPages "Type" "in" (slice "hacks")).GroupByDate "2006" }}
<h2>{{ .Key }}</h2>
<ul>
{{ range .Pages }}
<li>
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
{{ if .Params.tags }}
<span class="tags">
{{ range .Params.tags }}
<a href="/tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
19 changes: 19 additions & 0 deletions versions/latest/themes/devsparks/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ define "main" }}
<article>
<h1 class="article__title">{{ .Title }}</h1>
{{ with .Date }}
<p class="article__date">{{ .Format "January 2, 2006" }}</p>
{{ end }}
{{ with .Params.tags }}
<p class="article__tags">
{{ range . }}
<a href="/tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
</p>
{{ end }}
<div class="article__content">
{{ .Content }}
</div>
<div id="remark42" class="article__remark42"></div>
</article>
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="tip__container section__tip__hackerman">
<h4 class="tip__title">Hackerman's tip</h4>
<img class="tip__image" src="/hackerman.png" srcset="/hackerman.png 1x, /[email protected] 2x" alt="Hackerman Image">
{{ .Inner | markdownify }}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="tip__container section__tip__padawan">
<h4 class="tip__title">Padawan's Playground</h4>
<img class="tip__image" src="/padawan.png" srcset="/padawan.png 1x, /[email protected] 2x" alt="Padawan Image">
{{ .Inner | markdownify }}
</div>
103 changes: 103 additions & 0 deletions versions/latest/themes/devsparks/static/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap');

:root {
--border-width: 2px;
}

a {
color: var(--text-color);
text-decoration: none;
border-bottom: var(--border-width) solid var(--text-color);
transition: color 0.3s, background-color 0.3s;
}

a:hover {
color: var(--background-color);
background-color: var(--text-color);
background-image: linear-gradient(to top, var(--text-color), var(--background-color));
background-position: 0 100%;
background-repeat: no-repeat;
background-size: 100% 200%;
}

.layout__link__active {
border: var(--border-width) solid;
}

.layout__header {
display: flex;
justify-content: space-between;
padding-top: 10px;
}

.header__theme_switch {
background: transparent;
border: var(--border-width) solid;
padding: 0;
width: 22px;
height: 22px;
text-align: center;
}

.section__tip__hackerman .tip__title,
.section__tip__padawan .tip__title {
font-style: italic;
font-weight: bold;
}

.tip__container {
position: relative;
margin-top: 300px;
margin-bottom: 5px;
border: var(--border-color) solid;
padding: 20px;
margin-left: -20px;
margin-right: -20px;
}

.tip__image {
position: absolute;
bottom: 100%;
left: 20%;
height: 280px;
}

body {
width: 600px;
margin: 0 auto;
background-color: var(--background-color);
}

@media (max-width: 680px) {
body {
width: 100%;
padding: 20px;
}
}

.layout__header nav {
display: flex;
}

.footer__container {
display: flex;
}

.footer__author-photo {
height: 160px;
}

.footer__about_text {
border: var(--border-color) solid;
}

.article__content h3 {
padding-top: 5px;
border-top: var(--border-width) solid currentColor;
}

.article__remark42 {
margin-left: -20px;
margin-right: -20px;
margin-top: 10px;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* Code syntax highlighting */

/* Single line code */
code {
color: var(--background-color);
background-color: var(--color);
}

/* Code block */
pre div.highlight {
background-color: var(--background-color);
color: white;
padding: 10px;
}

/* Code inside code block */
pre div.highlight code {
background-color: transparent;
color: white;
}
56 changes: 56 additions & 0 deletions versions/latest/themes/devsparks/static/css/theme-dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
:root {
--background-color: #40414e;
--text-color: #ffc000;
--border-color: #ffc000;
}

body {
background-color: var(--background-color);
color: var(--text-color);
}

.layout__header nav a {
color: var(--text-color);
border-bottom: 2px solid var(--text-color);
}

.layout__header nav a:hover {
color: var(--background-color);
background-color: var(--text-color);
background-image: linear-gradient(to top, var(--text-color), var(--background-color));
background-position: 0 100%;
background-repeat: no-repeat;
background-size: 100% 200%;
}

.layout__link__active {
border: 2px solid;
}

.footer__about_text {
border: var(--border-color) solid;
}

.tip__container {
border: var(--border-color) solid;
}

.header__theme_switch {
background: transparent;
border: 2px solid;
}

@media (max-width: 680px) {
body {
width: 100%;
padding: 20px;
}
}

.footer__container {
display: flex;
}

.footer__author-photo {
height: 160px;
}
Loading

0 comments on commit b5cd8c1

Please sign in to comment.