Skip to content

Commit

Permalink
whats old is new again, bring back old layout with chosen nav in header
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Mar 17, 2013
1 parent 58baae2 commit 36b2f51
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 348 deletions.
122 changes: 98 additions & 24 deletions app.rb
Expand Up @@ -57,6 +57,10 @@
markdown :"#{params[:topic]}/#{params[:article]}"
end

get '/style.css' do
sass :style
end

__END__

@@ layout
Expand All @@ -67,9 +71,9 @@
meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"
meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no"
title Sinatra Recipes
link rel="stylesheet" type="text/css" href="/stylesheets/styles.css"
link rel="stylesheet" type="text/css" href="/style.css"
link rel="stylesheet" type="text/css" href="/stylesheets/pygment_trac.css"
link rel="stylesheet" type="text/css" href="/stylesheets/chosen.css"
link rel="stylesheet" type="text/css" href="/pygments.css"
link rel="shortcut icon" href="https://github.com/sinatra/resources/raw/master/logo/favicon.ico"
script src="/javascripts/scale.fix.js"
script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"
Expand All @@ -89,36 +93,19 @@
body
a name="top"
.wrapper
header
#header
a href="/"
img id="logo" src="https://github.com/sinatra/resources/raw/master/logo/sinatra-classic-156.png"
h1 Sinatra Recipes
p Comunity contributed recipes and techniques
p.view
a href="http://github.com/sinatra/sinatra-recipes"
| View the Project on GitHub <small>sinatra/sinatra</small>
ul
li
a href="https://github.com/sinatra/sinatra-recipes/zipball/master"
| Download <strong>ZIP File</strong>
li
a href="https://github.com/sinatra/sinatra-recipes/tarall/master"
| Download <strong>TAR File</strong>
li
a href="https://github.com/sinatra/sinatra-recipes"
| Fork on <strong>GitHub</strong>

p
small Theme based on "Minimal" by <a href="https://github.com/orderedlist">orderedlist</a>

section
a name="article"
h2 Community contributed recipes and techniques
nav
select#selectNav.chosen data-placeholder="Select a topic"
option
- @menu.each do |me|
option value="/p/#{me}?#article"
#{me.capitalize.sub('_', ' ')}

#content
#post
== yield
- if @children
Expand All @@ -138,7 +125,7 @@
p
| See the <a href="http://github.com/sinatra/recipes/blob/master/README.md">README</a>
| for more details.

- if @contributors
h2 Contributors
p
Expand All @@ -149,3 +136,90 @@
dt
a href="http://github.com/#{contributor["login"]}"
img src="http://www.gravatar.com/avatar/#{contributor["gravatar_id"]}?s=50"

@@ style
body
font-family: 'Lucida Grande', Verdana, sans-serif
margin: 0 auto
max-width: 800px

h1, h2, h3, h4, h5
font-family: georgia, 'bitstream vera serif', serif
font-weight: normal
font-size: 2em
line-height: 160%

a:link, a:visited
color: #3F3F3F

a:hover, a:active
color: #8F8F8F

.small
font-size: .7em

#header
margin: 10px 0px
a
text-decoration: none
h1
float: left
width: 200px
font-size: 2.65em
line-height: .75em
h2
text-align: right
font-style: oblique
font-size: 1em
float: right
width: 450px
img
float: left
width: 100px
margin: 20px 15px 0px 0px
border: 0
nav
width: 450px
float: right
#selectNav
width: 100%

#contributors dt
display: inline-block

#toplink
display: none
margin: 10px
float: right

#menu
float: left
max-width: 200px
word-wrap: break-word
font-size: .9em
clear: left

#children
clear: both
ul li
float: left
width: 275px
height: 40px

#content
float: right
max-width: 600px
pre
padding: 10px
max-width: 600px
overflow: auto
overflow-Y: hidden
background: #EEE
line-height: 100%

#post
line-height: 110%

#footer
clear: both
margin-top: 20px

0 comments on commit 36b2f51

Please sign in to comment.