diff --git a/README.md b/README.md index 6f1875a..8e79300 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ My Portfolio webiste * [Askama](https://github.com/djc/askama) * [Markdown-rs](https://github.com/wooorm/markdown-rs) * [Taskfile](https://taskfile.dev/) +* [TailwindCSS](https://tailwindcss.com/) ## How to use diff --git a/Taskfile.yml b/Taskfile.yml index af22803..c2a44a2 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -5,8 +5,14 @@ tasks: summary: Run unit test with logs cmds: - RUST_LOG=debug cargo test -- --nocapture + build-tailwind: + summary: Build tailwindcss + cmds: + - tailwindcss -i ./statics/input.css -o ./statics/styles.css run: summary: Run application with hot-reload + deps: + - build-tailwind cmds: - cargo watch -s 'export $(cat .env | xargs) && cargo run -- -release' update_version: @@ -22,6 +28,8 @@ tasks: EOF compose-run: summary: Run application in docker compose with database + deps: + - build-tailwind cmds: - | export $(cat .env | xargs) diff --git a/internal/src/handler.rs b/internal/src/handler.rs index 16150ae..1c6eec1 100644 --- a/internal/src/handler.rs +++ b/internal/src/handler.rs @@ -27,10 +27,11 @@ pub async fn handler(cfg: Config) -> std::io::Result<()> { .app_data(web::Data::new(blogs_data.clone())) .app_data(web::Data::new(config.clone())) .service(web::resource("/").route(web::get().to(profile))) - .service(web::resource("/styles.css").route(web::get().to(styles))) + .service(web::resource("/statics/{static_file}").route(web::get().to(statics))) .service(web::resource("/blogs").route(web::get().to(get_blogs))) .service(web::resource("/blogs/{blogid}").route(web::get().to(get_blog))) .service(web::resource("/version").route(web::get().to(get_version))) + .service(web::resource("/not-found").route(web::get().to(get_404_not_found))) }) .bind((endpoint, port)) .expect("Failed to start Http Server") diff --git a/internal/src/model/templates.rs b/internal/src/model/templates.rs index bc17be3..545abef 100644 --- a/internal/src/model/templates.rs +++ b/internal/src/model/templates.rs @@ -27,3 +27,7 @@ pub struct Version<'a> { pub build_hash: &'a str, pub build_date: &'a str, } + +#[derive(Template, Debug)] +#[template(path = "not_found.html")] +pub struct NotFound; diff --git a/internal/src/router.rs b/internal/src/router.rs index 94ea33f..d9b53c3 100644 --- a/internal/src/router.rs +++ b/internal/src/router.rs @@ -5,11 +5,24 @@ use actix_files::NamedFile; use actix_web::{web, Responder, Result}; use actix_web_lab::respond::Html; use askama::Template; -use log::info; +use log::{error, info}; -pub async fn styles() -> Result { - let styles = NamedFile::open("./statics/styles.css").expect("Failed to render styles.css"); - Ok(styles) +pub async fn statics(path: web::Path) -> Result { + info!("Statics path: {}", path.clone()); + let static_path = match path.into_inner().as_str() { + "styles.css" => Ok(format!("./statics/styles.css")), + "apple-touch-icon.png" => Ok(format!("./statics/favicon/apple-touch-icon.png")), + "favicon-16x16.png" => Ok(format!("./statics/favicon/favicon-16x16.png")), + "favicon-32x32.png" => Ok(format!("./statics/favicon/favicon-32x32.png")), + _ => { + let err = "Failed to get static path. Statics path is not allowed."; + error!("{}", err); + Err(err) + } + } + .expect("Failed to get static path"); + let static_file = NamedFile::open(static_path).expect("Failed to render static file(s)"); + Ok(static_file) } pub async fn profile() -> Result { @@ -17,6 +30,11 @@ pub async fn profile() -> Result { Ok(Html(profile)) } +pub async fn get_404_not_found() -> Result { + let html = NotFound.render().expect("Failed to render not_found.html"); + Ok(Html(html)) +} + pub async fn get_blogs(blogs_data: web::Data) -> Result { // Copy data to Template struct let blogs_template: Vec = blogs_data diff --git a/internal/templates/base.html b/internal/templates/base.html index 1f1044d..72e295e 100644 --- a/internal/templates/base.html +++ b/internal/templates/base.html @@ -1,5 +1,5 @@ - + {% block title %}{% endblock %} @@ -8,50 +8,156 @@ - + - - + + + - + - -
+ + + +
{% block content %}

Placeholder content

{% endblock %}
- +
+ diff --git a/internal/templates/blog.html b/internal/templates/blog.html index 0ce7f06..0fa5087 100644 --- a/internal/templates/blog.html +++ b/internal/templates/blog.html @@ -4,8 +4,7 @@ {% block description %}"Blog {{id}} - {{name}}"{% endblock %} {% block content %} -

{{id}} | {{name}}

- +

{{id}} | {{name}}


{{body|safe}} diff --git a/internal/templates/blogs.html b/internal/templates/blogs.html index d611e59..a313585 100644 --- a/internal/templates/blogs.html +++ b/internal/templates/blogs.html @@ -4,10 +4,10 @@ {% block description %}"Husni Naufal Zuhdi Blogs"{% endblock %} {% block content %} -

Blogs

+

Blogs


{% for blog in blogs %} -

+

{{blog.id}} | {{blog.name}}

{% endfor %} diff --git a/internal/templates/not_found.html b/internal/templates/not_found.html new file mode 100644 index 0000000..a898f28 --- /dev/null +++ b/internal/templates/not_found.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{% block title %}404 Not Found{% endblock %} +{% block description %}"Sorry, we couldn’t find the page you’re looking for"{% endblock %} + +{% block content %} + +
+
+

404

+

Page not found

+

Sorry, we couldn’t find the page you’re looking for.

+ +
+
+{% endblock content %} diff --git a/internal/templates/profile.html b/internal/templates/profile.html index 637c423..e114561 100644 --- a/internal/templates/profile.html +++ b/internal/templates/profile.html @@ -20,8 +20,8 @@

2022 - Now | Site Reliability Engineer at Tokopedia

-

Handle Tokopedia Multi-Cloud Environment

    +
  • Handle Tokopedia Multi-Cloud Environment
  • Onboard several existing Jenkins Pipelines into our new GitHub Action Workflows
  • Rolling out our existing Consul Service Discovery into the Enterprise version
  • Develop Cloud Platform Diary for our Internal Cloud-related Data Analytics Platform
  • @@ -102,7 +102,6 @@

    Linux

    -

    Personal Interests


    diff --git a/statics/favicon/apple-touch-icon.png b/statics/favicon/apple-touch-icon.png new file mode 100644 index 0000000..e8a6820 Binary files /dev/null and b/statics/favicon/apple-touch-icon.png differ diff --git a/statics/favicon/favicon-16x16.png b/statics/favicon/favicon-16x16.png new file mode 100644 index 0000000..ebb7a6c Binary files /dev/null and b/statics/favicon/favicon-16x16.png differ diff --git a/statics/favicon/favicon-32x32.png b/statics/favicon/favicon-32x32.png new file mode 100644 index 0000000..06c8256 Binary files /dev/null and b/statics/favicon/favicon-32x32.png differ diff --git a/statics/input.css b/statics/input.css new file mode 100644 index 0000000..48fb800 --- /dev/null +++ b/statics/input.css @@ -0,0 +1,18 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer base { + h1 { + @apply mb-4 mt-6 font-bold uppercase text-2xl md:justify-start; + } + h2 { + @apply mb-2 mt-4 text-xl font-semibold md:justify-start; + } + h3 { + @apply mb-2 mt-4 text-xl md:justify-start; + } + a { + @apply text-blue-500 hover:text-blue-900; + } +} diff --git a/statics/styles.css b/statics/styles.css index 189f04e..a9ac4f9 100644 --- a/statics/styles.css +++ b/statics/styles.css @@ -1,90 +1,1122 @@ -/* Color Pallete */ -/**/ -/* Eerie Black: #1C2321 */ -/* Thistle: #C4B7CB */ -/* PalePurple: #F1E4F3 */ -/* HonoluluBlue: #007CBE */ -/* NonPhotoBlue: #8DE4FF */ -.body { - margin: 0px; - padding: 0px; - letter-spacing: 0.1px; - display: flex; - flex-direction: column; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Helvetica", sans-serif; - font-size: 20px; +/* +! tailwindcss v3.4.4 | 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: #e5e7eb; + /* 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] { + display: none; +} + +h1 { + margin-bottom: 1rem; + margin-top: 1.5rem; + font-size: 1.5rem; + line-height: 2rem; + font-weight: 700; + text-transform: uppercase; +} + +@media (min-width: 768px) { + h1 { + justify-content: flex-start; + } +} + +h2 { + margin-bottom: 0.5rem; + margin-top: 1rem; + font-size: 1.25rem; + line-height: 1.75rem; + font-weight: 600; +} + +@media (min-width: 768px) { + h2 { + justify-content: flex-start; + } +} + +h3 { + margin-bottom: 0.5rem; + margin-top: 1rem; + font-size: 1.25rem; + line-height: 1.75rem; +} + +@media (min-width: 768px) { + h3 { + justify-content: flex-start; + } +} + +a { + --tw-text-opacity: 1; + color: rgb(59 130 246 / var(--tw-text-opacity)); +} + +a:hover { + --tw-text-opacity: 1; + color: rgb(30 58 138 / var(--tw-text-opacity)); +} + +*, ::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: ; +} + +.container { + width: 100%; +} + +@media (min-width: 640px) { + .container { + max-width: 640px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 768px; + } +} + +@media (min-width: 1024px) { + .container { + max-width: 1024px; + } +} + +@media (min-width: 1280px) { + .container { + max-width: 1280px; + } +} + +@media (min-width: 1536px) { + .container { + max-width: 1536px; + } +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} + +.absolute { + position: absolute; +} + +.relative { + position: relative; +} + +.-inset-0 { + inset: -0px; +} + +.-inset-0\.5 { + inset: -0.125rem; +} + +.inset-y-0 { + top: 0px; + bottom: 0px; +} + +.bottom-0 { + bottom: 0px; +} + +.left-0 { + left: 0px; +} + +.mx-6 { + margin-left: 1.5rem; + margin-right: 1.5rem; } -.navbar { - position: sticky; - top: 0; - background-color: #1C2321; - overflow: hidden; +.mb-2 { + margin-bottom: 0.5rem; } -.navbar a { - float: left; - color: #F1E4F3; - text-align: center; - text-decoration: none; - padding: 5px; +.mb-4 { + margin-bottom: 1rem; } -.navbar a:hover { - background-color: #C4B7CB; - color: #1C2321; +.me-12 { + margin-inline-end: 3rem; } -.navbar a.special { - background-color: #007CBE; - color: #F1E4F3; +.me-3 { + margin-inline-end: 0.75rem; } -.navbar a.auth { - float: right; +.me-6 { + margin-inline-end: 1.5rem; } -.main { - flex: 1; - padding: 5px 100px 5px 100px; +.mt-10 { + margin-top: 2.5rem; } -.main a.btn { - background-color: #8DE4FF; - color: #1C2321; +.mt-4 { + margin-top: 1rem; } -.paragraph { - padding-left: 0px; - padding-right: 0px; +.mt-6 { + margin-top: 1.5rem; } -.btn { - cursor: pointer; +.block { + display: block; +} + +.flex { + display: flex; +} + +.inline-flex { + display: inline-flex; +} + +.grid { + display: grid; +} + +.hidden { + display: none; +} + +.h-16 { + height: 4rem; +} + +.h-6 { + height: 1.5rem; +} + +.h-8 { + height: 2rem; +} + +.h-full { + height: 100%; +} + +.min-h-full { + min-height: 100%; +} + +.w-6 { + width: 1.5rem; +} + +.w-auto { + width: auto; +} + +.flex-1 { + flex: 1 1 0%; +} + +.flex-shrink-0 { + flex-shrink: 0; +} + +.grow { + flex-grow: 1; +} + +.place-items-center { + place-items: center; +} + +.items-center { + align-items: center; +} + +.justify-center { + justify-content: center; +} + +.justify-between { + justify-content: space-between; +} + +.gap-8 { + gap: 2rem; +} + +.gap-x-6 { + -moz-column-gap: 1.5rem; + column-gap: 1.5rem; +} + +.space-x-4 > :not([hidden]) ~ :not([hidden]) { + --tw-space-x-reverse: 0; + margin-right: calc(1rem * var(--tw-space-x-reverse)); + margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); +} + +.space-y-1 > :not([hidden]) ~ :not([hidden]) { + --tw-space-y-reverse: 0; + margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); + margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); +} + +.rounded-md { + border-radius: 0.375rem; +} + +.border-b-2 { + border-bottom-width: 2px; +} + +.border-neutral-200 { + --tw-border-opacity: 1; + border-color: rgb(229 229 229 / var(--tw-border-opacity)); +} + +.bg-gray-100 { + --tw-bg-opacity: 1; + background-color: rgb(243 244 246 / var(--tw-bg-opacity)); +} + +.bg-gray-900 { + --tw-bg-opacity: 1; + background-color: rgb(17 24 39 / var(--tw-bg-opacity)); +} + +.bg-green-600 { + --tw-bg-opacity: 1; + background-color: rgb(22 163 74 / var(--tw-bg-opacity)); +} + +.p-2 { + padding: 0.5rem; +} + +.p-6 { + padding: 1.5rem; +} + +.px-2 { + padding-left: 0.5rem; + padding-right: 0.5rem; +} + +.px-3 { + padding-left: 0.75rem; + padding-right: 0.75rem; +} + +.px-3\.5 { + padding-left: 0.875rem; + padding-right: 0.875rem; +} + +.px-6 { + padding-left: 1.5rem; + padding-right: 1.5rem; +} + +.py-10 { + padding-top: 2.5rem; + padding-bottom: 2.5rem; +} + +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.py-2\.5 { + padding-top: 0.625rem; + padding-bottom: 0.625rem; +} + +.py-24 { + padding-top: 6rem; + padding-bottom: 6rem; +} + +.pb-3 { + padding-bottom: 0.75rem; +} + +.pt-2 { + padding-top: 0.5rem; +} + +.text-left { + text-align: left; +} + +.text-center { + text-align: center; +} + +.font-mono { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + +.text-3xl { + font-size: 1.875rem; + line-height: 2.25rem; +} + +.text-base { + font-size: 1rem; + line-height: 1.5rem; +} + +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + +.font-bold { + font-weight: 700; +} + +.font-medium { + font-weight: 500; +} + +.font-semibold { + font-weight: 600; +} + +.uppercase { + text-transform: uppercase; +} + +.leading-7 { + line-height: 1.75rem; +} + +.tracking-tight { + letter-spacing: -0.025em; +} + +.text-gray-300 { + --tw-text-opacity: 1; + color: rgb(209 213 219 / var(--tw-text-opacity)); +} + +.text-gray-600 { + --tw-text-opacity: 1; + color: rgb(75 85 99 / var(--tw-text-opacity)); +} + +.text-gray-900 { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} + +.text-red-700 { + --tw-text-opacity: 1; + color: rgb(185 28 28 / var(--tw-text-opacity)); +} + +.text-white { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.shadow-sm { + --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); + box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); +} + +.hover\:bg-gray-700:hover { + --tw-bg-opacity: 1; + background-color: rgb(55 65 81 / var(--tw-bg-opacity)); +} + +.hover\:bg-green-500:hover { + --tw-bg-opacity: 1; + background-color: rgb(34 197 94 / var(--tw-bg-opacity)); +} + +.hover\:font-bold:hover { + font-weight: 700; +} + +.hover\:text-white:hover { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.focus\:outline-none:focus { + outline: 2px solid transparent; + outline-offset: 2px; +} + +.focus\:ring-2:focus { + --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); + --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); + box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); +} + +.focus\:ring-inset:focus { + --tw-ring-inset: inset; +} + +.focus\:ring-white:focus { + --tw-ring-opacity: 1; + --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); +} + +.focus-visible\:outline:focus-visible { + outline-style: solid; +} + +.focus-visible\:outline-2:focus-visible { + outline-width: 2px; +} + +.focus-visible\:outline-offset-2:focus-visible { + outline-offset: 2px; +} + +.focus-visible\:outline-green-600:focus-visible { + outline-color: #16a34a; +} + +@media (min-width: 640px) { + .sm\:ml-6 { + margin-left: 1.5rem; + } + + .sm\:block { + display: block; + } + + .sm\:hidden { + display: none; + } + + .sm\:items-stretch { + align-items: stretch; + } + + .sm\:justify-start { + justify-content: flex-start; + } + + .sm\:py-32 { + padding-top: 8rem; + padding-bottom: 8rem; + } + + .sm\:text-5xl { + font-size: 3rem; + line-height: 1; + } +} + +@media (min-width: 768px) { + .md\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + + .md\:justify-start { + justify-content: flex-start; + } + + .md\:text-left { + text-align: left; + } +} + +@media (min-width: 1024px) { + .lg\:block { + display: block; + } + + .lg\:grid-cols-4 { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + .lg\:justify-between { + justify-content: space-between; + } + + .lg\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .lg\:text-left { + text-align: left; + } } -.flex-container { - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: start; - align-items: start; +.\[\&\>svg\]\:h-4>svg { + height: 1rem; } -.flex-container > div { - width: 500px; - margin: 0px; - padding: 0px; +.\[\&\>svg\]\:h-5>svg { + height: 1.25rem; } -.footer { - padding: 10px; - display: inine-block; - text-align: center; - color: #F1E4F3; - background-color: #1C2321; +.\[\&\>svg\]\:w-4>svg { + width: 1rem; } -.footer a { - color: #F1E4F3; +.\[\&\>svg\]\:w-5>svg { + width: 1.25rem; } diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..9e65336 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,9 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./internal/templates/*.html", "./internal/templates/**/*.html"], + theme: { + extend: {}, + }, + plugins: [], +} +