Skip to content

Commit 45a3be4

Browse files
Dan billing (#1618)
1 parent 0b56b7e commit 45a3be4

File tree

11 files changed

+115
-3
lines changed

11 files changed

+115
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
div[data-controller="buttons-goto-btn"] {
2+
3+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
use pgml_components::component;
2+
use sailfish::TemplateOnce;
3+
4+
#[derive(TemplateOnce, Default)]
5+
#[template(path = "buttons/goto_btn/template.html")]
6+
pub struct GotoBtn {
7+
href: String,
8+
text: String,
9+
}
10+
11+
impl GotoBtn {
12+
pub fn new() -> GotoBtn {
13+
GotoBtn {
14+
href: String::new(),
15+
text: String::new(),
16+
}
17+
}
18+
19+
pub fn set_href(mut self, href: &str) -> Self {
20+
self.href = href.into();
21+
self
22+
}
23+
24+
pub fn set_text(mut self, text: &str) -> Self {
25+
self.text = text.into();
26+
self
27+
}
28+
}
29+
30+
component!(GotoBtn);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!-- goto btn -->
2+
<a href="<%- href %>" class="btn btn-tertiary goto-arrow-hover-trigger">
3+
<%- text %>
4+
<span class="material-symbols-outlined goto-arrow-shift-animation">arrow_forward</span>
5+
</a>
6+
<!-- end goto btn -->
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This file is automatically generated.
2+
// You shouldn't modify it manually.
3+
4+
// src/components/buttons/goto_btn
5+
pub mod goto_btn;
6+
pub use goto_btn::GotoBtn;

pgml-dashboard/src/components/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ pub mod badges;
1616
pub mod breadcrumbs;
1717
pub use breadcrumbs::Breadcrumbs;
1818

19+
// src/components/buttons
20+
pub mod buttons;
21+
1922
// src/components/cards
2023
pub mod cards;
2124

pgml-dashboard/src/components/sections/have_questions/template.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<% use crate::utils::config::standalone_dashboard; %>
2-
31
<div class="d-flex flex-column gap-4" data-controller="sections-have-questions">
42
<div class="w-100 justify-content-center d-flex flex-column text-center">
53
<h4>Have more questions?</h4>

pgml-dashboard/src/components/tables/large/table/mod.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::components::tables::large::Row;
2-
use pgml_components::component;
2+
use pgml_components::{component, Component};
33
use sailfish::TemplateOnce;
44

55
#[derive(TemplateOnce, Default)]
@@ -8,6 +8,7 @@ pub struct Table {
88
rows: Vec<Row>,
99
headers: Vec<String>,
1010
classes: String,
11+
footers: Vec<Component>,
1112
}
1213

1314
impl Table {
@@ -16,6 +17,7 @@ impl Table {
1617
headers: headers.iter().map(|h| h.to_string()).collect(),
1718
rows: rows.to_vec(),
1819
classes: "table table-lg".to_string(),
20+
footers: Vec::new(),
1921
}
2022
}
2123

@@ -24,6 +26,16 @@ impl Table {
2426
self.rows = self.rows.into_iter().map(|r| r.selectable()).collect();
2527
self
2628
}
29+
30+
pub fn footers(mut self, footer: Vec<Component>) -> Self {
31+
self.footers = footer;
32+
self
33+
}
34+
35+
pub fn alt_style(mut self) -> Self {
36+
self.classes.push_str(" alt-style");
37+
self
38+
}
2739
}
2840

2941
component!(Table);

pgml-dashboard/src/components/tables/large/table/table.scss

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,44 @@ table.table.table-lg {
7979
height: 100%;
8080
}
8181
}
82+
83+
table.table.table-lg.alt-style {
84+
border: 1px solid #{$peach-tint-100};
85+
border-spacing: 0px;
86+
background: #{$gray-800};
87+
border-radius: $border-radius;
88+
--bs-table-hover-bg: #{$gray-800};
89+
90+
tbody {
91+
tr td {
92+
background-color: #{$gray-800};
93+
border-radius: 0;
94+
}
95+
}
96+
97+
tfoot tr td {
98+
background-color: #{$gray-700};
99+
padding: 16px 0px;
100+
}
101+
102+
td:first-child, td:last-child {
103+
width: 67px;
104+
padding: 0px
105+
}
106+
107+
tr:first-child td:first-child {
108+
border-top-left-radius: $border-radius;
109+
}
110+
111+
tr:first-child td:last-child {
112+
border-top-right-radius: $border-radius;
113+
}
114+
115+
tr:last-child td:first-child {
116+
border-bottom-left-radius: $border-radius;
117+
}
118+
119+
tr:last-child td:last-child {
120+
border-bottom-right-radius: $border-radius;
121+
}
122+
}

pgml-dashboard/src/components/tables/large/table/template.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,13 @@
1111
<%+ row %>
1212
<% } %>
1313
</tbody>
14+
<% if !footers.is_empty() {%>
15+
<tfoot>
16+
<tr>
17+
<% for footer in footers { %>
18+
<td><%+ footer %></td>
19+
<% } %>
20+
</tr>
21+
</tfoot>
22+
<% } %>
1423
</table>

pgml-dashboard/static/css/modules.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
@import "../../src/components/badges/large/label/label.scss";
77
@import "../../src/components/badges/small/label/label.scss";
88
@import "../../src/components/breadcrumbs/breadcrumbs.scss";
9+
@import "../../src/components/buttons/goto_btn/goto_btn.scss";
910
@import "../../src/components/cards/blog/article_preview/article_preview.scss";
1011
@import "../../src/components/cards/marketing/slider/slider.scss";
1112
@import "../../src/components/cards/marketing/twitter_testimonial/twitter_testimonial.scss";

0 commit comments

Comments
 (0)
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