mirror of https://github.com/dyne/webnomad.git
minor fixes
This commit is contained in:
parent
df9b5ecc7d
commit
1f6b096ab4
2
init
2
init
|
|
@ -197,8 +197,6 @@ EXIF_CLEAN=1
|
|||
animateAnchor: true,
|
||||
recordHistory: false,
|
||||
//Custom selectors
|
||||
sectionSelector: '.section',
|
||||
slideSelector: '.slide',
|
||||
lazyLoading: true
|
||||
"
|
||||
|
||||
|
|
|
|||
4
preview
4
preview
|
|
@ -45,6 +45,6 @@ while print - $views | inotifywait --fromfile - -q -r \
|
|||
-e modify -e create -e move -e delete \
|
||||
--timefmt "${TIME_FORMAT}" --format "${OUTPUT_FORMAT}"; do
|
||||
$SYS/render test
|
||||
BROWSER_WINDOW_ID=$(xdotool search --onlyvisible --class $BROWSER)
|
||||
xdotool key --window $BROWSER_WINDOW_ID 'CTRL+r'
|
||||
# BROWSER_WINDOW_ID=$(xdotool search --onlyvisible --class $BROWSER)
|
||||
# xdotool key --window $BROWSER_WINDOW_ID 'CTRL+r'
|
||||
done
|
||||
|
|
|
|||
81
render
81
render
|
|
@ -69,7 +69,7 @@ act "Title: $B $TITLE $r"
|
|||
|
||||
# destination directory to render
|
||||
# also used by test to substitute pub/
|
||||
destination="$DIR/pub"
|
||||
destination="${destination:-$DIR/pub}"
|
||||
|
||||
# setup paths for test
|
||||
{ test "$CMD" = "test" } && {
|
||||
|
|
@ -198,9 +198,14 @@ EOF
|
|||
# must go after jquery
|
||||
[[ "$FULLPAGE" = "" ]] || {
|
||||
cat <<EOF
|
||||
<script> \$(document).ready(function() { \$('#fullpage').fullpage({
|
||||
<script>
|
||||
var fullpage_initialised = false;
|
||||
\$(document).ready(function() {
|
||||
if(fullpage_initialised) return;
|
||||
fullpage_initialised = true;
|
||||
\$('#fullpage').fullpage({
|
||||
${FULLPAGE_OPTIONS}
|
||||
}
|
||||
}
|
||||
); });</script>
|
||||
EOF
|
||||
}
|
||||
|
|
@ -312,12 +317,6 @@ render_html() {
|
|||
|
||||
cat $tmp
|
||||
|
||||
# extra js for html pages
|
||||
[[ "$FLOWTYPE" = "" ]] || {
|
||||
includejs+=(jquery.min.js)
|
||||
includejs+=(flowtype.js)
|
||||
}
|
||||
|
||||
# clean up from temporary files
|
||||
rm -f tmp.*
|
||||
|
||||
|
|
@ -389,25 +388,19 @@ prepare_extensions() {
|
|||
mkdir -p "$destination/js"
|
||||
mkdir -p "$destination/img"
|
||||
|
||||
# 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)
|
||||
|
||||
# TODO: check if jquery is needed by other extensions:
|
||||
## include jquery only if needed and grant html-only page
|
||||
## creation.
|
||||
includejs+=(jquery.min.js)
|
||||
|
||||
[[ "$BOOTSTRAP" = "" ]] || {
|
||||
includecss+=(bootstrap.min.css bootstrap-responsive.css)
|
||||
includejs+=(bootstrap.min.js html5.js)
|
||||
rsync -a "$SYS"/img/* "$destination"/img/
|
||||
includecss+=(bootstrap.min.css)
|
||||
includejs+=(popper.min.js)
|
||||
includejs+=(bootstrap.min.js)
|
||||
rsync -a "$SYS"/img/* "$destination"/img/
|
||||
}
|
||||
|
||||
[[ "$FLOWTYPE" = "" ]] || includecss+=(flowtype.css)
|
||||
|
||||
[[ "$FONTAWESOME" = "" ]] || {
|
||||
includecss+=(fontawesome-all.min.css)
|
||||
# copy fontawesome
|
||||
|
|
@ -415,30 +408,47 @@ prepare_extensions() {
|
|||
}
|
||||
|
||||
[[ "$FULLPAGE" = "" ]] || {
|
||||
# TODO: check if jquery is needed by other extensions
|
||||
includejs+=(jquery.min.js)
|
||||
includecss+=(jquery.fullpage.min.css)
|
||||
includejs+=(jquery.fullpage.min.js)
|
||||
}
|
||||
|
||||
#####
|
||||
# at last the custom css to override all
|
||||
|
||||
# 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)
|
||||
|
||||
# flowtype handles the size of fonts if active
|
||||
[[ "$FLOWTYPE" = "" ]] || {
|
||||
includecss+=(flowtype.css)
|
||||
includejs+=(flowtype.js)
|
||||
}
|
||||
|
||||
|
||||
# copy all css files
|
||||
act "+ css:"
|
||||
for c in $includecss; do
|
||||
act "+ css: $c"
|
||||
if [[ -r "$DIR"/views/css/$c ]]; then
|
||||
cp -a "$DIR"/views/css/$c "${destination}"/css/
|
||||
cp -av "$DIR"/views/css/$c "${destination}"/css/
|
||||
elif [[ -r "$SYS"/css/${c} ]]; then
|
||||
cp -a "$SYS"/css/${c} "${destination}"/css/
|
||||
cp -av "$SYS"/css/${c} "${destination}"/css/
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# copy all js files
|
||||
act "+ js:"
|
||||
for j in $includejs; do
|
||||
act "+ js: $j"
|
||||
if [[ -r "$DIR"/views/js/$j ]]; then
|
||||
cp -f "$DIR"/views/js/$j "$destination"/js
|
||||
cp -fv "$DIR"/views/js/$j "$destination"/js
|
||||
elif [[ -r "$SYS"/js/$j ]]; then
|
||||
cp -f "$SYS"/js/$j "$destination"/js
|
||||
cp -fv "$SYS"/js/$j "$destination"/js
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
@ -447,10 +457,10 @@ prepare_extensions() {
|
|||
# MAIN
|
||||
func MAIN
|
||||
|
||||
{ test "$1" = "source" } && { return 0 }
|
||||
{ test "$1" = "test" } && {
|
||||
act "Local test rendering inside test/"
|
||||
source $SYS/test }
|
||||
[[ "$1" = "source" ]] && return 0
|
||||
# { test "$1" = "test" } && {
|
||||
# act "Local test rendering inside test/"
|
||||
# source $SYS/test }
|
||||
|
||||
prepare_extensions
|
||||
|
||||
|
|
@ -518,7 +528,6 @@ EOF
|
|||
EOF
|
||||
else
|
||||
cat <<EOF >> $dst
|
||||
<p> </p>
|
||||
<div class="container-fluid" $extras>
|
||||
<article>
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Reference in New Issue