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

Commit45a3be4

Browse files
Dan billing (#1618)
1 parent0b56b7e commit45a3be4

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+
pubstructGotoBtn{
7+
href:String,
8+
text:String,
9+
}
10+
11+
implGotoBtn{
12+
pubfnnew() ->GotoBtn{
13+
GotoBtn{
14+
href:String::new(),
15+
text:String::new(),
16+
}
17+
}
18+
19+
pubfnset_href(mutself,href:&str) ->Self{
20+
self.href = href.into();
21+
self
22+
}
23+
24+
pubfnset_text(mutself,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+
<ahref="<%- href %>"class="btn btn-tertiary goto-arrow-hover-trigger">
3+
<%- text %>
4+
<spanclass="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+
pubmod goto_btn;
6+
pubuse 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
pubmod breadcrumbs;
1717
pubuse breadcrumbs::Breadcrumbs;
1818

19+
// src/components/buttons
20+
pubmod buttons;
21+
1922
// src/components/cards
2023
pubmod 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
<divclass="d-flex flex-column gap-4"data-controller="sections-have-questions">
42
<divclass="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
usecrate::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
implTable{
@@ -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+
pubfnfooters(mutself,footer:Vec<Component>) ->Self{
31+
self.footers = footer;
32+
self
33+
}
34+
35+
pubfnalt_style(mutself) ->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:1pxsolid#{$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+
trtd {
92+
background-color:#{$gray-800};
93+
border-radius:0;
94+
}
95+
}
96+
97+
tfoottrtd {
98+
background-color:#{$gray-700};
99+
padding:16px0px;
100+
}
101+
102+
td:first-child,td:last-child {
103+
width:67px;
104+
padding:0px
105+
}
106+
107+
tr:first-childtd:first-child {
108+
border-top-left-radius:$border-radius;
109+
}
110+
111+
tr:first-childtd:last-child {
112+
border-top-right-radius:$border-radius;
113+
}
114+
115+
tr:last-childtd:first-child {
116+
border-bottom-left-radius:$border-radius;
117+
}
118+
119+
tr:last-childtd: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)

[8]ページ先頭

©2009-2025 Movatter.jp