diff --git a/versions/latest/.gitignore b/versions/latest/.gitignore index a1c642e..967824e 100644 --- a/versions/latest/.gitignore +++ b/versions/latest/.gitignore @@ -1,5 +1,3 @@ -# .gitignore - .hugo_build.lock /public/ /resources/_gen/ diff --git a/versions/latest/Makefile b/versions/latest/Makefile index c4e0968..83651e7 100644 --- a/versions/latest/Makefile +++ b/versions/latest/Makefile @@ -1,5 +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 + 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 \ No newline at end of file diff --git a/versions/latest/shared_dependencies.md b/versions/latest/shared_dependencies.md index 1db385f..fb91378 100644 --- a/versions/latest/shared_dependencies.md +++ b/versions/latest/shared_dependencies.md @@ -1,39 +1,7 @@ -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 +the app is: DevSparks Blog Specification -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 \ No newline at end of file +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. \ No newline at end of file diff --git a/versions/latest/themes/devsparks/layouts/_default/baseof.html b/versions/latest/themes/devsparks/layouts/_default/baseof.html index d0c24a3..83347fd 100644 --- a/versions/latest/themes/devsparks/layouts/_default/baseof.html +++ b/versions/latest/themes/devsparks/layouts/_default/baseof.html @@ -8,20 +8,21 @@ -
@@ -29,12 +30,12 @@
- - + + \ No newline at end of file diff --git a/versions/latest/themes/devsparks/layouts/_default/list.html b/versions/latest/themes/devsparks/layouts/_default/list.html index af61b41..4029b96 100644 --- a/versions/latest/themes/devsparks/layouts/_default/list.html +++ b/versions/latest/themes/devsparks/layouts/_default/list.html @@ -1,19 +1,25 @@ {{ define "main" }} - {{ if .IsHome }} -

Hacks

- {{ else }} -

{{ .Title }}

- {{ end }} - - {{ range (where .Site.RegularPages "Type" "in" (slice "hacks")).GroupByDate "2006" }} -

{{ .Key }}

- - {{ end }} +{{ if eq .Title "Hacks" }} +

{{ .Title }}

+{{ else }} +

{{ .Title }}

+{{ end }} +{{ range (where .Site.RegularPages "Type" "in" (slice "hacks")).GroupByDate "2006" }} +

{{ .Key }}

+ +{{ end }} {{ end }} \ No newline at end of file diff --git a/versions/latest/themes/devsparks/layouts/_default/single.html b/versions/latest/themes/devsparks/layouts/_default/single.html index 80d8a6b..49de279 100644 --- a/versions/latest/themes/devsparks/layouts/_default/single.html +++ b/versions/latest/themes/devsparks/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" }}
-

{{ .Title }}

+

{{ .Title }}

{{ with .Date }}

{{ .Format "January 2, 2006" }}

{{ end }} @@ -14,6 +14,6 @@

{{ .Title }}

{{ .Content }}
-
+
{{ end }} \ No newline at end of file diff --git a/versions/latest/themes/devsparks/layouts/shortcodes/padawans-playground.html b/versions/latest/themes/devsparks/layouts/shortcodes/padawans-playground.html index e54d6f1..7374a23 100644 --- a/versions/latest/themes/devsparks/layouts/shortcodes/padawans-playground.html +++ b/versions/latest/themes/devsparks/layouts/shortcodes/padawans-playground.html @@ -1,5 +1,5 @@

Padawan's Playground

- Padawan Image + Padawan Image {{ .Inner | markdownify }}
\ No newline at end of file diff --git a/versions/latest/themes/devsparks/static/css/main.css b/versions/latest/themes/devsparks/static/css/main.css index 6b5021b..e464995 100644 --- a/versions/latest/themes/devsparks/static/css/main.css +++ b/versions/latest/themes/devsparks/static/css/main.css @@ -33,13 +33,19 @@ a:hover { .header__theme_switch { background: transparent; border: var(--border-width) solid; + padding: 0; width: 22px; height: 22px; text-align: center; } -.section__tip__hackerman .tip__container, -.section__tip__padawan .tip__container { +.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; @@ -49,30 +55,13 @@ a:hover { margin-right: -20px; } -.section__tip__hackerman .tip__image, -.section__tip__padawan .tip__image { +.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; @@ -84,4 +73,31 @@ 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; } \ No newline at end of file diff --git a/versions/latest/themes/devsparks/static/css/syntax-highlighting.css b/versions/latest/themes/devsparks/static/css/syntax-highlighting.css index 3005536..ba855fb 100644 --- a/versions/latest/themes/devsparks/static/css/syntax-highlighting.css +++ b/versions/latest/themes/devsparks/static/css/syntax-highlighting.css @@ -1,4 +1,4 @@ -/* themes/devsparks/static/css/syntax-highlighting.css */ +/* Code syntax highlighting */ /* Single line code */ code { diff --git a/versions/latest/themes/devsparks/static/css/theme-dark.css b/versions/latest/themes/devsparks/static/css/theme-dark.css index f0a6818..50dd3a8 100644 --- a/versions/latest/themes/devsparks/static/css/theme-dark.css +++ b/versions/latest/themes/devsparks/static/css/theme-dark.css @@ -1,28 +1,26 @@ -/* themes/devsparks/static/css/theme-dark.css */ - :root { --background-color: #40414e; --text-color: #ffc000; --border-color: #ffc000; } -body.body__theme__dark { +body { 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 nav a { + color: var(--text-color); + border-bottom: 2px solid var(--text-color); } -.layout__header { - display: flex; - justify-content: space-between; - padding-top: 10px; +.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 { @@ -30,33 +28,29 @@ body.body__theme__dark { } .footer__about_text { - border: 2px solid var(--border-color); + border: var(--border-color) solid; } .tip__container { - position: relative; - margin-top: 300px; - margin-bottom: 5px; - border: 2px solid var(--border-color); - padding: 20px; - margin-left: -20px; - margin-right: -20px; + border: var(--border-color) solid; } -.tip__image { - position: absolute; - bottom: 100%; - left: 20%; - height: 280px; +.header__theme_switch { + background: transparent; + border: 2px solid; } -.article__content h3 { - padding-top: 5px; - border-top: 1px solid currentColor; +@media (max-width: 680px) { + body { + width: 100%; + padding: 20px; + } +} + +.footer__container { + display: flex; } -.article__remark42 { - margin-left: -20px; - margin-right: -20px; - margin-top: 10px; +.footer__author-photo { + height: 160px; } \ No newline at end of file diff --git a/versions/latest/themes/devsparks/static/css/theme-light.css b/versions/latest/themes/devsparks/static/css/theme-light.css index 16f6be7..c246ae5 100644 --- a/versions/latest/themes/devsparks/static/css/theme-light.css +++ b/versions/latest/themes/devsparks/static/css/theme-light.css @@ -1,28 +1,26 @@ -/* themes/devsparks/static/css/theme-light.css */ - :root { --background-color: #ffc000; --text-color: #40414e; --border-color: #40414e; } -.body__theme__light { +body { 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 nav a { + color: var(--text-color); + border-bottom: 2px solid var(--text-color); } -.layout__header { - display: flex; - justify-content: space-between; - padding-top: 10px; +.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 { @@ -30,33 +28,29 @@ } .footer__about_text { - border: 2px solid var(--border-color); + border: var(--border-color) solid; } .tip__container { - position: relative; - margin-top: 300px; - margin-bottom: 5px; - border: 2px solid var(--border-color); - padding: 20px; - margin-left: -20px; - margin-right: -20px; + border: var(--border-color) solid; } -.tip__image { - position: absolute; - bottom: 100%; - left: 20%; - height: 280px; +.header__theme_switch { + background: transparent; + border: 2px solid; } -.article__content h3 { - padding-top: 5px; - border-top: 1px solid currentColor; +@media (max-width: 680px) { + body { + width: 100%; + padding: 20px; + } +} + +.footer__container { + display: flex; } -.article__remark42 { - margin-left: -20px; - margin-right: -20px; - margin-top: 10px; +.footer__author-photo { + height: 160px; } \ No newline at end of file diff --git a/versions/latest/themes/devsparks/static/js/footer-image.js b/versions/latest/themes/devsparks/static/js/footer-image.js index a2ce86b..e8ad1ba 100644 --- a/versions/latest/themes/devsparks/static/js/footer-image.js +++ b/versions/latest/themes/devsparks/static/js/footer-image.js @@ -1,12 +1,14 @@ -const footerImageHuman = document.getElementById('footer-image-human'); -const footerImageRobot = document.getElementById('footer-image-robot'); +document.addEventListener("DOMContentLoaded", function() { + const footerImageHuman = document.getElementById("footer-image-human"); + const footerImageRobot = document.getElementById("footer-image-robot"); -footerImageHuman.addEventListener('mouseover', () => { - footerImageHuman.style.display = 'none'; - footerImageRobot.style.display = 'block'; -}); + footerImageHuman.addEventListener("mouseover", function() { + footerImageHuman.style.display = "none"; + footerImageRobot.style.display = "block"; + }); -footerImageRobot.addEventListener('mouseout', () => { - footerImageRobot.style.display = 'none'; - footerImageHuman.style.display = 'block'; + footerImageRobot.addEventListener("mouseout", function() { + footerImageRobot.style.display = "none"; + footerImageHuman.style.display = "block"; + }); }); \ No newline at end of file diff --git a/versions/latest/themes/devsparks/static/js/theme-switcher.js b/versions/latest/themes/devsparks/static/js/theme-switcher.js deleted file mode 100644 index 329293e..0000000 --- a/versions/latest/themes/devsparks/static/js/theme-switcher.js +++ /dev/null @@ -1,13 +0,0 @@ -// https://r42.com/docs/configuration/frontend/ -var remark_config = { - host: 'https://r42.goooseman.dev', - site_id: 'dev_sparks', - components: ['embed', 'last-comments'], - max_shown_comments: 100, - theme: 'dark', - show_email_subscription: false, - simple_view: false, - no_footer: false -} - -!function(e,n){for(var o=0;o