diff --git a/Todo.txt b/Todo.txt index e886ee7..53fccda 100644 --- a/Todo.txt +++ b/Todo.txt @@ -2,12 +2,4 @@ -. Game list - tech tools and eq research sections. -- phone support - -- Games - -- reasearch -- lsit fo eq researh work, make DD -- make 3. -- mstr as short -- \ No newline at end of file +- phone support \ No newline at end of file diff --git a/data.json b/data.json new file mode 100644 index 0000000..b4bc112 --- /dev/null +++ b/data.json @@ -0,0 +1,3 @@ +{ + "job": "none" +} \ No newline at end of file diff --git a/main.go b/main.go index 1382cd2..cc3bf9a 100644 --- a/main.go +++ b/main.go @@ -1,30 +1,25 @@ package main import ( + "encoding/json" "flag" "fmt" "log" "net/http" + "os" ) -// ---------- HTTP Handlers ---------- - -func HelloHandler(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/hello" { - http.Error(w, "404 not found", http.StatusNotFound) - return - } - if r.Method != "GET" { - http.Error(w, "method is not supported", http.StatusNotFound) - return - } - fmt.Fprintf(w, "Hello You") +type Config struct { + Job string `json:"job"` } -func staticPage(path, file string) { - http.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) { - http.ServeFile(w, r, "./static/"+file) - }) +func loadConfig() (*Config, error) { + data, err := os.ReadFile("data.json") + if err != nil { + return nil, err + } + var c Config + return &c, json.Unmarshal(data, &c) } // ---------- Main ---------- @@ -36,23 +31,29 @@ func main() { fs := http.FileServer(http.Dir("static")) http.Handle("/static/", http.StripPrefix("/static/", fs)) - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/" { - http.Redirect(w, r, "/", http.StatusFound) + http.HandleFunc("GET /{$}", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/about.html") }) + http.HandleFunc("GET /infra", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/infra.html") }) + http.HandleFunc("GET /finance", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/finance.html") }) + http.HandleFunc("GET /cinema", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/cinema.html") }) + http.HandleFunc("GET /engine", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/engine.html") }) + http.HandleFunc("GET /42", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/42.html") }) + http.HandleFunc("GET /secret", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/secret.html") }) + http.HandleFunc("GET /favicon.ico", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "./static/icon.png") }) + + http.HandleFunc("GET /status", func(w http.ResponseWriter, r *http.Request) { + config, err := loadConfig() + if err != nil { + http.Error(w, "failed to load config", http.StatusInternalServerError) return } - http.ServeFile(w, r, "./static/about.html") - }) - //http.HandleFunc("/portfolio", Portfolio) - staticPage("/infra", "infra.html") - staticPage("/finance", "finance.html") - staticPage("/cinema", "cinema.html") - staticPage("/engine", "engine.html") - staticPage("/42", "42.html") - staticPage("/secret", "secret.html") - http.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) { - http.ServeFile(w, r, "./static/icon.png") + w.Header().Set("Content-Type", "text/html") + + if config.Job == "" || config.Job == "none" { + fmt.Fprint(w, `available for work`) + } else { + fmt.Fprintf(w, `working at: %s`, config.Job) + } }) //http.HandleFunc("/portfolio", Portfolio) diff --git a/site b/site index 83a971e..128b53d 100755 Binary files a/site and b/site differ diff --git a/static/about.html b/static/about.html index 8e40abd..3525ed5 100644 --- a/static/about.html +++ b/static/about.html @@ -9,8 +9,8 @@ - - + + @@ -87,13 +87,6 @@
-
@@ -107,7 +100,7 @@ and financial analysis. Analytical, detail-oriented, and efficiency-focused.

- available for work +
samantha42.xyz me@samantha42.xyz
diff --git a/static/portfolio.html b/static/portfolio.html deleted file mode 100644 index fa690ff..0000000 --- a/static/portfolio.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - - Portfolio — Samantha Friis - - - - -
- -
- ← back -

// portfolio

-

Investment
Portfolio

-

Equity positions  ·  Personal research

-
- - connecting to api… -
-

- Test of API: - Source at - git.samantha42.xyz/samantha/FPandA-Engine -

-
- - - -
-
-

Total Weight

-

1 -
-
-

Positions

-

-
-
-

Total Cost Basis

-

-
-
-

Total Shares

-

-
-
- - -
- - - - fetching prices… - - -
- - -
- - connecting to backend… - · - uptime — - · - db — - - -
- - -
-
-

Positions

-

-
-
-

Total Shares

-

-
-
-

Total Trades

-

-
-
-

Currencies

-

-
-
- - - -
- - - - - - - - - - - - - - - - - - - - -
SymbolCurrencySharesCost BasisWeightMarket Price
loading…
-
- - - - -
- - - - - - - - - - - - - -
SymbolCurrencyPriceShares OutstandingMarket Cap
loading…
-
- - -
- - -
-
-
-
- - - - - -
- -
-
- -
- -
- -

- -
- - - - - - - - - - - - - - - - - - -
SymbolAssetCcyCurrencyDateDirQtyPrice
open to load trades
expand to load trades
-
- -
-
-
- - - -
- - - - -
- - - - \ No newline at end of file diff --git a/static/style/game.css b/static/style/game.css deleted file mode 100644 index bca9cec..0000000 --- a/static/style/game.css +++ /dev/null @@ -1,57 +0,0 @@ -.play { - padding: 2rem 0; -} - -.play .section-head h2 { - font-family: var(--ff-mono); - font-size: 1rem; - font-weight: 400; - letter-spacing: 0.08em; - color: var(--muted); - margin-bottom: 1.5rem; -} - -.play .story-text { - font-family: var(--ff-mono); - font-size: 0.85rem; - line-height: 1.9; - color: var(--fg); - max-width: 560px; - margin-bottom: 2rem; - white-space: pre-wrap; - border: 1px solid rgb(167, 205, 250); - border-radius: 10px; - padding: 1rem 1.25rem; -} - -.play .choices { - display: flex; - flex-direction: column; - gap: 0.6rem; - max-width: 560px; -} - -.play .choices a, -.play .choices button { - font-family: var(--ff-mono); - font-size: 0.8rem; - color: var(--muted); - background: none; - border: none; - border-left: 1px solid var(--muted); - padding: 0.3rem 0.75rem; - cursor: pointer; - text-align: left; - text-decoration: none; - transition: color 0.15s, border-color 0.15s; -} - -.play .choices a:hover, -.play .choices button:hover { - color: var(--fg); - border-color: var(--fg); -} -.idx { - color: blueviolet; - padding: 10px; -} \ No newline at end of file diff --git a/static/style/styles2.css b/static/style/styles2.css index a24a46d..2d52a54 100644 --- a/static/style/styles2.css +++ b/static/style/styles2.css @@ -157,11 +157,7 @@ h1 span{color:var(--accent);} font-family:var(--ff-mono);font-size:0.72rem;color:var(--dim); } .hero-meta span{display:flex;align-items:center;gap:5px;} -.dot{ - width:6px;height:6px;border-radius:50%; - background:var(--green);display:inline-block; - animation:pulse 2s infinite; -} + @keyframes pulse{0%,100%{opacity:1;}50%{opacity:0.35;}} .section-head{display:flex;align-items:center;gap:10px;margin-bottom:1.8rem;} @@ -590,4 +586,14 @@ a{ font-size: 0.72rem; letter-spacing: 0.08em; padding-left: 1.1rem; -} \ No newline at end of file +} + +.dot { + width: 6px; + height: 6px; + border-radius: 50%; + display: inline-block; + animation: pulse 2s infinite; +} +.dot--available { background: var(--green); } +.dot--busy { background: red; } \ No newline at end of file