diff --git a/Dockerfile b/Dockerfile index 830daf5..e632f43 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,12 @@ -FROM golang:1.23-alpine as builder +FROM busybox:latest -# Set the working directory -WORKDIR /app +RUN adduser -D static +USER static +WORKDIR /home/static -# Copy and download dependencies -COPY go.mod go.sum ./ -RUN go mod download +COPY ./zig-out/ . -# Copy the source code -COPY . . +EXPOSE 3000 -# Build the Go application -RUN go build -o server . +CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"] -# Create a minimal runtime image -FROM alpine:latest - -# Set the working directory -WORKDIR /root/ - -# Copy the compiled binary from the builder -COPY --from=builder /app/server . - -# Expose the application port (e.g., 8080) -EXPOSE 8080 - -# Run the application -CMD ["./server"] diff --git a/assets/fonts/MonaspaceArgonVarVF[wght,wdth,slnt].woff2 b/assets/fonts/MonaspaceArgonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..ee8504e Binary files /dev/null and b/assets/fonts/MonaspaceArgonVarVF[wght,wdth,slnt].woff2 differ diff --git a/assets/fonts/MonaspaceKryptonVarVF[wght,wdth,slnt].woff2 b/assets/fonts/MonaspaceKryptonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..c5e0a45 Binary files /dev/null and b/assets/fonts/MonaspaceKryptonVarVF[wght,wdth,slnt].woff2 differ diff --git a/assets/fonts/MonaspaceNeonVarVF[wght,wdth,slnt].woff2 b/assets/fonts/MonaspaceNeonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..368882f Binary files /dev/null and b/assets/fonts/MonaspaceNeonVarVF[wght,wdth,slnt].woff2 differ diff --git a/assets/fonts/MonaspaceRadonVarVF[wght,wdth,slnt].woff2 b/assets/fonts/MonaspaceRadonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..e3e0049 Binary files /dev/null and b/assets/fonts/MonaspaceRadonVarVF[wght,wdth,slnt].woff2 differ diff --git a/assets/fonts/MonaspaceXenonVarVF[wght,wdth,slnt].woff2 b/assets/fonts/MonaspaceXenonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..06ff768 Binary files /dev/null and b/assets/fonts/MonaspaceXenonVarVF[wght,wdth,slnt].woff2 differ diff --git a/assets/reset.css b/assets/reset.css new file mode 100644 index 0000000..9b11b1f --- /dev/null +++ b/assets/reset.css @@ -0,0 +1,90 @@ +/* https://piccalil.li/blog/a-more-modern-css-reset/ */ + +/* Box sizing rules */ +*, +*::before, +*::after { + box-sizing: border-box; +} + +/* Prevent font size inflation */ +html { + -moz-text-size-adjust: none; + -webkit-text-size-adjust: none; + text-size-adjust: none; +} + +/* Remove default margin in favour of better control in authored CSS */ +body, +h1, +h2, +h3, +h4, +p, +figure, +blockquote, +dl, +dd { + margin-block-start: 0; + margin-block-end: 0; +} + +/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */ +ul[role='list'], +ol[role='list'] { + list-style: none; +} + +/* Set core body defaults */ +body { + min-height: 100vh; +} + +/* Set shorter line heights on headings and interactive elements */ +h1, +h2, +h3, +h4, +button, +input, +label {} + +/* Balance text wrapping on headings */ +h1, +h2, +h3, +h4 { + text-wrap: balance; +} + +/* A elements that don't have a class get default styles */ +a:not([class]) { + text-decoration-skip-ink: auto; + color: currentColor; +} + +/* Make images easier to work with */ +img, +picture { + max-width: 100%; + display: block; +} + +/* Inherit fonts for inputs and buttons */ +input, +button, +textarea, +select { + font-family: inherit; + font-size: inherit; +} + +/* Make sure textareas without a rows attribute are not tiny */ +textarea:not([rows]) { + min-height: 10em; +} + +/* Anything that has been anchored to should have extra scroll margin */ +:target { + scroll-margin-block: 5ex; +} diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..9999ca3 --- /dev/null +++ b/assets/style.css @@ -0,0 +1,138 @@ +:root { + --font-family: "Monaspace Argon", monospace; + --measure: 100ch; + --line-height: 1.20rem; + + --background-color: #fbf1c7; + --foreground-color: #282828; + + font-family: var(--font-family); + font-optical-sizing: auto; + font-weight: normal; + font-style: normal; + /*font-variant-numeric: tabular-nums lining-nums;*/ + font-size: 16px; +} + +@media screen and (max-width: 480px) { + body { + padding: var(--line-height) 1ch; + } +} + +@media (prefers-color-scheme: dark) { + :root { + --background-color: #282828; + --foreground-color: #fbf1c7; + } +} + +body { + line-height: var(--line-height); + background: var(--background-color); + color: var(--foreground-color); + margin: calc(var(--line-height) * 3) auto; + padding: 0 2ch; +} + + + +/* Specify max chars on a line */ +* { + max-inline-size: var(--measure); +} + +*+* { + margin-top: var(--line-height); +} + +ul { + margin-top: 0; + padding-left: 1ch; +} + +html { + display: flex; + width: 100%; + flex-direction: column; +} + +li { + margin-top: 0; +} + +html, +body, +div, +header, +nav, +main, +footer { + max-inline-size: none; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin-top: var(--line-height); + margin-bottom: var(--line-height); +} + +#debug-grid { + --color: color-mix(in srgb, var(--foreground-color) 10%, var(--background-color) 90%); + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -1; + + background-image: + repeating-linear-gradient(var(--color) 0 1px, transparent 1px 100%), + repeating-linear-gradient(90deg, var(--color) 0 1px, transparent 1px 100%); + + background-size: 1ch var(--line-height); +} + +@font-face { + font-family: 'Monaspace Neon'; + src: url('fonts/MonaspaceNeonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Argon'; + src: url('fonts/MonaspaceArgonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Krypton'; + src: url('fonts/MonaspaceKryptonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Radon'; + src: url('fonts/MonaspaceRadonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Xenon'; + src: url('fonts/MonaspaceXenonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..1693a88 --- /dev/null +++ b/build.zig @@ -0,0 +1,19 @@ +const std = @import("std"); +const zine = @import("zine"); + +pub fn build(b: *std.Build) !void { + zine.website(b, .{ + .title = "Yadunand's Site", + .host_url = "https://yadunut.dev", + .content_dir_path = "content", + .layouts_dir_path = "layouts", + .assets_dir_path = "assets", + .static_assets = &.{ + "fonts/MonaspaceNeonVarVF[wght,wdth,slnt].woff2", + "fonts/MonaspaceArgonVarVF[wght,wdth,slnt].woff2", + "fonts/MonaspaceXenonVarVF[wght,wdth,slnt].woff2", + "fonts/MonaspaceRadonVarVF[wght,wdth,slnt].woff2", + "fonts/MonaspaceKryptonVarVF[wght,wdth,slnt].woff2", + }, + }); +} diff --git a/build.zig.zon b/build.zig.zon new file mode 100644 index 0000000..f1da96f --- /dev/null +++ b/build.zig.zon @@ -0,0 +1,11 @@ +.{ + .name = "Zine Website", + .version = "0.0.0", + .dependencies = .{ + .zine = .{ + .url = "git+https://github.com/kristoff-it/zine#7feb9e2389f015f56fc86cc90ab581b9ba3a21c6", + .hash = "1220e1db0d9ad44ba2cb484d202cdbc2d9d62d6ec329b418d61ea13f09ab4f69df5c", + }, + }, + .paths = .{"."}, +} diff --git a/content/blog/first-post.smd b/content/blog/first-post.smd new file mode 100644 index 0000000..ea6590b --- /dev/null +++ b/content/blog/first-post.smd @@ -0,0 +1,8 @@ +--- +.title = "First Post!", +.date = @date("2024-12-14"), +.author = "Yadunand Prem", +.layout = "post.shtml", +.draft = false, +--- +This is my first post! diff --git a/content/blog/index.smd b/content/blog/index.smd new file mode 100644 index 0000000..7d5df56 --- /dev/null +++ b/content/blog/index.smd @@ -0,0 +1,7 @@ +--- +.title = "Blogs", +.date = @date("2024-12-14"), +.author = "Yadunand Prem", +.layout = "blogs.shtml", +.draft = false, +--- diff --git a/content/blog/lean.smd b/content/blog/lean.smd new file mode 100644 index 0000000..8a66c37 --- /dev/null +++ b/content/blog/lean.smd @@ -0,0 +1,9 @@ +--- +.title = "Learning Lean", +.date = @date("2024-12-26"), +.author = "Yadunand Prem", +.layout = "post.shtml", +.draft = true, +--- + +[Lean](https://lean-lang.org/) is a Programming Language and an interactive theorem prover. I'm mainly exploring this to improve my logical thinking and my mathematical proving skills. diff --git a/content/blog/second-post.smd b/content/blog/second-post.smd new file mode 100644 index 0000000..094a63c --- /dev/null +++ b/content/blog/second-post.smd @@ -0,0 +1,8 @@ +--- +.title = "Second Post!", +.date = @date("2024-12-16"), +.author = "Yadunand Prem", +.layout = "post.shtml", +.draft = false, +--- +This is my second post! diff --git a/content/index.smd b/content/index.smd new file mode 100644 index 0000000..ac748dd --- /dev/null +++ b/content/index.smd @@ -0,0 +1,29 @@ +--- +.title = "Yadunand's Site (WIP 🚧)", +.date = @date("2024-12-14"), +.author = "Yadunand Prem", +.layout = "home.shtml", +.draft = false, +--- +Hi, I'm Yadunand, a software engineer currently based in πŸ‡¨πŸ‡¦, previously in πŸ‡­πŸ‡°,πŸ‡¦πŸ‡Ί,πŸ‡ΈπŸ‡¬. I'm interested in how + companies build things that scale, and how infrastructure works in general. This site is built on the exploration of + that. Most of my work (including [this site](https://git.yadunut.dev/yadunut/yadunut.dev), and the [infrastructure](https://git.yadunut.dev/yadunut/homelab)) can be found on my [gitea](https://git.yadunut.dev/yadunut) + +## Currently +- Software Engineer at [Endor Health](https://endorhealth.com) + - React Native, Typescript + - Python, Flask +- Year 3 student at [National University of Singapore](https://www.nus.edu.sg/) +- Exchange Student at [University of Toronto](https://www.utoronto.ca/) + +## Previously +- Technology Intern at [Marshall Wace](https://www.mwam.com/) + - Python, FastAPI + - React, Typescript + - K8s, flux, grafana, prometheus +- Software Engineer at [Undertide](https://www.undertide.co/) + - React Native, Graphql, Typescript + +## Contact Me + +I'm always happy to chat, feel free to reach out to me a @yadunut on (Twitter, Instagram, Telegram) or on [email](mailto:me@yadunut.com) diff --git a/content/sitemap.smd b/content/sitemap.smd new file mode 100644 index 0000000..a761972 --- /dev/null +++ b/content/sitemap.smd @@ -0,0 +1,7 @@ +--- +.title = "Sitemap", +.date = @date("2024-12-14"), +.author = "Yadunand Prem", +.layout = "sitemap.shtml", +.draft = false, +--- diff --git a/flake.lock b/flake.lock index aaddd6a..60b7030 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731890469, - "narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=", + "lastModified": 1734126203, + "narHash": "sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5083ec887760adfe12af64830a66807423a859a7", + "rev": "71a6392e367b08525ee710a93af2e80083b5b3e2", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index dd13583..e62442d 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,7 @@ devShells = { default = pkgs.mkShell { buildInputs = with pkgs;[ - go gopls gotools go-tools + zig ]; }; }; diff --git a/go.mod b/go.mod deleted file mode 100644 index 540ffb2..0000000 --- a/go.mod +++ /dev/null @@ -1,9 +0,0 @@ -module git.yadunut.dev/yadunut/yadunut.dev - -go 1.23.3 - -require ( - github.com/yuin/goldmark v1.7.8 // indirect - github.com/yuin/goldmark-meta v1.1.0 // indirect - gopkg.in/yaml.v2 v2.3.0 // indirect -) diff --git a/go.sum b/go.sum deleted file mode 100644 index 3c12820..0000000 --- a/go.sum +++ /dev/null @@ -1,7 +0,0 @@ -github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic= -github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= -github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc= -github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/justfile b/justfile deleted file mode 100644 index e0a2a5d..0000000 --- a/justfile +++ /dev/null @@ -1,2 +0,0 @@ -default: - just --list diff --git a/layouts/blogs.shtml b/layouts/blogs.shtml new file mode 100644 index 0000000..db90c28 --- /dev/null +++ b/layouts/blogs.shtml @@ -0,0 +1,17 @@ + + +
+

+ +
diff --git a/layouts/home.shtml b/layouts/home.shtml new file mode 100644 index 0000000..0a8a099 --- /dev/null +++ b/layouts/home.shtml @@ -0,0 +1,6 @@ + + +
+

+
+
diff --git a/layouts/post.shtml b/layouts/post.shtml new file mode 100644 index 0000000..530a04d --- /dev/null +++ b/layouts/post.shtml @@ -0,0 +1,14 @@ + + +
+

+

by +

+

+ Posted on: + +

+
+
diff --git a/layouts/sitemap.shtml b/layouts/sitemap.shtml new file mode 100644 index 0000000..7ccfde6 --- /dev/null +++ b/layouts/sitemap.shtml @@ -0,0 +1,17 @@ + + +
+

+
    +
  • + +
    +
      +
    • + +
    • +
    +
    +
  • +
+
diff --git a/layouts/templates/base.shtml b/layouts/templates/base.shtml new file mode 100644 index 0000000..f1ed1d9 --- /dev/null +++ b/layouts/templates/base.shtml @@ -0,0 +1,20 @@ + + + + + <super> + + + + + +
+ +
+
+ + diff --git a/main.go b/main.go deleted file mode 100644 index 5d724e2..0000000 --- a/main.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -import ( - "fmt" - "log/slog" - - "git.yadunut.dev/yadunut/yadunut.dev/site" -) - -func main() { - c := site.NewConfig(slog.LevelDebug, 8080) - c.Logger.Info("Starting server") - if err := site.Run(c); err != nil { - c.Logger.Error(fmt.Sprintf("failed with error %s", err)) - } -} diff --git a/site/handler.go b/site/handler.go deleted file mode 100644 index 684573f..0000000 --- a/site/handler.go +++ /dev/null @@ -1,79 +0,0 @@ -package site - -import ( - "fmt" - "log/slog" - "net/http" - "path" - "sync" -) - -type counter struct { - hits map[string]int - mu sync.Mutex -} - -type handler struct { - logger *slog.Logger - requestsCounter *counter -} - -func newHandler(logger *slog.Logger) *handler { - return &handler{ - logger: logger, - requestsCounter: &counter{hits: make(map[string]int)}, - } -} - -func (h *handler) LoggingMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - h.logger.Debug("Received request", "path", r.URL.Path) - next.ServeHTTP(w, r) - h.logger.Debug("Finished Request", "path", r.URL.Path) - }) -} - -func (h *handler) RequestsCounterMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - h.requestsCounter.mu.Lock() - h.requestsCounter.hits[r.URL.Path] += 1 - h.requestsCounter.mu.Unlock() - next.ServeHTTP(w, r) - }) -} - -func (h *handler) Ping(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Pong") -} - -func (h *handler) Index(w http.ResponseWriter, r *http.Request) { - h.logger.Info(r.URL.Path) - - if template, isOk := templates[path.Base(r.URL.Path)]; isOk { - h.logger.Info("Found template") - template.ExecuteTemplate(w, "base", nil) - } else { - h.logger.Info("default template") - templates["index"].ExecuteTemplate(w, "base", nil) - } -} - -func (h *handler) FileServer(w http.ResponseWriter, r *http.Request) { - h.logger.Info("handled by file server router") - http.FileServer(http.FS(staticContent)).ServeHTTP(w, r) -} - -func (h *handler) Metrics(w http.ResponseWriter, r *http.Request) { - h.requestsCounter.mu.Lock() - defer h.requestsCounter.mu.Unlock() - for path, hits := range h.requestsCounter.hits { - fmt.Fprintf(w, "http_requests_total{handler=\"%s\"} %d\n", path, hits) - } -} -func (h *handler) Healthz(w http.ResponseWriter, r *http.Request) { - fmt.Fprintln(w, "Ok") -} - -func (h *handler) NotFound(w http.ResponseWriter, r *http.Request) { - http.Error(w, "Page Not Found", http.StatusNotFound) -} diff --git a/site/router.go b/site/router.go deleted file mode 100644 index 9882297..0000000 --- a/site/router.go +++ /dev/null @@ -1,33 +0,0 @@ -package site - -import "net/http" - -func middlewares(h *handler, next http.Handler) http.Handler { - return h.LoggingMiddleware(h.RequestsCounterMiddleware(next)) -} - -func createRoutes(h *handler) map[string]http.Handler { - routes := map[string]http.Handler{ - "/static/": middlewares(h, http.HandlerFunc(h.FileServer)), - "/": middlewares(h, http.HandlerFunc(h.Index)), - "/ping": middlewares(h, http.HandlerFunc(h.Ping)), - "/metrics": middlewares(h, http.HandlerFunc(h.Metrics)), - "/healthz": middlewares(h, http.HandlerFunc(h.Healthz)), - } - return routes -} - -func newRouter(handler *handler) http.Handler { - mux := http.NewServeMux() - for pattern, handler := range createRoutes(handler) { - mux.Handle(pattern, handler) - } - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if h, pattern := mux.Handler(r); pattern != "" { - h.ServeHTTP(w, r) - } else { - middlewares(handler, http.HandlerFunc(handler.NotFound)).ServeHTTP(w, r) - } - }) -} diff --git a/site/site.go b/site/site.go deleted file mode 100644 index 871f6c1..0000000 --- a/site/site.go +++ /dev/null @@ -1,26 +0,0 @@ -package site - -import ( - "fmt" - "log/slog" - "net/http" - "os" -) - -type Config struct { - Logger *slog.Logger - Port int -} - -func NewConfig(logLevel slog.Level, port int) Config { - logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: slog.LevelDebug})) - return Config{ - Logger: logger, - Port: port, - } -} - -func Run(c Config) error { - h := newHandler(c.Logger) - return http.ListenAndServe(fmt.Sprintf(":%d", c.Port), newRouter(h)) -} diff --git a/site/static/css/main.css b/site/static/css/main.css deleted file mode 100644 index 46c85f3..0000000 --- a/site/static/css/main.css +++ /dev/null @@ -1,77 +0,0 @@ -:root { - --font-family: "Comic Mono"; - --line-height: 1.2rem; - --font-weight-normal: 500; - --font-weight-medium: 600; - --font-weight-bold: 800; - - font-family: var(--font-family), monospace; - font-weight: var(--font-weight-normal); - font-size: 16px; -} - -* { - box-sizing: border-box; -} - -body { - width: 100%; - padding: 2ch; - line-height: var(--line-height); - max-width: 100ch; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin: calc(var(--line-height) * 2) 0 var(--line-height) 0; - font-weight: var(--font-weight-bold); -} - -h1 { - font-size: 2rem; - margin-bottom: calc(var(--line-height) * 2); - text-transform: uppercase; -} - -h2 { - font-size: 1rem; - text-transform: uppercase; -} - -#grid { - position: absolute; - z-index: -1; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-image: linear-gradient(to right, #ccc 1px, transparent 1px), - linear-gradient(to bottom, #ccc 1px, transparent 1px); - background-size: 1ch var(--line-height); - /* Adjust grid size */ - background-position: top left; - margin: 0; -} - -p { - margin-bottom: var(--line-height); -} - -li { - margin: 0; - padding: 0; -} - -ul { - padding: 0 0 0 2ch; - margin: 0 0 var(--line-height); - list-style-type: square; -} - -ul li ul { - margin-bottom: 0; -} diff --git a/site/static/css/reset.css b/site/static/css/reset.css deleted file mode 100644 index 2df6143..0000000 --- a/site/static/css/reset.css +++ /dev/null @@ -1,129 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ - -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -img, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -b, -u, -i, -center, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td, -article, -aside, -canvas, -details, -embed, -figure, -figcaption, -footer, -header, -hgroup, -menu, -nav, -output, -ruby, -section, -summary, -time, -mark, -audio, -video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} -/* HTML5 display-role reset for older browsers */ -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -menu, -nav, -section { - display: block; -} -body { - line-height: 1; -} -ol, -ul { - list-style: none; -} -blockquote, -q { - quotes: none; -} -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ""; - content: none; -} -table { - border-collapse: collapse; - border-spacing: 0; -} diff --git a/site/templates.go b/site/templates.go deleted file mode 100644 index 3ade087..0000000 --- a/site/templates.go +++ /dev/null @@ -1,42 +0,0 @@ -package site - -import ( - "embed" - _ "embed" - "fmt" - "html/template" - "io/fs" - "path" - "path/filepath" - "strings" -) - -var templates map[string]*template.Template - -func init() { - templates = make(map[string]*template.Template) - fs.WalkDir(templateDir, "templates", func(p string, d fs.DirEntry, err error) error { - if d.IsDir() || !strings.HasSuffix(p, ".html") { - return nil - } - basePath := strings.TrimSuffix(path.Base(p), filepath.Ext(p)) - - templates[basePath] = template.Must(template.ParseFS(templateDir, p, "templates/_layout.html.tmpl")) - return nil - }) - fmt.Println("Parsed templates") - for k, ts := range templates { - fmt.Printf("%s: ", k) - for _, t := range ts.Templates() { - fmt.Printf("%s ", t.Name()) - } - fmt.Println() - } - fmt.Println() -} - -//go:embed templates/* -var templateDir embed.FS - -//go:embed static/* -var staticContent embed.FS diff --git a/site/templates/_layout.html.tmpl b/site/templates/_layout.html.tmpl deleted file mode 100644 index bc66cd9..0000000 --- a/site/templates/_layout.html.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -{{ define "base" }} - - - - - - - Yadunand's Site 🚧 - - - {{ template "content" .}} -
- - - -{{ end }} diff --git a/site/templates/index.html b/site/templates/index.html deleted file mode 100644 index 1c2feb7..0000000 --- a/site/templates/index.html +++ /dev/null @@ -1,36 +0,0 @@ -{{ define "content" }} -

Yadunand's Site WIP 🚧

-

Hi, I'm Yadunand, a software engineer currently based in πŸ‡¨πŸ‡¦, previously in πŸ‡­πŸ‡°,πŸ‡¦πŸ‡Ί,πŸ‡ΈπŸ‡¬. I'm interested in how - companies build things that scale, and how infrastructure works in general. This site is built on the exploration of - that. Most of my work (including this site, and the infrastructure) can be found on my gitea

-

Currently

- - -

Previously

-
    -
  • Technology Intern at Marshall Wace -
      -
    • Python, FastAPI
    • -
    • React, Typescript
    • -
    -
  • -
  • Software Engineer at Undertide
  • -
      -
    • React Native, Graphql, Typescript
    • -
    -
-

Contact Me

-

I'm always happy to chat, feel free to reach out to me a @yadunut on (Twitter, Instagram, Telegram) or on email

- -{{ end }} diff --git a/site/templates/something.html b/site/templates/something.html deleted file mode 100644 index 3c690a9..0000000 --- a/site/templates/something.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "content" }} -

Something goes here

-{{ end }} diff --git a/zig-out/blog/first-post/index.html b/zig-out/blog/first-post/index.html new file mode 100644 index 0000000..bf0e8ac --- /dev/null +++ b/zig-out/blog/first-post/index.html @@ -0,0 +1,29 @@ + + + + + Yadunand's Site + + + + + +
+ +

First Post!

+

by + Yadunand Prem

+

+ Posted on: + December 14, 2024 +

+

This is my first post!

+ +
+
+ + diff --git a/zig-out/blog/index.html b/zig-out/blog/index.html new file mode 100644 index 0000000..cdfa737 --- /dev/null +++ b/zig-out/blog/index.html @@ -0,0 +1,33 @@ + + + + + Yadunand's Site + + + + + +
+ +

Blogs

+ + +
+
+ + diff --git a/zig-out/blog/second-post/index.html b/zig-out/blog/second-post/index.html new file mode 100644 index 0000000..3ecdc06 --- /dev/null +++ b/zig-out/blog/second-post/index.html @@ -0,0 +1,29 @@ + + + + + Yadunand's Site + + + + + +
+ +

Second Post!

+

by + Yadunand Prem

+

+ Posted on: + December 16, 2024 +

+

This is my second post!

+ +
+
+ + diff --git a/zig-out/fonts/MonaspaceArgonVarVF[wght,wdth,slnt].woff2 b/zig-out/fonts/MonaspaceArgonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..ee8504e Binary files /dev/null and b/zig-out/fonts/MonaspaceArgonVarVF[wght,wdth,slnt].woff2 differ diff --git a/zig-out/fonts/MonaspaceKryptonVarVF[wght,wdth,slnt].woff2 b/zig-out/fonts/MonaspaceKryptonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..c5e0a45 Binary files /dev/null and b/zig-out/fonts/MonaspaceKryptonVarVF[wght,wdth,slnt].woff2 differ diff --git a/zig-out/fonts/MonaspaceNeonVarVF[wght,wdth,slnt].woff2 b/zig-out/fonts/MonaspaceNeonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..368882f Binary files /dev/null and b/zig-out/fonts/MonaspaceNeonVarVF[wght,wdth,slnt].woff2 differ diff --git a/zig-out/fonts/MonaspaceRadonVarVF[wght,wdth,slnt].woff2 b/zig-out/fonts/MonaspaceRadonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..e3e0049 Binary files /dev/null and b/zig-out/fonts/MonaspaceRadonVarVF[wght,wdth,slnt].woff2 differ diff --git a/zig-out/fonts/MonaspaceXenonVarVF[wght,wdth,slnt].woff2 b/zig-out/fonts/MonaspaceXenonVarVF[wght,wdth,slnt].woff2 new file mode 100644 index 0000000..06ff768 Binary files /dev/null and b/zig-out/fonts/MonaspaceXenonVarVF[wght,wdth,slnt].woff2 differ diff --git a/zig-out/index.html b/zig-out/index.html new file mode 100644 index 0000000..e1d9071 --- /dev/null +++ b/zig-out/index.html @@ -0,0 +1,23 @@ + + + + + Yadunand's Site + + + + + +
+ +

Yadunand's Site (WIP 🚧)

+

Hi, I’m Yadunand, a software engineer currently based in πŸ‡¨πŸ‡¦, previously in πŸ‡­πŸ‡°,πŸ‡¦πŸ‡Ί,πŸ‡ΈπŸ‡¬. I’m interested in how companies build things that scale, and how infrastructure works in general. This site is built on the exploration of that. Most of my work (including this site, and the infrastructure) can be found on my gitea

Currently

Previously

  • Technology Intern at Marshall Wace
    • Python, FastAPI
    • React, Typescript
    • K8s, flux, grafana, prometheus
  • Software Engineer at Undertide
    • React Native, Graphql, Typescript

Contact Me

I’m always happy to chat, feel free to reach out to me a @yadunut on (Twitter, Instagram, Telegram) or on email

+ +
+
+ + diff --git a/zig-out/reset.css b/zig-out/reset.css new file mode 100644 index 0000000..9b11b1f --- /dev/null +++ b/zig-out/reset.css @@ -0,0 +1,90 @@ +/* https://piccalil.li/blog/a-more-modern-css-reset/ */ + +/* Box sizing rules */ +*, +*::before, +*::after { + box-sizing: border-box; +} + +/* Prevent font size inflation */ +html { + -moz-text-size-adjust: none; + -webkit-text-size-adjust: none; + text-size-adjust: none; +} + +/* Remove default margin in favour of better control in authored CSS */ +body, +h1, +h2, +h3, +h4, +p, +figure, +blockquote, +dl, +dd { + margin-block-start: 0; + margin-block-end: 0; +} + +/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */ +ul[role='list'], +ol[role='list'] { + list-style: none; +} + +/* Set core body defaults */ +body { + min-height: 100vh; +} + +/* Set shorter line heights on headings and interactive elements */ +h1, +h2, +h3, +h4, +button, +input, +label {} + +/* Balance text wrapping on headings */ +h1, +h2, +h3, +h4 { + text-wrap: balance; +} + +/* A elements that don't have a class get default styles */ +a:not([class]) { + text-decoration-skip-ink: auto; + color: currentColor; +} + +/* Make images easier to work with */ +img, +picture { + max-width: 100%; + display: block; +} + +/* Inherit fonts for inputs and buttons */ +input, +button, +textarea, +select { + font-family: inherit; + font-size: inherit; +} + +/* Make sure textareas without a rows attribute are not tiny */ +textarea:not([rows]) { + min-height: 10em; +} + +/* Anything that has been anchored to should have extra scroll margin */ +:target { + scroll-margin-block: 5ex; +} diff --git a/zig-out/sitemap/index.html b/zig-out/sitemap/index.html new file mode 100644 index 0000000..4894042 --- /dev/null +++ b/zig-out/sitemap/index.html @@ -0,0 +1,43 @@ + + + + + Yadunand's Site + + + + + +
+ +

Sitemap

+ + +
+
+ + diff --git a/zig-out/style.css b/zig-out/style.css new file mode 100644 index 0000000..9999ca3 --- /dev/null +++ b/zig-out/style.css @@ -0,0 +1,138 @@ +:root { + --font-family: "Monaspace Argon", monospace; + --measure: 100ch; + --line-height: 1.20rem; + + --background-color: #fbf1c7; + --foreground-color: #282828; + + font-family: var(--font-family); + font-optical-sizing: auto; + font-weight: normal; + font-style: normal; + /*font-variant-numeric: tabular-nums lining-nums;*/ + font-size: 16px; +} + +@media screen and (max-width: 480px) { + body { + padding: var(--line-height) 1ch; + } +} + +@media (prefers-color-scheme: dark) { + :root { + --background-color: #282828; + --foreground-color: #fbf1c7; + } +} + +body { + line-height: var(--line-height); + background: var(--background-color); + color: var(--foreground-color); + margin: calc(var(--line-height) * 3) auto; + padding: 0 2ch; +} + + + +/* Specify max chars on a line */ +* { + max-inline-size: var(--measure); +} + +*+* { + margin-top: var(--line-height); +} + +ul { + margin-top: 0; + padding-left: 1ch; +} + +html { + display: flex; + width: 100%; + flex-direction: column; +} + +li { + margin-top: 0; +} + +html, +body, +div, +header, +nav, +main, +footer { + max-inline-size: none; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin-top: var(--line-height); + margin-bottom: var(--line-height); +} + +#debug-grid { + --color: color-mix(in srgb, var(--foreground-color) 10%, var(--background-color) 90%); + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -1; + + background-image: + repeating-linear-gradient(var(--color) 0 1px, transparent 1px 100%), + repeating-linear-gradient(90deg, var(--color) 0 1px, transparent 1px 100%); + + background-size: 1ch var(--line-height); +} + +@font-face { + font-family: 'Monaspace Neon'; + src: url('fonts/MonaspaceNeonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Argon'; + src: url('fonts/MonaspaceArgonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Krypton'; + src: url('fonts/MonaspaceKryptonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Radon'; + src: url('fonts/MonaspaceRadonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +} + +@font-face { + font-family: 'Monaspace Xenon'; + src: url('fonts/MonaspaceXenonVarVF[wght\,wdth\,slnt].woff2') format('woff2'); + font-weight: 100 900; + font-stretch: 75% 125%; + font-style: oblique -10deg 0deg; +}