Compare commits

...

15 commits

Author SHA1 Message Date
f23c4169ec alternative page desc 2024-11-27 15:35:57 -05:00
c6100df602 games placeholder copy 2024-11-27 15:35:44 -05:00
6dc0f4c84a alpha video overlay system 2024-11-27 15:35:26 -05:00
67d9109bd8 style v++ 2024-11-27 15:34:50 -05:00
14929a79fa email form draft 2024-11-27 15:34:15 -05:00
8f3fbcb115 textarea styling 2024-11-27 15:33:44 -05:00
0754b3452e color btn 2024-11-27 15:33:35 -05:00
e84e4cf1c4 user -> dev oriented 2024-11-27 15:33:10 -05:00
ded8ade348 update logo 2024-11-27 14:26:47 -05:00
3b80ec6da9 dev nav btn 2024-11-27 14:26:23 -05:00
151ee3ffdb dynamic onpage class set based on currentPath 2024-11-27 14:26:11 -05:00
5897374fd9 dev icon 2024-11-27 14:20:55 -05:00
4173fbdff2 dev page 2024-11-27 14:20:48 -05:00
72638cda3a basic user data 2024-11-27 14:20:20 -05:00
f8f5b19007 json utils 2024-11-27 14:19:38 -05:00
15 changed files with 221 additions and 19 deletions

View file

@ -1 +1,28 @@
package data package data
import (
"fmt"
"github.com/gookit/goutil/jsonutil"
)
var (
Devs = make(map[string]Dev)
)
type Dev struct {
Email string // map key
// Profile Profile
}
var devs_file = "data/devs.json"
func SaveDevs() {
jsonutil.WritePretty(devs_file, Devs)
}
func LoadDevs() {
err := jsonutil.ReadFile(devs_file, &Devs)
if err != nil {
fmt.Println(err)
}
}

2
go.mod
View file

@ -3,3 +3,5 @@ module dofdev
go 1.23.2 go 1.23.2
require github.com/gorilla/mux v1.8.1 require github.com/gorilla/mux v1.8.1
require github.com/gookit/goutil v0.6.17 // indirect

2
go.sum
View file

@ -1,2 +1,4 @@
github.com/gookit/goutil v0.6.17 h1:SxmbDz2sn2V+O+xJjJhJT/sq1/kQh6rCJ7vLBiRPZjI=
github.com/gookit/goutil v0.6.17/go.mod h1:rSw1LchE1I3TDWITZvefoAC9tS09SFu3lHXLCV7EaEY=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=

View file

@ -5,6 +5,7 @@ import (
"log" "log"
"net/http" "net/http"
"dofdev/data"
"dofdev/src/router" "dofdev/src/router"
"dofdev/tem" "dofdev/tem"
) )
@ -12,6 +13,9 @@ import (
func init() { func init() {
fmt.Println("init()") fmt.Println("init()")
tem.Load() tem.Load()
data.LoadDevs()
fmt.Println(len(data.Devs), "devs")
} }
func main() { func main() {

View file

@ -5,6 +5,7 @@ import (
"dofdev/web/pages/about" "dofdev/web/pages/about"
braillexr "dofdev/web/pages/braille_xr" braillexr "dofdev/web/pages/braille_xr"
"dofdev/web/pages/dev"
"dofdev/web/pages/games" "dofdev/web/pages/games"
"dofdev/web/pages/mono" "dofdev/web/pages/mono"
"dofdev/web/pages/moves" "dofdev/web/pages/moves"
@ -20,6 +21,7 @@ func New() *mux.Router {
r.PathPrefix(("/public/")).Handler(http.StripPrefix("/public/", http.FileServer(http.Dir("web/public/")))) r.PathPrefix(("/public/")).Handler(http.StripPrefix("/public/", http.FileServer(http.Dir("web/public/"))))
r.HandleFunc("/", mono.Handler) r.HandleFunc("/", mono.Handler)
r.HandleFunc("/about", about.Handler) r.HandleFunc("/about", about.Handler)
r.HandleFunc("/dev", dev.Handler)
r.HandleFunc("/moves", moves.Handler) r.HandleFunc("/moves", moves.Handler)
r.HandleFunc("/move/{hash}", moves.MoveHandler) r.HandleFunc("/move/{hash}", moves.MoveHandler)
r.HandleFunc("/games", games.Handler) r.HandleFunc("/games", games.Handler)

View file

@ -8,8 +8,8 @@
<meta name="description" content="{{ .Desc }}"> <meta name="description" content="{{ .Desc }}">
<meta name="og:image" content="/public/img/knuckles_owo.png"> <meta name="og:image" content="/public/img/knuckles_owo.png">
<link rel="shortcut icon" href="https://media.dof.dev/kit/logo.svg" type="image/svg+xml"> <link rel="shortcut icon" href="https://media.dof.dev/kit/logo.svg" type="image/svg+xml">
<link rel="stylesheet" href="/public/style.css?v4"> <link rel="stylesheet" href="/public/style.css?v6">
<script src="/public/js/mono.js?v1"></script> <script src="/public/js/mono.js?v2"></script>
<link rel="canonical" href="https://{{ .Host }}{{ .PagePath }}"> <link rel="canonical" href="https://{{ .Host }}{{ .PagePath }}">
</head> </head>
@ -63,12 +63,12 @@
</div> </div>
<div id="nav_border"></div> <div id="nav_border"></div>
<div class="disabled" style="display: flex; gap: 12px;"> <div style="display: flex; gap: 12px;">
<a href="/settings"> <a href="/dev">
<img src="/public/img/icons/settings.svg?v2" height="32" width="auto" /> <img src="/public/img/icons/dev.svg?v1" height="32" width="auto" />
</a> </a>
<a href="/profile"> <a href="/settings" class="disabled">
<img src="/public/img/profile-pic.png?v1" height="32" width="auto" style="border-radius: 16px;" /> <img src="/public/img/icons/settings.svg?v2" height="32" width="auto" />
</a> </a>
</div> </div>
</div> </div>
@ -81,7 +81,7 @@
gap: 6px; gap: 6px;
" "
> >
<a href="/" class="onpage"> <a href="/">
<img src="/public/img/icons/home.svg?v1" height="32" width="auto" /> <img src="/public/img/icons/home.svg?v1" height="32" width="auto" />
<div>home</div> <div>home</div>
</a> </a>

View file

@ -15,7 +15,7 @@
<div style="height: 12px; width: 100%;"></div> <div style="height: 12px; width: 100%;"></div>
<img src='https://media.dof.dev/kit/logotype.svg?v22' width='256'> <img src='https://media.dof.dev/kit/logotype.svg?v25' width='256'>
<p>degrees of freedom development</p> <p>degrees of freedom development</p>
<div style="height: 12px; width: 100%;"></div> <div style="height: 12px; width: 100%;"></div>

31
tem/html/pages/dev.html Normal file
View file

@ -0,0 +1,31 @@
{{ template "head.html" .}}
<div style='height: 30vh; width: 100%;'></div>
<h1>dev</h1>
<!-- <div>{{ .Data.Dev.Email }}</div> -->
<div
style="
padding: 6px 12px;
border-radius: 6px;
background: var(--col-01);
color: var(--col-10);
"
>
<textarea rows="1" spellcheck="false">{{ .Data.Dev.Email }}</textarea>
</div>
<div style="height: 32px;"></div>
<a href="javascript:post()" id="post_btn" class="btn">post</a>
<script>
function post() {
console.log("post")
post_btn = elbyid("post_btn")
post_btn.classList.add("bob")
post_btn.classList.add("disabled")
}
</script>

View file

@ -60,7 +60,56 @@
>degrees of freedom development</div> --> >degrees of freedom development</div> -->
</div> </div>
<h2>notes</h2> <div
<pre>{{ .Data.Game.Notes }}</pre> style="
position: relative;
width: 100%;
padding: 12px;
"
>
<h2>notes</h2>
<pre>{{ .Data.Game.Notes }}</pre>
<div style='height: 44px; width: 100%;'></div> <div style='height: 128px; width: 100%;'></div>
<div
style="
position: absolute;
top: 0;
right: 0;
height: 300px;
width: 300px;
"
>
<video src='/public/games/{{ .Data.Hash }}_alpha.webm' autoplay loop muted
style="
width: fit-content;
object-fit: cover;
width: 100%;
height: 100%;
"
></video>
<div
style="
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: -1;
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="
outline: 2px solid var(--col-04);
border-radius: 12px;
height: 140px;
width: 110px;
"
></div>
</div>
</div>
</div>

View file

@ -17,6 +17,8 @@
<p>{{ .Desc }}</p> <p>{{ .Desc }}</p>
</div> </div>
<p>we make high degree of freedom games that maximize a player's input bandwidth, in stark opposition to the mainstream games of today where you merely follow an arrow on the ground and mash some buttons as the game is played for you - as we believe human expression should not be boiled down to the lowest common denominator and predicted away by asymptotic algorithms.</p>
{{ range $hash, $game := .Data.Games }} {{ range $hash, $game := .Data.Games }}
<div> <div>

22
web/pages/dev/dev.go Normal file
View file

@ -0,0 +1,22 @@
package dev
import (
"dofdev/data"
"dofdev/tem"
"net/http"
)
func Handler(w http.ResponseWriter, r *http.Request) {
data := struct {
Dev data.Dev
}{
Dev: data.Devs["ethan@dof.dev"],
}
tem.Render(
w, r,
"dev.html",
"dev",
"account management",
data,
)
}

View file

@ -62,6 +62,7 @@ func Handler(w http.ResponseWriter, r *http.Request) {
w, r, w, r,
"games.html", "games.html",
"games", "games",
// "high input bandwidth games",
"dof driven games", "dof driven games",
data, data,
) )

BIN
web/public/img/icons/dev.svg (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -16,6 +16,15 @@ document.addEventListener("DOMContentLoaded", () => {
const main_el = elbyid("main"); const main_el = elbyid("main");
const top_img_el = elbyid("top_img"); const top_img_el = elbyid("top_img");
const currentPath = window.location.pathname;
const sideLinks = side_el.getElementsByTagName('a');
for (const link of sideLinks) {
if (link.pathname === currentPath) {
link.classList.add('onpage');
}
}
nav_fade = () => { nav_fade = () => {
if (window.scrollY == 0) { if (window.scrollY == 0) {
if (!side_open) { if (!side_open) {

View file

@ -134,9 +134,6 @@ body {
margin: 0; margin: 0;
} }
} }
> a.onpage {
background-color: #11111166;
}
> #support { > #support {
display: none; display: none;
} }
@ -144,6 +141,9 @@ body {
display: none; display: none;
} }
} }
#side a.onpage {
background-color: #11111133;
}
#side a:hover { #side a:hover {
background-color: #11111166; background-color: #11111166;
transition: 0.166s; transition: 0.166s;
@ -236,7 +236,8 @@ a,
b, b,
i, i,
code, code,
span { span,
textarea {
display: inline; display: inline;
font-family: inherit; font-family: inherit;
font-size: inherit; font-size: inherit;
@ -246,15 +247,15 @@ a {
cursor: pointer; cursor: pointer;
text-decoration: underline; text-decoration: underline;
} }
a:focus {
filter: brightness(1.333);
}
b { b {
font-weight: bold; font-weight: bold;
} }
i { i {
font-style: italic; font-style: italic;
} }
textarea {
display: block;
}
pre { pre {
white-space: pre-wrap; white-space: pre-wrap;
} }
@ -282,6 +283,53 @@ img {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
.btn {
padding: 6px 12px;
border-radius: 6px;
color: var(--col-10);
outline: 2px solid var(--col-10);
font-weight: bold;
letter-spacing: 1px;
text-shadow: 1px 1px 1px var(--col-05);
text-decoration: none;
background: linear-gradient(
135deg,
rgb(0 255 0 / 33%),
rgb(0 255 0 / 0%) 50%
),
linear-gradient(
225deg,
rgb(255 255 0 / 33%),
rgb(255 255 0 / 0%) 50%
),
linear-gradient(
-45deg,
rgb(255 0 0 / 33%),
rgb(255 0 0 / 0%) 50%
),
linear-gradient(
45deg,
rgb(0 0 255 / 33%),
rgb(0 0 255 / 0%) 50%
);
background-size: 600% 1200%;
background-position: 50% 50%;
transition: 0.333s;
}
.btn:hover {
background-size: 100% 100%;
}
.bob {
animation: bob 0.333s infinite alternate;
}
@keyframes bob {
from {
transform: translateY(0);
}
to {
transform: translateY(-4px);
}
}
/* keep this at the end */ /* keep this at the end */
.disabled { .disabled {
filter: grayscale(100%); filter: grayscale(100%);