Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add list item to take color, small refactors#1126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chillenberger merged 1 commit intomasterfromdan-plan-page-update
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletionspgml-dashboard/src/components/lists/item/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,53 @@
use pgml_components::component;
use sailfish::TemplateOnce;
use std::fmt;

#[derive(PartialEq,Eq,Default,Clone)]
pubenumColor{
#[default]
Green,
Blue,
Orange,
Pink,
Purple,
}

impl fmt::DisplayforColor{
fnfmt(&self,f:&mut fmt::Formatter<'_>) -> fmt::Result{
matchself{
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")]
pubstructItem{
value:String,
color:Color,
}

implItem{
pubfnnew() ->Item{
Item{
value:String::from("Your list item"),
color:Color::Green,
}
}

pubfnvalue(mutself,value:&str) ->Item{
self.value = value.into();
self
}

pubfncolor(mutself,color:Color) ->Item{
self.color = color;
self
}
}

component!(Item);
4 changes: 3 additions & 1 deletionpgml-dashboard/src/components/lists/item/template.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
<divclass="list-group-item d-flex align-items-center gap-2">
<imgloading="lazy"src="/dashboard/static/images/icons/checkmark.svg"width="15"height="11"alt="Checkmark">
<spanclass="material-symbols-outlined text-gradient-<%- color.to_string() %> align-self-start">
check
</span>
<%- value %>
</div>
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,14 +13,14 @@

<divclass="collapse navbar-collapse"id="navbarSupportedContent">
<ulclass="navbar-nav flex-grow-1 gap-4 me-auto mb-4 mb-lg-0">
<% if !standalone_dashboard { %>
<liclass="nav-item d-flex align-items-center">
<aclass="nav-link p-0"href="/plans">Pricing</a>
</li>
<% } %>
<liclass="nav-item d-flex align-items-center">
<aclass="nav-link p-0"href="/docs/guides/">Docs</a>
</li>
<% if !standalone_dashboard { %>
<!-- <li class="nav-item d-flex align-items-center">
<a class="nav-link p-0" href="/plan_comparison">Pricing</a>
</li> -->
<% } %>
<liclass="nav-item d-flex align-items-center">
<aclass="nav-link p-0"href="/blog/speeding-up-vector-recall-by-5x-with-hnsw">Blog</a>
</li>
Expand Down
17 changes: 0 additions & 17 deletionspgml-dashboard/static/css/scss/base/_base.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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.
@includemedia-breakpoint-up(lg) {
body {
Expand DownExpand Up@@ -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*/
Expand Down
5 changes: 4 additions & 1 deletionpgml-dashboard/static/css/scss/base/_typography.scss
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -90,7 +90,7 @@ h6, .h6 {
background-clip:text;
text-fill-color:transparent;
}
.text-gradient-blue {
.text-gradient-blue,.syntax-highlight {
@includetext-gradient($gradient-blue);
}
.text-gradient-green {
Expand All@@ -105,6 +105,9 @@ h6, .h6 {
.text-gradient-purple {
@includetext-gradient($gradient-purple);
}
.text-gradient-party,.party-time {
@includetext-gradient($gradient-text);
}


.marketing-body-large {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp