From f0c188273fde94680e31e7a84e330ed219711756 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 23 Sep 2005 13:15:58 +0000 Subject: [PATCH] add webif SVN-Revision: 1980 --- openwrt/package/Config.in | 1 + openwrt/package/Makefile | 1 + openwrt/package/webif/Config.in | 6 + openwrt/package/webif/Makefile | 29 ++ .../files/usr/lib/webif/apply-wireless.sh | 4 + .../webif/files/usr/lib/webif/apply.sh | 13 + .../webif/files/usr/lib/webif/form.awk | 45 ++ .../webif/files/usr/lib/webif/webif.sh | 166 +++++++ .../webif/files/www/cgi-bin/webif/.categories | 4 + .../webif/files/www/cgi-bin/webif/about.sh | 20 + .../webif/files/www/cgi-bin/webif/config.sh | 37 ++ .../files/www/cgi-bin/webif/connection.sh | 9 + .../webif/files/www/cgi-bin/webif/index.sh | 8 + .../webif/files/www/cgi-bin/webif/info.sh | 30 ++ .../webif/files/www/cgi-bin/webif/ipkg.sh | 55 +++ .../webif/files/www/cgi-bin/webif/lan.sh | 40 ++ .../webif/files/www/cgi-bin/webif/system.sh | 44 ++ .../webif/files/www/cgi-bin/webif/upgrade.sh | 76 +++ .../webif/files/www/cgi-bin/webif/wan.sh | 9 + .../www/cgi-bin/webif/wireless-config.sh | 203 ++++++++ .../www/cgi-bin/webif/wireless-status.sh | 12 + openwrt/package/webif/files/www/index.html | 10 + openwrt/package/webif/files/www/webif.css | 460 ++++++++++++++++++ openwrt/package/webif/files/www/webif.js | 13 + openwrt/package/webif/ipkg/webif.control | 9 + openwrt/package/webif/ipkg/webif.preinst | 2 + 26 files changed, 1306 insertions(+) create mode 100644 openwrt/package/webif/Config.in create mode 100644 openwrt/package/webif/Makefile create mode 100644 openwrt/package/webif/files/usr/lib/webif/apply-wireless.sh create mode 100644 openwrt/package/webif/files/usr/lib/webif/apply.sh create mode 100644 openwrt/package/webif/files/usr/lib/webif/form.awk create mode 100644 openwrt/package/webif/files/usr/lib/webif/webif.sh create mode 100644 openwrt/package/webif/files/www/cgi-bin/webif/.categories create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/about.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/config.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/connection.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/index.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/info.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/ipkg.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/lan.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/system.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/upgrade.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/wan.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh create mode 100755 openwrt/package/webif/files/www/cgi-bin/webif/wireless-status.sh create mode 100644 openwrt/package/webif/files/www/index.html create mode 100644 openwrt/package/webif/files/www/webif.css create mode 100644 openwrt/package/webif/files/www/webif.js create mode 100644 openwrt/package/webif/ipkg/webif.control create mode 100755 openwrt/package/webif/ipkg/webif.preinst diff --git a/openwrt/package/Config.in b/openwrt/package/Config.in index 11f504d167..73b031c608 100644 --- a/openwrt/package/Config.in +++ b/openwrt/package/Config.in @@ -23,6 +23,7 @@ source "package/sablevm-classpath/Config.in" source "package/libffi-sable/Config.in" endmenu source "package/screen/Config.in" +source "package/webif/Config.in" comment "Networking" source "package/aiccu/Config.in" diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile index d8f06fa566..3c748baef8 100644 --- a/openwrt/package/Makefile +++ b/openwrt/package/Makefile @@ -114,6 +114,7 @@ package-$(BR2_PACKAGE_ULOGD) += ulogd package-$(BR2_PACKAGE_USBUTILS) += usbutils package-$(BR2_PACKAGE_VTUN) += vtun package-$(BR2_PACKAGE_VSFTPD) += vsftpd +package-$(BR2_PACKAGE_WEBIF) += webif package-$(BR2_PACKAGE_WIFICONF) += wificonf package-$(BR2_PACKAGE_WIRELESS_TOOLS) += wireless-tools package-$(BR2_PACKAGE_WOL) += wol diff --git a/openwrt/package/webif/Config.in b/openwrt/package/webif/Config.in new file mode 100644 index 0000000000..079b4d8617 --- /dev/null +++ b/openwrt/package/webif/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_WEBIF + tristate "webif - OpenWrt Administrative Console" + default n + help + A web interface for configuring OpenWrt + diff --git a/openwrt/package/webif/Makefile b/openwrt/package/webif/Makefile new file mode 100644 index 0000000000..c5222f6057 --- /dev/null +++ b/openwrt/package/webif/Makefile @@ -0,0 +1,29 @@ +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=webif +PKG_VERSION:=0.01 +PKG_RELEASE:=1 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(TOPDIR)/package/rules.mk + +$(eval $(call PKG_template,WEBIF,webif,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) + +$(PKG_BUILD_DIR)/.prepared: + mkdir -p $(PKG_BUILD_DIR) + touch $@ + +$(PKG_BUILD_DIR)/.configured: + touch $@ + +$(PKG_BUILD_DIR)/.built: + touch $@ + +$(IPKG_WEBIF): + cp -a ./files/* $(IDIR_WEBIF)/ + find $(IDIR_WEBIF) -name CVS | xargs rm -rf + find $(IDIR_WEBIF) -name .svn | xargs rm -rf + $(IPKG_BUILD) $(IDIR_WEBIF) $(PACKAGE_DIR) diff --git a/openwrt/package/webif/files/usr/lib/webif/apply-wireless.sh b/openwrt/package/webif/files/usr/lib/webif/apply-wireless.sh new file mode 100644 index 0000000000..e45d5749ff --- /dev/null +++ b/openwrt/package/webif/files/usr/lib/webif/apply-wireless.sh @@ -0,0 +1,4 @@ +echo Reloading wireless settings... +killall nas >&- 2>&- && sleep 2 +/sbin/wifi +[ -f /etc/init.d/S41wpa ] && /etc/init.d/S41wpa diff --git a/openwrt/package/webif/files/usr/lib/webif/apply.sh b/openwrt/package/webif/files/usr/lib/webif/apply.sh new file mode 100644 index 0000000000..cafa9bc764 --- /dev/null +++ b/openwrt/package/webif/files/usr/lib/webif/apply.sh @@ -0,0 +1,13 @@ +cd /tmp/.webif + +[ -f /etc/nvram.overrides ] && ( # White Russian + cd /proc/self + cat /tmp/.webif/config-* | tee fd/1 | xargs -n1 nvram set +) + +nvram commit +for config in config-*; do + name="/usr/lib/webif/apply-${config#config-}.sh" + [ -f "$name" ] && sh $name & +done +rm -f config-* diff --git a/openwrt/package/webif/files/usr/lib/webif/form.awk b/openwrt/package/webif/files/usr/lib/webif/form.awk new file mode 100644 index 0000000000..7b02bd9794 --- /dev/null +++ b/openwrt/package/webif/files/usr/lib/webif/form.awk @@ -0,0 +1,45 @@ +# $1 = type +# $2 = form variable name +# $3 = form variable value +# $4 = (radio button) value of button +# $5 = string to append +# $6 = additional attributes + +$1 ~ /^start_form/ { + print "
" + print "" + print "" + print "" +} +$1 ~ /^field/ { + if (field_open == 1) print "" + if ($3 != "") field_id=" id=\"" $3 "\"" + else field_id="" + print "" + print "" + print "
" $2 "" + field_open=1 +} +$1 ~ /^checkbox/ { + if ($3==$4) checkbox_selected="checked=\"checked\" " + else checkbox_selected="" + print "" +} +$1 ~ /^radio/ { + if ($3==$4) radio_selected="checked=\"checked\" " + else radio_selected="" + print "" +} +$1 ~ /^text/ { + print "" $4 +} +$1 ~ /^submit/ { + print "" +} +{ + print $5 +} +$1 ~ /^end_form/ { + if (field_open == 1) print "
" + print "
" +} diff --git a/openwrt/package/webif/files/usr/lib/webif/webif.sh b/openwrt/package/webif/files/usr/lib/webif/webif.sh new file mode 100644 index 0000000000..92cc7c4927 --- /dev/null +++ b/openwrt/package/webif/files/usr/lib/webif/webif.sh @@ -0,0 +1,166 @@ +libdir=/usr/lib/webif +wwwdir=/www +cgidir=/www/cgi-bin/webif +indexpage=index.sh + +header() { + UPTIME=$(uptime) + UPTIME="up ${UPTIME##*up}" + HOSTNAME=$(cat /proc/sys/kernel/hostname) + CHANGES=$(($(cat /tmp/.webif/config-* 2>&- | wc -l))) + CHANGES=${CHANGES#0} + CHANGES=${CHANGES:+( ${CHANGES} )} + cat < + + + + + OpenWrt Administrative Console + + +
+ + + +EOF +} + +apply_passwd() { + case ${SERVER_SOFTWARE%% *} in + busybox) + echo -n '/:' > /etc/httpd.conf + cat /etc/passwd | grep root | cut -d: -f1,2 >> /etc/httpd.conf + killall -HUP httpd + ;; + esac +} + +display_form() { + echo "$1" | awk -F: -f /usr/lib/webif/form.awk +} + +mkdir -p /tmp/.webif + +load_settings() { + [ \! "$1" = "nvram" -a -f /etc/config/$1 ] && . /etc/config/$1 + [ -f /tmp/.webif/config-$1 ] && . /tmp/.webif/config-$1 +} + +save_setting() { + oldval=$(eval "echo \${$2}") + oldval=${oldval:-$(nvram get "$2")} + [ "$oldval" != "$3" ] && echo "$2=\"$3\"" >> /tmp/.webif/config-$1 +} diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/.categories b/openwrt/package/webif/files/www/cgi-bin/webif/.categories new file mode 100644 index 0000000000..b1a84f4303 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/.categories @@ -0,0 +1,4 @@ +##WEBIF:category:Info +##WEBIF:category:Status +##WEBIF:category:System +##WEBIF:category:Network diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/about.sh b/openwrt/package/webif/files/www/cgi-bin/webif/about.sh new file mode 100755 index 0000000000..139d35925f --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/about.sh @@ -0,0 +1,20 @@ +#!/usr/bin/haserl + + +

webif - OpenWrt Administrative Console

+ +This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+Copyright © 2005 Felix Fietkau <openwrt@nbd.name>
+XHTML/CSS based on "Prosimii" by haran + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/config.sh b/openwrt/package/webif/files/www/cgi-bin/webif/config.sh new file mode 100755 index 0000000000..01a64f1fe6 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/config.sh @@ -0,0 +1,37 @@ +#!/usr/bin/haserl +&- 2>&- +header $FORM_cat . +?> + + +

All configuration changes have been cleared.

+ + &- 2>&- ?> + +

Updating configuration...

+
+
+

Done

+ + + +

Configuration changes:

+ ${configname#config-}
"
+		cat $configname
+		echo '
' + done + ) ?> + + + +

No configuration changes were made.

+ + + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/connection.sh b/openwrt/package/webif/files/www/cgi-bin/webif/connection.sh new file mode 100755 index 0000000000..cf4ca6fd2d --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/connection.sh @@ -0,0 +1,9 @@ +#!/usr/bin/haserl + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/index.sh b/openwrt/package/webif/files/www/cgi-bin/webif/index.sh new file mode 100755 index 0000000000..6a9a8f58a2 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/index.sh @@ -0,0 +1,8 @@ +#!/usr/bin/haserl + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/info.sh b/openwrt/package/webif/files/www/cgi-bin/webif/info.sh new file mode 100755 index 0000000000..3a54d085eb --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/info.sh @@ -0,0 +1,30 @@ +#!/usr/bin/haserl + + + + + + + + + + + + + + + + + + + + +
Firmware Version
Kernel Version
Current Date/Time
MAC-Address
+ + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/ipkg.sh b/openwrt/package/webif/files/www/cgi-bin/webif/ipkg.sh new file mode 100755 index 0000000000..8f2e04d580 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/ipkg.sh @@ -0,0 +1,55 @@ +#!/usr/bin/haserl + +

Update package lists

+
+
+

Installed packages

+ +" +} +' +?> +
" $1 "Remove
+
+
+

Available packages

+ +&- | sed -e 's, ,,' -e 's,/usr/lib/ipkg/lists/,,' | awk -F: ' +$1 ~ /status/ { + installed[$3]++; +} +($1 !~ /terminated/) && ($1 !~ /\/status/) && (!installed[$3]) { + if (current != $1) print "" + link=$3 + gsub(/\+/,"%2B",link) + print "" + current=$1 +} +' +?> +
" $1 "
" $3 "Install
+
+ +
+ + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/lan.sh b/openwrt/package/webif/files/www/cgi-bin/webif/lan.sh new file mode 100755 index 0000000000..67de725cf0 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/lan.sh @@ -0,0 +1,40 @@ +#!/usr/bin/haserl + + +

Settings saved

+ + + + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/system.sh b/openwrt/package/webif/files/www/cgi-bin/webif/system.sh new file mode 100755 index 0000000000..83435c65dc --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/system.sh @@ -0,0 +1,44 @@ +#!/usr/bin/haserl +&- >&- && { + FORM_boot_wait=${boot_wait:-$(nvram get boot_wait)} + FORM_boot_wait=${FORM_boot_wait:-off} + } +} || { + SAVED=1 + [ -z $FORM_hostname ] || save_setting system wan_hostname $FORM_hostname + grep BCM947 /proc/cpuinfo 2>&- >&- && { + [ -z $FORM_boot_wait ] || save_setting nvram boot_wait $FORM_boot_wait + } +} +header "System" "Settings" "System settings" +?> + +

Settings saved

+ +&- >&- && bootwait_form="field:boot_wait +radio:boot_wait:$FORM_boot_wait:on:On
+radio:boot_wait:$FORM_boot_wait:off:Off" + +display_form "start_form:$SCRIPT_NAME +field:Hostname +text:hostname:$FORM_hostname +$bootwait_form +field +submit:action:Save settings +end_form" +?> + + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/upgrade.sh b/openwrt/package/webif/files/www/cgi-bin/webif/upgrade.sh new file mode 100755 index 0000000000..fbf0d79d68 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/upgrade.sh @@ -0,0 +1,76 @@ +#!/usr/bin/haserl -u +/dev/null + rm $FORM_firmware +} + +[ -z "$FORM_submit" -o -z "$FORM_firmware" ] || { + [ -n $FORM_firmware ] && { + HEADER=$(head -c4 $FORM_firmware | hexdump -e "8/1 \"%x\"") + grep BCM947 /proc/cpuinfo > /dev/null && { + case "$HEADER" in + 48445230) # TRX + echo "Firmware is in TRX format
" + mv $FORM_firmware /tmp/upgrade.bin + UPGRADE=1 + ;; + 57353447|57353453) # WRT54G(S) + echo "Firmware is in Cybertan BIN format, converting... " + strip_cybertan + echo "done
" + UPGRADE=1 + ;; + *) + rm $FORM_firmware + ERROR="

Error: Invalid firmware file format

" + ;; + esac + } + } || { + ERROR="

Error: Couldn't open firmware file

" + } +} +?> + + +
+ + + + + + + + + + + + + +
Options: + Erase JFFS2 partition
+ Erase NVRAM +
Firmware image to upload: + +
+
+
+ + +Upgrading... +&- >&- ?> +done
+ + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/wan.sh b/openwrt/package/webif/files/www/cgi-bin/webif/wan.sh new file mode 100755 index 0000000000..c8c8a0b327 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/wan.sh @@ -0,0 +1,9 @@ +#!/usr/bin/haserl + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh b/openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh new file mode 100755 index 0000000000..74b20b913e --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/wireless-config.sh @@ -0,0 +1,203 @@ +#!/usr/bin/haserl + + + + + +

Settings saved

+ +:onChange=\"modechange()\" +radio:mode:$FORM_mode:sta:Client
:onChange=\"modechange()\" +radio:mode:$FORM_mode:wet:Bridge:onChange=\"modechange()\" +field:Encryption type +radio:encryption:$FORM_encryption:off:Disabled
:onChange=\"modechange()\" +radio:encryption:$FORM_encryption:wep:WEP
:onChange=\"modechange()\" +radio:encryption:$FORM_encryption:psk:WPA (preshared key)
:onChange=\"modechange()\" +radio:encryption:$FORM_encryption:wpa:WPA (RADIUS):onChange=\"modechange()\" +field:WPA support:wpa_support +checkbox:wpa1:$FORM_wpa1:wpa1:WPA1 +checkbox:wpa2:$FORM_wpa2:wpa2:WPA2 +field:WPA encryption type:wpa_crypto +checkbox:tkip:$FORM_tkip:tkip:RC4 (TKIP) +checkbox:aes:$FORM_aes:aes:AES +field:WPA preshared key:wpa_psk +text:wpa_psk:$FORM_wpa_psk +field:WEP keys:wep_keys +radio:key:$FORM_key:1 +text:key1:$FORM_key1:
+radio:key:$FORM_key:2 +text:key2:$FORM_key2:
+radio:key:$FORM_key:3 +text:key3:$FORM_key3:
+radio:key:$FORM_key:4 +text:key4:$FORM_key4:
+field +submit:action:Save settings +end_form" +?> + + + + diff --git a/openwrt/package/webif/files/www/cgi-bin/webif/wireless-status.sh b/openwrt/package/webif/files/www/cgi-bin/webif/wireless-status.sh new file mode 100755 index 0000000000..b718a6eeb7 --- /dev/null +++ b/openwrt/package/webif/files/www/cgi-bin/webif/wireless-status.sh @@ -0,0 +1,12 @@ +#!/usr/bin/haserl + + +
&1 | grep -v 'no wireless' | grep '\w' ?>
+ + + diff --git a/openwrt/package/webif/files/www/index.html b/openwrt/package/webif/files/www/index.html new file mode 100644 index 0000000000..c11a7e45f4 --- /dev/null +++ b/openwrt/package/webif/files/www/index.html @@ -0,0 +1,10 @@ + + + + + +
+ Redirecting to main page... +
+ + diff --git a/openwrt/package/webif/files/www/webif.css b/openwrt/package/webif/files/www/webif.css new file mode 100644 index 0000000000..f41aaf6faa --- /dev/null +++ b/openwrt/package/webif/files/www/webif.css @@ -0,0 +1,460 @@ +/*************************************** + * TITLE: Prosimii Screen Stylesheet * + * URI : prosimii/prosimii-screen.css * + * MODIF: 2004-Apr-28 21:43 +0800 * + ***************************************/ + + +/* ##### Common Styles ##### */ + +html, body { + height: 100%; + width: inherit; +} + +#container { + position: relative; + min-height: 100%; +} + +body { + font-family: verdana, helvetica, arial, sans-serif; + font-size: 73%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + +html > body { + font-size: 9pt; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(61,92,122); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +a { + color: rgb(61,92,122); + background-color: transparent; + text-decoration: underline; + margin: 0; + padding: 0 1px 2px 1px; +} + +a:hover { + color: rgb(117,144,174); + text-decoration: none; +} + +ol { + margin: 1em 0 1.5em 0; + padding: 0; +} + +ul { + list-style-type: square; + margin: 1em 0 1.5em 0; + padding: 0; +} + +dl { + margin: 1em 0 0.5em 0; + padding: 0; +} + +ul li { + line-height: 1.5em; + margin: 1.25ex 0 0 1.5em; + padding: 0; +} + +ol li { + line-height: 1.5em; + margin: 1.25ex 0 0 2em; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0; + padding: 0 0 1ex 0; +} + +dd { + line-height: 1.75em; + margin: 0 0 1.5em 1.5em; + padding: 0; +} + +.doNotDisplay { + display: none !important; +} + + +.smallCaps { + font-size: 117%; + font-variant: small-caps; +} + + +/* ##### Header ##### */ + +.superHeader { + color: rgb(130,128,154); + background-color: rgb(33,50,66); + text-align: right; + margin: 0; + padding: 0.5ex 10px; +} + +.superHeader span { + color: rgb(195,196,210); + background-color: transparent; + font-weight: bold; + text-transform: uppercase; +} + +.superHeader a { + color: rgb(195,196,210); + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0 0.25ex 0 0; +} + +.superHeader a:hover { + color: rgb(193,102,90); + background-color: transparent; + text-decoration: none; +} + +.topHeader { + color: rgb(130,128,154); + background-color: rgb(33,50,66); + text-align: left; + margin: 0; + padding: 0.5ex 10px; +} + +.categoryHeader { + color: rgb(130,128,154); + background-color: rgb(33,50,66); + position: absolute; + top: 0; + text-align: left; + margin: 0; + padding: 0.5ex 10px; +} + +.categoryHeader span { + color: rgb(195,196,210); + background-color: transparent; + font-weight: bold; + text-transform: uppercase; +} + +.categoryHeader a { + color: rgb(195,196,210); + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0 0.25ex 0 0; +} + +.categoryHeader a.active { + color: rgb(195,196,210); + font-weight: bold; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0 0.25ex 0 0; +} + +.categoryHeader a:hover { + color: rgb(193,102,90); + background-color: transparent; + text-decoration: none; +} + +.midHeader { + color: white; + background-color: rgb(61,92,122); + margin: 0; + padding: 0.26ex 10px; +} + +.headerTitle { + font-size: 300%; + margin: 0; + padding: 0; +} + +.headerSubTitle { + font-size: 151%; + font-weight: normal; + font-style: italic; + margin: 0 0 1ex 0; + padding: 0; +} + +.headerInfo { + text-align: right; + margin: 0; + padding: 0 0 2ex 0; + position: absolute; + right: 1em; + top: 0.3em; +} + +.headerInfo span { + color: rgb(195,196,210); + background-color: transparent; + font-weight: bold; + text-transform: uppercase; +} + +.headerInfo a { + color: white; + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0 0 0.5ex 0; + display: block; +} + +.headerInfo a:hover { + color: rgb(195,196,210); + background-color: transparent; + text-decoration: underline; +} + +.headerLinks { + text-align: right; + margin: 0; + padding: 0 0 2ex 0; + position: absolute; + right: 1.5em; + top: 3em; +} + +.headerLinks a { + color: white; + background-color: transparent; + text-decoration: none; + display: block; +} + +.headerLinks a:hover { + color: rgb(195,196,210); + background-color: transparent; + text-decoration: underline; +} + +.subHeader { + color: white; + background-color: rgb(117,144,174); + margin: 0; + padding: 0.5ex 10px; +} + +.subHeader a, .subHeader .highlight { + color: white; + background-color: transparent; + font-size: 110%; + font-weight: bold; + text-decoration: none; + margin: 0; + padding: 0 0.25ex 0 0; +} + +.subHeader a:hover, .subHeader .highlight { + color: rgb(255,204,0); + background-color: transparent; + text-decoration: none; +} + + +/* ##### Main Copy ##### */ + +#main-copy { + margin: 0; + padding: 0.5em 10px; + clear: left; +} + +#main-copy h1 { + color: rgb(117,144,174); + background-color: transparent; + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-size: 200%; + margin: 0; + padding: 0; +} + +#main-copy h2 { + color: rgb(61,92,122); + background-color: transparent; + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-weight: normal; + font-size: 151%; + margin: 0; + padding: 1ex 0 0 0; +} + +#main-copy p { + line-height: 1.75em; + margin: 1em 0 1.5em 0; + padding: 0; +} + +.newsHeading { + color: rgb(61,92,122); + background-color: transparent; + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-size: 145%; + text-decoration: none; + margin: 0; + padding: 1ex 0 0 0; + display: block; +} + +.newsHeading:hover { + color: rgb(117,144,174); + background-color: transparent; + text-decoration: underline; +} + +.newsDate { + font-style: italic; + margin: 0 !important; + padding: 0; +} + +.newsSummary { + margin: 1.5ex 0 2.5ex 0.75ex !important; + padding: 0; +} + +.more { + text-align: right; + margin: 0; + padding: 0.5em 0; +} + +.more a { + color: rgb(61,92,122); + background-color: transparent; + font-size: 92%; + text-decoration: underline; + margin: 0; + padding: 0.25ex 0.75ex; +} + +.more a:hover { + color: rgb(117,144,174); + text-decoration: none; +} + +.rowOfBoxes { + clear: both; +} + +.quarter, .threeQuarter, .oneThird, .half, .twoThirds, .fullWidth { + margin: 1em 0; + float: left; + border-left: 1px solid rgb(204,204,204); +} + +.quarter { + width: 21%; + padding: 0 1.9%; +} + +.threeQuarter { + width: 71%; + padding: 0 1.9%; +} + +.oneThird { + width: 28%; + padding: 0 1.9%; +} + +.half { + text-align: justify; + width: 46%; + padding: 0 1.9%; +} + +.twoThirds { + text-align: justify; + width: 63%; + padding: 0 1.9%; +} + +.fullWidth { + text-align: justify; + width: 96%; + padding: 0 1.2em; + border-left: none; +} + +.filler { /* use with an empty

element to add padding to the end of a text box */ + border: 1px solid white; +} + +.noBorderOnLeft { + border-left: none; +} + +.dividingBorderAbove { + border-top: 1px solid rgb(204,204,204); +} + +/* More elegant alternatives to .noBorderOnLeft & .dividingBorderAbove + * that don't require the creation of new classes - but which are not + * supported by MSIE - are the following: + * + * .rowOfBoxes > div:first-child { + * border-left: none; + * } + * + * .rowOfBoxes + .rowOfBoxes { + * border-top: 1px solid rgb(204,204,204); + * } + */ + + +/* ##### Footer ##### */ + +#footer { + border-top: 1px solid rgb(128,128,128); + color: rgb(51,51,102); + background-color: rgb(239,239,239); + font-size: 87%; + text-align: center; + line-height: 1.25em; + margin: 2em 0 0 0; + padding: 1ex 10px; + position: absolute; + bottom: 0; + width: 100%; +} + +* > #footer { + width: auto; + left: 0; + right: 0; +} + +#footer a { + color: rgb(0,68,204); + background-color: transparent; + text-decoration: underline; +} + +#footer a:hover { + text-decoration: none; +} diff --git a/openwrt/package/webif/files/www/webif.js b/openwrt/package/webif/files/www/webif.js new file mode 100644 index 0000000000..b93693b95b --- /dev/null +++ b/openwrt/package/webif/files/www/webif.js @@ -0,0 +1,13 @@ +function checked(name) +{ + return document.getElementById(name).checked; +} +function hide(name) +{ + document.getElementById(name).style.display = 'none'; +} +function show(name) +{ + document.getElementById(name).style.display = ''; +} + diff --git a/openwrt/package/webif/ipkg/webif.control b/openwrt/package/webif/ipkg/webif.control new file mode 100644 index 0000000000..8707357f7c --- /dev/null +++ b/openwrt/package/webif/ipkg/webif.control @@ -0,0 +1,9 @@ +Package: webif +Version: 0.00 +Architecture: all +Maintainer: Felix Fietkau +Source: buildroot internal +Section: net +Depends: haserl +Priority: normal +Description: A modular, extensible web interface for OpenWrt. diff --git a/openwrt/package/webif/ipkg/webif.preinst b/openwrt/package/webif/ipkg/webif.preinst new file mode 100755 index 0000000000..236ce92922 --- /dev/null +++ b/openwrt/package/webif/ipkg/webif.preinst @@ -0,0 +1,2 @@ +#!/bin/sh +rm -f /www/index.html -- 2.30.2