cookutils rev 894
cook: fix copy() -> cook_copy_folders() for repeated copying; web/cooker.cgi: manage packages with '+' in the name; web/style.css: get styles from mirror1.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 24 17:29:16 2017 +0200 (2017-03-24) |
parents | eff71eaaee4f |
children | db8f7638ad59 |
files | cook web/cooker.cgi web/style.css |
line diff
1.1 --- a/cook Mon Mar 20 05:12:29 2017 +0200 1.2 +++ b/cook Fri Mar 24 17:29:16 2017 +0200 1.3 @@ -403,10 +403,10 @@ 1.4 # A bit smarter function than the classic `cp` command 1.5 1.6 copy() { 1.7 - if [ "$(stat -c %h -- "$1")" -gt 1 ]; then 1.8 + if [ -d "$1" -o "$(stat -c %h -- "$1")" -eq 1 ]; then 1.9 + cp -a "$1" "$2" # copy folders and generic files 1.10 + else 1.11 cp -al "$1" "$2" # copy hardlinks 1.12 - else 1.13 - cp -a "$1" "$2" # copy generic files 1.14 fi 1.15 } 1.16 1.17 @@ -782,6 +782,68 @@ 1.18 } 1.19 1.20 1.21 +# Receipt used for cooking the package is redundant to be included into package. 1.22 +# This script will strip the original receipt to bare minimum: variables, 1.23 +# {pre,post}_{install,remove} functions. 1.24 + 1.25 +mk_pkg_receipt() { 1.26 + orig_receipt="$1" 1.27 + # $pkg is package name 1.28 + 1.29 + # Receipt's signature is important, although some receipts may miss it 1.30 + signature=$(head -n1 "$orig_receipt") 1.31 + [ "${signature:0:1}" == '#' ] || signature='# SliTaz package receipt.' 1.32 + 1.33 + . "$orig_receipt" 1.34 + 1.35 + # Is package splitted one? 1.36 + [ -n "$SPLIT" -a "${SPLIT/$pkg/}" != "$SPLIT" ]; splitted=$? 1.37 + 1.38 + # Manage splitted packages 1.39 + if $splitted; then 1.40 + # For packages with empty $DEPENDS 1.41 + [ -n "$DEPENDS" ] || DEPENDS="$PACKAGE" 1.42 + 1.43 + # Default $CAT 1.44 + [ -z "$CAT" ] && 1.45 + case $pkg in 1.46 + *-dev) CAT="development|development files" ;; 1.47 + esac 1.48 + 1.49 + # Manage $CAT 1.50 + CATEGORY="${CAT%|*}" 1.51 + SHORT_DESC="$SHORT_DESC (${CAT#*|})" 1.52 + fi 1.53 + 1.54 + # Mandatory variables 1.55 + cat <<EOF 1.56 +$signature 1.57 + 1.58 +PACKAGE="$PACKAGE" 1.59 +VERSION="$VERSION" 1.60 +CATEGORY="$CATEGORY" 1.61 +SHORT_DESC="$SHORT_DESC" 1.62 +MAINTAINER="$MAINTAINER" 1.63 +LICENSE="$LICENSE" 1.64 +WEB_SITE="$WEB_SITE" 1.65 +EOF 1.66 + 1.67 + # Optional variables 1.68 + [ -n "$TAGS" ] && echo "TAGS=\"$TAGS\"" 1.69 + [ -n "$DEPENDS" ] && echo "DEPENDS=\"$DEPENDS\"" 1.70 + 1.71 + # Extract {pre,post}_{install,remove} functions 1.72 + for i in pre post; do 1.73 + for j in install remove; do 1.74 + if grep -q "^${i}_$j()"; then 1.75 + echo 1.76 + sed "/^${i}_$j()/,/}/!d" "$orig_receipt" 1.77 + fi 1.78 + done 1.79 + done 1.80 +} 1.81 + 1.82 + 1.83 # Create the package. Wanted to use TazPkg to create a tazpkg package at first, 1.84 # but it doesn't handle EXTRAVERSION. 1.85
2.1 --- a/web/cooker.cgi Mon Mar 20 05:12:29 2017 +0200 2.2 +++ b/web/cooker.cgi Fri Mar 24 17:29:16 2017 +0200 2.3 @@ -25,9 +25,9 @@ 2.4 2.5 # Path to markdown to html convertor 2.6 if [ -n "$(which cmark 2>/dev/null)" ]; then 2.7 - md2html="$(which cmark) --smart" 2.8 + md2html="$(which cmark) --smart -e table -e strikethrough -e autolink -e tagfilter" 2.9 elif [ -x "./cmark" ]; then 2.10 - md2html="./cmark --smart" 2.11 + md2html="./cmark --smart -e table -e strikethrough -e autolink -e tagfilter" 2.12 elif [ -n "$(which sundown 2>/dev/null)" ]; then 2.13 md2html=$(which sundown) 2.14 elif [ -x "./sundown" ]; then 2.15 @@ -131,13 +131,15 @@ 2.16 mm=$(echo $time | cut -d: -f2) 2.17 ss=$(echo $time | cut -d: -f3) 2.18 date_s=$(date -ud "$year$mon$day$hh$mm.$ss" +%s) 2.19 - if [ "$date_s" -ge "$(date -ur "$file" +%s)" ]; then 2.20 - echo -e 'HTTP/1.1 304 Not Modified\n' 2.21 - exit 2.22 - fi 2.23 +# if [ "$date_s" -ge "$(date -ur "$file" +%s)" ]; then 2.24 +# echo -e 'HTTP/1.1 304 Not Modified\n' 2.25 +# exit 2.26 +# fi 2.27 +# TODO: improve caching control 2.28 done 2.29 fi 2.30 echo "Last-Modified: $(date -Rur "$file" | sed 's|UTC|GMT|')" 2.31 + echo "Cache-Control: public, max-age=3600" 2.32 } 2.33 2.34 2.35 @@ -145,8 +147,8 @@ 2.36 recook=*) 2.37 case "$HTTP_USER_AGENT" in 2.38 *SliTaz*) 2.39 - grep -qs "^${QUERY_STRING#recook=}$" $CACHE/recook-packages || 2.40 - echo ${QUERY_STRING#recook=} >> $CACHE/recook-packages 2.41 + grep -qs "^$(GET recook)$" $CACHE/recook-packages || 2.42 + echo "$(GET recook)" >> $CACHE/recook-packages 2.43 esac 2.44 echo -e "Location: ${HTTP_REFERER:-${REQUEST_URI%\?*}}\n" 2.45 exit 2.46 @@ -159,7 +161,7 @@ 2.47 ;; 2.48 2.49 src*) 2.50 - file=$(busybox httpd -d "$SRC/${QUERY_STRING#*=}") 2.51 + file=$(busybox httpd -d "$SRC/$(GET src)") 2.52 manage_modified "$file" 2.53 content_type='application/octet-stream' 2.54 case $file in 2.55 @@ -171,7 +173,8 @@ 2.56 esac 2.57 echo "Content-Type: $content_type" 2.58 echo "Content-Length: $(stat -c %s "$file")" 2.59 - echo "Content-Disposition: attachment; filename=\"$(basename "$file")\"" 2.60 + filename=$(basename "$file") 2.61 + echo "Content-Disposition: attachment; filename=\"$filename\"" # Note, no conversion '+' -> '%2B' here 2.62 echo 2.63 2.64 cat "$file" 2.65 @@ -179,7 +182,7 @@ 2.66 ;; 2.67 2.68 download*) 2.69 - file=$(busybox httpd -d "$PKGS/${QUERY_STRING#*=}") 2.70 + file="$PKGS/$(GET download)" 2.71 manage_modified "$file" 2.72 content_type='application/octet-stream' 2.73 case $file in 2.74 @@ -201,7 +204,8 @@ 2.75 2.76 echo "Content-Type: $content_type" 2.77 echo "Content-Length: $(stat -c %s "$file")" 2.78 - echo "Content-Disposition: inline; filename=\"$(basename "$file")\"" 2.79 + filename=$(basename "$file") 2.80 + echo "Content-Disposition: inline; filename=\"$filename\"" # Note, no conversion '+' -> '%2B' here 2.81 echo 2.82 2.83 cat "$file" 2.84 @@ -213,7 +217,7 @@ 2.85 ;; 2.86 2.87 stuff*) 2.88 - file="$wok/${QUERY_STRING#stuff=}" 2.89 + file="$wok/$(GET stuff)" 2.90 manage_modified "$file" 2.91 ;; 2.92 2.93 @@ -284,20 +288,21 @@ 2.94 2.95 info2html() { 2.96 sed \ 2.97 - -e 's|&|\&|g' -e 's|<|\<|g' \ 2.98 + -e 's|&|\&|g; s|<|\<|g; s|>|\>|g' \ 2.99 -e 's|^\* \(.*\)::|* <a href="#\1">\1</a> |' \ 2.100 -e 's|\*note \(.*\)::|<a href="#\1">\1</a>|' \ 2.101 - -e '/^File: /s|(dir)|Top|g' \ 2.102 - -e '/^File: /s|Node: \([^,]*\)|Node: <a name="\1"></a><u>\1</u>|' \ 2.103 - -e '/^File: /s|Next: \([^,]*\)|Next: <a href="#\1">\1</a>|' \ 2.104 - -e '/^File: /s|Prev: \([^,]*\)|Prev: <a href="#\1">\1</a>|' \ 2.105 - -e '/^File: /s|Up: \([^,]*\)|Up: <a href="#\1">\1</a>|' \ 2.106 - -e '/^File: /s|^.*$|<i>&</i>|' \ 2.107 + -e '/^File: / s|(dir)|Top|g' \ 2.108 + -e '/^File: / s|Next: \([^,]*\)|<a class="button" href="#\1">Next: \1</a>|' \ 2.109 + -e '/^File: / s|Prev: \([^,]*\)|<a class="button" href="#\1">Prev: \1</a>|' \ 2.110 + -e '/^File: / s|Up: \([^,]*\)|<a class="button" href="#\1">Up: \1</a>|' \ 2.111 + -e '/^File: / s|^.* Node: \([^,]*\), *\(.*\)$|<pre id="\1">\2|' \ 2.112 + -e '/^<pre id=/ s|^\([^>]*>\)\(<a[^>]*>Next: [^,]*\), *\(<a[^>]*>Prev: [^,]*\), *\(<a[^>]*>Up: .*\)|\1 \3 \4 \2|' \ 2.113 -e '/^Tag Table:$/,/^End Tag Table$/d' \ 2.114 -e '/INFO-DIR/,/^END-INFO-DIR/d' \ 2.115 - -e "s|https*://[^>),'\"\` ]*|<a href=\"&\">&</a>|g" \ 2.116 + -e "s|https*://[^>),'\"\`’ ]*|<a href=\"&\">&</a>|g" \ 2.117 -e "s|ftp://[^>),\"\` ]*|<a href=\"&\">&</a>|g" \ 2.118 - -e "s|^|</pre><pre class='info'>|" 2.119 + -e 's|^\* Menu:|<b>Menu:</b>|' \ 2.120 + -e "s|^|</pre>|" 2.121 } 2.122 2.123 2.124 @@ -474,7 +479,7 @@ 2.125 cmd=${QUERY_STRING%%=*} 2.126 echo '<div id="info">' 2.127 active=''; [ "$cmd" == 'receipt' -o "$cmd" == 'stuff' ] && active=' active' 2.128 - echo "<a class='button green$active' href='?receipt=$pkg'>receipt & stuff</a>" 2.129 + echo "<a class='button green$active' href='?receipt=${pkg//+/%2B}'>receipt & stuff</a>" 2.130 2.131 unset WEB_SITE WANTED 2.132 bpkg=$pkg 2.133 @@ -487,27 +492,27 @@ 2.134 2.135 if [ -f "$wok/$pkg/taz/$PACKAGE-$VERSION/receipt" ]; then 2.136 active=''; [ "$cmd" == 'files' ] && active=' active' 2.137 - echo "<a class='button khaki$active' href='?files=$pkg'>files</a>" 2.138 + echo "<a class='button khaki$active' href='?files=${pkg//+/%2B}'>files</a>" 2.139 2.140 unset EXTRAVERSION 2.141 . $wok/$pkg/taz/$PACKAGE-$VERSION/receipt 2.142 2.143 if [ -f $wok/$pkg/taz/$PACKAGE-$VERSION/description.txt ]; then 2.144 active=''; [ "$cmd" == 'description' ] && active=' active' 2.145 - echo "<a class='button brown$active' href='?description=$pkg'>description</a>" 2.146 + echo "<a class='button brown$active' href='?description=${pkg//+/%2B}'>description</a>" 2.147 fi 2.148 2.149 if [ -f $PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg ]; then 2.150 - echo "<a class='button gold' href='?download=$PACKAGE-$VERSION$EXTRAVERSION.tazpkg'>download</a>" 2.151 + echo "<a class='button gold' href='?download=${PACKAGE//+/%2B}-${VERSION//+/%2B}${EXTRAVERSION//+/%2B}.tazpkg'>download</a>" 2.152 fi 2.153 2.154 if [ -f $PKGS/$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg ]; then 2.155 - echo "<a class='button gold' href='?download=$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg'>download</a>" 2.156 + echo "<a class='button gold' href='?download=${PACKAGE//+/%2B}-${VERSION//+/%2B}${EXTRAVERSION//+/%2B}-${ARCH//+/%2B}.tazpkg'>download</a>" 2.157 fi 2.158 fi 2.159 2.160 [ -n "$TARBALL" ] && [ -s "$SRC/$TARBALL" ] && 2.161 - echo "<a class='button yellow' href='?src=$TARBALL'>source</a>" 2.162 + echo "<a class='button yellow' href='?src=${TARBALL//+/%2B}'>source</a>" 2.163 2.164 [ -x ./man2html ] && 2.165 if [ -d $wok/$bpkg/install/usr/man ] || 2.166 @@ -515,7 +520,7 @@ 2.167 [ -d $wok/$bpkg/taz/*/fs/usr/man ] || 2.168 [ -d $wok/$bpkg/taz/*/fs/usr/share/man ]; then 2.169 active=''; [ "$cmd" == 'man' ] && active=' active' 2.170 - echo "<a class='button plum$active' href='?man=$bpkg'>man</a>" 2.171 + echo "<a class='button plum$active' href='?man=${bpkg//+/%2B}'>man</a>" 2.172 fi 2.173 2.174 if [ -d $wok/$bpkg/install/usr/doc ] || 2.175 @@ -523,7 +528,7 @@ 2.176 [ -d $wok/$bpkg/taz/*/fs/usr/doc ] || 2.177 [ -d $wok/$bpkg/taz/*/fs/usr/share/doc ]; then 2.178 active=''; [ "$cmd" == 'doc' ] && active=' active' 2.179 - echo "<a class='button plum$active' href='?doc=$bpkg'>doc</a>" 2.180 + echo "<a class='button plum$active' href='?doc=${bpkg//+/%2B}'>doc</a>" 2.181 fi 2.182 2.183 if [ -d $wok/$bpkg/install/usr/info ] || 2.184 @@ -531,15 +536,15 @@ 2.185 [ -d $wok/$bpkg/taz/*/fs/usr/info ] || 2.186 [ -d $wok/$bpkg/taz/*/fs/usr/share/info ]; then 2.187 active=''; [ "$cmd" == 'info' ] && active=' active' 2.188 - echo "<a class='button plum$active' href='?info=$bpkg'>info</a>" 2.189 + echo "<a class='button plum$active' href='?info=${bpkg//+/%2B}#Top'>info</a>" 2.190 fi 2.191 2.192 [ -n "$(echo $REQUEST_URI | sed 's|/[^/]*?pkg.*||')" ] || 2.193 - echo "<a class='button' href='ftp://${HTTP_HOST%:*}/$pkg/'>browse</a>" 2.194 + echo "<a class='button' href='ftp://${HTTP_HOST%:*}/${pkg//+/%2B}/'>browse</a>" 2.195 2.196 if [ -s "$log" ]; then 2.197 active=''; [ "$cmd" == 'log' ] && active=' active' 2.198 - echo "<a class='button gray$active' href='?log=$pkg.log'>logs</a>" 2.199 + echo "<a class='button gray$active' href='?log=${pkg//+/%2B}.log'>logs</a>" 2.200 fi 2.201 2.202 echo '</div>' 2.203 @@ -556,7 +561,7 @@ 2.204 2.205 case "${QUERY_STRING}" in 2.206 pkg=*) 2.207 - pkg=${QUERY_STRING#pkg=} 2.208 + pkg=$(GET pkg) 2.209 log=$LOGS/$pkg.log 2.210 2.211 # Define cook variables for syntax highlighter 2.212 @@ -614,7 +619,7 @@ 2.213 ;; 2.214 2.215 log=*) 2.216 - log=${QUERY_STRING#log=} 2.217 + log=$(GET log) 2.218 logfile=$LOGS/$log 2.219 pkg=${log%.log*} 2.220 if [ -s "$logfile" ]; then 2.221 @@ -629,7 +634,8 @@ 2.222 esac 2.223 for i in $(ls -t $baselog $baselog.* 2>/dev/null); do 2.224 class=''; [ $i == $logfile ] && class=' gray' 2.225 - echo -n "<a class='button$class' href=\"?log=$(basename $i)\">" 2.226 + j=$(basename "$i") 2.227 + echo -n "<a class='button$class' href=\"?log=${j//+/%2B}\">" 2.228 echo "$(stat -c %y $i | cut -d: -f1,2)</a>" 2.229 done 2.230 2.231 @@ -646,7 +652,7 @@ 2.232 file=*) 2.233 echo "<div id='content'>" 2.234 # Don't allow all files on the system for security reasons. 2.235 - file=${QUERY_STRING#file=} 2.236 + file=$(GET file) 2.237 case "$file" in 2.238 activity|cooknotes|cooklist) 2.239 [ "$file" == "cooklist" ] && \ 2.240 @@ -693,17 +699,17 @@ 2.241 2.242 stuff=*) 2.243 echo "<div id='content'>" 2.244 - file=${QUERY_STRING#stuff=} 2.245 + file=$(GET stuff) 2.246 pkg=${file%%/*} 2.247 if [ -f "$wok/$file" ]; then 2.248 echo "<h2>$file</h2>" 2.249 pkg_info 2.250 - echo "<a class='button' href='?receipt=$pkg'>receipt</a>" 2.251 + echo "<a class='button' href='?receipt=${pkg//+/%2B}'>receipt</a>" 2.252 2.253 ( cd $wok/$pkg ; find stuff -type f 2> /dev/null ) | sort | \ 2.254 while read i ; do 2.255 class=''; [ "$pkg/$i" == "$file" ] && class=" green" 2.256 - echo "<a class='button$class' href='?stuff=$pkg/$i'>$i</a>" 2.257 + echo "<a class='button$class' href='?stuff=${pkg//+/%2B}/${i//+/%2B}'>$i</a>" 2.258 done 2.259 2.260 case $file in 2.261 @@ -742,7 +748,7 @@ 2.262 # Display image 2.263 case $file in 2.264 *.png|*.svg|*.jpg|*.jpeg|*.ico) 2.265 - echo "<img src='?download=../wok/$file' style='display: block; max-width: 100%; margin: auto'/>" 2.266 + echo "<img src='?download=../wok/${file//+/%2B}' style='display: block; max-width: 100%; margin: auto'/>" 2.267 ;; 2.268 esac 2.269 2.270 @@ -767,22 +773,22 @@ 2.271 2.272 receipt=*) 2.273 echo "<div id='content'>" 2.274 - pkg=${QUERY_STRING#receipt=} 2.275 + pkg=$(GET receipt) 2.276 echo "<h2>Receipt for: $pkg</h2>" 2.277 pkg_info 2.278 - echo "<a class='button green' href='?receipt=$pkg'>receipt</a>" 2.279 + echo "<a class='button green' href='?receipt=${pkg//+/%2B}'>receipt</a>" 2.280 . $wok/$pkg/receipt 2.281 2.282 ( cd $wok/$pkg; find stuff -type f 2> /dev/null ) | sort | \ 2.283 while read file; do 2.284 - echo "<a class='button' href='?stuff=$pkg/$file'>$file</a>" 2.285 + echo "<a class='button' href='?stuff=${pkg//+/%2B}/${file//+/%2B}'>$file</a>" 2.286 done | sort 2.287 cat $wok/$pkg/receipt | show_code bash 2.288 ;; 2.289 2.290 files=*) 2.291 echo "<div id='content'>" 2.292 - pkg=${QUERY_STRING#files=} 2.293 + pkg=$(GET files) 2.294 dir=$(ls -d $WOK/$pkg/taz/$pkg-* 2>/dev/null) 2.295 size=$(du -hs $dir/fs | awk '{ print $1 }') 2.296 echo "<h2>Files installed by the package \"$pkg\" ($size)</h2>" 2.297 @@ -793,14 +799,18 @@ 2.298 find $dir/fs -not -type d -print0 | sort -z | \ 2.299 xargs -0 ls -ld --color=always | \ 2.300 syntax_highlighter files | \ 2.301 - sed "s|\([^/]*\)/.*\(${dir#*wok}/fs\)\([^<]*\)\(<.*\)$|\1<a href=\"?download=../wok\2\3\">\3</a>\4|" 2.302 + sed "s|\([^/]*\)/.*\(${dir#*wok}/fs\)\([^<]*\)\(<.*\)$|\1<a href=\"?download=../wok\2\3\">\3</a>\4|" |\ 2.303 + awk ' 2.304 + BEGIN { FS="\""; } 2.305 + { gsub("+", "%2B", $2); print; } 2.306 + ' 2.307 2.308 echo '</pre>' 2.309 ;; 2.310 2.311 description=*) 2.312 echo "<div id='content'>" 2.313 - pkg=${QUERY_STRING#description=} 2.314 + pkg=$(GET description) 2.315 dir=$(ls -d $WOK/$pkg/taz/$pkg-* 2>/dev/null) 2.316 echo "<h2>Description of $pkg</h2>" 2.317 pkg_info 2.318 @@ -849,7 +859,7 @@ 2.319 ;; 2.320 info) 2.321 info=$(basename $i) 2.322 - echo "<a class='button$class' href='?$type=$pkg&file=$i'>${info/.info/}</a>" 2.323 + echo "<a class='button$class' href='?$type=$pkg&file=$i#Top'>${info/.info/}</a>" 2.324 ;; 2.325 *) 2.326 echo "<a class='button$class' href='?$type=$pkg&file=$i'>$(basename $i .gz)</a>" 2.327 @@ -864,14 +874,14 @@ 2.328 [ -s "$tmp" ] && 2.329 case "$type" in 2.330 info) 2.331 - echo '<div id="content2">' 2.332 - echo '<pre class="info">' 2.333 + echo '<div id="content2" class="texinfo"><pre class="first">' 2.334 info2html < "$tmp" 2.335 echo '</pre></div>' 2.336 ;; 2.337 doc) 2.338 case "$page" in 2.339 *.sgml) class='xml';; 2.340 + *.py) class='python';; # pycurl package 2.341 *) class='asciidoc';; 2.342 esac 2.343 case "$page" in 2.344 @@ -979,7 +989,7 @@ 2.345 EOT 2.346 2.347 tac $CACHE/activity | head -n 12 | syntax_highlighter activity | \ 2.348 - sed 's|cooker.cgi||; s|^|<li>|; s|$|</li>|' 2.349 + sed 's|cooker.cgi||; s|^|<li>|; s|$|</li>|;' 2.350 2.351 echo '</ul>' 2.352 2.353 @@ -1024,7 +1034,8 @@ 2.354 cat <<EOT 2.355 <h2 id="lastcook">Latest cook</h2> 2.356 <ul class="activity"> 2.357 -$(list_packages | sed "s|^.* :|<span class='log-date'>\0</span> <span style='white-space:nowrap'>|g; s|^|<li>|; s|$|</span></li>|") 2.358 +$(list_packages | sed 's|.tazpkg$||' | \ 2.359 +sed "s|^.* :|<span class='log-date'>\0</span> <span style='white-space:nowrap'>|g; s|^|<li>|; s|$|</span></li>|") 2.360 </ul> 2.361 2.362 EOT
3.1 --- a/web/style.css Mon Mar 20 05:12:29 2017 +0200 3.2 +++ b/web/style.css Fri Mar 24 17:29:16 2017 +0200 3.3 @@ -19,64 +19,60 @@ 3.4 a:hover { text-decoration: underline; } 3.5 .files a { text-decoration: none; color: inherit; } 3.6 .files a:hover { text-decoration: underline; } 3.7 -hr { margin: 0; border: 1px solid #CFCFCF; } 3.8 +hr { margin: 0; border: 1px solid #cfcfcf; } 3.9 pre { 3.10 - background-color: #F8F8F8; 3.11 - border: 1px solid #DDD; 3.12 + background-color: #f8f8f8; 3.13 + border: 1px solid #ddd; 3.14 padding: 8px; 3.15 overflow: auto; 3.16 } 3.17 3.18 /* Header */ 3.19 - 3.20 -#header { 3.21 - color: #FFF; 3.22 - background: #222; 3.23 - height: 40px; 3.24 - border-bottom: 3px solid #AAA; 3.25 +body>header { 3.26 + display:block; 3.27 + background:#444; 3.28 + text-align:justify; 3.29 + line-height:0; 3.30 + box-shadow:0 -8px 8px #333 inset 3.31 } 3.32 - 3.33 -#header h1 { 3.34 - margin: 0; 3.35 - padding: 8px 0 0 42px; 3.36 - color: #FFF; 3.37 - font-size: 20px; 3.38 - width: 250px; 3.39 +h1 { 3.40 + display:inline-block; 3.41 + margin:auto 0; 3.42 + height:40px; 3.43 + white-space:nowrap; 3.44 + vertical-align:middle 3.45 } 3.46 -#logo { 3.47 - background: url(/images/logo.png) no-repeat left; 3.48 - position: absolute; 3.49 - float: left; 3.50 - left: 0px; 3.51 - top: 0px; 3.52 - width: 40px; 3.53 - height: 40px; 3.54 +h1::before { 3.55 + display:inline-block; 3.56 + content:url(images/logo.png); 3.57 + vertical-align:middle 3.58 } 3.59 - 3.60 -#header h1 a { 3.61 - color: #FFF; 3.62 - text-decoration: none; 3.63 - font-size: 20px; 3.64 - font-style: italic; 3.65 +h1 a { 3.66 + color:#FFF; 3.67 + font-size:20px; 3.68 + font-style:italic 3.69 } 3.70 - 3.71 -#header h1 a:hover, #network a:hover { 3.72 - color: #AFAFAF; 3.73 +body>header::before,body>header::after,.block>div::before,.block>div::after { 3.74 + display:inline-block; 3.75 + width:100%; 3.76 + height:0; 3.77 + visibility:hidden; 3.78 + overflow:hidden; 3.79 + content:'' 3.80 } 3.81 - 3.82 -/* Header links */ 3.83 - 3.84 -#network { 3.85 - float: right; 3.86 - padding: 14px 5px 0; 3.87 - font-size: 12px; 3.88 +.network { 3.89 + display:inline-block; 3.90 + text-align:left; 3.91 + vertical-align:middle; 3.92 + font-size:12px; 3.93 + line-height:normal; 3.94 + color:#999 3.95 } 3.96 - 3.97 -#network a { 3.98 - padding: 0 4px; 3.99 - color: #FFF; 3.100 - font-weight: bold; 3.101 - text-decoration: none; 3.102 +.network a { 3.103 + display:inline-block; 3.104 + padding:0 6px; 3.105 + vertical-align:middle; 3.106 + color:#FFF 3.107 } 3.108 3.109 /* Content */ 3.110 @@ -86,22 +82,22 @@ 3.111 padding: 0.5em; 3.112 } 3.113 #content2 { 3.114 - width: 100%; 3.115 + width: 100%; box-sizing: border-box; 3.116 max-width: 700px; 3.117 margin: auto; 3.118 padding: 0.5em; 3.119 } 3.120 3.121 3.122 -.span-ok { color: #0A0; } 3.123 +.span-ok { color: #0a0; } 3.124 .span-red { color: red; } 3.125 .span-sky { color: blue; } 3.126 -.span-no { color: #D90; } 3.127 +.span-no { color: #d90; } 3.128 .span-line { color: #888; } 3.129 .log-date { color: #666; font-size: 95%; } 3.130 -.sh-comment { color: #A00; } 3.131 -.sh-val { color: #E50; font-weight: bold; } 3.132 -.var { color: #05A; } 3.133 +.sh-comment { color: #a00; } 3.134 +.sh-val { color: #e50; font-weight: bold; } 3.135 +.var { color: #05a; } 3.136 3.137 /* Buttons */ 3.138 3.139 @@ -117,7 +113,7 @@ 3.140 } 3.141 3.142 .pct { 3.143 - background: #9DFF4A; 3.144 + background: #9dff4a; 3.145 background-image: -webkit-linear-gradient(#CDFFA3, #9DFF4A 40%, #87DB40); 3.146 background-image: -moz-linear-gradient(#CDFFA3, #9DFF4A 40%, #87DB40); 3.147 padding: 2px 4px; 3.148 @@ -160,7 +156,7 @@ 3.149 #footer { 3.150 text-align: center; 3.151 padding: 20px 0; 3.152 - border-top: 1px solid #DDD; 3.153 + border-top: 1px solid #ddd; 3.154 font-size: 90%; 3.155 /* position: absolute;*/ 3.156 bottom: 0; 3.157 @@ -170,12 +166,30 @@ 3.158 3.159 #footer a { padding: 0 2px; } 3.160 3.161 +body>footer { 3.162 + background:#f1f1f1; 3.163 + text-align:center; 3.164 + border-top:1px solid #CCC; 3.165 + padding:6px; 3.166 + color:#666; 3.167 + clear:both; 3.168 + box-shadow:0 4px 8px #CCC inset 3.169 +} 3.170 + 3.171 +footer a+a::before { display: inline-block; content: '• '; color: #E81; } 3.172 + 3.173 +body>footer div { 3.174 + margin:12px 3.175 +} 3.176 + 3.177 + 3.178 + 3.179 .log a { text-decoration: none; color: #666; } 3.180 .log a:hover { color: #000; } 3.181 3.182 .activity { padding-left: 0.5em; } 3.183 .activity li { list-style-type: none; } 3.184 -.activity li::before { color: #666; content: "•"; padding-right: 0.5em; } 3.185 +.activity li:before { color: #666; content: "•"; padding-right: 0.5em; } 3.186 3.187 .r { float: right; } 3.188 3.189 @@ -193,4 +207,59 @@ 3.190 3.191 a:target {background-color: yellow; } 3.192 3.193 -pre.info { color: #FFF; background-color: #272822; } 3.194 + 3.195 +/* 3.196 +table { 3.197 + border-spacing: 0; 3.198 + padding: 0 2px; 3.199 + border-width: 1px; 3.200 + border-color: #666; 3.201 + border-radius: 4px; 3.202 + border-style: solid; 3.203 +} 3.204 +th { 3.205 + background-color: #CCC; 3.206 +} 3.207 +td { 3.208 + border-bottom: 1px solid #79B; 3.209 + padding: 2px; 3.210 +} 3.211 +tr:last-child td { 3.212 + border-bottom: unset; 3.213 +} 3.214 +*/ 3.215 + 3.216 +table { 3.217 + /*width: 100%;*/ 3.218 + border: 1px solid #CCC; 3.219 + border-radius: 4px; 3.220 + border-spacing: 0; 3.221 + padding: 0; 3.222 +} 3.223 +tr { 3.224 + margin: 0; 3.225 + padding: 2px; 3.226 +} 3.227 +td { 3.228 + margin: 0; 3.229 + padding: 3px; 3.230 + vertical-align: top; 3.231 + line-height: 1.1; 3.232 +} 3.233 +thead tr { 3.234 + background-color:#DDD 3.235 +} 3.236 +thead th { 3.237 + border-bottom:1px solid #BBB 3.238 +} 3.239 + 3.240 +tbody tr:nth-child(odd) { background-color: #FFFFFF; } 3.241 +tbody tr:nth-child(even) { background-color: #ECECEC; } 3.242 + 3.243 +#content, #content2 { 3.244 + min-height: 80vh; 3.245 +} 3.246 + 3.247 +.texinfo pre { display: none; } 3.248 +/*.texinfo pre.first:not(:target) { display: block; }*/ 3.249 +.texinfo pre:target { display: block; }