From ce843fcb3a27fba9fb7918fbd7691007f6ed2bbf Mon Sep 17 00:00:00 2001
From: Dan <39170265+chillenberger@users.noreply.github.com>
Date: Thu, 26 Oct 2023 16:57:11 -0600
Subject: [PATCH] update list items to take color, move text highlight and
party time to typography, add pricing nav to marketing nav
---
.../src/components/lists/item/mod.rs | 30 +++++++++++++++++++
.../src/components/lists/item/template.html | 4 ++-
.../navigation/navbar/marketing/template.html | 10 +++----
.../static/css/scss/base/_base.scss | 17 -----------
.../static/css/scss/base/_typography.scss | 5 +++-
5 files changed, 42 insertions(+), 24 deletions(-)
diff --git a/pgml-dashboard/src/components/lists/item/mod.rs b/pgml-dashboard/src/components/lists/item/mod.rs
index 8a0ff1645..0ae5d1b73 100644
--- a/pgml-dashboard/src/components/lists/item/mod.rs
+++ b/pgml-dashboard/src/components/lists/item/mod.rs
@@ -1,16 +1,41 @@
use pgml_components::component;
use sailfish::TemplateOnce;
+use std::fmt;
+
+#[derive(PartialEq, Eq, Default, Clone)]
+pub enum Color {
+ #[default]
+ Green,
+ Blue,
+ Orange,
+ Pink,
+ Purple,
+}
+
+impl fmt::Display for Color {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ match self {
+ Color::Green => write!(f, "green"),
+ Color::Blue => write!(f, "blue"),
+ Color::Orange => write!(f, "orange"),
+ Color::Pink => write!(f, "pink"),
+ Color::Purple => write!(f, "purple"),
+ }
+ }
+}
#[derive(TemplateOnce, Default)]
#[template(path = "lists/item/template.html")]
pub struct Item {
value: String,
+ color: Color,
}
impl Item {
pub fn new() -> Item {
Item {
value: String::from("Your list item"),
+ color: Color::Green,
}
}
@@ -18,6 +43,11 @@ impl Item {
self.value = value.into();
self
}
+
+ pub fn color(mut self, color: Color) -> Item {
+ self.color = color;
+ self
+ }
}
component!(Item);
diff --git a/pgml-dashboard/src/components/lists/item/template.html b/pgml-dashboard/src/components/lists/item/template.html
index 7df3b5ec6..d4c85e98d 100644
--- a/pgml-dashboard/src/components/lists/item/template.html
+++ b/pgml-dashboard/src/components/lists/item/template.html
@@ -1,4 +1,6 @@
-

+
+ check
+
<%- value %>
diff --git a/pgml-dashboard/src/components/navigation/navbar/marketing/template.html b/pgml-dashboard/src/components/navigation/navbar/marketing/template.html
index ff3715baf..7d4313763 100644
--- a/pgml-dashboard/src/components/navigation/navbar/marketing/template.html
+++ b/pgml-dashboard/src/components/navigation/navbar/marketing/template.html
@@ -13,14 +13,14 @@
+ <% if !standalone_dashboard { %>
+ -
+ Pricing
+
+ <% } %>
-
Docs
- <% if !standalone_dashboard { %>
-
- <% } %>
-
Blog
diff --git a/pgml-dashboard/static/css/scss/base/_base.scss b/pgml-dashboard/static/css/scss/base/_base.scss
index 25007229c..e988b693c 100644
--- a/pgml-dashboard/static/css/scss/base/_base.scss
+++ b/pgml-dashboard/static/css/scss/base/_base.scss
@@ -74,15 +74,6 @@ article {
background-color: #{$bg-white} !important;
}
-// Our flagship gradient.
-.party-time {
- background: $gradient-text;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- background-clip: text;
- text-fill-color: transparent;
-}
-
// Remove padding from large screens.
@include media-breakpoint-up(lg) {
body {
@@ -116,14 +107,6 @@ article {
background: #{$purple};
}
-.syntax-highlight {
- background: $gradient-blue;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- background-clip: text;
- text-fill-color: transparent;
-}
-
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
diff --git a/pgml-dashboard/static/css/scss/base/_typography.scss b/pgml-dashboard/static/css/scss/base/_typography.scss
index c0f01b4ad..b7e8347b7 100644
--- a/pgml-dashboard/static/css/scss/base/_typography.scss
+++ b/pgml-dashboard/static/css/scss/base/_typography.scss
@@ -90,7 +90,7 @@ h6, .h6 {
background-clip: text;
text-fill-color: transparent;
}
-.text-gradient-blue {
+.text-gradient-blue, .syntax-highlight {
@include text-gradient($gradient-blue);
}
.text-gradient-green {
@@ -105,6 +105,9 @@ h6, .h6 {
.text-gradient-purple {
@include text-gradient($gradient-purple);
}
+.text-gradient-party, .party-time {
+ @include text-gradient($gradient-text);
+}
.marketing-body-large {
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy