forked from connamara/quickfixn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
we are using sinatra for website, here is the basic code
- Loading branch information
Kenny Stone
committed
Oct 2, 2011
1 parent
227bbcb
commit 1d4d470
Showing
12 changed files
with
559 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source "http://rubygems.org" | ||
gem "sinatra" | ||
gem "redcarpet", "~>2.0.0b5" | ||
gem "albino" | ||
gem "nokogiri" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$LOAD_PATH << File.dirname(__FILE__) | ||
$LOAD_PATH << File.dirname(__FILE__) + '/web' | ||
|
||
require 'web/qfn_web' | ||
run Sinatra::Application | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'redcarpet' | ||
require 'albino' | ||
require 'pry' | ||
|
||
class MarkdownAlbinoEngine < Tilt::Template | ||
|
||
class MarkdownAlbino < Redcarpet::Render::HTML | ||
def block_code(code, language) | ||
return "<pre class='highlight'>#{code}</pre>" if language.nil? | ||
Albino.colorize(code, language) | ||
end | ||
end | ||
|
||
self.default_mime_type = 'text/html' | ||
|
||
def self.engine_initialized? | ||
defined? ::MarkdownAlbino | ||
end | ||
|
||
def initialize_engine | ||
end | ||
|
||
def prepare | ||
@engine = Redcarpet::Markdown.new(MarkdownAlbino, :fenced_code_blocks => true) | ||
@output = nil | ||
end | ||
|
||
def evaluate(scope, locals, &block) | ||
@output ||= @engine.render(data) | ||
end | ||
end | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* ----------------------------------------------------------------------- | ||
Blueprint CSS Framework 1.0.1 | ||
http://blueprintcss.org | ||
* Copyright (c) 2007-Present. See LICENSE for more info. | ||
* See README for instructions on how to use Blueprint. | ||
* For credits and origins, see AUTHORS. | ||
* This is a compressed file. See the sources in the 'src' directory. | ||
----------------------------------------------------------------------- */ | ||
|
||
/* ie.css */ | ||
body {text-align:center;} | ||
.container {text-align:left;} | ||
* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;} | ||
* html legend {margin:0px -8px 16px 0;padding:0;} | ||
sup {vertical-align:text-top;} | ||
sub {vertical-align:text-bottom;} | ||
html>body p code {*white-space:normal;} | ||
hr {margin:-8px auto 11px;} | ||
img {-ms-interpolation-mode:bicubic;} | ||
.clearfix, .container {display:inline-block;} | ||
* html .clearfix, * html .container {height:1%;} | ||
fieldset {padding-top:0;} | ||
legend {margin-top:-0.2em;margin-bottom:1em;margin-left:-0.5em;} | ||
textarea {overflow:auto;} | ||
label {vertical-align:middle;position:relative;top:-0.25em;} | ||
input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;} | ||
input.text:focus, input.title:focus {border-color:#666;} | ||
input.text, input.title, textarea, select {margin:0.5em 0;} | ||
input.checkbox, input.radio {position:relative;top:.25em;} | ||
form.inline div, form.inline p {vertical-align:middle;} | ||
form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;} | ||
button, input.button {position:relative;top:0.25em;} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* ----------------------------------------------------------------------- | ||
Blueprint CSS Framework 1.0.1 | ||
http://blueprintcss.org | ||
* Copyright (c) 2007-Present. See LICENSE for more info. | ||
* See README for instructions on how to use Blueprint. | ||
* For credits and origins, see AUTHORS. | ||
* This is a compressed file. See the sources in the 'src' directory. | ||
----------------------------------------------------------------------- */ | ||
|
||
/* print.css */ | ||
body {line-height:1.5;font-family:Verdana, "Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;} | ||
.container {background:none;} | ||
hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;} | ||
hr.space {background:#fff;color:#fff;visibility:hidden;} | ||
h1, h2, h3, h4, h5, h6 {font-family:Verdana, "Helvetica Neue", Arial, "Lucida Grande", sans-serif;} | ||
code {font:.9em "Courier New", Monaco, Courier, monospace;} | ||
a img {border:none;} | ||
p img.top {margin-top:0;} | ||
blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;} | ||
.small {font-size:.9em;} | ||
.large {font-size:1.1em;} | ||
.quiet {color:#999;} | ||
.hide {display:none;} | ||
a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;} | ||
a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;} |
Oops, something went wrong.