aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-25 21:12:42 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-25 21:12:42 +0100
commit4bc0df7fb2758da15b306eb168529c6a3acb816f (patch)
treeed6bd2e5c299035c298f2411138ed6d849acf67b
parent967c201902dcd36899122b75d26ed663e7e0066e (diff)
usability: config is now a tab
-rwxr-xr-xconfig_poll.rb12
-rw-r--r--dudle.css43
-rwxr-xr-xindex.cgi2
-rwxr-xr-xparticipate.rb28
4 files changed, 59 insertions, 26 deletions
diff --git a/config_poll.rb b/config_poll.rb
index 86d1906..566ca3a 100755
--- a/config_poll.rb
+++ b/config_poll.rb
@@ -124,15 +124,15 @@ $htmlout += <<HTMLHEAD
<link rel="stylesheet" type="text/css" href="../dudle.css" title="default"/>
</head>
<body>
- <div>
- <small>
- <a href='.' style='text-decoration:none'>#{BACK}</a>
- history:#{table.history_to_html}
- </small>
+ <div id='tabs'>
+ <ul>
+ <li class='nonactive_tab'><a href='.'>&nbsp;poll&nbsp;</a></li>
+ <li id='active_tab'>&nbsp;config&nbsp;</li>
</div>
HTMLHEAD
$htmlout += <<TABLE
+ <div id='main'>
<h1>#{table.name}</h1>
#{table.to_html("",true,$cgi["editcolumn"])}
TABLE
@@ -216,7 +216,7 @@ $htmlout +=<<REMOVE
</div>
REMOVE
-$htmlout += "</body>"
+$htmlout += "</div></body>"
$htmlout += "</html>"
diff --git a/dudle.css b/dudle.css
index 42e7d83..a44f4e0 100644
--- a/dudle.css
+++ b/dudle.css
@@ -88,14 +88,51 @@ html {
background: #CCCCD3;
color: black;
}
-body {
+#main {
background: white;
- margin: 3ex auto;
- width: 90%;
padding: 2em;
color: black;
line-height: 1.5em;
border: solid 1px black;
+ top: 0px;
+ margin-top: 0px;
+}
+body#main, div#tabs ul{
+ margin-top: 2em;
+}
+div#tabs ul, p#history{
+ font-size: 80%;
+}
+div#tabs ul{
+ margin-left 0em;
+ margin-bottom: 0em;
+ padding: 0em;
+ list-style-type: none;
+}
+div#tabs li{
+ background: white;
+ border-width: 1px;
+ display: inline;
+}
+div#tabs a{
+ text-decoration:none;
+}
+li#active_tab{
+ border-style: solid solid none;
+ padding-bottom: 1px;
+}
+li.nonactive_tab{
+ border-style: solid;
+}
+li.nonactive_tab a:hover {
+ background: #CCC;
+}
+pre#configwarning {
+ font-family:Courier New,Courier,monospace;
+ letter-spacing:0;
+ margin-top: -12ex;
+ line-height:95%;
+ margin-left: -2ex;
}
h1 {
text-align: center;
diff --git a/index.cgi b/index.cgi
index c1c7c33..6158925 100755
--- a/index.cgi
+++ b/index.cgi
@@ -46,7 +46,7 @@ HEAD
$htmlout += '<link rel="alternate" type="application/atom+xml" href="atom.cgi" />' if File.exists?("atom.cgi")
- $htmlout += "</head><body><h1>dudle</h1>"
+ $htmlout += "</head><body id='main'><h1>dudle</h1>"
if $cgi.include?("create_poll")
SITE=$cgi["create_poll"].gsub(/^\//,"")
diff --git a/participate.rb b/participate.rb
index d828079..1ac9f64 100755
--- a/participate.rb
+++ b/participate.rb
@@ -73,34 +73,30 @@ $htmlout += '<link rel="alternate" type="application/atom+xml" href="atom.cgi"
$htmlout += <<HEAD
</head>
<body>
- <div>
- <small>
- <a href='..' style='text-decoration:none'>#{BACK}</a>
- <a href='config.cgi' style='text-decoration:none'>config</a>
- history:#{table.history_to_html}
- </small>
+ <div id='tabs'>
+ <ul>
+ <li id='active_tab' >&nbsp;poll&nbsp;</li>
+ <li class='nonactive_tab'><a href='config.cgi'>&nbsp;config&nbsp;</a></li>
+ </ul>
</div>
+ <div id='main'>
+ <p id='history'>history:#{table.history_to_html}</p>
HEAD
# TABLE
$htmlout += "<h1>#{table.name}</h1>"
if VCS.revno == 1
$htmlout += <<HINT
-<pre
- style="font-family:Courier New,Courier,monospace;
- letter-spacing:0;
- margin-top: -8ex;
- line-height:95%;"
->
+<pre id='configwarning'>
.
.:;:.
.:;;;;;:.
;;;;;
;;;;;
;;;;;
- ;;;;; Please press the config link on
- ;:;;; the top left corner of this page
- ;;; : to configure this poll!
+ ;;;;; Please configure this poll
+ ;:;;; within the config tab!
+ ;;; :
;:;
;.: .
: .
@@ -121,7 +117,7 @@ TABLE
$htmlout += table.comment_to_html
end
-$htmlout += "</body>"
+$htmlout += "</div></body>"
$htmlout += "</html>"