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 939939 padding : 0.25rem 0 ;
940940}
941941
942- .doc .conum [data-value ] {
942+ .doc .conum [data-value ],
943+ .doc .step {
943944 @include text-overline;
944945
945946 color : var (--ds-text-inverse );
963964 display : none;
964965}
965966
967+ .doc .step {
968+ position : relative;
969+ top : -0.25em ;
970+ margin-right : var (--ds-space-q );
971+ }
972+
966973.doc hr {
967974 border : solid var (--section-divider-color );
968975 border-width : 2px 0 0 ;
Original file line number Diff line number Diff line change 1515 }
1616}
1717
18+ a .ds-button : hover {
19+ text-decoration : none;
20+ }
21+
1822/* icon button */
1923.ds-button--is-icon {
2024 height : var (--ds-space-5 );
2428
2529.ds-button--leading-icon {
2630 margin-right : var (--ds-space-1 );
31+ display : flex;
2732}
2833
2934.ds-button--trailing-icon {
3035 margin-left : var (--ds-space-1 );
36+ display : flex;
3137}
3238
3339.ds-button--variant-outlined {
Original file line number Diff line number Diff line change 2323@import "footer.css" ;
2424@import "highlight.css" ;
2525@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 11<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