Skip to content

Commit

Permalink
Improved the basic sample site.
Browse files Browse the repository at this point in the history
Use YUI css framework for consistency across browsers.
  • Loading branch information
jgm committed Jul 22, 2009
1 parent e4aa3cf commit af985a3
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 6 deletions.
30 changes: 30 additions & 0 deletions YUI-LICENSE
@@ -0,0 +1,30 @@
Software License Agreement (BSD License)
Copyright (c) 2009, Yahoo! Inc.
All rights reserved.

Redistribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the following
conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of Yahoo! Inc. nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission of Yahoo! Inc.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9 changes: 8 additions & 1 deletion samplesite/events.rbtxt
@@ -1,7 +1,14 @@
# Events # Events


![Ukulele](Ukulele.jpg) Here is a list of recent events, most recent first:


<?rb for event in @events.sort_by {|e| e.date}.reverse ?> <?rb for event in @events.sort_by {|e| e.date}.reverse ?>
+ ${event.speaker}, ${event.title} (${event.date.to_s("%B %d, %Y")}) + ${event.speaker}, ${event.title} (${event.date.to_s("%B %d, %Y")})
<?rb end ?> <?rb end ?>

Oldest first, with different date format:

<?rb for event in @events.sort_by {|e| e.date} ?>
+ ${event.speaker}, ${event.title} (${event.date.to_s("%m/%d/%y")})
<?rb end ?>

4 changes: 4 additions & 0 deletions samplesite/events.yaml
Expand Up @@ -12,3 +12,7 @@ events:
- John Doe - John Doe
date: 2009-05-09 date: 2009-05-09


- title: Reading Books For Fun
speaker: Joseph Fong
date: 2008-01-09

Binary file removed samplesite/files/Ukulele.jpg
Binary file not shown.
7 changes: 7 additions & 0 deletions samplesite/files/css/base-min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions samplesite/files/css/reset-fonts-grids.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions samplesite/files/css/screen.css
@@ -1 +1,11 @@
/* CSS for screen display here */ /* CSS for screen display here */
@import url("reset-fonts-grids.css");
@import url("base-min.css");

body { font-size : 93%; }

div#sidebar { margin-top: 4em; }
ul.nav { margin-top: 0; }
ul.nav li { list-style: none; padding-bottom: 0.1em; }
ul.nav li.selected { list-style: square; }

10 changes: 7 additions & 3 deletions samplesite/sitenav.yaml
@@ -1,5 +1,9 @@
- Home: index.html - Home: index.html
- Events: events.html - Events: events.html
- My submenu:
- Home again: index.html # You can have submenus like this:
- Events again: events.html # - My submenu:
# - Food: food.html
# - Drinks:
# - Wine: wine.html
# - Beer: beer.html
12 changes: 10 additions & 2 deletions samplesite/standard.rbhtml
Expand Up @@ -5,7 +5,15 @@
<link rel="stylesheet" type="text/css" media="print" href="css/print.css" /> <link rel="stylesheet" type="text/css" media="print" href="css/print.css" />
</head> </head>
<body> <body>
#{Ecstatic.mkmenu(@_nav,@_url)} <div id="doc3" class="yui-t1">
#{@_contents} <div id="yui-main">
<div id="maincol" class="yui-b">
#{@_contents}
</div>
</div>
<div id="sidebar" class="yui-b first">
#{Ecstatic.mkmenu(@_nav,@_url)}
</div>
</div>
</body> </body>
</html> </html>

0 comments on commit af985a3

Please sign in to comment.