utempl/www: correction des options et modification cosmétique
This commit is contained in:
parent
ad88c99fc5
commit
225060c0b1
|
@ -25,20 +25,20 @@ OPTIONS
|
|||
-5, --html5
|
||||
Spécifier le type de document. Les options -4 et -5 sont équivalentes à
|
||||
--doctype html4 et --doctype html5, respectivement.
|
||||
-U, --baseurl BASEURL
|
||||
-b, --baseurl BASEURL
|
||||
Spécifier le chemin à partir de la racine qui contient les resources
|
||||
blueprint et bootstrap
|
||||
-B, --bpurl, --bsurl BPURL
|
||||
Spécifier le chemin sous BASURL à partir duquel charger blueprint ou
|
||||
bootstrap. La valeur par défaut est 'blueprint' pour l'option --bp,
|
||||
'bootstrap' pour l'option --bs
|
||||
-B, --bspath, --bppath CLPATH
|
||||
Spécifier le chemin sous BASEURL à partir duquel charger bootstrap ou
|
||||
blueprint. La valeur par défaut est 'bootstrap' pour l'option --bs,
|
||||
'blueprint' pour l'option --bp
|
||||
-s, --bs, --bootstrap
|
||||
Activer le support de bootstrap. L'option --bs est automatiquement
|
||||
activée si l'option --bsurl n'est pas utilisée et le répertoire
|
||||
activée si l'option --bspath n'est pas utilisée et le répertoire
|
||||
[BASEURL/]bootstrap/ existe
|
||||
-b, --bp, --blueprint
|
||||
-p, --bp, --blueprint
|
||||
Activer le support de blueprint. L'option --bp est automatiquement
|
||||
activée si l'option --bpurl n'est pas utilisée et le répertoire
|
||||
activée si l'option --bppath n'est pas utilisée et le répertoire
|
||||
[BASEURL/]blueprint/ existe
|
||||
-n, --nobs, --no-bootstrap, --nobp, --no-blueprint
|
||||
Désactiver le support de bootstrap et blueprint
|
||||
|
@ -110,10 +110,10 @@ function __generate_html() {
|
|||
local dir="$(dirname "$file")"
|
||||
local nobpsuppl nobplocal nobpmobile
|
||||
if [ "$csslib" == auto ]; then
|
||||
if [ -n "$bpurl" ]; then
|
||||
if [ "$bpurl" == bootstrap -o -z "${bpurl##*/bootstrap}" ]; then
|
||||
if [ -n "$clpath" ]; then
|
||||
if [ "$clpath" == bootstrap -o -z "${clpath##*/bootstrap}" ]; then
|
||||
csslib=bootstrap
|
||||
elif [ "$bpurl" == blueprint -o -z "${bpurl##*/blueprint}" ]; then
|
||||
elif [ "$clpath" == blueprint -o -z "${clpath##*/blueprint}" ]; then
|
||||
csslib=blueprint
|
||||
else
|
||||
csslib=
|
||||
|
@ -127,16 +127,16 @@ function __generate_html() {
|
|||
fi
|
||||
fi
|
||||
if [ "$csslib" == bootstrap ]; then
|
||||
[ -n "$bpurl" ] || bpurl=bootstrap
|
||||
[ -n "$clpath" ] || clpath=bootstrap
|
||||
elif [ "$csslib" == blueprint ]; then
|
||||
[ -n "$bpurl" ] || bpurl=blueprint
|
||||
[ -n "$clpath" ] || clpath=blueprint
|
||||
[ -f "$dir/${baseurl#/}bpsuppl.css" ] || nobpsuppl=1
|
||||
[ -f "$dir/${baseurl#/}bplocal.css" ] || nobplocal=1
|
||||
[ -f "$dir/${baseurl#/}bpmobile.css" ] || nobpmobile=1
|
||||
fi
|
||||
|
||||
bpurl="$baseurl$bpurl"
|
||||
[ "${bpurl:$((-1)):1}" == / ] || bpurl="$bpurl/"
|
||||
clpath="$baseurl$clpath"
|
||||
[ "${clpath:$((-1)):1}" == / ] || clpath="$clpath/"
|
||||
|
||||
local jquerymin
|
||||
if [ "$jquery" == auto ]; then
|
||||
|
@ -172,14 +172,14 @@ function __generate_html() {
|
|||
head="$head
|
||||
"'<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="shortcut" href="'"$bpurl"'favicon.ico" />
|
||||
<link rel="icon apple-touch-icon" href="'"$bpurl"'icon.png" />'
|
||||
csslib='<link href="'"$bpurl"'bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<script src="'"$bpurl"'jquery.min.js" type="text/javascript"></script>
|
||||
<script src="'"$bpurl"'bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<link rel="shortcut" href="'"$clpath"'favicon.ico" />
|
||||
<link rel="icon apple-touch-icon" href="'"$clpath"'icon.png" />'
|
||||
csslib='<link href="'"$clpath"'bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<script src="'"$clpath"'jquery.min.js" type="text/javascript"></script>
|
||||
<script src="'"$clpath"'bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="'"$bpurl"'html5shiv/html5shiv.js"></script>
|
||||
<script src="'"$bpurl"'respond/respond.min.js"></script>
|
||||
<script src="'"$clpath"'html5shiv/html5shiv.js"></script>
|
||||
<script src="'"$clpath"'respond/respond.min.js"></script>
|
||||
<![endif]-->'
|
||||
startcl='<div class="container">'
|
||||
endcl='</div>'
|
||||
|
@ -188,10 +188,10 @@ function __generate_html() {
|
|||
"'<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="shortcut" href="'"$baseurl"'favicon.ico" />
|
||||
<link rel="icon apple-touch-icon" href="'"$baseurl"'icon.png" />'
|
||||
csslib='<link rel="stylesheet" href="'"$bpurl"'screen.css" type="text/css" media="screen, projection" />
|
||||
<link rel="stylesheet" href="'"$bpurl"'print.css" type="text/css" media="print" />
|
||||
csslib='<link rel="stylesheet" href="'"$clpath"'screen.css" type="text/css" media="screen, projection" />
|
||||
<link rel="stylesheet" href="'"$clpath"'print.css" type="text/css" media="print" />
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="'"$bpurl"'ie.css" type="text/css" media="screen, projection" />
|
||||
<link rel="stylesheet" href="'"$clpath"'ie.css" type="text/css" media="screen, projection" />
|
||||
<![endif]-->
|
||||
<'"${nobpsuppl:+!--}"'link rel="stylesheet" href="'"$baseurl"'bpsuppl.css" type="text/css" media="screen, projection" /'"${nobpsuppl:+--}"'>
|
||||
<'"${nobplocal:+!--}"'link rel="stylesheet" href="'"$baseurl"'bplocal.css" type="text/css" media="screen, projection" /'"${nobplocal:+--}"'>
|
||||
|
@ -381,7 +381,7 @@ overwrite=
|
|||
encoding=
|
||||
doctype=auto
|
||||
baseurl=/
|
||||
bpurl=
|
||||
clpath=
|
||||
csslib=auto
|
||||
jquery=auto
|
||||
titlehl=
|
||||
|
@ -397,10 +397,10 @@ parse_opts "${PRETTYOPTS[@]}" \
|
|||
--doctype: doctype= \
|
||||
-4,--html4 doctype=html4 \
|
||||
-5,--html5 doctype=html5 \
|
||||
-U:,--baseurl: baseurl= \
|
||||
-B:,--bpurl:,--bsurl: bpurl= \
|
||||
-b:,--baseurl: baseurl= \
|
||||
-B:,--bspath:,--bppath: clpath= \
|
||||
-s,--bootstrap,--bs csslib=bootstrap \
|
||||
-b,--blueprint,--bp csslib=blueprint \
|
||||
-p,--blueprint,--bp csslib=blueprint \
|
||||
-n,--no-bootstrap,--nobootstrap,--nobs,--no-blueprint,--noblueprint,--nobp csslib= \
|
||||
-j,--jquery jquery=1 \
|
||||
-k,--no-jquery,--nojquery jquery= \
|
||||
|
|
Loading…
Reference in New Issue