This commit is contained in:
Alex Dunae 2007-12-01 01:04:23 +00:00
parent 205b770858
commit 4c19694ef8
2 changed files with 168 additions and 134 deletions

View file

@ -73,76 +73,142 @@ module Page
FONTS = "verdana,arial,'Bitstream Vera Sans',helvetica,sans-serif"
STYLE = %{
body, th, td {
font: normal 14px verdana,arial,'Bitstream Vera Sans',helvetica,sans-serif;
line-height: 160%;
padding: 0; margin: 0;
margin-bottom: 30px;
/* background-color: #402; */
background-color: #694;
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
text-align: left;
}
h1, h2, h3, h4 {
font-family: Utopia, Georgia, serif;
font-weight: bold;
letter-spacing: -0.018em;
}
h1 { font-size: 24px; margin: .15em 1em 0 0 }
h2 { font-size: 24px }
h3 { font-size: 19px }
h4 { font-size: 17px; font-weight: normal; }
h4.ruled { border-bottom: solid 1px #CC9; }
h2.ruled { padding-top: 35px; border-top: solid 1px #AA5; }
/* Link styles */
:link, :visited {
color: #00b;
a { outline:none; }
table { border-collapse:collapse; border-spacing:0; }
fieldset,img { border:0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
ol,ul { list-style:none; }
caption,th { text-align:left; }
h1,h2,h3,h4,h5,h6 { font-size: 100%; font-weight:normal; }
q:before,q:after { content:''; }
abbr,acronym { border:0; }
body {
font: 13px/18px Arial, sans-serif;
}
:link:hover, :visited:hover {
background-color: #eee;
color: #B22;
a, a:visited { color: #00f; }
#container { width: 900px; margin: 18px auto; }
#left {
width: 200px;
float: left;
}
#fullpage {
width: 720px;
margin: 0 auto;
#content {
width: 660px;
padding: 0 0 0 20px;
margin-left: 220px;
}
.page_shade, .page {
padding: 0px 5px 5px 0px;
background-color: #fcfcf9;
border: solid 1px #983;
tt {
font: 13px/18px monospace;
}
.page {
margin-left: -5px;
margin-top: -5px;
padding: 20px 35px;
pre {
border: 1px dotted #ccc;
padding: 9px;
background-color: #D7EAF2;
margin: 9px 0;
}
.page .header {
float: right;
color: #777;
font-size: 10px;
dt {
width: 100px;
}
.page h1, .page h2, .page h3 {
clear: both;
text-align: center;
dd {
margin: 0 0 9px 20px;
}
#pager {
padding: 10px 4px;
color: white;
font-size: 11px;
li {
margin-left: 18px;
list-style: disc;
}
#pager :link, #pager :visited {
color: #bfb;
padding: 0px 5px;
ul, pre, p {
margin-bottom: 18px;
}
#pager :link:hover, #pager :visited:hover {
background-color: #262;
color: white;
h1 {
font: bold 22px/27px Arial;
margin-bottom: 9px
}
#logo { float: left; }
#menu { background-color: #dfa; padding: 4px 12px; margin: 0; }
#menu h3 { padding: 0; margin: 0; }
#menu #links { float: right; }
pre { font-weight: bold; color: #730; }
tt { color: #703; font-size: 12pt; }
h2 {
font: bold 18px/27px Arial;
margin-bottom: 9px
}
h3 {
font: bold 16px/18px Arial;
margin: 9px 0;
}
h3.section-bar {
font: 15px/18px Arial;
margin: 27px 0 9px -20px;
padding: 3px;
background-color: #dedede;
}
#content h1, #content h2, #content h3 {
margin-left: -20px;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
a.method-signature {
color: #000;
text-decoration: none;
}
.method-detail {
margin-bottom: 18px;
padding: 9px 0;
border-bottom: 1px solid #aaa;
}
.method-heading {
margin-left: -20px;
margin-bottom: 9px;
}
.method-heading a {
font: bold 14px/18px Arial;
}
.meta {
padding: 0 0 9px;
}
.meta, .meta a {
color: #666;
}
.method-source-code { display: none; }
.dyn-source { background-color: #775915; padding: 4px 8px; margin: 0; display: none; }
.dyn-source pre { color: #DDDDDD; font-size: 8pt; }
.source-link { text-align: right; font-size: 8pt; }
@ -205,18 +271,21 @@ ENDIF:includes
START:sections
IF:method_list
<h2 class="ruled">Methods</h2>
<h3 class="section-bar">Methods</h3>
START:method_list
IF:methods
START:methods
<h4 class="ruled">%type% %category% method:
<div class="method-detail">
<div class="method-heading">
<!-- SHOULD BE GROUPED -->
<h4>
IF:callseq
<strong><a name="%aref%">%callseq%</a></strong> <a href="#%aref%"><img src="%root%/permalink.gif" border="0" title="Permalink to %callseq%" /></a>
<strong><a name="%aref%">%callseq%</a></strong>
ENDIF:callseq
IFNOT:callseq
<strong><a name="%aref%">%name%%params%</a></strong> <a href="#%aref%"><img src="%root%/permalink.gif" border="0" title="Permalink to %type% %category% method: %name%" /></a></h4>
<strong><a name="%aref%">%name%%params%</a></strong></h4>
ENDIF:callseq
</div>
IF:m_desc
%m_desc%
ENDIF:m_desc
@ -231,6 +300,7 @@ IF:sourcecode
</div>
</div>
ENDIF:sourcecode
</div>
END:methods
ENDIF:methods
END:method_list
@ -296,35 +366,33 @@ ENDIF:title
</script>
</head>
<body>
<div id="menu">
<div id="links">
<a href="http://redhanded.hobix.com/bits/campingAMicroframework.html">backstory</a> |
<a href="http://code.whytheluckystiff.net/camping/">wiki</a> |
<a href="http://code.whytheluckystiff.net/camping/newticket">bugs</a> |
<a href="http://code.whytheluckystiff.net/svn/camping/">svn</a>
</div>
<h3 class="title">%title%</h3>
</div>
<div id="fullpage">
<div id="logo"><img src="%root%/Camping.gif" /></div>
<div id="pager">
<strong>Files:</strong>
<div id="container">
<div id="header">
<h1>
%realtitle%
</h1>
</div><!-- /header -->
<div id="left">
<h3>Files</h3>
<ul>
START:allfiles
<a href="%root%/%href%" value="%title%">%name%</a>
<li><a href="%root%/%href%" value="%title%">%name%</a></li>
END:allfiles
IF:allclasses
|
<strong>classes:</strong>
START:allclasses
<a href="%root%/%href%" title="%title%">%name%</a>
END:allclasses
ENDIF:allclasses
</ul>
</div>
IF:allclasses
<h3>Classes</h3>
<ul>
START:allclasses
<li><a href="%root%/%href%" title="%title%">%name%</a></li>
END:allclasses
</ul>
ENDIF:allclasses
</div><!-- /left -->
<div id="content">
!INCLUDE!
</div>
</div><!-- /content -->
</div><!-- /container -->
</body>
</html>
}
@ -332,28 +400,24 @@ ENDIF:allclasses
###############################################################################
FILE_PAGE = <<_FILE_PAGE_
<div id="%full_path%" class="page_shade">
<div class="page">
<div class="header">
<div class="path">%full_path% / %dtm_modified%</div>
</div>
<div class="file">
#{CONTENTS_XML}
</div>
</div>
</div><!-- /page -->
_FILE_PAGE_
###################################################################
CLASS_PAGE = %{
<div id="%full_name%" class="page_shade">
<div class="page">
<div class="class" id="%full_name%">
<h1>
IF:parent
<h3>%classmod% %full_name% &lt; HREF:par_url:parent:</h3>
%classmod% %full_name% <span class="meta">&lt; HREF:par_url:parent:</span>
ENDIF:parent
IFNOT:parent
<h3>%classmod% %full_name%</h3>
%classmod% %full_name%
ENDIF:parent
</h1>
<div class="meta">
IF:infiles
(in files
START:infiles
@ -361,8 +425,7 @@ HREF:full_path_url:full_path:
END:infiles
)
ENDIF:infiles
} + CONTENTS_XML + %{
</div>
</div>} + CONTENTS_XML + %{
</div>
}
@ -385,8 +448,6 @@ IF:methods
<tr><td class="tablesubtitle">%type% %category% methods</td></tr>
</table>
START:methods
<table width="100%" cellspacing = 0 cellpadding=5 border=0>
<tr><td class="methodtitle">
<a name="%aref%">
IF:callseq
<b>%callseq%</b>
@ -397,8 +458,7 @@ ENDIF:callseq
IF:codeurl
<a href="%codeurl%" target="source" class="srclink">src</a>
ENDIF:codeurl
</a></td></tr>
</table>
</a>
IF:m_desc
<div class="description">
%m_desc%
@ -439,30 +499,6 @@ FILE_INDEX = %{
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
<style>
<!--
body {
background-color: #ddddff;
font-family: #{FONTS};
font-size: 11px;
font-style: normal;
line-height: 14px;
color: #000040;
}
div.banner {
background: #0000aa;
color: white;
padding: 1;
margin: 0;
font-size: 90%;
font-weight: bold;
line-height: 1.1;
text-align: center;
width: 100%;
}
-->
</style>
<base target="docwin">
</head>
<body>
@ -483,7 +519,7 @@ INDEX = %{
<TITLE>%realtitle%</TITLE>
</HEAD>
<BODY>
Click <a href="%initial_page%">here</a> to open the Camping docs.
Click <a href="%initial_page%">here</a> to open the docs.
</BODY>
</HTML>
}

View file

@ -2,9 +2,7 @@ $:.unshift File.dirname(__FILE__)
require 'digest/md5'
# === Ruby Holidays module
#
# ==== Region options
# == Region options
# Holidays can be defined as belonging to one or more regions and sub regions.
# The Holidays#on, Holidays#between, Date#holidays and Date#holiday? methods
# each allow you to specify a specific region.
@ -22,11 +20,11 @@ require 'digest/md5'
# [<tt>:any</tt>]
# Any region. Return holidays from any loaded region.
#
# ==== Other options
# == Other options
# [<tt>:observed</tt>] Return holidays on the day they are observed (e.g. on a Monday if they fall on a Sunday).
# [<tt>:informal</tt>] Include informal holidays (e.g. Valentine's Day)
#
# ==== Examples
# == Examples
# Return all holidays in the <tt>:ca</tt> and <tt>:us</tt> regions on the day that they are
# observed.
#