diff --git a/init b/init index cfa0b8e..f547396 100755 --- a/init +++ b/init @@ -138,9 +138,8 @@ WEB_ROOT="" # information that works also with twitter. TWITTER="@DyneOrg" -# -# Anything below is safe to leave untouched -# +# What file extension to use for html files +EXTENSION=".html" # Comment to disable Bootstrap BOOTSTRAP=1 @@ -148,9 +147,6 @@ BOOTSTRAP=1 # Comment to disable FontAwesome FONTAWESOME=1 -# What file extension to use for html files -EXTENSION=".html" - # What is the url for files in case indexing is used # this can be different from WEB_ROOT in order to serve # files from a position different from the web pages @@ -170,6 +166,42 @@ EXIF_CLEAN=1 # EXIF_COMMENT="" # Automatically rotate the image according to EXIF information # EXIF_ROTATE=1 + +# Uncomment to enable Fullpage.js +# FULLPAGE=1 +# FULLPAGE_OPTIONS=" + //Design + controlArrows: true, + verticalCentered: true, + sectionsColor : ['#ccc', '#fff'], + paddingTop: '3em', + paddingBottom: '10px', + fixedElements: '#header, .footer', + //Navigation + navigation: true, + navigationPosition: 'right', + showActiveTooltip: false, + slidesNavigation: false, + slidesNavPosition: 'bottom', + //Scrolling + scrollingSpeed: 700, + autoScrolling: true, + fitToSection: true, + scrollBar: true, + loopBottom: true, + loopTop: false, + loopHorizontal: true, + touchSensitivity: 15, + //Accessibility + keyboardScrolling: true, + animateAnchor: true, + recordHistory: false, + //Custom selectors + sectionSelector: '.section', + slideSelector: '.slide', + lazyLoading: true +" + EOF } diff --git a/render b/render index a82be8f..4cbb8e3 100755 --- a/render +++ b/render @@ -123,9 +123,6 @@ EOF - - - EOF } @@ -155,33 +152,13 @@ EOF EOF } - # include all css files found in views/css - cssfound=`find $DIR/views/css -iname '*.css'` - - for c in ${(f)cssfound}; do - includecss+=(${c##*/}) - done - - - # include also generated css for fonts if present - [[ -f "${destination}"/css/custom.fonts.css ]] && includecss+=(custom.fonts.css) - # add all css needed + # array is setup in prepare_extensions() for c in $includecss; do - act "+ css: $c" - func "" - cat < - EOF - if [[ -r "$DIR"/views/css/$c ]]; then - cp -a $DIR/views/css/$c "${destination}"/css/ - elif [[ -r "$SYS"/css/${c} ]]; then - cp -a "$SYS"/css/${c} "${destination}"/css/ - fi - done # add the user configured header @@ -201,20 +178,6 @@ EOF includejs+=(${j##*/}) done - # insert and copy all js files - for j in $includejs; do - act "+ js: $j" - cat < -EOF - if [[ -r "$DIR"/views/js/$j ]]; then - cp -f "$DIR"/views/js/$j "$destination"/js - elif [[ -r "$SYS"/js/$j ]]; then - cp -f "$SYS"/js/$j "$destination"/js - fi - done - - render_file "$DIR"/tmpl/footer.html # add any string argument to the footer @@ -223,6 +186,25 @@ EOF # if test mode then render the test footer [[ "$CMD" = "test" ]] && render_test_footer + + # insert all js files + for j in $includejs; do + cat < +EOF + done + + + # must go after jquery + [[ "$FULLPAGE" = "" ]] || { + cat < \$(document).ready(function() { \$('#fullpage').fullpage({ +${FULLPAGE_OPTIONS} +} +); }); +EOF + } + [[ "$FLOWTYPE" = "" ]] || { # if there is flowtype.js then use it cat <> $dst - [[ $BOOTSTRAP = 0 ]] || { - cat <> $dst -

 

-
+ extras="" + [[ "$FULLPAGE" = "" ]] || extras+=" id=\"fullpage\" " + if [[ $BOOTSTRAP = 0 ]]; then + cat <> $dst +
EOF - } + else + cat <> $dst +

 

+
+
+EOF + fi # read meta commands cat ${src} | strip_meta | render_html >> $dst @@ -516,7 +543,6 @@ EOF } - # render all maildirs maildirs=(`find views -type f -name '*.maildir'`) maildirs+=(`find views -type f -name '*.maildirs'`)