File tree Expand file tree Collapse file tree
templates/blocks/frontpage-content Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ function requireModuleTasks(moduleName) {
5959gulp . task ( "nodemon" , lazyRequireTask ( './tasks/nodemon' , {
6060 // shared client/server code has require('template.jade) which precompiles template on run
6161 // so I have to restart server to pickup the template change
62- ext : "js" ,
62+ ext : "js,yml " ,
6363
6464 nodeArgs : process . env . NODE_DEBUG ? [ '--debug' ] : [ ] ,
6565 script : "./bin/server.js" ,
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ exports.get = async function (ctx, next) {
1717 ctx . locals . siteToolbarCurrentSection = "tutorial" ;
1818 ctx . locals . title = t ( 'tutorial.frontpage.modern_javascript_tutorial' ) ;
1919
20- let topArticlesRendered = await localStorage . getOrGenerate ( 'tutorial:frontpage' , renderTop ) ;
20+ let topArticlesRendered = await localStorage . getOrGenerate ( 'tutorial:frontpage' , renderTop , process . env . TUTORIAL_EDIT ) ;
2121
2222 if ( ! Object . keys ( topArticlesRendered ) . length ) {
2323 ctx . throw ( 404 , "Database is empty?" ) ; // empty db
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ block append variables
1313
1414block append head
1515 != js (" tutorial" , {defer: true })
16- meta( name ="description" content =t (" site .meta.description" ))
16+ meta( name ="description" content =t (" config .meta.description" ))
1717
1818block content
1919 + frontpage-content({
Original file line number Diff line number Diff line change @@ -205,18 +205,18 @@ module.exports = function (config) {
205205 new WriteVersionsPlugin ( path . join ( config . cacheRoot , 'webpack.versions.json' ) ) ,
206206
207207 new MiniCssExtractPlugin ( {
208- filename : devMode ? '[name].css' : extHash ( "[name]" , 'css' ) ,
209- chunkFilename : devMode ? '[id].css' : extHash ( "[id]" , 'css' ) ,
208+ filename : extHash ( "[name]" , 'css' ) ,
209+ chunkFilename : extHash ( "[id]" , 'css' ) ,
210210 } ) ,
211211
212212 function ( ) {
213213
214- let styles = glob . sync ( 'styles/**/*.styl' , { cwd : config . projectRoot } ) ;
214+ let styles = glob . sync ( '{ styles,templates} /**/*.styl' , { cwd : config . projectRoot } ) ;
215215
216- config . handlers . forEach ( handler => {
217- let handlerStyles = glob . sync ( `handlers/${ handler } /client/styles/**/*.styl` , { cwd : config . projectRoot } ) ;
218- styles . push ( ...handlerStyles ) ;
219- } ) ;
216+ // config.handlers.forEach(handler => {
217+ // let handlerStyles = glob.sync(`handlers/${handler}/client/styles/**/*.styl`, {cwd: config.projectRoot});
218+ // styles.push(...handlerStyles);
219+ // });
220220
221221 let content = styles . map ( s => `@require '../${ s } '` ) . join ( "\n" ) ;
222222
Original file line number Diff line number Diff line change 1- mixin frontpage-contents (data )
1+ mixin frontpage-content (data )
22 - let {tutorialTree, topArticlesRendered} = data;
33
44 mixin partList(children )
@@ -16,7 +16,7 @@ mixin frontpage-contents(data)
1616 if (topic .children .length > 6 )
1717 + e('li' ).more = t (' tutorial.frontpage.more' )
1818
19- + b.main-en-contents
19+ + b.frontpage-content
2020 + e.container
2121 - let folder = tutorialTree .bySlug (' js' )
2222 + e.inner
Original file line number Diff line number Diff line change 1- .main-en-contents
1+ .frontpage-content
22 background white
33 outline none
44
You can’t perform that action at this time.
0 commit comments