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;
16
16
pub mod breadcrumbs;
17
17
pub use breadcrumbs:: Breadcrumbs ;
18
18
19
+ // src/components/buttons
20
+ pub mod buttons;
21
+
19
22
// src/components/cards
20
23
pub mod cards;
21
24
Original file line number Diff line number Diff line change 1
- < % use crate::utils::config::standalone_dashboard; %>
2
-
3
1
< div class ="d-flex flex-column gap-4 " data-controller ="sections-have-questions ">
4
2
< div class ="w-100 justify-content-center d-flex flex-column text-center ">
5
3
< h4 > Have more questions?</ h4 >
Original file line number Diff line number Diff line change 1
1
use crate :: components:: tables:: large:: Row ;
2
- use pgml_components:: component;
2
+ use pgml_components:: { component, Component } ;
3
3
use sailfish:: TemplateOnce ;
4
4
5
5
#[ derive( TemplateOnce , Default ) ]
@@ -8,6 +8,7 @@ pub struct Table {
8
8
rows : Vec < Row > ,
9
9
headers : Vec < String > ,
10
10
classes : String ,
11
+ footers : Vec < Component > ,
11
12
}
12
13
13
14
impl Table {
@@ -16,6 +17,7 @@ impl Table {
16
17
headers : headers. iter ( ) . map ( |h| h. to_string ( ) ) . collect ( ) ,
17
18
rows : rows. to_vec ( ) ,
18
19
classes : "table table-lg" . to_string ( ) ,
20
+ footers : Vec :: new ( ) ,
19
21
}
20
22
}
21
23
@@ -24,6 +26,16 @@ impl Table {
24
26
self . rows = self . rows . into_iter ( ) . map ( |r| r. selectable ( ) ) . collect ( ) ;
25
27
self
26
28
}
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
+ }
27
39
}
28
40
29
41
component ! ( Table ) ;
Original file line number Diff line number Diff line change @@ -79,3 +79,44 @@ table.table.table-lg {
79
79
height : 100% ;
80
80
}
81
81
}
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 11
11
< %+ row %>
12
12
< % } %>
13
13
</ 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
+ < % } %>
14
23
</ table >
Original file line number Diff line number Diff line change 6
6
@import " ../../src/components/badges/large/label/label.scss" ;
7
7
@import " ../../src/components/badges/small/label/label.scss" ;
8
8
@import " ../../src/components/breadcrumbs/breadcrumbs.scss" ;
9
+ @import " ../../src/components/buttons/goto_btn/goto_btn.scss" ;
9
10
@import " ../../src/components/cards/blog/article_preview/article_preview.scss" ;
10
11
@import " ../../src/components/cards/marketing/slider/slider.scss" ;
11
12
@import " ../../src/components/cards/marketing/twitter_testimonial/twitter_testimonial.scss" ;
Original file line number Diff line number Diff line change @@ -129,6 +129,9 @@ $magenta-shade-800: #450029;
129
129
$magenta-shade-900 : #2e001b ;
130
130
$magenta-shade-1000 : #17000d ;
131
131
132
+ // Orange Shade
133
+ $orange-shade-100 : #FF9145 ;
134
+
132
135
// Colors
133
136
$primary : #0D0D0E ;
134
137
$secondary : $gray-100 ;
You can’t perform that action at this time.
0 commit comments