Skip to content

Commit

Permalink
chore: copy v0.0.0 as latest to see changes in 0.1.0 in commit diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Gusman committed Jun 21, 2023
1 parent c3bdea9 commit 72f820b
Show file tree
Hide file tree
Showing 16 changed files with 438 additions and 0 deletions.
7 changes: 7 additions & 0 deletions versions/latest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .gitignore

.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 --bind 0.0.0.0

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'
39 changes: 39 additions & 0 deletions versions/latest/shared_dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Files to generate:
- 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-switcher.js
- themes/devsparks/static/js/footer-image.js
- themes/devsparks/static/js/remark42.js

Shared dependencies:
- breakpoints
- theme-switch
- remark42
- footer-image-human
- footer-image-robot
- .layout__header
- .header__theme_switch
- .layout__link__active
- .section__tip__hackerman
- .section__tip__padawan
- .tip__container
- .tip__title
- .tip__image
- .article__title
- .article__date
- .article__tags
- .article__content
- .article__remark42
- .footer__container
- .footer__about_text
- .footer__author-photo
40 changes: 40 additions & 0 deletions versions/latest/themes/devsparks/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!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 }}">
<script src="{{ "js/theme-switcher.js" | relURL }}" defer></script>
</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="Switch to dark theme">🌞</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="/[email protected] 2x" alt="Author Photo">
<img id="footer-image-robot" class="footer__author-photo" src="/robot.png" srcset="/[email protected] 2x" alt="Author Photo">
<p class="footer__about_text">Footer Ipsum</p>
</div>
</footer>
<script src="{{ "js/footer-image.js" | relURL }}"></script>
<script src="{{ "js/remark42.js" | relURL }}"></script>
</body>
</html>
19 changes: 19 additions & 0 deletions versions/latest/themes/devsparks/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ define "main" }}
{{ if .IsHome }}
<h1>Hacks</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>
</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>{{ .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"></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>
87 changes: 87 additions & 0 deletions versions/latest/themes/devsparks/static/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@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;
width: 22px;
height: 22px;
text-align: center;
}

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

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

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

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

.article__remark42 {
margin-left: -20px;
margin-right: -20px;
margin-top: 10px;
}

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

@media (max-width: 680px) {
body {
width: 100%;
padding: 20px;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/* themes/devsparks/static/css/syntax-highlighting.css */

/* 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;
}
62 changes: 62 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,62 @@
/* themes/devsparks/static/css/theme-dark.css */

:root {
--background-color: #40414e;
--text-color: #ffc000;
--border-color: #ffc000;
}

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

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

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

.layout__link__active {
border: 2px solid;
}

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

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

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

.article__content h3 {
padding-top: 5px;
border-top: 1px solid currentColor;
}

.article__remark42 {
margin-left: -20px;
margin-right: -20px;
margin-top: 10px;
}
Loading

0 comments on commit 72f820b

Please sign in to comment.