File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 33 "use strict" ;
44
55 // Page specific actions
6- var MYSITE = {
6+ const MYSITE = {
77 common : { // sitewide code
88 init : function ( ) {
99
2424 } ;
2525
2626
27- var UTIL = {
27+ const UTIL = {
2828 exec : function ( controller , action ) {
29- var ns = MYSITE ,
30- action = ( action === undefined ) ? 'init' : action ;
31- if ( controller !== '' && ns [ controller ] && typeof ns [ controller ] [ action ] == 'function' ) {
32- ns [ controller ] [ action ] ( ) ;
29+ let namespace = MYSITE ;
30+ action = ( action === undefined ) ? 'init' : action ;
31+ if ( controller !== '' && namespace [ controller ] && typeof namespace [ controller ] [ action ] == 'function' ) {
32+ namespace [ controller ] [ action ] ( ) ;
3333 }
3434 } ,
35-
3635 init : function ( ) {
37- var main = document . getElementById ( 'main' ) ,
38- controller = main . getAttribute ( 'data-controller' ) ,
39- action = main . getAttribute ( 'data-action' ) ;
36+ let elm = document . getElementById ( 'main' ) ;
37+ let controller = elm . getAttribute ( 'data-controller' ) ;
38+ let action = elm . getAttribute ( 'data-action' ) ;
4039 UTIL . exec ( 'common' ) ;
4140 UTIL . exec ( controller ) ;
4241 UTIL . exec ( controller , action ) ;
Original file line number Diff line number Diff line change 11@import " settings" ; // <-- Set sitewide defaults
22@import " components/mixins" ; // Goodies!
33
4+ html {
5+ scroll-behavior : smooth ;
6+ }
47/* Demo */
58body {
69 font-family : ' Roboto Condensed' , sans-serif ;
You can’t perform that action at this time.
0 commit comments