Skip to content

Commit

Permalink
Better layout
Browse files Browse the repository at this point in the history
This needs to go in a gem or something, though
  • Loading branch information
pikesley committed Dec 2, 2013
1 parent 35e0a64 commit d0021fd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
14 changes: 12 additions & 2 deletions lib/uncle_clive.rb
Expand Up @@ -18,7 +18,12 @@ class Spectrum < Sinatra::Base
haml :readme, :locals => {
:bootstrap_theme => '../lavish-bootstrap.css',
:title => '© 1982 Sinclair Research Ltd.',
:text => markdown(File.read('README.md'))
:text => markdown(File.read('README.md')),
:github => {
:user => 'pikesley',
:project => 'uncle-clive',
:ribbon => 'right_darkblue_121621'
}
}
end

Expand Down Expand Up @@ -62,7 +67,12 @@ def respond text, gitfiti = false
halt haml :tabliser, :locals => {
:bootstrap_theme => '../lavish-bootstrap.css',
:title => params[:text],
:table => cs[params[:text]]
:table => cs[params[:text]],
:github => {
:user => 'pikesley',
:project => 'uncle-clive',
:ribbon => 'right_darkblue_121621'
}
}

when 'text/plain'
Expand Down
21 changes: 9 additions & 12 deletions lib/views/layout.haml
Expand Up @@ -5,23 +5,20 @@
%link{:rel => 'stylesheet', :href => '//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css', :type => "text/css"}
-if defined? bootstrap_theme
%link{:rel => 'stylesheet', :href => bootstrap_theme, :type => "text/css"}
%link{:rel => 'stylesheet', :href => '../sinclair.css', :type => "text/css"}
%link{:rel => 'stylesheet', :href => '../uncle-clive.css', :type => "text/css"}

%body
.body
%a{:href => "https://github.com/pikesley/uncle-clive"}
-if defined? github[:ribbon]
%a{:href => "https://github.com/%s/%s" % [ github[:user], github[:project] ] }
%img{:style => "position: absolute; top: 0; right: 0; border: 0;",
:src => "https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png",
:alt => "Fork me on GitHub"}
:src => "https://s3.amazonaws.com/github/ribbons/forkme_%s.png" % [ github[:ribbon] ],
:alt => "Fork me on GitHub"}

.container
= yield
.container
= yield

%footer
%p.text-center
%a{:href => "http://github.com/pikesley/uncle-clive"}Source on Github
|
%a{:href => "http://travis-ci.org/pikesley/uncle-clive"}Built on Travis
|
%a{:href => "http://heroku.com"}Hosted on Heroku
%a.btn.btn-default{:href => "http://github.com/%s/%s" % [ github[:user], github[:project] ] }Source on Github
%a.btn.btn-default{:href => "http://travis-ci.org/%s/%s" % [ github[:user], github[:project] ] }Built on Travis
%a.btn.btn-default{:href => "http://heroku.com"}Hosted on Heroku

0 comments on commit d0021fd

Please sign in to comment.