Skip to content

Commit

Permalink
Merge pull request #14 from wpp/walkthrough
Browse files Browse the repository at this point in the history
Move walkthrough to shoesrb.com
  • Loading branch information
steveklabnik committed Feb 21, 2013
2 parents 38f2415 + de4a268 commit 2886757
Show file tree
Hide file tree
Showing 30 changed files with 632 additions and 41 deletions.
1 change: 1 addition & 0 deletions config.ru
Expand Up @@ -17,6 +17,7 @@ Shoes = Webmachine::Application.new do |app|
add ["contribute"], ContributePage
add ["downloads"], DownloadsPage
add ["downloads", :filename], DownloadResource
add ["walkthrough"], WalkthroughPage
add ['*'], StaticResource, :root => "public"
end
app.configure do |config|
Expand Down
2 changes: 1 addition & 1 deletion posts/bundler-integration.md
Expand Up @@ -15,7 +15,7 @@ This reminded me of a Gemfile, so why not add Bundler support? So I did! Create
a `Gemfile`:

source "https://test.rubygems.org"

gem "twitter"

And in your application use this setup block:
Expand Down
82 changes: 43 additions & 39 deletions public/css/bootstrap.css
Expand Up @@ -69,53 +69,53 @@ img {
height: 100px;
}
#lion{
background: url('/img/sprite.png') no-repeat -6px -59px;
width: 100px;
height: 100px;
background: url('/img/sprite.png') no-repeat -6px -59px;
width: 100px;
height: 100px;
margin: 40px;
display: inline-block;
}
#mountain_lion{
background: url('/img/sprite.png') no-repeat -6px -262px;
width: 100px;
height: 100px;
background: url('/img/sprite.png') no-repeat -6px -262px;
width: 100px;
height: 100px;
margin: 40px;
display: inline-block;
}
#windows{
background: url('/img/sprite.png') no-repeat 0 -369px;
width: 110px;
height: 99px;
background: url('/img/sprite.png') no-repeat 0 -369px;
width: 110px;
height: 99px;
margin: 40px;
display: inline-block;
}
#ubuntu{
background: url('/img/sprite.png') no-repeat -4px -161px;
width: 100px;
height: 100px;
background: url('/img/sprite.png') no-repeat -4px -161px;
width: 100px;
height: 100px;
margin: 40px;
display: inline-block;
}
#tutorials{
background: url('/img/sprite.png') no-repeat 0px -482px;
width: 45px;
height: 33px;
width: 45px;
height: 33px;
display: inline-block;
vertical-align: middle;
margin: 5px;
}
#blog{
background: url('/img/sprite.png') no-repeat -1px -524px;
width: 45px;
height: 35px;
background: url('/img/sprite.png') no-repeat -1px -524px;
width: 45px;
height: 35px;
display: inline-block;
vertical-align: middle;
margin: 5px;
}
#contribute{
background: url('/img/sprite.png') no-repeat -57px -515px;
width: 48px;
height: 44px;
background: url('/img/sprite.png') no-repeat -57px -515px;
width: 48px;
height: 44px;
display: inline-block;
vertical-align: middle;
margin: 5px;
Expand All @@ -125,9 +125,9 @@ img {
top: -50px;
right: -10px;

background: url('/img/sprite2.png') no-repeat -1px -52px;
width: 429px;
height: 178px;
background: url('/img/sprite2.png') no-repeat -1px -52px;
width: 429px;
height: 178px;
display: inline-block;
vertical-align: middle;
}
Expand Down Expand Up @@ -166,33 +166,33 @@ img {
height: 128px;
}
#walk{
background: url('/img/sprite2.png') no-repeat -52px -4px;
width: 40px;
height: 42px;
background: url('/img/sprite2.png') no-repeat -52px -4px;
width: 40px;
height: 42px;
display: inline-block;
vertical-align: middle;
margin: 2px;
}
#book{
background: url('/img/sprite2.png') no-repeat 0 0;
width: 44px;
height: 48px;
background: url('/img/sprite2.png') no-repeat 0 0;
width: 44px;
height: 48px;
display: inline-block;
vertical-align: middle;
margin: 2px;
}
#manual{
background: url('/img/sprite2.png') no-repeat -163px -1px;
width: 62px;
height: 48px;
width: 62px;
height: 48px;
display: inline-block;
vertical-align: middle;
margin: 2px;
}
#rdocs{
background: url('/img/sprite2.png') no-repeat -95px 0;
width: 63px;
height: 49px;
background: url('/img/sprite2.png') no-repeat -95px 0;
width: 63px;
height: 49px;
display: inline-block;
vertical-align: middle;
margin: 2px;
Expand Down Expand Up @@ -263,11 +263,11 @@ body {
line-height: 18px;
color: #333333;
background-color: #ffffff;
background: url('/img/background.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background: url('/img/background.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
a {
color: #0088cc;
Expand Down Expand Up @@ -3653,3 +3653,7 @@ a.thumbnail:hover {
.invisible {
visibility: hidden;
}
.walkthrough {
background: red;
border: 1px solid black;
}
135 changes: 135 additions & 0 deletions public/css/code.css
@@ -0,0 +1,135 @@
/*
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/

pre code {
display: block; padding: 0.5em;
background: #F0F0F0;
}

pre code,
pre .subst,
pre .tag .title,
pre .lisp .title,
pre .clojure .built_in,
pre .nginx .title {
color: black;
}

pre .string,
pre .title,
pre .constant,
pre .parent,
pre .tag .value,
pre .rules .value,
pre .rules .value .number,
pre .preprocessor,
pre .ruby .symbol,
pre .ruby .symbol .string,
pre .aggregate,
pre .template_tag,
pre .django .variable,
pre .smalltalk .class,
pre .addition,
pre .flow,
pre .stream,
pre .bash .variable,
pre .apache .tag,
pre .apache .cbracket,
pre .tex .command,
pre .tex .special,
pre .erlang_repl .function_or_atom,
pre .markdown .header {
color: #800;
}

pre .comment,
pre .annotation,
pre .template_comment,
pre .diff .header,
pre .chunk,
pre .markdown .blockquote {
color: #888;
}

pre .number,
pre .date,
pre .regexp,
pre .literal,
pre .smalltalk .symbol,
pre .smalltalk .char,
pre .go .constant,
pre .change,
pre .markdown .bullet,
pre .markdown .link_url {
color: #080;
}

pre .label,
pre .javadoc,
pre .ruby .string,
pre .decorator,
pre .filter .argument,
pre .localvars,
pre .array,
pre .attr_selector,
pre .important,
pre .pseudo,
pre .pi,
pre .doctype,
pre .deletion,
pre .envvar,
pre .shebang,
pre .apache .sqbracket,
pre .nginx .built_in,
pre .tex .formula,
pre .erlang_repl .reserved,
pre .prompt,
pre .markdown .link_label,
pre .vhdl .attribute,
pre .clojure .attribute,
pre .coffeescript .property {
color: #88F
}

pre .keyword,
pre .id,
pre .phpdoc,
pre .title,
pre .built_in,
pre .aggregate,
pre .css .tag,
pre .javadoctag,
pre .phpdoc,
pre .yardoctag,
pre .smalltalk .class,
pre .winutils,
pre .bash .variable,
pre .apache .tag,
pre .go .typename,
pre .tex .command,
pre .markdown .strong,
pre .request,
pre .status {
font-weight: bold;
}

pre .markdown .emphasis {
font-style: italic;
}

pre .nginx .built_in {
font-weight: normal;
}

pre .coffeescript .javascript,
pre .javascript .xml,
pre .tex .formula,
pre .xml .javascript,
pre .xml .vbscript,
pre .xml .css,
pre .xml .cdata {
opacity: 0.5;
}
43 changes: 43 additions & 0 deletions public/css/wt.css
@@ -0,0 +1,43 @@
.walkthrough {
background: white;
padding: 40px;
border: 1px solid #ccc;
border-radius: 6px;
}
h1 {
line-height: 2em;
}
h2 {
line-height: 2em;
}
h3 {
line-height: 2em;
}
p {
font-size: 14px;
line-height: 1.43em;
}
pre {
float: right;
margin-top: 20px;
min-width: 453px;
}
pre code {
float: left;
}
.row2 {
padding: 0px;
background: #fff;
*zoom: 1;
}
.row2:before, .row2:after {
display: table;
content: "";
}
.row2:after {
clear: both;
}
hr {
margin-top: 40px;
}

Binary file added public/img/wt/000.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/001.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/002.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/003.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/004.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/005.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/007.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/008.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/009.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/010.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/011.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/012.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/013.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/014.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/015.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/016.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/nks-kidnap--modified.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/nks-kidnap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wt/shoes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/js/highlight.pack.js

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

9 changes: 9 additions & 0 deletions resources/walkthrough.rb
@@ -0,0 +1,9 @@
require 'metadown'

class WalkthroughPage < Webmachine::Resource
def to_html
walkthrough = Metadown.render(File.read("walkthrough/README.md"))
Template.new(:walkthrough).render(walkthrough: walkthrough)
end
end

5 changes: 5 additions & 0 deletions views/layout.html.haml
Expand Up @@ -6,8 +6,13 @@
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
%meta{:content => "The website for Shoes, a GUI toolkit for Ruby", :name => "description"}
%meta{:content => "Team Shoes", :name => "author"}

%link{:href => "/css/code.css", :rel => "stylesheet"}
%script{:type => "text/javascript", :src => "/js/highlight.pack.js"}
<script>hljs.initHighlightingOnLoad();</script>
/ Le styles
%link{:href => "/css/bootstrap.css", :rel => "stylesheet"}
%link{:href => "/css/wt.css", :rel => "stylesheet"}
:css
body {
padding-top: 60px;
Expand Down
2 changes: 1 addition & 1 deletion views/tutorials.html.haml
Expand Up @@ -9,7 +9,7 @@
%h2 The Walkthrough
#walk
%p The quickest way to get started with Shoes.
%a{:href => "https://github.com/ashbb/shoes_tutorial_walkthrough"} Click here.
%a{:href => "/walkthrough"} Click here.

.span5
%h2 The Manual
Expand Down
2 changes: 2 additions & 0 deletions views/walkthrough.html.haml
@@ -0,0 +1,2 @@
.walkthrough
= walkthrough.output

0 comments on commit 2886757

Please sign in to comment.