Compare commits

..

No commits in common. "f23c4169ec10dc1ac112f0370e2cc907a277b38f" and "7b10cad2394f113d0f1116f997915f30ef39b170" have entirely different histories.

15 changed files with 19 additions and 221 deletions

View file

@ -1,28 +1 @@
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,5 +3,3 @@ module dofdev
go 1.23.2
require github.com/gorilla/mux v1.8.1
require github.com/gookit/goutil v0.6.17 // indirect

2
go.sum
View file

@ -1,4 +1,2 @@
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/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=

View file

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

View file

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

View file

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

View file

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

View file

@ -1,31 +0,0 @@
{{ 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,56 +60,7 @@
>degrees of freedom development</div> -->
</div>
<div
style="
position: relative;
width: 100%;
padding: 12px;
"
>
<h2>notes</h2>
<pre>{{ .Data.Game.Notes }}</pre>
<h2>notes</h2>
<pre>{{ .Data.Game.Notes }}</pre>
<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>
<div style='height: 44px; width: 100%;'></div>

View file

@ -17,8 +17,6 @@
<p>{{ .Desc }}</p>
</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 }}
<div>

View file

@ -1,22 +0,0 @@
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,7 +62,6 @@ func Handler(w http.ResponseWriter, r *http.Request) {
w, r,
"games.html",
"games",
// "high input bandwidth games",
"dof driven games",
data,
)

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

Binary file not shown.

View file

@ -16,15 +16,6 @@ document.addEventListener("DOMContentLoaded", () => {
const main_el = elbyid("main");
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 = () => {
if (window.scrollY == 0) {
if (!side_open) {

View file

@ -134,6 +134,9 @@ body {
margin: 0;
}
}
> a.onpage {
background-color: #11111166;
}
> #support {
display: none;
}
@ -141,9 +144,6 @@ body {
display: none;
}
}
#side a.onpage {
background-color: #11111133;
}
#side a:hover {
background-color: #11111166;
transition: 0.166s;
@ -236,8 +236,7 @@ a,
b,
i,
code,
span,
textarea {
span {
display: inline;
font-family: inherit;
font-size: inherit;
@ -247,15 +246,15 @@ a {
cursor: pointer;
text-decoration: underline;
}
a:focus {
filter: brightness(1.333);
}
b {
font-weight: bold;
}
i {
font-style: italic;
}
textarea {
display: block;
}
pre {
white-space: pre-wrap;
}
@ -283,53 +282,6 @@ img {
display: block;
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 */
.disabled {
filter: grayscale(100%);