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,
|
animateAnchor: true,
|
||||||
recordHistory: false,
|
recordHistory: false,
|
||||||
//Custom selectors
|
//Custom selectors
|
||||||
sectionSelector: '.section',
|
|
||||||
slideSelector: '.slide',
|
|
||||||
lazyLoading: true
|
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 \
|
-e modify -e create -e move -e delete \
|
||||||
--timefmt "${TIME_FORMAT}" --format "${OUTPUT_FORMAT}"; do
|
--timefmt "${TIME_FORMAT}" --format "${OUTPUT_FORMAT}"; do
|
||||||
$SYS/render test
|
$SYS/render test
|
||||||
BROWSER_WINDOW_ID=$(xdotool search --onlyvisible --class $BROWSER)
|
# BROWSER_WINDOW_ID=$(xdotool search --onlyvisible --class $BROWSER)
|
||||||
xdotool key --window $BROWSER_WINDOW_ID 'CTRL+r'
|
# xdotool key --window $BROWSER_WINDOW_ID 'CTRL+r'
|
||||||
done
|
done
|
||||||
|
|
|
||||||
79
render
79
render
|
|
@ -69,7 +69,7 @@ act "Title: $B $TITLE $r"
|
||||||
|
|
||||||
# destination directory to render
|
# destination directory to render
|
||||||
# also used by test to substitute pub/
|
# also used by test to substitute pub/
|
||||||
destination="$DIR/pub"
|
destination="${destination:-$DIR/pub}"
|
||||||
|
|
||||||
# setup paths for test
|
# setup paths for test
|
||||||
{ test "$CMD" = "test" } && {
|
{ test "$CMD" = "test" } && {
|
||||||
|
|
@ -198,9 +198,14 @@ EOF
|
||||||
# must go after jquery
|
# must go after jquery
|
||||||
[[ "$FULLPAGE" = "" ]] || {
|
[[ "$FULLPAGE" = "" ]] || {
|
||||||
cat <<EOF
|
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}
|
${FULLPAGE_OPTIONS}
|
||||||
}
|
}
|
||||||
); });</script>
|
); });</script>
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
@ -312,12 +317,6 @@ render_html() {
|
||||||
|
|
||||||
cat $tmp
|
cat $tmp
|
||||||
|
|
||||||
# extra js for html pages
|
|
||||||
[[ "$FLOWTYPE" = "" ]] || {
|
|
||||||
includejs+=(jquery.min.js)
|
|
||||||
includejs+=(flowtype.js)
|
|
||||||
}
|
|
||||||
|
|
||||||
# clean up from temporary files
|
# clean up from temporary files
|
||||||
rm -f tmp.*
|
rm -f tmp.*
|
||||||
|
|
||||||
|
|
@ -389,25 +388,19 @@ prepare_extensions() {
|
||||||
mkdir -p "$destination/js"
|
mkdir -p "$destination/js"
|
||||||
mkdir -p "$destination/img"
|
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" = "" ]] || {
|
[[ "$BOOTSTRAP" = "" ]] || {
|
||||||
includecss+=(bootstrap.min.css bootstrap-responsive.css)
|
includecss+=(bootstrap.min.css)
|
||||||
includejs+=(bootstrap.min.js html5.js)
|
includejs+=(popper.min.js)
|
||||||
|
includejs+=(bootstrap.min.js)
|
||||||
rsync -a "$SYS"/img/* "$destination"/img/
|
rsync -a "$SYS"/img/* "$destination"/img/
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ "$FLOWTYPE" = "" ]] || includecss+=(flowtype.css)
|
|
||||||
|
|
||||||
[[ "$FONTAWESOME" = "" ]] || {
|
[[ "$FONTAWESOME" = "" ]] || {
|
||||||
includecss+=(fontawesome-all.min.css)
|
includecss+=(fontawesome-all.min.css)
|
||||||
# copy fontawesome
|
# copy fontawesome
|
||||||
|
|
@ -415,30 +408,47 @@ prepare_extensions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ "$FULLPAGE" = "" ]] || {
|
[[ "$FULLPAGE" = "" ]] || {
|
||||||
# TODO: check if jquery is needed by other extensions
|
|
||||||
includejs+=(jquery.min.js)
|
|
||||||
includecss+=(jquery.fullpage.min.css)
|
includecss+=(jquery.fullpage.min.css)
|
||||||
includejs+=(jquery.fullpage.min.js)
|
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
|
# copy all css files
|
||||||
|
act "+ css:"
|
||||||
for c in $includecss; do
|
for c in $includecss; do
|
||||||
act "+ css: $c"
|
|
||||||
if [[ -r "$DIR"/views/css/$c ]]; then
|
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
|
elif [[ -r "$SYS"/css/${c} ]]; then
|
||||||
cp -a "$SYS"/css/${c} "${destination}"/css/
|
cp -av "$SYS"/css/${c} "${destination}"/css/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# copy all js files
|
# copy all js files
|
||||||
|
act "+ js:"
|
||||||
for j in $includejs; do
|
for j in $includejs; do
|
||||||
act "+ js: $j"
|
|
||||||
if [[ -r "$DIR"/views/js/$j ]]; then
|
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
|
elif [[ -r "$SYS"/js/$j ]]; then
|
||||||
cp -f "$SYS"/js/$j "$destination"/js
|
cp -fv "$SYS"/js/$j "$destination"/js
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
@ -447,10 +457,10 @@ prepare_extensions() {
|
||||||
# MAIN
|
# MAIN
|
||||||
func MAIN
|
func MAIN
|
||||||
|
|
||||||
{ test "$1" = "source" } && { return 0 }
|
[[ "$1" = "source" ]] && return 0
|
||||||
{ test "$1" = "test" } && {
|
# { test "$1" = "test" } && {
|
||||||
act "Local test rendering inside test/"
|
# act "Local test rendering inside test/"
|
||||||
source $SYS/test }
|
# source $SYS/test }
|
||||||
|
|
||||||
prepare_extensions
|
prepare_extensions
|
||||||
|
|
||||||
|
|
@ -518,7 +528,6 @@ EOF
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
cat <<EOF >> $dst
|
cat <<EOF >> $dst
|
||||||
<p> </p>
|
|
||||||
<div class="container-fluid" $extras>
|
<div class="container-fluid" $extras>
|
||||||
<article>
|
<article>
|
||||||
EOF
|
EOF
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue