Skip to content

Commit

Permalink
fix links in main dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Oct 9, 2023
1 parent cc60e99 commit 7cdd001
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 47 deletions.
46 changes: 5 additions & 41 deletions assets/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,11 @@ video {
background-color: rgb(96 165 250 / var(--tw-bg-opacity));
}

.bg-blue-700 {
--tw-bg-opacity: 1;
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
}

.bg-error-500 {
--tw-bg-opacity: 1;
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
Expand Down Expand Up @@ -1050,11 +1055,6 @@ video {
color: rgb(75 85 99 / var(--tw-text-opacity));
}

.text-green-400 {
--tw-text-opacity: 1;
color: rgb(74 222 128 / var(--tw-text-opacity));
}

.text-green-500 {
--tw-text-opacity: 1;
color: rgb(34 197 94 / var(--tw-text-opacity));
Expand Down Expand Up @@ -1143,42 +1143,6 @@ a[aria-current="page"] {
}
}

@media (min-width: 768px) {
.md\:container {
width: 100%;
}

@media (min-width: 640px) {
.md\:container {
max-width: 640px;
}
}

@media (min-width: 768px) {
.md\:container {
max-width: 768px;
}
}

@media (min-width: 1024px) {
.md\:container {
max-width: 1024px;
}
}

@media (min-width: 1280px) {
.md\:container {
max-width: 1280px;
}
}

@media (min-width: 1536px) {
.md\:container {
max-width: 1536px;
}
}
}

.hover\:border-gray-400:hover {
--tw-border-opacity: 1;
border-color: rgb(156 163 175 / var(--tw-border-opacity));
Expand Down
12 changes: 6 additions & 6 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ fn Dashboard(cx: Scope) -> Element {
let health_checks = &*state.health_checks.read();
// A Card component
#[component]
fn Card<'a>(cx: Scope, href: &'static str, children: Element<'a>) -> Element<'a> {
fn Card<'a>(cx: Scope, href: Route, children: Element<'a>) -> Element<'a> {
render! {
// TODO: Use Link
a {
href: "{href}",
Link {
to: "{href}",
class: "flex items-center justify-center w-48 h-48 p-2 m-2 border-2 rounded-lg shadow border-base-400 active:shadow-none bg-base-100 hover:bg-primary-200",
span { class: "text-3xl text-base-800", children }
}
Expand All @@ -80,7 +80,7 @@ fn Dashboard(cx: Scope) -> Element {
render! {
h1 { class: "text-5xl font-bold", "Dashboard" }
div { id: "cards", class: "flex flex-row flex-wrap",
Card { href: "/health",
Card { href: Route::Health {},
"Nix Health Check "
match health_checks {
Some(Ok(checks)) => {
Expand All @@ -95,8 +95,8 @@ fn Dashboard(cx: Scope) -> Element {
None => "⏳",
}
}
Card { href: "/info", "Nix Info ℹ️" }
Card { href: "/flake", "Flake Overview ❄️️" }
Card { href: Route::Info {}, "Nix Info ℹ️" }
Card { href: Route::Flake {}, "Flake Overview ❄️️" }
}
}
}
Expand Down

0 comments on commit 7cdd001

Please sign in to comment.