This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m[c=rand(3)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### configuration & settings ########### | |
configure do | |
set :name, ENV['NAME'] || 'DAZ4126' | |
set :author, ENV['AUTHOR'] || 'DAZ' | |
set :analytics, ENV['ANALYTICS'] || 'UA-XXXXXXXX-X' | |
set :javascripts, %w[ ] | |
set :fonts, %w[ Abel ] | |
set :markdown, :layout_engine => :slim | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### DAZ4126 website ########### | |
require 'bundler' | |
Bundler.require | |
get '/' do | |
@title = "DAZ, Made in Manchester" | |
slim :index | |
end | |
__END__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@quote1 | |
blockquote rel="http://www.flickr.com/photos/nativephotography/4343566244/" We Do Things Differently Here | |
cite Anthony H Wilson | |
@@quote2 | |
blockquote rel="http://shop.visitmanchester.com/store/product/2265/Quote-magnet---dark-blue/" They return the love around here, don't they? | |
cite Guy Garvey | |
@@quote3 | |
blockquote rel="http://shop.visitmanchester.com/store/product/2265/Quote-magnet---dark-blue/" It All Comes from Here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@404 | |
h1 404! | |
p That page is missing | |
@@500 | |
h1 500 Error! | |
p Oops, something has gone terribly wrong! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$normalfont: "Courier New", "Nimbus Mono L", Monospace; | |
$headingfont: Abel,"Liberation Sans",Helvetica ,Arial, "Nimbus Sans L", FreeSans, Sans-serif; | |
$basefontsize: 13px; | |
$thickness:6px; | |
$width: 90%; | |
$mainwidth: 62%; | |
$sidebarwidth: 32%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$grey:#A1A794; | |
$yellow:#F1E166; | |
$banner:$yellow; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin links($color:white,$hovercolor:red,$background:$color){ | |
a,a:link,a:visited{ | |
text-decoration: underline; | |
text-shadow: none; | |
color:$color; | |
&:hover{ | |
background: $background; | |
color:$hovercolor; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post '/' do | |
require 'pony' | |
Pony.mail( | |
from: "DAZ4126<[email protected]>", | |
to: '[email protected]', | |
subject: "A message from the DAZ4126 website", | |
body: params[:message], | |
port: '587', | |
via: :smtp, | |
via_options: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get '/:page' do | |
if File.exists?('views/'+params[:page]+'.slim') | |
slim params[:page].to_sym | |
elsif File.exists?('views/'+params[:page]+'.md') | |
markdown params[:page].to_sym | |
else | |
raise error(404) | |
end | |
end |