File tree Expand file tree Collapse file tree 11 files changed +115
-3
lines changed
Expand file tree Collapse file tree 11 files changed +115
-3
lines changed Original file line number Diff line number Diff line change 1+ div [data-controller = " buttons-goto-btn" ] {
2+
3+ }
Original file line number Diff line number Diff line change 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 ) ;
Original file line number Diff line number Diff line change 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 -->
Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ pub mod badges;
1616pub mod breadcrumbs;
1717pub use breadcrumbs:: Breadcrumbs ;
1818
19+ // src/components/buttons
20+ pub mod buttons;
21+
1922// src/components/cards
2023pub mod cards;
2124
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 11use crate :: components:: tables:: large:: Row ;
2- use pgml_components:: component;
2+ use pgml_components:: { component, Component } ;
33use 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
1314impl 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
2941component ! ( Table ) ;
Original file line number Diff line number Diff 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+ }
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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" ;
You can’t perform that action at this time.
0 commit comments