Developing lightweight computation at the DSG edge
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Quick Mesh Project
qMp packages
Commits
63a0da1f
Commit
63a0da1f
authored
Sep 14, 2012
by
Agustí Moll Garcia
Committed by
user
Sep 14, 2012
Browse files
Add new LuCI theme from qMp
parent
69d6ab4f
Changes
10
Hide whitespace changes
Inline
Side-by-side
packages/luci-theme-qmp/Makefile
0 → 100644
View file @
63a0da1f
# Copyright (C) 2011 Pau Escrich <pau@dabax.net>
#
# 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.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
luci-theme-qmp
PKG_RELEASE
:=
1
PKG_BUILD_DIR
:=
$(BUILD_DIR)
/
$(PKG_NAME)
include
$(INCLUDE_DIR)/package.mk
define
Package/luci-theme-qmp
SECTION
:=
theme
CATEGORY
:=
qMp
TITLE
:=
Luci qMp theme
DEPENDS
:=
+luci-mod-admin-core
endef
define
Package/luci-theme-qmp/description
bmx6
web
interface
for
luci
endef
define
Build/Prepare
mkdir
-p
$(PKG_BUILD_DIR)
endef
define
Build/Configure
endef
define
Build/Compile
endef
define
Package/luci-theme-qmp/install
$(CP)
./files/*
$(1)/
endef
$(eval
$(call
BuildPackage,luci-theme-qmp))
packages/luci-theme-qmp/files/etc/uci-defaults/luci-theme-qmp
0 → 100755
View file @
63a0da1f
#!/bin/sh
uci batch
<<-
EOF
set luci.themes.qMp=/luci-static/qmp
commit luci
EOF
packages/luci-theme-qmp/files/usr/lib/lua/luci/view/themes/qmp/footer.htm
0 → 100644
View file @
63a0da1f
<
%
#
LuCI
-
Lua
Configuration
Interface
Copyright
2008
Steven
Barth
<
steven
@
midlink.org
>
Copyright 2008 Jo-Philipp Wich
<xm
@
leipzig.freifunk.net
>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id: footer.htm 7810 2011-10-28 15:15:27Z jow $
-%>
<div
class=
"clear"
></div>
</div>
</div>
<p
class=
"luci"
>
Powered by
<
%=
luci.__appname__
..
"
("
..
luci.__version__
..
")"
%
></p>
</body>
</html>
packages/luci-theme-qmp/files/usr/lib/lua/luci/view/themes/qmp/header.htm
0 → 100644
View file @
63a0da1f
<
%
#
LuCI
-
Lua
Configuration
Interface
Copyright
2008
Steven
Barth
<
steven
@
midlink.org
>
Copyright 2008-2010 Jo-Philipp Wich
<xm
@
subsignal.org
>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
$Id: header.htm 7810 2011-10-28 15:15:27Z jow $
-%>
<
%
local
sys =
require
"
luci.sys
"
local
http =
require
"
luci.http
"
local
disp =
require
"
luci.dispatcher
"
local
hostname =
sys.hostname()
local
load1
,
load5
,
load15 =
sys.loadavg()
local
request =
disp.context.path
local
request2 =
disp.context.request
local
category =
request[1]
local
cattree =
category
and
disp.node
(
category
)
local
leaf =
request2[#request2]
local
tree =
disp.node()
local
node =
disp.context.dispatched
local
categories =
disp.node_childs(tree)
local
c =
tree
local
i
,
r
--
tag
all
nodes
leading
to
this
page
for
i
,
r
in
ipairs
(
request
)
do
if
c.nodes
and
c.nodes
[
r
]
then
c =
c.nodes[r]
c._menu_selected =
true
end
end
http.prepare_content
("
application
/
xhtml
+
xml
")
local
function
nodeurl
(
prefix
,
name
,
query
)
local
url =
controller
..
prefix
..
name
..
"/"
if
query
then
url =
url
..
http.build_querystring
(
query
)
end
return
pcdata
(
url
)
end
-
%
>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xml:lang=
"<%=luci.i18n.context.lang%>"
lang=
"<%=luci.i18n.context.lang%>"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-Script-Type"
content=
"text/javascript"
/>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"<%=media%>/cascade.css"
/>
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie6.css" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie7.css" /><![endif]-->
<!--[if IE 8]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie8.css" /><![endif]-->
<
%
if
node
and
node.css
then
%
><link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"<%=resource%>/<%=node.css%>"
/>
<
%
end
-
%
>
<script
type=
"text/javascript"
src=
"<%=resource%>/xhr.js"
></script>
<title><
%=
striptags
(
hostname
..
(
(
node
and
node.title
)
and
'
-
'
..
translate
(
node.title
)
or
''))
%
>
- LuCI
</title>
</head>
<body
class=
"lang_<%=luci.i18n.context.lang%>"
>
<p
class=
"skiplink"
>
<span
id=
"skiplink1"
><a
href=
"#navigation"
><
%
:Skip
to
navigation
%
></a></span>
<span
id=
"skiplink2"
><a
href=
"#content"
><
%
:Skip
to
content
%
></a></span>
</p>
<div
class=
"hostinfo"
>
<
%=
hostname
%
>
|
<
%=
luci.version.distversion
%
>
|
<
%
:Load
%
>
:
<
%="%.2
f
"
%
load1
%
>
<
%="%.2
f
"
%
load5
%
>
<
%="%.2
f
"
%
load15
%
>
<span
id=
"xhr_poll_status"
style=
"display:none"
onclick=
"XHR.running() ? XHR.halt() : XHR.run()"
>
|
<
%
:Auto
Refresh
%
>
:
<span
id=
"xhr_poll_status_on"
><
%
:on
%
></span>
<span
id=
"xhr_poll_status_off"
style=
"display:none"
><
%
:off
%
></span>
</span>
</div>
<div
id=
"header"
>
<div
class=
"banner"
style=
"background-color: #000; display: block; clear: both; height: 58px;"
>
<div
style=
"float:left;padding-left:24px"
><a
href=
"http://qmp.cat"
><img
src=
"/luci-static/qmp/qmp_small.png"
height=
"45px"
alt=
"qMp"
style=
"padding: 5px;"
border=
"0"
/></a></div>
<div
style=
"float:left; padding-top:20px;padding-left:5px;color:#ff9900"
><h2>
Quick Mesh Project
</h2></div>
</div>
</div>
<
%
-
local
function
submenu
(
prefix
,
node
)
local
childs =
disp.node_childs(node)
if
#childs
>
0 then
%>
<ul
id=
"submenu_<%=string.gsub(string.gsub(prefix, "
/",
"
_
"),
"^
_
(.
-
)
_
$",
"%1")%
>
">
<
%
-
for
i
,
r
in
ipairs
(
childs
)
do
local
nnode =
node.nodes[r]
local
href =
controller
..
prefix
..
r
..
"/"
..
(
nnode.query
and
http.build_querystring
(
nnode.query
)
or
"")
%
>
<li>
<a
<%=
ifattr
(
nnode._menu_selected
,
"
class
",
"
active
")%
>
href="
<
%=
luci.util.pcdata
(
href
)%
>
">
<
%=
translate
(
nnode.title
)%
></a>
<
%
-
submenu
(
prefix
..
r
..
"/",
nnode
)
%
>
</li>
<
%
-
end
%
>
</ul>
<
%
end
end
%
>
<div
id=
"menubar"
>
<h2
class=
"navigation"
><a
id=
"navigation"
name=
"navigation"
><
%
:navigation
Navigation
%
></a></h2>
<ul
id=
"mainmenu"
class=
"dropdowns"
>
<
%
local
childs =
disp.node_childs(cattree)
if
#childs
>
0 then
for i, r in ipairs(childs) do
local nnode = cattree.nodes[r]
local href = controller .. "/" .. category .. "/" .. r ..
(nnode.query and http.build_querystring(k.query) or "")
%>
<li>
<a
<%=
ifattr
(
nnode._menu_selected
,
"
class
",
"
preactive
")%
>
href="
<
%=
href
%
>
">
<
%=
translate
(
nnode.title
)%
></a>
<
%
-
submenu
("/"
..
category
..
"/"
..
r
..
"/",
nnode
)
%
>
</li>
<
%
end
end
%
>
<li></li>
</ul>
<
%
if
#categories
>
1 then %>
<ul
id=
"modemenu"
>
<
%
for
i
,
r
in
ipairs
(
categories
)
do
%
>
<li><a
<%=
ifattr(request[1] =
=
r
,
"
class
",
"
active
")%
>
href="
<
%=
controller
%
>
/
<
%=
r
%
>
/">
<
%=
striptags
(
translate
(
tree.nodes
[
r
].
title
))%
></a></li>
<
%
end
%
>
</ul>
<
%
end
%
>
<
%
if
tree.nodes
[
category
]
and
tree.nodes
[
category
].
ucidata
then
local
ucic =
0
for
i
,
j
in
pairs
(
require
("
luci.model.uci
").
cursor
()
:changes
())
do
for
k
,
l
in
pairs
(
j
)
do
for
m
,
n
in
pairs
(
l
)
do
ucic =
ucic
+
1;
end
end
end
-
%
>
<div
id=
"savemenu"
>
<
%
if
ucic
>
0 then %>
<a
class=
"warning"
href=
"<%=controller%>/<%=category%>/uci/changes/?redir=<%=http.urlencode(http.formvalue("
redir
")
or
REQUEST_URI
)%
>
">
<
%
:Unsaved
Changes
%
>
:
<
%=
ucic
%
></a>
<
%
end
-
%
>
</div>
<
%
end
%
>
<div
class=
"clear"
></div>
</div>
<div
id=
"maincontainer"
>
<div
id=
"maincontent"
>
<noscript>
<div
class=
"errorbox"
>
<strong><
%
:Java
Script
required
!%
></strong><br
/>
<
%
:You
must
enable
Java
Script
in
your
browser
or
LuCI
will
not
work
properly.
%
>
</div>
</noscript>
<
%
-
if
luci.sys.user.getuser
("
root
")
and
not
luci.sys.user.getpasswd
("
root
")
then
-
%
>
<div
class=
"errorbox"
>
<strong><
%
:No
password
set
!%
></strong><br
/>
<
%
:There
is
no
password
set
on
this
router.
Please
configure
a
root
password
to
protect
the
web
interface
and
enable
SSH.
%
><br
/>
<a
href=
"<%=pcdata(luci.dispatcher.build_url("
admin
/
system
/
admin
"))%
>
">
<
%
:Go
to
password
configuration...
%
></a>
</div>
<
%
-
end
-
%
>
packages/luci-theme-qmp/files/www/luci-static/qmp/cascade.css
0 → 100644
View file @
63a0da1f
@charset
"utf-8"
;
@media
all
{
html
{
min-height
:
100%
;
height
:
auto
;
position
:
relative
;
}
body
{
color
:
#ffffff
;
background-color
:
#4a6b7c
;
background-position
:
bottom
center
;
background-repeat
:
repeat-x
;
font-family
:
Verdana
,
Arial
,
sans-serif
;
font-size
:
11pt
;
line-height
:
100%
;
padding-bottom
:
1.5em
;
}
*
{
margin
:
0
;
padding
:
0
;
}
a
img
{
border
:
none
;
text-decoration
:
none
;
}
small
{
white-space
:
nowrap
;
}
ul
.l1
li
a
{
background-color
:
#AAAAAA
;
background-image
:
url(tabbg.png)
;
background-repeat
:
repeat-x
;
border-color
:
#444444
;
}
ul
.l1
li
.tabmenu-item-logout
a
{
margin-left
:
30px
;
}
abbr
,
acronym
{
font-style
:
normal
;
font-variant
:
normal
;
}
abbr
[
title
],
acronym
[
title
]
{
border-bottom
:
1px
dotted
;
cursor
:
help
;
}
a
:link
abbr
[
title
],
a
:visited
abbr
[
title
],
a
:link
acronym
[
title
],
a
:visited
acronym
[
title
]
{
cursor
:
pointer
;
}
code
{
font-family
:
monospace
;
white-space
:
pre
;
}
#maincontent
ul
{
margin-left
:
2em
;
}
.warning
{
color
:
red
;
background-color
:
white
;
font-weight
:
bold
;
}
.clear
{
clear
:
both
;
}
ul
.dropdowns
{
float
:
left
;
margin
:
0
;
padding
:
0
;
width
:
auto
;
list-style
:
none
;
}
html
>
body
ul
.dropdowns
{
position
:
relative
;
}
ul
.dropdowns
li
,
ul
.dropdowns
ul
{
margin
:
0
;
padding
:
0
;
list-style
:
none
;
}
ul
.dropdowns
li
{
float
:
left
;
position
:
relative
;
white-space
:
nowrap
;
}
ul
.dropdowns
li
ul
{
position
:
absolute
;
z-index
:
1000
;
top
:
auto
;
min-width
:
10em
;
}
ul
.dropdowns
li
li
{
float
:
none
;
position
:
relative
;
}
ul
.dropdowns
li
a
{
display
:
block
;
}
ul
.dropdowns
ul
li
ul
{
top
:
0
;
}
ul
.dropdowns
li
ul
,
ul
.dropdowns
li
.over
ul
ul
,
ul
.dropdowns
li
.focus
ul
ul
,
ul
.dropdowns
li
:hover
ul
ul
,
ul
.dropdowns
li
.over
ul
ul
ul
,
ul
.dropdowns
li
.focus
ul
ul
ul
,
ul
.dropdowns
li
:hover
ul
ul
ul
,
ul
.dropdowns
li
.over
ul
ul
ul
ul
,
ul
.dropdowns
li
.focus
ul
ul
ul
ul
,
ul
.dropdowns
li
:hover
ul
ul
ul
ul
{
left
:
-3000px
;
}
ul
.dropdowns
li
.over
ul
,
ul
.dropdowns
li
.focus
ul
,
ul
.dropdowns
li
:hover
ul
{
left
:
0
;
}
ul
.dropdowns
ul
li
.over
ul
,
ul
.dropdowns
ul
li
.focus
ul
,
ul
.dropdowns
ul
li
:hover
ul
,
ul
.dropdowns
ul
ul
li
.over
ul
,
ul
.dropdowns
ul
ul
li
.focus
ul
,
ul
.dropdowns
ul
ul
li
:hover
ul
,
ul
.dropdowns
ul
ul
ul
li
.over
ul
,
ul
.dropdowns
ul
ul
ul
li
.focus
ul
,
ul
.dropdowns
ul
ul
ul
li
:hover
ul
{
left
:
100%
;
}
.skiplink
,
.navigation
,
.hidden
{
position
:
absolute
;
left
:
-1000px
;
top
:
-1000px
;
width
:
0px
;
height
:
0px
;
overflow
:
hidden
;
display
:
inline
;
}
.error
{
color
:
#ff0000
;
background-color
:
white
;
}
div
.hostinfo
{
float
:
left
;
margin
:
0
;
width
:
100%
;
font-size
:
80%
;
padding
:
0.5em
0
;
background-color
:
#000
;
}
#xhr_poll_status
{
cursor
:
pointer
;
}
#xhr_poll_status
#xhr_poll_status_off
{
font-weight
:
bold
;
color
:
#FF0000
;
}
#xhr_poll_status
#xhr_poll_status_on
{
font-weight
:
bold
;
color
:
#00FF00
;
}
#menubar
{
position
:
relative
;
width
:
100%
;
background
:
#000000
;
color
:
#ffffff
;
float
:
left
;
}
#menubar
ul
.dropdowns
{
min-height
:
1.8em
;
background
:
#FFF
;
color
:
#004a9c
;
}
#menubar
ul
.dropdowns
li
ul
{
background
:
#FFF
;
color
:
#004a9c
;
border-width
:
0
1px
1px
1px
;
border-style
:
dotted
;
border-color
:
#5a5a5a
;
}
#menubar
ul
.dropdowns
ul
li
ul
{
border-width
:
1px
;
}
#menubar
ul
.dropdowns
li
.over
>
a
,
#menubar
ul
.dropdowns
li
.focus
>
a
,
#menubar
ul
.dropdowns
li
:hover
>
a
{
}
#menubar
.warning
{
color
:
red
;
background-color
:
#557788
;
}
html
#menubar
a
:link
,
html
#menubar
a
:visited
{
position
:
relative
;
display
:
block
;
padding
:
0.5em
;
background
:
#000000
;
color
:
#ffffff
;
text-decoration
:
none
;
font-size
:
80%
;
font-weight
:
normal
;
}
html
#menubar
a
:link:hover
,
html
#menubar
a
:visited:hover
,
html
#menubar
a
:link:active
,
html
#menubar
a
:visited:active
,
#menubar
a
:link:focus
,
#menubar
a
:visited:focus
{
background
:
#000000
;
color
:
#ffff00
;
font-weight
:
normal
;
}
html
#menubar
a
:link
.active
,
html
#menubar
a
:visited
.active
,
html
#menubar
a
:link
.preactive
,
html
#menubar
a
:visited
.preactive
{
background
:
#000000
;
color
:
#ffff00
;
font-weight
:
bold
;
}
html
#menubar
a
:link
.warning
,
html
#menubar
a
:visited
.warning
{
background
:
#000000
;
color
:
red
;
font-weight
:
bold
;
}
#modemenu
{
width
:
auto
;
background
:
#000000
;
color
:
#ffffff
;
list-style
:
none
;
margin-right
:
1px
;
margin-left
:
2em
;
float
:
right
;
}
#modemenu
li
{
float
:
right
;
list-style
:
none
;
}
#savemenu
{
float
:
right
;
}
.lang_de
#submenu_admin_uci
{
width
:
12em
;
}
.lang_ru
#submenu_admin_uci
{
width
:
11.5em
;
}
textarea
#syslog
{
width
:
98%
;
min-height
:
500px
;
border
:
3px
solid
#cccccc
;
padding
:
5px
;
font-family
:
monospace
;
}
#maincontainer
{
clear
:
both
;
width
:
96%
;
margin
:
0
auto
;
height
:
100%
;
}