Remove DaisyUI

master
Araozu 2024-05-21 16:33:18 -05:00
parent 664e851ed5
commit e366798630
7 changed files with 552 additions and 426 deletions

2
Rocket.toml Normal file
View File

@ -0,0 +1,2 @@
[default]
address = "0.0.0.0"

View File

@ -11,7 +11,6 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"daisyui": "^4.6.1",
"tailwindcss": "^3.4.1" "tailwindcss": "^3.4.1"
} }
} }

File diff suppressed because it is too large Load Diff

17
src/view/icons/mod.rs Normal file
View File

@ -0,0 +1,17 @@
use maud::{html, Markup};
pub fn magnifying_glass(fill: String, size: i32) -> Markup {
html! {
svg class="inline-block" xmlns="http://www.w3.org/2000/svg" width=(size) height=(size) fill=(fill) viewBox="0 0 256 256" {
path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" {}
}
}
}
pub fn bird(fill: String, size: i32) -> Markup {
html! {
svg class="inline-block" xmlns="http://www.w3.org/2000/svg" width=(size) height=(size) fill=(fill) viewBox="0 0 256 256" style="--darkreader-inline-fill: #000000;" data-darkreader-inline-fill="" {
path d="M176,72a16,16,0,1,1-16-16A16,16,0,0,1,176,72Zm68,8a12,12,0,0,1-5.34,10L220,102.42V120A108.12,108.12,0,0,1,112,228H24A20,20,0,0,1,8.41,195.5l.15-.18L92,95.18V76.89C92,41.28,120.57,12.17,155.69,12H156a63.94,63.94,0,0,1,60.58,43.29L238.66,70A12,12,0,0,1,244,80Zm-33.63,0-10.69-7.13a12,12,0,0,1-5-7A40,40,0,0,0,156,36h-.19c-21.95.11-39.8,18.45-39.8,40.89V99.52a12,12,0,0,1-2.79,7.69L32.57,204H53.05l69.74-83.68a12,12,0,1,1,18.43,15.36L84.29,204H112a84.09,84.09,0,0,0,84-84V96a12,12,0,0,1,5.35-10Z" {}
}
}
}

View File

@ -1,9 +1,14 @@
use maud::{html, Markup, DOCTYPE}; use maud::{html, Markup, DOCTYPE};
mod icons;
use icons::{magnifying_glass, bird};
pub fn skeleton(body: Markup) -> Markup { pub fn skeleton(body: Markup) -> Markup {
html! { html! {
(DOCTYPE) (DOCTYPE)
html lang="es" data-theme="cupcake" { html lang="es" {
head { head {
title { "Jerguero" } title { "Jerguero" }
meta name="viewport" content="width=device-width, initial-scale=1.0"; meta name="viewport" content="width=device-width, initial-scale=1.0";
@ -26,20 +31,19 @@ pub fn skeleton(body: Markup) -> Markup {
fn navbar() -> Markup { fn navbar() -> Markup {
html! { html! {
nav class="navbar gap-1 fixed z-50 bottom-0 left-0 w-full border-t border-[rgba(150,150,150,0.5)] bg-base-200 text-base-content" { nav class="grid grid-cols-[3.5rem_auto_3.5rem] bg-c-primary fixed z-50 bottom-0 left-0 w-full h-14" {
div class="flex-none" { // nav class="navbar gap-1 fixed z-50 bottom-0 left-0 w-full border-t border-[rgba(150,150,150,0.5)] bg-base-200 text-base-content" {
a class="btn btn-ghost text-xl" { div class="table" {
"J" a href="/" class="table-cell align-middle h-14 text-center" {
(bird("var(--c-on-bg)".into(), 36))
} }
} }
div class="flex-1" { div {
div class="form-control" { input type="text" placeholder="Buscá una palabra" class="w-full md:w-auto py-2 px-1 rounded-md my-2";
input type="text" placeholder="Search" class="input input-bordered w-full md:w-auto";
}
} }
div class="flex-none" { div class="table" {
a class="btn btn-ghost text-xl" { button class="table-cell align-middle h-14 text-center w-full" {
"s" (magnifying_glass("var(--c-on-bg)".into(), 36))
} }
} }
} }

View File

@ -1,3 +1,26 @@
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities; @tailwind utilities;
:root {
--c-primary: #0ea5e9;
}
:root {
--c-bg: white;
--c-on-bg: black;
}
@media (prefers-color-scheme: dark) {
:root {
--c-bg: #0e1419;
--c-on-bg: white;
}
}
html {
background-color: var(--c-bg);
color: var(--c-on-bg);
}

View File

@ -11,11 +11,13 @@ module.exports = {
extend: { extend: {
fontFamily: { fontFamily: {
'serif': ["'Playfair Display'", "serif"], 'serif': ["'Playfair Display'", "serif"],
} },
colors: {
"c-primary": "var(--c-primary)"
},
}, },
}, },
plugins: [ plugins: [
require("daisyui"),
function ({ addComponents }) { function ({ addComponents }) {
addComponents({ addComponents({
'.container': { '.container': {