Skip to content

Commit

Permalink
feat: v1.1.0 gpt-4-0613, USE_FULL_PROJECT_PROMPT=False
Browse files Browse the repository at this point in the history
New feat: spoilers!
smol-ai/developer#105
DEFAULT_MAX_TOKENS=0
  • Loading branch information
Alexander Gusman committed Jun 23, 2023
1 parent 3d07c04 commit cf13a2d
Show file tree
Hide file tree
Showing 17 changed files with 176 additions and 133 deletions.
38 changes: 33 additions & 5 deletions versions/latest/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
.hugo_build.lock
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
# .gitignore

node_modules/
public/
resources/
.DS_Store
*.log
*.swp
*.bak
*.tmp
*.sublime-project
*.sublime-workspace
*.tmproj
*.tmproject
*.komodoproject
*.idea
*.iml
*.cache
*.pyc
*.pyo
*.egg-info/
dist/
build/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
_site/
.surge/
.gh-pages/
vendor/bundle/
vendor/cache/
vendor/gems/
vendor/ruby/
Empty file.
6 changes: 2 additions & 4 deletions versions/latest/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
HUGO_VERSION := 0.111.3
DOCKER_IMAGE := klakegg/hugo:$(HUGO_VERSION)

.PHONY: serve
serve:
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static -p 1313:1313 $(DOCKER_IMAGE) server --bind 0.0.0.0 --disableFastRender
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static -p 1313:1313 $(DOCKER_IMAGE) server --bind 0.0.0.0

.PHONY: build
build:
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static $(DOCKER_IMAGE)
docker run --rm -it -v $(PWD):/src -v $(PWD)/../../content:/src/content -v $(PWD)/../../static:/src/static $(DOCKER_IMAGE) --minify
7 changes: 3 additions & 4 deletions versions/latest/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
baseURL: "https://devsparks.goooseman.dev"
languageCode: "en-us"
title: "DevSparks"
theme: "devsparks"
relativeUrls: true
Expand All @@ -11,16 +10,16 @@ menu:
main:
- name: "Hacks"
url: "/"
weight: 10
identifier: "hacks"
weight: 10
- name: "About"
url: "/about/"
weight: 20
identifier: "about"
weight: 20
- name: "GitHub"
url: "https://github.com/goooseman/devsparks-blog"
weight: 30
identifier: "github"
weight: 30

module:
mounts:
Expand Down
21 changes: 10 additions & 11 deletions versions/latest/shared_dependencies.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
Shared dependencies:

Exported variables:
- baseURL: `https://devsparks.goooseman.dev`

Data schemas:
- None
- breakpoints: >680px - desktop, <680px mobile

ID names of DOM elements:
- theme-switch
- remark42
- footer-image-human
- footer-image-robot

Message names:
- None

Function names:
- None

Classnames:
- .layout__header
- .header__theme_switch
Expand All @@ -34,4 +25,12 @@ Classnames:
- .article__remark42
- .footer__container
- .footer__about_text
- .footer__author-photo
- .footer__author-photo

Function names:
- themeSwitcher
- systemThemeMonitoring
- footerImageHover

Message names:
- DevSparks Feedback
32 changes: 13 additions & 19 deletions versions/latest/themes/devsparks/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html lang="{{ .Site.Language.Lang }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<title>{{ .Title }}</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Code&display=swap">
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/syntax-highlighting.css" | relURL }}">
Expand All @@ -15,40 +15,34 @@
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#ffc000">
<meta name="theme-color" content="#ffc000">
<script src="{{ "js/theme.js" | relURL }}" defer></script>
<script src="{{ "js/footer-image.js" | relURL }}" defer></script>
<script src="{{ "js/remark42.js" | relURL }}" defer></script>
</head>
<body class="{{ with .Site.Params.theme }}body__theme__{{ . }}{{ else }}body__theme__light{{ end }}">
<body class="{{ if eq (getenv "THEME") "dark" }}body__theme__dark{{ else }}body__theme__light{{ end }}">
<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}}" target='{{ if in .URL "https://" }}_blank{{ else }}_self{{ end }}'>{{ .Name }}</a>
<a class="{{if or (eq $currentPage.RelPermalink .URL) (eq $currentPage.Section .Identifier) }} layout__link__active{{end}}" href="{{.URL}}" target='{{ if in .URL "https://" }}_blank{{ else }}_self{{ end }}'>{{ .Name }}</a>
{{ end }}
</nav>
<nav>
<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" target="_blank" rel="noopener noreferrer">Fix typo</a>
<button id="theme-switch" class="header__theme_switch" aria-label="Switch to dark theme">🌒</button>
<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" target="_blank">Fix typo</a>
<button id="theme-switch" class="header__theme_switch" aria-label="Switch theme" onclick="themeSwitcher()"></button>
</nav>
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
<footer class="layout__footer">
<div class="footer__container">
<img id="footer-image-human" src="/human.png" srcset="/[email protected] 2x" alt="Author photo">
<img id="footer-image-robot" src="/robot.png" srcset="/[email protected] 2x" alt="Author photo" style="display: none;">
<img id="footer-image-human" src="/human.png" srcset="/[email protected] 2x" alt="Author photo" onmouseover="footerImageHover(true)">
<img id="footer-image-robot" src="/robot.png" srcset="/[email protected] 2x" alt="Author photo" onmouseover="footerImageHover(false)" style="display: none;">
<div 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!
Footer Ipsum
</div>
</div>
</footer>
<script src="{{ "js/theme.js" | relURL }}" defer></script>
<script src="{{ "js/footer-image.js" | relURL }}" defer></script>
<script src="{{ "js/remark42.js" | relURL }}" defer></script>
</body>
</html>
3 changes: 1 addition & 2 deletions versions/latest/themes/devsparks/layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ <h1>Hacks</h1>
{{ else }}
<h1>{{ .Title }}</h1>
{{ end }}

{{ range (where .Site.RegularPages "Type" "in" (slice "hacks")).GroupByDate "2006" }}
<h2>{{ .Key }}</h2>
<ul>
Expand All @@ -15,7 +14,7 @@ <h2>{{ .Key }}</h2>
{{ with .Params.tags }}
<span class="tags">
{{ range . }}
<a class="tag" href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +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="/[email protected] 2x" alt="Hackerman's tip image">
<img class="tip__image" src="/hackerman.png" srcset="/[email protected] 2x" alt="Hackerman's tip">
{{ .Inner | markdownify }}
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +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="/[email protected] 2x" alt="Padawan's Playground">
<img class="tip__image" src="/padawan.png" srcset="/[email protected] 2x" />
{{ .Inner | markdownify }}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- $title := .Get "title" -}}
<details>
<summary>{{ $title }}</summary>
{{ .Inner | markdownify }}
</details>
62 changes: 30 additions & 32 deletions versions/latest/themes/devsparks/static/css/main.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
@import url('https://fonts.googleapis.com/css2?family=Fira+Code&display=swap');

/* Global variables */
:root {
--border-width: 2px;
}

/* Breakpoints */
@media (min-width: 680px) {
body {
width: 600px;
margin: 0 auto;
}
}

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

body {
font-family: 'Fira Code', monospace;
background-color: var(--background-color);
color: var(--text-color);
max-width: 600px;
margin: 0 auto;
padding: 0 24px;
}

a {
color: inherit;
text-decoration: none;
border-bottom: 2px solid var(--border-color);
border-bottom: var(--border-width) solid;
}

a:hover {
background-image: linear-gradient(to top, var(--text-color), var(--text-color));
background-image: linear-gradient(to top, currentColor, currentColor);
background-size: 100% 2px;
background-repeat: no-repeat;
background-size: 100% 100%;
color: var(--background-color);
background-position: 0 100%;
transition: background-size 0.3s;
}

Expand All @@ -31,7 +46,7 @@ a:hover {

.header__theme_switch {
background: transparent;
border: 2px solid var(--border-color);
border: var(--border-width) solid;
width: 22px;
height: 22px;
text-align: center;
Expand All @@ -40,7 +55,7 @@ a:hover {
}

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

.tip__container {
Expand All @@ -50,7 +65,7 @@ a:hover {
margin-left: -24px;
margin-right: -24px;
padding: 24px;
border: 2px solid var(--border-color);
border: var(--border-width) solid;
}

.tip__title {
Expand All @@ -67,7 +82,7 @@ a:hover {

.article__content h3 {
padding-top: 8px;
border-top: 1px solid var(--border-color);
border-top: 1px solid;
}

.article__remark42 {
Expand All @@ -77,24 +92,7 @@ a:hover {
}

.footer__about_text {
border: 2px solid var(--border-color);
border: var(--border-width) solid;
border-bottom: 0;
padding: 12px;
}

.footer__container {
display: flex;
flex-direction: column;
align-items: center;
margin-top: 48px;
margin-bottom: 12px;
}

.footer__author-photo {
height: 160px;
}

@media (min-width: 680px) {
.footer__container {
flex-direction: row;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
code {
background-color: var(--text-color);
background-color: var(--color);
color: var(--background-color);
border: none;
padding: 0;
Expand All @@ -9,12 +9,9 @@ code {
background-color: var(--background-color);
color: white;
padding: 12px;
border: none;
}

.highlight > pre > code {
background-color: transparent;
color: white;
border: none;
padding: 0;
}
Loading

0 comments on commit cf13a2d

Please sign in to comment.