File tree Expand file tree Collapse file tree 10 files changed +113
-7
lines changed Expand file tree Collapse file tree 10 files changed +113
-7
lines changed Original file line number Diff line number Diff line change 939
939
padding : 0.25rem 0 ;
940
940
}
941
941
942
- .doc .conum [data-value ] {
942
+ .doc .conum [data-value ],
943
+ .doc .step {
943
944
@include text-overline;
944
945
945
946
color : var (--ds-text-inverse );
963
964
display : none;
964
965
}
965
966
967
+ .doc .step {
968
+ position : relative;
969
+ top : -0.25em ;
970
+ margin-right : var (--ds-space-q );
971
+ }
972
+
966
973
.doc hr {
967
974
border : solid var (--section-divider-color );
968
975
border-width : 2px 0 0 ;
Original file line number Diff line number Diff line change 15
15
}
16
16
}
17
17
18
+ a .ds-button : hover {
19
+ text-decoration : none;
20
+ }
21
+
18
22
/* icon button */
19
23
.ds-button--is-icon {
20
24
height : var (--ds-space-5 );
24
28
25
29
.ds-button--leading-icon {
26
30
margin-right : var (--ds-space-1 );
31
+ display : flex;
27
32
}
28
33
29
34
.ds-button--trailing-icon {
30
35
margin-left : var (--ds-space-1 );
36
+ display : flex;
31
37
}
32
38
33
39
.ds-button--variant-outlined {
Original file line number Diff line number Diff line change 23
23
@import "footer.css" ;
24
24
@import "highlight.css" ;
25
25
@import "print.css" ;
26
+ @import "tutorial-info.css" ;
Original file line number Diff line number Diff line change
1
+ .tutorial-info {
2
+ display : flex;
3
+ align-items : center;
4
+ gap : var (--ds-space-2h );
5
+ margin-bottom : var (--ds-space-3 );
6
+ }
7
+
8
+ .tutorial-info .info-item {
9
+ display : flex;
10
+ gap : var (--ds-space-1 );
11
+ }
12
+
13
+ .tutorial-info .tutorial-actions {
14
+ margin-left : auto;
15
+ }
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ module . exports = ( html ) => {
4
+ const matches = html . toString ( ) . match ( / c l a s s = " s t e p " / g)
5
+ if ( ! matches ) return undefined
6
+ return matches . length
7
+ }
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ const fs = require ( 'fs' )
4
+ const path = require ( 'path' )
5
+
6
+ module . exports = ( iconName ) => {
7
+ const pathName = path . join ( __dirname , '/src/img/' , iconName + '.svg' )
8
+ const content = fs . readFileSync ( pathName , 'utf8' )
9
+ return content
10
+ }
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ <html lang =" en" >
3
+ <head >
4
+ {{> head defaultPageTitle =' Untitled' }}
5
+ </head >
6
+ <body class =" article{{ #with (or page.attributes.role page.role )}} {{{ this }}} {{ /with }} " >
7
+ {{> header }}
8
+ {{> body }}
9
+ {{> footer }}
10
+ </body >
11
+ </html >
Original file line number Diff line number Diff line change 1
1
<article class =" doc" >
2
- {{ #with page.title }}
3
- <h1 class =" page" >{{{ this }}} </h1 >
4
- {{ /with }}
5
- {{{ page.contents }}}
6
- {{> pagination }}
7
- </article >
2
+ {{ #with page.title }}
3
+ <h1 class =" page" >{{{ this }}} </h1 >
4
+ {{ /with }}
5
+ {{ #if (eq page.layout ' tutorial' )}}
6
+ {{> tutorial-info }}
7
+ {{ /if }}
8
+ {{{ page.contents }}}
9
+ {{> pagination }}
10
+ </article >
Original file line number Diff line number Diff line change
1
+ <div class =" tutorial-info" >
2
+ {{ #with page.attributes.skill-level }}
3
+ <div class =" info-item" >
4
+ <span class =" material-icons" >network_check</span >
5
+ {{{ this }}}
6
+ </div >
7
+ {{ /with }}
8
+ {{ #with (stepcount page.contents )}}
9
+ <div class =" info-item" >
10
+ <span class =" material-icons" >playlist_add_check</span >
11
+ {{{ this }}} Steps
12
+ </div >
13
+ {{ /with }}
14
+ {{ #with page.attributes.time-commitment }}
15
+ <div class =" info-item" >
16
+ <span class =" material-icons" >query_builder</span >
17
+ {{{ this }}}
18
+ </div >
19
+ {{ /with }}
20
+ <div class =" tutorial-actions" >
21
+ {{ #with page.attributes.colab-link }}
22
+ <a href =" {{{ this }}} " target =" _blank" class =" colab ds-button ds-button--variant-outlined ds-button--color-neutral" >
23
+ <div class =" ds-button--leading-icon" >{{{ svg ' colab' }}} </div >
24
+ Run this on Colab
25
+ </a >
26
+ {{ /with }}
27
+ </div >
28
+ </div >
You can’t perform that action at this time.
0 commit comments