From 5ada7ae762eec79809d7ced641f3ec31ba9cf4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20G=C3=A9rard?= Date: Wed, 29 Jan 2025 22:44:23 +0100 Subject: [PATCH] feat(site): handle multiple languages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louis Gérard --- .gitignore | 2 + internal/blog/article.go | 49 +- .../{content.md => content/en.md} | 0 .../advent-of-code-review/content/fr.md | 265 +++ .../advent-of-code-review/metadata.json | 5 +- .../{summary.md => summary/en.md} | 0 .../advent-of-code-review/summary/fr.md | 3 + internal/blog/build.go | 78 +- internal/blog/home.go | 18 +- internal/blog/languages.go | 42 + internal/blog/not_found.templ | 4 +- internal/blog/not_found_templ.go | 22 +- internal/blog/pages.go | 10 +- .../blog/pages/about-me/{content.md => en.md} | 0 internal/blog/pages/about-me/fr.md | 14 + internal/blog/site.templ | 108 +- internal/blog/site_templ.go | 260 ++- internal/blog/static/css/input.css | 30 +- internal/blog/static/css/output.css | 1516 +++++++++-------- main.go | 12 +- package-lock.json | 931 ++++++++++ package.json | 6 + tailwind.config.js | 13 - 23 files changed, 2555 insertions(+), 833 deletions(-) rename internal/blog/articles/advent-of-code-review/{content.md => content/en.md} (100%) create mode 100644 internal/blog/articles/advent-of-code-review/content/fr.md rename internal/blog/articles/advent-of-code-review/{summary.md => summary/en.md} (100%) create mode 100644 internal/blog/articles/advent-of-code-review/summary/fr.md create mode 100644 internal/blog/languages.go rename internal/blog/pages/about-me/{content.md => en.md} (100%) create mode 100644 internal/blog/pages/about-me/fr.md create mode 100644 package-lock.json create mode 100644 package.json delete mode 100644 tailwind.config.js diff --git a/.gitignore b/.gitignore index f463ba0..38b8369 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ export # Local Netlify folder .netlify + +node_modules diff --git a/internal/blog/article.go b/internal/blog/article.go index 27bf142..e46a577 100644 --- a/internal/blog/article.go +++ b/internal/blog/article.go @@ -46,11 +46,18 @@ func init() { var articlesFiles embed.FS type ArticleMetadata struct { - Title string + Titles map[Language]string CreationDate time.Time LastModified time.Time } +func (am ArticleMetadata) TitleInLanguage(lang Language) string { + if lang == "" { + return am.Titles[DEFAULT_LANGUAGE] + } + return am.Titles[lang] +} + type Article struct { Name string Link string @@ -118,36 +125,36 @@ func mdToHTML(md []byte) []byte { return markdown.Render(doc, renderer) } -func articleNotFound(w http.ResponseWriter, req *http.Request) { +func articleNotFound(w http.ResponseWriter, req *http.Request, lang Language, pagePath string) { w.WriteHeader(http.StatusNotFound) - site(notFound()).Render(req.Context(), w) + site(notFound(lang), lang, pagePath).Render(req.Context(), w) } -func ServeArticles(ctx context.Context, w io.Writer) error { - articles, err := GetRecentArticles(20) +func ServeArticles(ctx context.Context, w io.Writer, lang Language, pagePath string) error { + articles, err := GetRecentArticles(20, lang) if err != nil { return fmt.Errorf("loading recent articles : %w", err) } - component := articleList(articles) - err = site(component).Render(ctx, w) + component := articleList(articles, lang) + err = site(component, lang, pagePath).Render(ctx, w) if err != nil { return fmt.Errorf("rendering recent articles : %w", err) } return nil } -func ServeArticle(ctx context.Context, w io.Writer, articleName string) error { - const contentFileName = "content.md" +func ServeArticle(ctx context.Context, w io.Writer, articleName string, lang Language, pagePath string) error { + const contentFolder = "content" if !validArticleFile.MatchString(articleName) { return fmt.Errorf("invalid article") } - articleContent, err := articlesFiles.ReadFile(articlesPath + "/" + articleName + "/" + contentFileName) + articleContent, err := articlesFiles.ReadFile(articlesPath + "/" + articleName + "/" + contentFolder + "/" + string(lang) + ".md") if err != nil { return fmt.Errorf("reading article content : %w", err) } articleContent = mdToHTML(articleContent) component := article(string(articleContent)) - err = site(component).Render(ctx, w) + err = site(component, lang, pagePath).Render(ctx, w) if err != nil { return fmt.Errorf("rendering article : %w", err) } @@ -155,7 +162,8 @@ func ServeArticle(ctx context.Context, w io.Writer, articleName string) error { } func ArticlesHandler(w http.ResponseWriter, req *http.Request) { - err := ServeArticles(req.Context(), w) + lang := LanguageFromParam(req.PathValue("lang")) + err := ServeArticles(req.Context(), w, lang, getPagePath(req, lang)) if err != nil { w.WriteHeader(http.StatusNotFound) log.Println(err) @@ -165,8 +173,10 @@ func ArticlesHandler(w http.ResponseWriter, req *http.Request) { func ArticleHandler(w http.ResponseWriter, req *http.Request) { const contentFileName = "content.md" - articleName := strings.TrimPrefix(req.URL.Path, "/articles/") - err := ServeArticle(req.Context(), w, articleName) + lang := LanguageFromParam(req.PathValue("lang")) + prefix := fmt.Sprintf("/site/%s/articles/", lang) + articleName := strings.TrimPrefix(req.URL.Path, prefix) + err := ServeArticle(req.Context(), w, articleName, lang, getPagePath(req, lang)) if err != nil { if errors.Is(err, os.ErrNotExist) { w.WriteHeader(http.StatusNotFound) @@ -181,12 +191,13 @@ func ArticleHandler(w http.ResponseWriter, req *http.Request) { func ArticleImageHandler(w http.ResponseWriter, req *http.Request) { image := req.PathValue("image") article := req.PathValue("article") + lang := LanguageFromParam(req.PathValue("lang")) if !validArticleFile.MatchString(article) { - articleNotFound(w, req) + articleNotFound(w, req, lang, getPagePath(req, lang)) return } if !validImageFile.MatchString(image) { - articleNotFound(w, req) + articleNotFound(w, req, lang, getPagePath(req, lang)) return } fileName := articlesPath + "/" + article + "/images/" + image @@ -197,7 +208,7 @@ func ArticleImageHandler(w http.ResponseWriter, req *http.Request) { // you can specify a limit with nbArticles. if nbArticles <= 0 // then it will return all articles (useful for exporting site // as static HTML -func GetRecentArticles(nbArticles int) ([]Article, error) { +func GetRecentArticles(nbArticles int, lang Language) ([]Article, error) { articles, err := articlesFiles.ReadDir(articlesPath) if err != nil { return nil, err @@ -212,7 +223,7 @@ func GetRecentArticles(nbArticles int) ([]Article, error) { result = make([]Article, nbArticles) } const metadataFileName = "metadata.json" - const summaryFileName = "summary.md" + const summaryFolder = "summary" for i, article := range articles { metadataFileContent, err := articlesFiles.ReadFile(articlesPath + "/" + article.Name() + "/" + metadataFileName) if err != nil { @@ -227,7 +238,7 @@ func GetRecentArticles(nbArticles int) ([]Article, error) { log.Println(newError) return nil, newError } - summary, err := articlesFiles.ReadFile(articlesPath + "/" + article.Name() + "/" + summaryFileName) + summary, err := articlesFiles.ReadFile(articlesPath + "/" + article.Name() + "/" + summaryFolder + "/" + string(lang) + ".md") if err != nil { newError := fmt.Errorf("unable to find summary file for article %s : %w", article.Name(), err) log.Println(newError) diff --git a/internal/blog/articles/advent-of-code-review/content.md b/internal/blog/articles/advent-of-code-review/content/en.md similarity index 100% rename from internal/blog/articles/advent-of-code-review/content.md rename to internal/blog/articles/advent-of-code-review/content/en.md diff --git a/internal/blog/articles/advent-of-code-review/content/fr.md b/internal/blog/articles/advent-of-code-review/content/fr.md new file mode 100644 index 0000000..9d9b67c --- /dev/null +++ b/internal/blog/articles/advent-of-code-review/content/fr.md @@ -0,0 +1,265 @@ +# Ce que j'ai appris de l'Advent of code 2024 + +For the first time I was able to complete Advent of Code completely (and on time). It is a yearly challenge that will present a new puzzle every day from December 1st to December 25th. You can do it in any language you want as you are only required to provide the solution to the puzzle given your input, but you don't have to actually submit code. + +I love using AoC as a learning and practicing opportunity. Today I would like to share what I discovered during this year's edition. + +## 1. Go's generics + +I was already familiar with how Generics, or whatever you call them, can work in other languages. Basically, instead of giving a specific type to a function or a struct definition you can give a generic one. You can also specify constraints on which types should be allowed. + +For example to define a `Heap` type that can work with different types : + +```go +type Heap[] []int // Specific implementation +type Heap[T Comparable] []T // Generic one +``` + +Note that the name `Comparable` here is a custom interface I defined and not the built-in comparable type constraint. I probably could have come up with a better name. + +In any case, while I never really needed generics when working with Go at my job, it was really useful for AoC as it allowed me to define a Grid-like typethat I could use throughout all puzzles. + +```go +type Grid[T any] struct { + Nodes map[Point]T + Height, Width int +} +``` + +It included functions such as finding neighbors which is a VERY common pattern in AoC. All the memes on the [r/adventofcode subreddit](https://www.reddit.com/r/adventofcode/) about 2D grids are a testament to that. + +```go +func (grid *Grid[T]) CarthesianNeighbors(point Point) iter.Seq[T] { + return func(yield func(T) bool) { + for _, dir := range CarthesianDirections { + neighbor := point.Add(dir) + if node, ok := grid.Nodes[neighbor]; ok { + if !yield(node) { + break + } + } + } + } +} +``` + +## 2. Go's iterators + +Go is defninitely not the best language to pick up for Advent of Code. While it's a great pick for some use cases (servers or DevOps tooling for example), for Advent of code you want a lot of functions that works on containers such as slices and maps. + +You often get an input in a form of a list, each item on this list must be parsed, some computation must be applied to deduce a value for each element and then you must filter out some outputs or take the sum or product of those outputs. Go does not have `map`, `filter` or `reduce` functions in its standard library. + +Of course you can use loops, but that can make the code a little bit longer to write and to navigate. While I know that functional patterns are really not idiomatic in Go (probably due to to the lack of generics until recently), I wanted to try to build them myself to try out generics and iterators as they are a perfect fit for such use cases. + +It can make some days really easier. For example here is my part 1 for day 22 : + +```go +func part1(input []string) int { + deriveSecret := func(secret int) int { + for range 2000 { + secret = nextSecret(secret) + } + return secret + } + initialSecrets := functions.Map(slices.Values(input), functions.MustAtoi) + results := functions.Map(initialSecrets, deriveSecret) + return functions.Sum(results) +} +``` + +Iterators were a bit hard to wrap my head around and I'm glad I built this small library just because I now see more clearly how they work. + +Basically an iterator in Go is a function that takes another function as its argument (named `yield`, by convention). You then must apply this function to every element in the collection, BUT, you should stop if this function returns `false`. + +So if you want to apply a function to every element you would write something like this : + +```go +// Map creates a new slice with a function applied to each +// element in the input slice +func Map[T any, U any](input iter.Seq[T], operation func(T) U) iter.Seq[U] { + return func(yield func(U) bool) { + for element := range input { + if !yield(operation(element)) { + break + } + } + } +} +``` + +I also built a Pair iterator because that had some uses for it in previous AoC puzzles (that I did in Python). That's when I wrote this function that I really understood how iterators work : + +```go +// Pair will make pair from two iterators and stop once +// the shortest is exhausted +func Pairs[T any](s1, s2 iter.Seq[T]) iter.Seq[Pair[T]] { + return func(yield func(Pair[T]) bool) { + next1, stop1 := iter.Pull(s1) + defer stop1() + next2, stop2 := iter.Pull(s2) + defer stop2() + for { + v1, ok1 := next1() + v2, ok2 := next2() + if !ok1 || !ok2 { + break + } + if !yield(Pair[T]{A: v1, B: v2}) { + break + } + } + } +} +``` + +You can do whatever operation you want inside the iterator function, you juste need to call yield on each element unless it returns `false`. I'm glad Go iterators clicked with me when I wrote that because I only the Pair iterator once on day 2. + +## 2. Using profiling tools + +At some point I started adding benchmarks to my solutions, just to know if what I did was not that bad in term of performance. + +Now on day 12 I got my working solution during my lunch break. When browsing the subreddit, I noticed that my runtime was particularly slow compared to what other users reported. Here is what I had : + +``` +❯ go test -bench=. +goos: linux +goarch: amd64 +pkg: advent-of-go/solutions/2024/12 +cpu: AMD Ryzen 5 5600 6-Core Processor +BenchmarkPart1-12 10 122588965 ns/op +BenchmarkPart2-12 9 136754725 ns/op +PASS +ok advent-of-go/solutions/2024/12 2.724s +``` + +This means that my runtime was 136ms for part 2. Not necessarily terrible but I wondered if I could do better without changing my approach too much. So while I had no experience with it I started the go profiler just to see if I could get a hint as to what was slowing me down. Here is what I got : + +![profiler1](advent-of-code-review/images/profiler_output1.png) + +I had to search a little bit to find out what this meant but basically I was spending a lot of time in two things : + +* Accessing element in a map (which I used as the underlying type for working with 2D grids) +* Garbage collection + +I didn't really know how to solve that, maybe I was doing too much allocations, so I looked at my `make` calls, and in one of my functions, I was doing this : + +```go + crops := make(map[ds.Point]bool, len(grid.Nodes)) +``` + +The length of `grid.Nodes` was 19600 with my input, but in reality the `crops` map contained only about 100 elements. + +In go, maps are backed by buckets. To store or access a key,value pair in the map, Go will hash the key of the element to find out which bucket holds that data. When I reserve enough space to store 196000 key,value pairs, Go will create a lot more buckets that will need to be garbage collected, which will take some time. + +Changing this to : + +```go + crops := make(map[ds.Point]bool, 0) +``` + +Made the program run almost 10x faster. + +``` +❯ go test -bench=. +goos: linux +goarch: amd64 +pkg: advent-of-go/solutions/2024/12 +cpu: AMD Ryzen 5 5600 6-Core Processor +BenchmarkPart1-12 96 11678739 ns/op +BenchmarkPart2-12 78 14791988 ns/op +PASS +ok advent-of-go/solutions/2024/12 2.306s +``` + +Lesson learned : Trying to size correctly for maps is good, but overshooting by such a large margin is a mistake. I will consider this more carefully in the future. + +## 3. Recursion and Memoization + +On some days, like day 19 and day 21 the part 2 requires to explore a much bigger solution space than in part 1. So using the same approach usually won't work if you want an answer before the end of the universe. + +There is a technique that is relatively simple to use and can help in those case and that is : Memoization + +Memoization is a technique that makes perfect sense once you know it, but back when I started doing AoC, I did not really think about it. Basically the idea is that you want to store the result of expensive computations. Here is what it can look like in practice. I'll take the day 19 as an example so you might want to skip this part if you plan to do day 19 at a later date. + +On day 19 you were given a list of string such as `gbbr` and a list of pattern you could use to make up that string : `r, wr, b, g, bwu, rb, gb, br`. +The task was to find all of the possible way to make each string using only the pattern you were given. + +When you think about it, you may realize that you can divide this problem into smaller subproblems which makes it a perfect candidate for a recursion. Whici is the idea of calling a function inside itself, the process is as follows : + +1. Try to find all the pattern that can be used to make the string, here we have `gb and g` +2. For each pattern that matches try to solve the subproblem where the pattern is removed and sum those values, here this is `bbr and br` + +If we apply this process we can find that there are two ways to do `bbr` (`b,br` and `b`,`b`,`r`) and two ways to do `br` (`b`,`r` and `br`). That makes 4 in total. Here is the code that does that + +```go + +func possibleOptions(patterns []string, design string) int { + sum := 0 + for _, pattern := range patterns { + if pattern == design { + sum += 1 + continue + } + if strings.Index(design, pattern) == 0 { + var result, count int + var cached bool + subDesign := design[len(pattern):] + result = possibleOptions(patterns, subDesign) + sum += result + } + } + return sum +} +``` + +You may have noticed that we found how many combination exists for `br` twice. But under no circumstances would the result for that substring change. So instead of caculating this every time, we can just store this in a map. And use this in our function + +```go +var cache map[string]int + +func possibleOptions(patterns []string, design string) int { + sum := 0 + for _, pattern := range patterns { + if pattern == design { + sum += 1 + continue + } + if strings.Index(design, pattern) == 0 { + var result, count int + var cached bool + subDesign := design[len(pattern):] + // Avoid computation if we already know the result + if count, cached = cache[subDesign]; cached { + result = count + } else { + result = possibleOptions(patterns, subDesign) + } + sum += result + } + } + // Save the result + cache[design] = sum + return sum +} +``` + +In general recursion is a very good way to tackle problem that can be easily divided in subproblems like this one. You can always write a recursive function in an iterative way, but I find that depending on the problem structure, recursion makes it easier to reason about. + +As for memoization, the structure is often the same so it's a good tool to keep in mind when an AoC problem is taking too long to solve. + +## 4. Thought process + +I've now done almost two events worth of puzzle (20 days in 2023 and the 25 in 2024). So I developed habits, some of which really helped me in the long run : + +* **Read the problem carefully** : I don't know how many times I've misread the instructions and lost a lot of time because of that. +* **Set-up tests with the provided examples** : The small example provided in each puzzle are smaller and easier to reason about. And a good proportion of the time, if you get the correct answer for these examples, you will get the correct answer for the puzzle. +* **Don't try to do part 2 before part 1** : When I was doing my first puzzles I would always try to anticipate what part 2 could be and this would often make me write more complicated code for part 1 which more often than not was more difficult to troubleshoot, even for part 2. So now I'm solving the problem for part 1, even if it seems unoptimized and not scalable. This will allow me to test my assumptions about the problem quicker and worry about optimizing it only if needed. +* **Look for help** : On day 21 and 24 part 2 I had to see what others were doing as I was really stuck. And while it's gratifying to solve the puzzle without guidance, it's not necessarily worth it staying stuck for hours (especially if you're short on time like I was). The [r/adventofcode subreddit](https://www.reddit.com/r/adventofcode/) is a really great place to ask for help or to see what others are doing. + +## Closing words + +Doing the Advent of Code was a good excuse to write some Go and learn some stuff while also having fun. I don't have that many opportunities to use Go at my current job so it was really refreshing. That's the thing about AoC, it's there, a lot of people are solving it as well, and you can use it for whatever reason such as discovering a new language, challenging yourself or just have some fun on the first few days. + +It was exhausting near the end as puzzle got harder but it was worth it. + +If you did AoC as well I hope you enjoyed it as much as I did, and if you didn't I encourage you to take a look. diff --git a/internal/blog/articles/advent-of-code-review/metadata.json b/internal/blog/articles/advent-of-code-review/metadata.json index 2e47dc4..d993782 100644 --- a/internal/blog/articles/advent-of-code-review/metadata.json +++ b/internal/blog/articles/advent-of-code-review/metadata.json @@ -1,5 +1,8 @@ { - "title": "What I learned doing Advent of Code 2024", + "titles": { + "en": "What I learned doing Advent of Code 2024", + "fr": "Ce que j'ai appris sur l'Advent of Code 2024" + }, "creation_date": "2025-01-02", "last_modified_date": "2025-01-02" } diff --git a/internal/blog/articles/advent-of-code-review/summary.md b/internal/blog/articles/advent-of-code-review/summary/en.md similarity index 100% rename from internal/blog/articles/advent-of-code-review/summary.md rename to internal/blog/articles/advent-of-code-review/summary/en.md diff --git a/internal/blog/articles/advent-of-code-review/summary/fr.md b/internal/blog/articles/advent-of-code-review/summary/fr.md new file mode 100644 index 0000000..8d7d065 --- /dev/null +++ b/internal/blog/articles/advent-of-code-review/summary/fr.md @@ -0,0 +1,3 @@ +Un résumé de mes apprentissages lors de l'Advent of Code 2024 que j'ai pu faire en go. + +Vous y trouverez comme je m'y suis préparé et quelles techniques j'ai utilisées. Ainsi que les points qui m'ont posés problème. diff --git a/internal/blog/build.go b/internal/blog/build.go index 84f6ac9..9288e3e 100644 --- a/internal/blog/build.go +++ b/internal/blog/build.go @@ -7,9 +7,8 @@ import ( "os" ) -const distDir = "export" - func BuildStaticFiles() error { + distDir := "export" ctx := context.Background() err := os.RemoveAll(distDir) if err != nil { @@ -19,94 +18,111 @@ func BuildStaticFiles() error { if err != nil { return fmt.Errorf("generating static export : %w", err) } - err = buildHome(ctx) + err = buildStatic(distDir) if err != nil { - return fmt.Errorf("building home page : %w", err) + return fmt.Errorf("building static files : %w", err) } - err = build404(ctx) + err = BuildStaticFilesForLanguage(ctx, distDir, FR) if err != nil { - return fmt.Errorf("building 404 page : %w", err) + return fmt.Errorf("generating static export for FR : %w", err) } - err = buildStatic() + err = BuildStaticFilesForLanguage(ctx, distDir, EN) if err != nil { - return fmt.Errorf("building static files : %w", err) + return fmt.Errorf("generating static export for EN : %w", err) + } + return nil +} + +func BuildStaticFilesForLanguage(ctx context.Context, dir string, lang Language) error { + langDir := dir + "/site/" + string(lang) + err := os.MkdirAll(langDir, 0o777) + if err != nil { + return fmt.Errorf("creating language folder : %w", err) + } + err = buildHome(ctx, langDir, lang) + if err != nil { + return fmt.Errorf("building home page : %w", err) + } + err = build404(ctx, langDir, lang) + if err != nil { + return fmt.Errorf("building 404 page : %w", err) } - err = buildArticlesPage(ctx) + err = buildArticlesPage(ctx, langDir, lang) if err != nil { return fmt.Errorf("building articles page : %w", err) } - err = buildArticles(ctx) + err = buildArticles(ctx, langDir, lang) if err != nil { return fmt.Errorf("building articles files : %w", err) } - err = buildPages(ctx) + err = buildPages(ctx, langDir, lang) if err != nil { return fmt.Errorf("building articles files : %w", err) } return nil } -func buildHome(ctx context.Context) error { +func buildHome(ctx context.Context, dir string, lang Language) error { const homePath = "index.html" - path := distDir + "/" + homePath + path := dir + "/" + homePath index, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return fmt.Errorf("opening file for writing : %w", err) } - err = ServeComponent(ctx, index, nil) + err = ServeComponent(ctx, index, nil, lang, path) if err != nil { return fmt.Errorf("rendering file : %w", err) } return nil } -func buildStatic() error { - return os.CopyFS(distDir, Static) +func buildStatic(dir string) error { + return os.CopyFS(dir, Static) } -func build404(ctx context.Context) error { - path := distDir + "/404.html" +func build404(ctx context.Context, dir string, lang Language) error { + path := dir + "/404.html" notFoundFile, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return fmt.Errorf("opening 404 file for writing : %w", err) } - err = ServeComponent(ctx, notFoundFile, notFound()) + err = ServeComponent(ctx, notFoundFile, notFound(lang), lang, path) if err != nil { return fmt.Errorf("rendering file : %w", err) } return nil } -func buildArticlesPage(ctx context.Context) error { +func buildArticlesPage(ctx context.Context, dir string, lang Language) error { const articlesPath = "articles.html" - path := distDir + "/" + articlesPath + path := dir + "/" + articlesPath articlesPage, err := os.OpenFile(path, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return fmt.Errorf("opening file for writing : %w", err) } - ServeArticles(ctx, articlesPage) + ServeArticles(ctx, articlesPage, lang, path) return nil } -func buildArticles(ctx context.Context) error { +func buildArticles(ctx context.Context, dir string, lang Language) error { const articlesPath = "articles" - path := distDir + "/" + articlesPath + path := dir + "/" + articlesPath err := os.MkdirAll(path, 0o777) if err != nil { return fmt.Errorf("creating articles folder : %w", err) } - articles, err := GetRecentArticles(-1) + articles, err := GetRecentArticles(-1, lang) if err != nil { return fmt.Errorf("listing articles : %w", err) } for _, article := range articles { - articlePath := distDir + "/" + articlesPath + "/" + article.Name + articlePath := dir + "/" + articlesPath + "/" + article.Name filePath := articlePath + ".html" articlePage, err := os.OpenFile(filePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return fmt.Errorf("opening file for writing article content %s : %w", article.Name, err) } - ServeArticle(ctx, articlePage, article.Name) + ServeArticle(ctx, articlePage, article.Name, lang, path) fmt.Println(filePath) // Copy images imagesPath := articlePath + "/images" @@ -126,9 +142,9 @@ func buildArticles(ctx context.Context) error { return nil } -func buildPages(ctx context.Context) error { +func buildPages(ctx context.Context, dir string, lang Language) error { const pagesPath = "pages" - path := distDir + "/" + pagesPath + path := dir + "/" + pagesPath err := os.MkdirAll(path, 0o777) if err != nil { return fmt.Errorf("creating pages folder : %w", err) @@ -138,13 +154,13 @@ func buildPages(ctx context.Context) error { return fmt.Errorf("listing pages : %w", err) } for _, page := range pages { - pagePath := distDir + "/" + pagesPath + "/" + page + pagePath := dir + "/" + pagesPath + "/" + page filePath := pagePath + ".html" pageFile, err := os.OpenFile(filePath, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o644) if err != nil { return fmt.Errorf("opening file for writing page content %s : %w", page, err) } - err = ServePage(ctx, pageFile, page) + err = ServePage(ctx, pageFile, page, lang, path) if err != nil { return fmt.Errorf("rendering page %s : %w", page, err) } diff --git a/internal/blog/home.go b/internal/blog/home.go index 03bf661..980c64d 100644 --- a/internal/blog/home.go +++ b/internal/blog/home.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "net/http" + "strings" "github.com/a-h/templ" ) @@ -13,13 +14,16 @@ import ( //go:embed static/* var Static embed.FS -func ServeComponent(ctx context.Context, w io.Writer, c templ.Component) error { - return site(c).Render(ctx, w) +func getPagePath(req *http.Request, lang Language) string { + result := strings.TrimPrefix(req.URL.Path, fmt.Sprintf("/site/%s", lang)) + return result +} + +func ServeComponent(ctx context.Context, w io.Writer, c templ.Component, lang Language, pagePath string) error { + return site(c, lang, pagePath).Render(ctx, w) } func ServeStatic(ctx context.Context, w io.Writer, path string) error { - files, _ := Static.ReadDir(".") - fmt.Println(files) file, err := Static.ReadFile(path) if err != nil { return fmt.Errorf("serving page %q : %w", path, err) @@ -32,9 +36,11 @@ func ServeStatic(ctx context.Context, w io.Writer, path string) error { } func HomeHandler(w http.ResponseWriter, req *http.Request) { - ServeComponent(req.Context(), w, home()) + lang := LanguageFromParam(req.PathValue("lang")) + ServeComponent(req.Context(), w, home(lang), lang, getPagePath(req, lang)) } func NotFoundHandler(w http.ResponseWriter, req *http.Request) { - ServeComponent(req.Context(), w, notFound()) + lang := LanguageFromParam(req.PathValue("lang")) + ServeComponent(req.Context(), w, notFound(lang), lang, getPagePath(req, lang)) } diff --git a/internal/blog/languages.go b/internal/blog/languages.go new file mode 100644 index 0000000..ac94b0d --- /dev/null +++ b/internal/blog/languages.go @@ -0,0 +1,42 @@ +package blog + +import "fmt" + +type ( + Language string +) + +const ( + FR Language = "fr" + EN Language = "en" +) + +const ( + DEFAULT_LANGUAGE = FR + INVALID = "TRANSLATION NOT FOUND" +) + +func AbsolutePathWithLanguage(URL string, lang Language) string { + return fmt.Sprintf("/%s/%s", lang, URL) +} + +func LanguageFromParam(param string) Language { + if param == "" { + return DEFAULT_LANGUAGE + } + return Language(param) +} + +type Text map[Language]string + +func (t Text) Render(lang Language) string { + result, exists := t[lang] + if !exists { + defaultResult, defaultExists := t[DEFAULT_LANGUAGE] + if !defaultExists { + return INVALID + } + return defaultResult + } + return result +} diff --git a/internal/blog/not_found.templ b/internal/blog/not_found.templ index cf39176..70700d3 100644 --- a/internal/blog/not_found.templ +++ b/internal/blog/not_found.templ @@ -1,6 +1,6 @@ package blog -templ notFound() { +templ notFound(lang Language) {

Oops! The page you're looking for doesn't exist.

-

Return to the home page or check out the articles section.

+

Return to the home page or check out the articles section.

} diff --git a/internal/blog/not_found_templ.go b/internal/blog/not_found_templ.go index 8bfe5a9..f6c7374 100644 --- a/internal/blog/not_found_templ.go +++ b/internal/blog/not_found_templ.go @@ -8,7 +8,7 @@ package blog import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -func notFound() templ.Component { +func notFound(lang Language) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -29,7 +29,25 @@ func notFound() templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Oops! The page you're looking for doesn't exist.

Return to the home page or check out the articles section.

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Oops! The page you're looking for doesn't exist.

Return to the home page or check out the articles section.

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/blog/pages.go b/internal/blog/pages.go index 3564d9e..a8fde16 100644 --- a/internal/blog/pages.go +++ b/internal/blog/pages.go @@ -31,15 +31,14 @@ func GetPages() ([]string, error) { return result, nil } -func ServePage(ctx context.Context, w io.Writer, page string) error { - const contentFileName = "content.md" - pageContent, err := pageFiles.ReadFile(pagesPath + "/" + page + "/" + contentFileName) +func ServePage(ctx context.Context, w io.Writer, page string, lang Language, pagePath string) error { + pageContent, err := pageFiles.ReadFile(pagesPath + "/" + page + "/" + string(lang) + ".md") if err != nil { return fmt.Errorf("serving page %q : %w", page, err) } pageContent = mdToHTML(pageContent) component := article(string(pageContent)) - err = site(component).Render(ctx, w) + err = site(component, lang, pagePath).Render(ctx, w) if err != nil { return fmt.Errorf("rendering page %q : %w", page, err) } @@ -48,7 +47,8 @@ func ServePage(ctx context.Context, w io.Writer, page string) error { func PageHandler(w http.ResponseWriter, req *http.Request) { page := req.PathValue("page") - err := ServePage(req.Context(), w, page) + lang := LanguageFromParam(req.PathValue("lang")) + err := ServePage(req.Context(), w, page, lang, getPagePath(req, lang)) if err != nil { if errors.Is(err, os.ErrNotExist) { w.WriteHeader(http.StatusNotFound) diff --git a/internal/blog/pages/about-me/content.md b/internal/blog/pages/about-me/en.md similarity index 100% rename from internal/blog/pages/about-me/content.md rename to internal/blog/pages/about-me/en.md diff --git a/internal/blog/pages/about-me/fr.md b/internal/blog/pages/about-me/fr.md new file mode 100644 index 0000000..bda7ab8 --- /dev/null +++ b/internal/blog/pages/about-me/fr.md @@ -0,0 +1,14 @@ +# Qui suis-je ? + +Bonjour, + +Je suis un ingénieur Cloud de 30 ans avec une passion pour la tech avec plus de 7 années d'expérience dans le domaine. +J'habite dans le nord de la France, où j'ai grandi. + +Mon travail principal c'est de gérer l'infrastructure cloud, des pipelines CI/CD, et de manière générale aider les développeurs à mettre en ligne leurs services en créant et en mettant en place de l'outillage interne. + +## My favourite tools + +* **Langages de programmation** : Golang/Rust/Python +* **Infrastructure** : Terraform with Terragrunt and Atlantis +* **Déploiement d'applications** : Kubernetes/Helm/ArgoCD diff --git a/internal/blog/site.templ b/internal/blog/site.templ index 4060e6d..d0bfb96 100644 --- a/internal/blog/site.templ +++ b/internal/blog/site.templ @@ -1,34 +1,90 @@ package blog +import "fmt" +import "strings" -templ site(view templ.Component) { +func pathURL(lang Language, currentURL string) templ.SafeURL { + url := fmt.Sprintf("/site/%s/%s",lang,currentURL) + url = strings.TrimRight(url, "/") + return templ.SafeURL(url) +} + +templ site(view templ.Component, lang Language, currentURL string) { + {{ + title := Text{ + FR: "DevOps avec Dhawos", + EN: "DevOps with Dhawos", + } + subTitle := Text{ + FR: "Cloud, infrastructure et programmation", + EN: "Cloud, infrastructure and programming", + } + homePageName := Text{ + FR: "Accueil", + EN: "Home", + } + articlePageName := Text{ + FR: "Articles", + EN: "Articles", + } + aboutPageName := Text{ + FR: "À propos", + EN: "About", + } + }} - + - DevOps with Dhawos + {title.Render(lang)} -
-

DevOps with Dhawos

-

Cloud, infrastructure and programming

+
+
+
+
+

{title.Render(lang)}

+

{subTitle.Render(lang)}

+
+
if view != nil { @view } else { - @home() + @home(lang) }
@@ -43,29 +99,41 @@ templ site(view templ.Component) { } -templ home() { +templ home(lang Language) { + {{ + title := Text{ + FR: "Bienvenue sur mon Blog", + EN: "Welcome to my Blog", + } + intro := Text{ + FR: "Ici vou trouverez des articles, des tutoriels sur les sujets liés au DevOps, à la programmation et à la culture tech en général", + EN: "Here you'll find articles and tutorials on all things DevOps, programming, and tech culture.", + } + recentArticles := Text{ + FR: "Articles récents", + EN: "Recent articles", + } + }}
-

Welcome to my Blog

-

- Here you'll find articles and tutorials on all things DevOps, programming, and tech culture. -

+

{title.Render(lang)}

+

{intro.Render(lang)}

- {{ articles, err := GetRecentArticles(10)}} + {{ articles, err := GetRecentArticles(10, lang)}} if err == nil { -

Recent Articles

- @articleList(articles) +

{recentArticles.Render(lang)}

+ @articleList(articles,lang) }
} -templ articleList(articles []Article) { +templ articleList(articles []Article, lang Language) {
    for _, article := range articles {
  1. - { article.Metadata.Title } + { article.Metadata.TitleInLanguage(lang) }

    @templ.Raw(article.Summary) diff --git a/internal/blog/site_templ.go b/internal/blog/site_templ.go index 301c091..27e35cd 100644 --- a/internal/blog/site_templ.go +++ b/internal/blog/site_templ.go @@ -8,7 +8,16 @@ package blog import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -func site(view templ.Component) templ.Component { +import "fmt" +import "strings" + +func pathURL(lang Language, currentURL string) templ.SafeURL { + url := fmt.Sprintf("/site/%s/%s", lang, currentURL) + url = strings.TrimRight(url, "/") + return templ.SafeURL(url) +} + +func site(view templ.Component, lang Language, currentURL string) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -29,7 +38,164 @@ func site(view templ.Component) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("DevOps with Dhawos

    DevOps with Dhawos

    Cloud, infrastructure and programming

    ") + + title := Text{ + FR: "DevOps avec Dhawos", + EN: "DevOps with Dhawos", + } + subTitle := Text{ + FR: "Cloud, infrastructure et programmation", + EN: "Cloud, infrastructure and programming", + } + homePageName := Text{ + FR: "Accueil", + EN: "Home", + } + articlePageName := Text{ + FR: "Articles", + EN: "Articles", + } + aboutPageName := Text{ + FR: "À propos", + EN: "About", + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title.Render(lang)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 40, Col: 32} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var4 string + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title.Render(lang)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 50, Col: 62} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var5 string + templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(subTitle.Render(lang)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 51, Col: 65} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -39,7 +205,7 @@ func site(view templ.Component) templ.Component { return templ_7745c5c3_Err } } else { - templ_7745c5c3_Err = home().Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = home(lang).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -52,7 +218,7 @@ func site(view templ.Component) templ.Component { }) } -func home() templ.Component { +func home(lang Language) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -68,22 +234,74 @@ func home() templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent + templ_7745c5c3_Var14 := templ.GetChildren(ctx) + if templ_7745c5c3_Var14 == nil { + templ_7745c5c3_Var14 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    Welcome to my Blog

    Here you'll find articles and tutorials on all things DevOps, programming, and tech culture.

    ") + + title := Text{ + FR: "Bienvenue sur mon Blog", + EN: "Welcome to my Blog", + } + intro := Text{ + FR: "Ici vou trouverez des articles, des tutoriels sur les sujets liés au DevOps, à la programmation et à la culture tech en général", + EN: "Here you'll find articles and tutorials on all things DevOps, programming, and tech culture.", + } + recentArticles := Text{ + FR: "Articles récents", + EN: "Recent articles", + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var15 string + templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(title.Render(lang)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 118, Col: 74} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var16 string + templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(intro.Render(lang)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 119, Col: 40} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - articles, err := GetRecentArticles(10) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + articles, err := GetRecentArticles(10, lang) if err == nil { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    Recent Articles

    ") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var17 string + templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(recentArticles.Render(lang)) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 124, Col: 85} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

    ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = articleList(articles).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = articleList(articles, lang).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -96,7 +314,7 @@ func home() templ.Component { }) } -func articleList(articles []Article) templ.Component { +func articleList(articles []Article, lang Language) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -112,9 +330,9 @@ func articleList(articles []Article) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var3 := templ.GetChildren(ctx) - if templ_7745c5c3_Var3 == nil { - templ_7745c5c3_Var3 = templ.NopComponent + templ_7745c5c3_Var18 := templ.GetChildren(ctx) + if templ_7745c5c3_Var18 == nil { + templ_7745c5c3_Var18 = templ.NopComponent } ctx = templ.ClearChildren(ctx) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
      ") @@ -126,8 +344,8 @@ func articleList(articles []Article) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var4 templ.SafeURL = templ.URL(article.Link) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var4))) + var templ_7745c5c3_Var19 templ.SafeURL = templ.URL(article.Link) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var19))) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -135,12 +353,12 @@ func articleList(articles []Article) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var5 string - templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(article.Metadata.Title) + var templ_7745c5c3_Var20 string + templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(article.Metadata.TitleInLanguage(lang)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 68, Col: 109} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/blog/site.templ`, Line: 136, Col: 125} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/internal/blog/static/css/input.css b/internal/blog/static/css/input.css index b5c61c9..567b4a4 100644 --- a/internal/blog/static/css/input.css +++ b/internal/blog/static/css/input.css @@ -1,3 +1,27 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import 'tailwindcss'; + +@theme { + --color-*: initial; + --color-secondary: #282c34; + --color-secondary-content: #61dafb; + --color-background: #f4f4f4; + --color-white: #fff; +} + +/* + The default border color has changed to `currentColor` in Tailwind CSS v4, + so we've added these compatibility styles to make sure everything still + looks the same as it did with Tailwind CSS v3. + + If we ever want to remove these styles, we need to add an explicit border + color utility to any element that depends on these defaults. +*/ +@layer base { + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + border-color: var(--color-gray-200, currentColor); + } +} diff --git a/internal/blog/static/css/output.css b/internal/blog/static/css/output.css index 805a03f..44ce388 100644 --- a/internal/blog/static/css/output.css +++ b/internal/blog/static/css/output.css @@ -1,707 +1,811 @@ -*, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; -} - -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; -} - -/* -! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com -*/ - -/* -1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) -2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) -*/ - -*, -::before, -::after { - box-sizing: border-box; - /* 1 */ - border-width: 0; - /* 2 */ - border-style: solid; - /* 2 */ - border-color: currentColor; - /* 2 */ -} - -::before, -::after { - --tw-content: ''; -} - -/* -1. Use a consistent sensible line-height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -3. Use a more readable tab size. -4. Use the user's configured `sans` font-family by default. -5. Use the user's configured `sans` font-feature-settings by default. -6. Use the user's configured `sans` font-variation-settings by default. -7. Disable tap highlights on iOS -*/ - -html, -:host { - line-height: 1.5; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ - -moz-tab-size: 4; - /* 3 */ - -o-tab-size: 4; - tab-size: 4; - /* 3 */ - font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - /* 4 */ - font-feature-settings: normal; - /* 5 */ - font-variation-settings: normal; - /* 6 */ - -webkit-tap-highlight-color: transparent; - /* 7 */ -} - -/* -1. Remove the margin in all browsers. -2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. -*/ - -body { - margin: 0; - /* 1 */ - line-height: inherit; - /* 2 */ -} - -/* -1. Add the correct height in Firefox. -2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) -3. Ensure horizontal rules are visible by default. -*/ - -hr { - height: 0; - /* 1 */ - color: inherit; - /* 2 */ - border-top-width: 1px; - /* 3 */ -} - -/* -Add the correct text decoration in Chrome, Edge, and Safari. -*/ - -abbr:where([title]) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} - -/* -Remove the default font size and weight for headings. -*/ - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} - -/* -Reset links to optimize for opt-in styling instead of opt-out. -*/ - -a { - color: inherit; - text-decoration: inherit; -} - -/* -Add the correct font weight in Edge and Safari. -*/ - -b, -strong { - font-weight: bolder; -} - -/* -1. Use the user's configured `mono` font-family by default. -2. Use the user's configured `mono` font-feature-settings by default. -3. Use the user's configured `mono` font-variation-settings by default. -4. Correct the odd `em` font sizing in all browsers. -*/ - -code, -kbd, -samp, -pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - /* 1 */ - font-feature-settings: normal; - /* 2 */ - font-variation-settings: normal; - /* 3 */ - font-size: 1em; - /* 4 */ -} - -/* -Add the correct font size in all browsers. -*/ - -small { - font-size: 80%; -} - -/* -Prevent `sub` and `sup` elements from affecting the line height in all browsers. -*/ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* -1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) -3. Remove gaps between table borders by default. -*/ - -table { - text-indent: 0; - /* 1 */ - border-color: inherit; - /* 2 */ - border-collapse: collapse; - /* 3 */ -} - -/* -1. Change the font styles in all browsers. -2. Remove the margin in Firefox and Safari. -3. Remove default padding in all browsers. -*/ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-feature-settings: inherit; - /* 1 */ - font-variation-settings: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - font-weight: inherit; - /* 1 */ - line-height: inherit; - /* 1 */ - letter-spacing: inherit; - /* 1 */ - color: inherit; - /* 1 */ - margin: 0; - /* 2 */ - padding: 0; - /* 3 */ -} - -/* -Remove the inheritance of text transform in Edge and Firefox. -*/ - -button, -select { - text-transform: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Remove default button styles. -*/ - -button, -input:where([type='button']), -input:where([type='reset']), -input:where([type='submit']) { - -webkit-appearance: button; - /* 1 */ - background-color: transparent; - /* 2 */ - background-image: none; - /* 2 */ -} - -/* -Use the modern Firefox focus style for all focusable elements. -*/ - -:-moz-focusring { - outline: auto; -} - -/* -Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) -*/ - -:-moz-ui-invalid { - box-shadow: none; -} - -/* -Add the correct vertical alignment in Chrome and Firefox. -*/ - -progress { - vertical-align: baseline; -} - -/* -Correct the cursor style of increment and decrement buttons in Safari. -*/ - -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} - -/* -1. Correct the odd appearance in Chrome and Safari. -2. Correct the outline style in Safari. -*/ - -[type='search'] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/* -Remove the inner padding in Chrome and Safari on macOS. -*/ - -::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Change font properties to `inherit` in Safari. -*/ - -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* -Add the correct display in Chrome and Safari. -*/ - -summary { - display: list-item; -} - -/* -Removes the default spacing and border for appropriate elements. -*/ - -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} - -fieldset { - margin: 0; - padding: 0; -} - -legend { - padding: 0; -} - -ol, -ul, -menu { - list-style: none; - margin: 0; - padding: 0; -} - -/* -Reset default styling for dialogs. -*/ - -dialog { - padding: 0; -} - -/* -Prevent resizing textareas horizontally by default. -*/ - -textarea { - resize: vertical; -} - -/* -1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) -2. Set the default placeholder color to the user's configured gray 400 color. -*/ - -input::-moz-placeholder, textarea::-moz-placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -input::placeholder, -textarea::placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -/* -Set the default cursor for buttons. -*/ - -button, -[role="button"] { - cursor: pointer; -} - -/* -Make sure disabled buttons don't get the pointer cursor. -*/ - -:disabled { - cursor: default; -} - -/* -1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) -2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) - This can trigger a poorly considered lint error in some tools but is included by design. -*/ - -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; - /* 1 */ - vertical-align: middle; - /* 2 */ -} - -/* -Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) -*/ - -img, -video { - max-width: 100%; - height: auto; -} - -/* Make elements with the HTML hidden attribute stay hidden by default */ - -[hidden]:where(:not([hidden="until-found"])) { - display: none; -} - -.m-4 { - margin: 1rem; -} - -.mx-auto { - margin-left: auto; - margin-right: auto; -} - -.my-10 { - margin-top: 2.5rem; - margin-bottom: 2.5rem; -} - -.my-4 { - margin-top: 1rem; - margin-bottom: 1rem; -} - -.flex { - display: flex; -} - -.h-screen { - height: 100vh; -} - -.w-full { - width: 100%; -} - -.max-w-5xl { - max-width: 64rem; -} - -.flex-1 { - flex: 1 1 0%; -} - -.flex-none { - flex: none; -} - -.flex-col { - flex-direction: column; -} - -.items-center { - align-items: center; -} - -.justify-center { - justify-content: center; -} - -.gap-x-14 { - -moz-column-gap: 3.5rem; - column-gap: 3.5rem; -} - -.rounded-lg { - border-radius: 0.5rem; -} - -.bg-background { - --tw-bg-opacity: 1; - background-color: rgb(244 244 244 / var(--tw-bg-opacity, 1)); -} - -.bg-secondary { - --tw-bg-opacity: 1; - background-color: rgb(40 44 52 / var(--tw-bg-opacity, 1)); -} - -.bg-secondary-content { - --tw-bg-opacity: 1; - background-color: rgb(97 218 251 / var(--tw-bg-opacity, 1)); -} - -.bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); -} - -.p-10 { - padding: 2.5rem; -} - -.p-2 { - padding: 0.5rem; -} - -.p-5 { - padding: 1.25rem; -} - -.text-center { - text-align: center; -} - -.font-mono { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; -} - -.font-sans { - font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; -} - -.text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} - -.text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; -} - -.text-base { - font-size: 1rem; - line-height: 1.5rem; -} - -.text-xl { - font-size: 1.25rem; - line-height: 1.75rem; -} - -.font-bold { - font-weight: 700; -} - -.text-secondary-content { - --tw-text-opacity: 1; - color: rgb(97 218 251 / var(--tw-text-opacity, 1)); -} - -.text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)); -} - -.underline { - text-decoration-line: underline; -} - -.shadow-md { - --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +/*! tailwindcss v4.0.1 | MIT License | https://tailwindcss.com */ +@layer theme, base, components, utilities; +@layer theme { + :root, :host { + --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + "Liberation Mono", "Courier New", monospace; + --spacing: 0.25rem; + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-6xl: 3.75rem; + --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --text-8xl: 6rem; + --text-8xl--line-height: 1; + --text-9xl: 8rem; + --text-9xl--line-height: 1; + --font-weight-thin: 100; + --font-weight-extralight: 200; + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --font-weight-black: 900; + --tracking-tighter: -0.05em; + --tracking-tight: -0.025em; + --tracking-normal: 0em; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + --leading-tight: 1.25; + --leading-snug: 1.375; + --leading-normal: 1.5; + --leading-relaxed: 1.625; + --leading-loose: 2; + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + --shadow-2xs: 0 1px rgb(0 0 0 / 0.05); + --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), + 0 2px 4px -2px rgb(0 0 0 / 0.1); + --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), + 0 4px 6px -4px rgb(0 0 0 / 0.1); + --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), + 0 8px 10px -6px rgb(0 0 0 / 0.1); + --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); + --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05); + --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05); + --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05); + --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05); + --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15); + --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12); + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1); + --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15); + --ease-in: cubic-bezier(0.4, 0, 1, 1); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + --animate-spin: spin 1s linear infinite; + --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + --blur-xs: 4px; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --blur-xl: 24px; + --blur-2xl: 40px; + --blur-3xl: 64px; + --perspective-dramatic: 100px; + --perspective-near: 300px; + --perspective-normal: 500px; + --perspective-midrange: 800px; + --perspective-distant: 1200px; + --aspect-video: 16 / 9; + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: var(--font-sans); + --default-font-feature-settings: var(--font-sans--font-feature-settings); + --default-font-variation-settings: var( + --font-sans--font-variation-settings + ); + --default-mono-font-family: var(--font-mono); + --default-mono-font-feature-settings: var( + --font-mono--font-feature-settings + ); + --default-mono-font-variation-settings: var( + --font-mono--font-variation-settings + ); + --color-secondary: #282c34; + --color-secondary-content: #61dafb; + --color-background: #f4f4f4; + --color-white: #fff; + } +} +@layer base { + *, ::after, ::before, ::backdrop, ::file-selector-button { + box-sizing: border-box; + margin: 0; + padding: 0; + border: 0 solid; + } + html, :host { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + tab-size: 4; + font-family: var( --default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" ); + font-feature-settings: var(--default-font-feature-settings, normal); + font-variation-settings: var( --default-font-variation-settings, normal ); + -webkit-tap-highlight-color: transparent; + } + body { + line-height: inherit; + } + hr { + height: 0; + color: inherit; + border-top-width: 1px; + } + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + h1, h2, h3, h4, h5, h6 { + font-size: inherit; + font-weight: inherit; + } + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + b, strong { + font-weight: bolder; + } + code, kbd, samp, pre { + font-family: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace ); + font-feature-settings: var( --default-mono-font-feature-settings, normal ); + font-variation-settings: var( --default-mono-font-variation-settings, normal ); + font-size: 1em; + } + small { + font-size: 80%; + } + sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + sub { + bottom: -0.25em; + } + sup { + top: -0.5em; + } + table { + text-indent: 0; + border-color: inherit; + border-collapse: collapse; + } + :-moz-focusring { + outline: auto; + } + progress { + vertical-align: baseline; + } + summary { + display: list-item; + } + ol, ul, menu { + list-style: none; + } + img, svg, video, canvas, audio, iframe, embed, object { + display: block; + vertical-align: middle; + } + img, video { + max-width: 100%; + height: auto; + } + button, input, select, optgroup, textarea, ::file-selector-button { + font: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + letter-spacing: inherit; + color: inherit; + border-radius: 0; + background-color: transparent; + opacity: 1; + } + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + ::file-selector-button { + margin-inline-end: 4px; + } + ::placeholder { + opacity: 1; + color: color-mix(in oklab, currentColor 50%, transparent); + } + textarea { + resize: vertical; + } + ::-webkit-search-decoration { + -webkit-appearance: none; + } + ::-webkit-date-and-time-value { + min-height: 1lh; + text-align: inherit; + } + ::-webkit-datetime-edit { + display: inline-flex; + } + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + :-moz-ui-invalid { + box-shadow: none; + } + button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button { + appearance: button; + } + ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { + height: auto; + } + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } +} +@layer utilities { + .\@container { + container-type: inline-size; + } + .collapse { + visibility: collapse; + } + .visible { + visibility: visible; + } + .absolute { + position: absolute; + } + .fixed { + position: fixed; + } + .relative { + position: relative; + } + .static { + position: static; + } + .sticky { + position: sticky; + } + .isolate { + isolation: isolate; + } + .container { + width: 100%; + @media (width >= 40rem) { + max-width: 40rem; + } + @media (width >= 48rem) { + max-width: 48rem; + } + @media (width >= 64rem) { + max-width: 64rem; + } + @media (width >= 80rem) { + max-width: 80rem; + } + @media (width >= 96rem) { + max-width: 96rem; + } + } + .m-4 { + margin: calc(var(--spacing) * 4); + } + .mx-2 { + margin-inline: calc(var(--spacing) * 2); + } + .mx-4 { + margin-inline: calc(var(--spacing) * 4); + } + .mx-auto { + margin-inline: auto; + } + .my-4 { + margin-block: calc(var(--spacing) * 4); + } + .my-10 { + margin-block: calc(var(--spacing) * 10); + } + .block { + display: block; + } + .contents { + display: contents; + } + .flex { + display: flex; + } + .flow-root { + display: flow-root; + } + .grid { + display: grid; + } + .hidden { + display: none; + } + .inline { + display: inline; + } + .table { + display: table; + } + .table-caption { + display: table-caption; + } + .table-cell { + display: table-cell; + } + .table-column { + display: table-column; + } + .table-column-group { + display: table-column-group; + } + .table-footer-group { + display: table-footer-group; + } + .table-header-group { + display: table-header-group; + } + .table-row { + display: table-row; + } + .table-row-group { + display: table-row-group; + } + .h-30 { + height: calc(var(--spacing) * 30); + } + .h-screen { + height: 100vh; + } + .w-12 { + width: calc(var(--spacing) * 12); + } + .w-full { + width: 100%; + } + .max-w-5xl { + max-width: var(--container-5xl); + } + .flex-1 { + flex: 1; + } + .flex-none { + flex: none; + } + .flex-shrink { + flex-shrink: 1; + } + .shrink { + flex-shrink: 1; + } + .flex-grow { + flex-grow: 1; + } + .grow { + flex-grow: 1; + } + .transform { + transform: var(--tw-rotate-x) var(--tw-rotate-y) var(--tw-rotate-z) var(--tw-skew-x) var(--tw-skew-y); + } + .resize { + resize: both; + } + .flex-col { + flex-direction: column; + } + .flex-wrap { + flex-wrap: wrap; + } + .items-center { + align-items: center; + } + .justify-between { + justify-content: space-between; + } + .justify-center { + justify-content: center; + } + .gap-x-14 { + column-gap: calc(var(--spacing) * 14); + } + .self-end { + align-self: flex-end; + } + .self-start { + align-self: flex-start; + } + .rounded { + border-radius: 0.25rem; + } + .rounded-lg { + border-radius: var(--radius-lg); + } + .border { + border-style: var(--tw-border-style); + border-width: 1px; + } + .bg-background { + background-color: var(--color-background); + } + .bg-secondary { + background-color: var(--color-secondary); + } + .bg-secondary-content { + background-color: var(--color-secondary-content); + } + .bg-white { + background-color: var(--color-white); + } + .p-2 { + padding: calc(var(--spacing) * 2); + } + .p-5 { + padding: calc(var(--spacing) * 5); + } + .p-10 { + padding: calc(var(--spacing) * 10); + } + .text-center { + text-align: center; + } + .text-justify { + text-align: justify; + } + .font-mono { + font-family: var(--font-mono); + } + .font-sans { + font-family: var(--font-sans); + } + .text-3xl { + font-size: var(--text-3xl); + line-height: var(--tw-leading, var(--text-3xl--line-height)); + } + .text-4xl { + font-size: var(--text-4xl); + line-height: var(--tw-leading, var(--text-4xl--line-height)); + } + .text-base { + font-size: var(--text-base); + line-height: var(--tw-leading, var(--text-base--line-height)); + } + .text-xl { + font-size: var(--text-xl); + line-height: var(--tw-leading, var(--text-xl--line-height)); + } + .font-bold { + --tw-font-weight: var(--font-weight-bold); + font-weight: var(--font-weight-bold); + } + .break-all { + word-break: break-all; + } + .text-secondary-content { + color: var(--color-secondary-content); + } + .text-white { + color: var(--color-white); + } + .capitalize { + text-transform: capitalize; + } + .lowercase { + text-transform: lowercase; + } + .uppercase { + text-transform: uppercase; + } + .italic { + font-style: italic; + } + .line-through { + text-decoration-line: line-through; + } + .overline { + text-decoration-line: overline; + } + .underline { + text-decoration-line: underline; + } + .shadow { + --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-md { + --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .outline { + outline-style: var(--tw-outline-style); + outline-width: 1px; + } + .blur { + --tw-blur: blur(8px); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .drop-shadow { + --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow( 0 1px 1px rgb(0 0 0 / 0.06)); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .grayscale { + --tw-grayscale: grayscale(100%); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .invert { + --tw-invert: invert(100%); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .sepia { + --tw-sepia: sepia(100%); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .filter { + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .backdrop-filter { + -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + } + .transition { + transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .ease-in { + --tw-ease: var(--ease-in); + transition-timing-function: var(--ease-in); + } + .ease-in-out { + --tw-ease: var(--ease-in-out); + transition-timing-function: var(--ease-in-out); + } + .ease-out { + --tw-ease: var(--ease-out); + transition-timing-function: var(--ease-out); + } + .\[keywords\:node-addon-api\] { + keywords: node-addon-api; + } +} +@layer base { + *, ::after, ::before, ::backdrop, ::file-selector-button { + border-color: var(--color-gray-200, currentColor); + } +} +@keyframes spin { + to { + transform: rotate(360deg); + } +} +@keyframes ping { + 75%, 100% { + transform: scale(2); + opacity: 0; + } +} +@keyframes pulse { + 50% { + opacity: 0.5; + } +} +@keyframes bounce { + 0%, 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + 50% { + transform: none; + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } +} +@property --tw-rotate-x { + syntax: "*"; + inherits: false; + initial-value: rotateX(0); +} +@property --tw-rotate-y { + syntax: "*"; + inherits: false; + initial-value: rotateY(0); +} +@property --tw-rotate-z { + syntax: "*"; + inherits: false; + initial-value: rotateZ(0); +} +@property --tw-skew-x { + syntax: "*"; + inherits: false; + initial-value: skewX(0); +} +@property --tw-skew-y { + syntax: "*"; + inherits: false; + initial-value: skewY(0); +} +@property --tw-border-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-font-weight { + syntax: "*"; + inherits: false; +} +@property --tw-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-ring-inset { + syntax: "*"; + inherits: false; +} +@property --tw-ring-offset-width { + syntax: ""; + inherits: false; + initial-value: 0px; +} +@property --tw-ring-offset-color { + syntax: "*"; + inherits: false; + initial-value: #fff; +} +@property --tw-ring-offset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-outline-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-blur { + syntax: "*"; + inherits: false; +} +@property --tw-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-invert { + syntax: "*"; + inherits: false; +} +@property --tw-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-blur { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-invert { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-ease { + syntax: "*"; + inherits: false; } diff --git a/main.go b/main.go index fbc7058..6644ebf 100644 --- a/main.go +++ b/main.go @@ -8,11 +8,15 @@ import ( ) func main() { - http.HandleFunc("/{$}", blog.HomeHandler) http.Handle("/static/", http.StripPrefix("/", http.FileServerFS(blog.Static))) - http.HandleFunc("/articles/{article}", blog.ArticleHandler) - http.HandleFunc("/articles/{article}/images/{image}", blog.ArticleImageHandler) - http.HandleFunc("/pages/{page}", blog.PageHandler) + + http.HandleFunc("/site/{lang}", blog.HomeHandler) + + http.HandleFunc("/site/{lang}/articles/{article}", blog.ArticleHandler) + http.HandleFunc("/site/{lang}/articles", blog.ArticlesHandler) + http.HandleFunc("/site/{lang}/articles/{article}/images/{image}", blog.ArticleImageHandler) + http.HandleFunc("/site/{lang}/pages/{page}", blog.PageHandler) + http.HandleFunc("/", blog.NotFoundHandler) log.Println("server starting on port 9000") diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a046e5b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,931 @@ +{ + "name": "personal-site", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@tailwindcss/cli": "^4.0.1", + "tailwindcss": "^4.0.1" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@tailwindcss/cli": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.0.1.tgz", + "integrity": "sha512-UuF9NNMdPAO3rSrTey33m6Qw0tX86t5Z+boxEqot8OBwqC8214ByV0/9ib0Y/ojzuZFWaeFldmvSEJsudNYvSg==", + "license": "MIT", + "dependencies": { + "@parcel/watcher": "^2.5.0", + "@tailwindcss/node": "^4.0.1", + "@tailwindcss/oxide": "^4.0.1", + "enhanced-resolve": "^5.18.0", + "lightningcss": "^1.29.1", + "mri": "^1.2.0", + "picocolors": "^1.1.1", + "tailwindcss": "4.0.1" + }, + "bin": { + "tailwindcss": "dist/index.mjs" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.0.1.tgz", + "integrity": "sha512-lc+ly6PKHqgCVl7eO8D2JlV96Lks5bmL6pdtM6UasyUHLU2zmrOqU6jfgln120IVnCh3VC8GG/ca24xVTtSokw==", + "license": "MIT", + "dependencies": { + "enhanced-resolve": "^5.18.0", + "jiti": "^2.4.2", + "tailwindcss": "4.0.1" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.0.1.tgz", + "integrity": "sha512-3z1SpWoDeaA6K6jd92CRrGyDghOcRILEgyWVHRhaUm/tcpiazwJpU9BSG0xB7GGGnl9capojaC+zme/nKsZd/w==", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.0.1", + "@tailwindcss/oxide-darwin-arm64": "4.0.1", + "@tailwindcss/oxide-darwin-x64": "4.0.1", + "@tailwindcss/oxide-freebsd-x64": "4.0.1", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.1", + "@tailwindcss/oxide-linux-arm64-gnu": "4.0.1", + "@tailwindcss/oxide-linux-arm64-musl": "4.0.1", + "@tailwindcss/oxide-linux-x64-gnu": "4.0.1", + "@tailwindcss/oxide-linux-x64-musl": "4.0.1", + "@tailwindcss/oxide-win32-arm64-msvc": "4.0.1", + "@tailwindcss/oxide-win32-x64-msvc": "4.0.1" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.0.1.tgz", + "integrity": "sha512-eP/rI9WaAElpeiiHDqGtDqga9iDsOClXxIqdHayHsw93F24F03b60CwgGhrGF9Io/EuWIpz3TMRhPVOLhoXivw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.0.1.tgz", + "integrity": "sha512-jZVUo0kNd1IjxdCYwg4dwegDNsq7PoUx4LM814RmgY3gfJ63Y6GlpJXHOpd5FLv1igpeZox5LzRk2oz8MQoJwQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.0.1.tgz", + "integrity": "sha512-E31wHiIf4LB0aKRohrS4U6XfFSACCL9ifUFfPQ16FhcBIL4wU5rcBidvWvT9TQFGPkpE69n5dyXUcqiMrnF/Ig==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.0.1.tgz", + "integrity": "sha512-8/3ZKLMYqgAsBzTeczOKWtT4geF02g9S7cntY5gvqQZ4E0ImX724cHcZJi9k6fkE6aLbvwxxHxaShFvRxblwKQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.0.1.tgz", + "integrity": "sha512-EYjbh225klQfWzy6LeIAfdjHCK+p71yLV/GjdPNW47Bfkkq05fTzIhHhCgshUvNp78EIA33iQU+ktWpW06NgHw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.0.1.tgz", + "integrity": "sha512-PrX2SwIqWNP5cYeSyQfrhbk4ffOM338T6CrEwIAGvLPoUZiklt19yknlsBme6bReSw7TSAMy+8KFdLLi5fcWNQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.0.1.tgz", + "integrity": "sha512-iuoFGhKDojtfloi5uj6MIk4kxEOGcsAk/kPbZItF9Dp7TnzVhxo2U/718tXhxGrg6jSL3ST3cQHIjA6yw3OeXw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.0.1.tgz", + "integrity": "sha512-pNUrGQYyE8RK+N9yvkPmHnlKDfFbni9A3lsi37u4RoA/6Yn+zWVoegvAQMZu3w+jqnpb2A/bYJ+LumcclUZ3yg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.1.tgz", + "integrity": "sha512-xSGWaDcT6SJ75su9zWXj8GYb2jM/przXwZGH96RTS7HGDIoI1tvgpls88YajG5Sx7hXaqAWCufjw5L/dlu+lzg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.0.1.tgz", + "integrity": "sha512-BUNL2isUZ2yWnbplPddggJpZxsqGHPZ1RJAYpu63W4znUnKCzI4m/jiy0WpyYqqOKL9jDM5q0QdsQ9mc3aw5YQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.0.1.tgz", + "integrity": "sha512-ZtcVu+XXOddGsPlvO5nh2fnbKmwly2C07ZB1lcYCf/b8qIWF04QY9o6vy6/+6ioLRfbp3E7H/ipFio38DZX4oQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz", + "integrity": "sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/lightningcss": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.1.tgz", + "integrity": "sha512-FmGoeD4S05ewj+AkhTY+D+myDvXI6eL27FjHIjoyUkO/uw7WZD1fBVs0QxeYWa7E17CUHJaYX/RUGISCtcrG4Q==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^1.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.29.1", + "lightningcss-darwin-x64": "1.29.1", + "lightningcss-freebsd-x64": "1.29.1", + "lightningcss-linux-arm-gnueabihf": "1.29.1", + "lightningcss-linux-arm64-gnu": "1.29.1", + "lightningcss-linux-arm64-musl": "1.29.1", + "lightningcss-linux-x64-gnu": "1.29.1", + "lightningcss-linux-x64-musl": "1.29.1", + "lightningcss-win32-arm64-msvc": "1.29.1", + "lightningcss-win32-x64-msvc": "1.29.1" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.29.1.tgz", + "integrity": "sha512-HtR5XJ5A0lvCqYAoSv2QdZZyoHNttBpa5EP9aNuzBQeKGfbyH5+UipLWvVzpP4Uml5ej4BYs5I9Lco9u1fECqw==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.29.1.tgz", + "integrity": "sha512-k33G9IzKUpHy/J/3+9MCO4e+PzaFblsgBjSGlpAaFikeBFm8B/CkO3cKU9oI4g+fjS2KlkLM/Bza9K/aw8wsNA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.29.1.tgz", + "integrity": "sha512-0SUW22fv/8kln2LnIdOCmSuXnxgxVC276W5KLTwoehiO0hxkacBxjHOL5EtHD8BAXg2BvuhsJPmVMasvby3LiQ==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.29.1.tgz", + "integrity": "sha512-sD32pFvlR0kDlqsOZmYqH/68SqUMPNj+0pucGxToXZi4XZgZmqeX/NkxNKCPsswAXU3UeYgDSpGhu05eAufjDg==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.29.1.tgz", + "integrity": "sha512-0+vClRIZ6mmJl/dxGuRsE197o1HDEeeRk6nzycSy2GofC2JsY4ifCRnvUWf/CUBQmlrvMzt6SMQNMSEu22csWQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.29.1.tgz", + "integrity": "sha512-UKMFrG4rL/uHNgelBsDwJcBqVpzNJbzsKkbI3Ja5fg00sgQnHw/VrzUTEc4jhZ+AN2BvQYz/tkHu4vt1kLuJyw==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.29.1.tgz", + "integrity": "sha512-u1S+xdODy/eEtjADqirA774y3jLcm8RPtYztwReEXoZKdzgsHYPl0s5V52Tst+GKzqjebkULT86XMSxejzfISw==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.1.tgz", + "integrity": "sha512-L0Tx0DtaNUTzXv0lbGCLB/c/qEADanHbu4QdcNOXLIe1i8i22rZRpbT3gpWYsCh9aSL9zFujY/WmEXIatWvXbw==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.29.1.tgz", + "integrity": "sha512-QoOVnkIEFfbW4xPi+dpdft/zAKmgLgsRHfJalEPYuJDOWf7cLQzYg0DEh8/sn737FaeMJxHZRc1oBreiwZCjog==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.29.1.tgz", + "integrity": "sha512-NygcbThNBe4JElP+olyTI/doBNGJvLs3bFCRPdvuCcxZCcCZ71B858IHpdm7L1btZex0FvCmM17FK98Y9MRy1Q==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tailwindcss": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.0.1.tgz", + "integrity": "sha512-UK5Biiit/e+r3i0O223bisoS5+y7ZT1PM8Ojn0MxRHzXN1VPZ2KY6Lo6fhu1dOfCfyUAlK7Lt6wSxowRabATBw==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..b4791fb --- /dev/null +++ b/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "@tailwindcss/cli": "^4.0.1", + "tailwindcss": "^4.0.1" + } +} diff --git a/tailwind.config.js b/tailwind.config.js deleted file mode 100644 index d80337e..0000000 --- a/tailwind.config.js +++ /dev/null @@ -1,13 +0,0 @@ -/** @type {import('tailwindcss').Config} */ -module.exports = { - content: ["./internal/blog/**/*.{templ,html,js}"], - theme: { - colors: { - 'secondary': '#282c34', - 'secondary-content': '#61dafb', - 'background': '#f4f4f4', - 'white': '#fff', - } - } -} - -- knotmirror 0.0.1