Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Working on official Stasis site

  • Loading branch information...
commit f670b8bbd1049109aeb8cb7437763ab924cfc530 1 parent 6ffd6a1
Winton Welsh authored
2  .gitignore
View
@@ -3,5 +3,7 @@
coverage
docs
pkg
+site/.sass-cache
+site/public
spec/fixtures/project/public
tmp
2  config/gemsets.yml
View
@@ -5,5 +5,5 @@ stasis:
rocco: ~>0.6
rspec: ~>1.0
slop: ~>1.6.0
- tilt: ~>1.2
+ tilt: ~>1.3
yajl-ruby: ~>0.8.2
8 lib/stasis/auto.rb
View
@@ -9,8 +9,7 @@ def initialize(dir)
puts "\nAuto-regenerating enabled: #{dir}"
- @stasis = Stasis.new(dir)
- generate
+ generate(dir)
dw = DirectoryWatcher.new(@stasis.root)
dw.interval = 1
@@ -28,7 +27,7 @@ def initialize(dir)
dw.add_observer do |*events|
modified = events.detect { |e| e[:type] == :modified }
- generate if modified
+ generate(dir) if modified
end
dw.start
@@ -37,9 +36,10 @@ def initialize(dir)
private
- def generate
+ def generate(dir)
puts "\n[#{Time.now.strftime("%Y-%m-%d %H:%M:%S")}] Auto-regenerating project..."
begin
+ @stasis = Stasis.new(dir)
@stasis.generate
rescue Exception => e
puts "\n[#{Time.now.strftime("%Y-%m-%d %H:%M:%S")}] Error: #{e.message}`"
10 site/controller.rb
View
@@ -0,0 +1,10 @@
+require 'nokogiri'
+
+before 'index.html.haml' do
+ @readme = Nokogiri::HTML(render('../README.md')).css('body')
+ @readme.children.each do |node|
+ break if node.name == 'h2'
+ node.remove
+ end
+ @readme = @readme.inner_html
+end
36 site/index.html.haml
View
@@ -0,0 +1,36 @@
+!!! 5
+%html
+ %head
+ %title Stasis - Static Sites Made Powerful
+ %link{ :href => "stasis.css", :media => "screen", :rel => "stylesheet", :type => "text/css" }
+ %link{ :href => "http://fonts.googleapis.com/css?family=Amaranth|Open+Sans:400,600,700&v2", :rel => "stylesheet", :type => "text/css" }
+ %body
+ %ul
+ %li
+ %a{ :href => '#install' } Install
+ %li
+ %a{ :href => '#templates' } Templates
+ %li
+ %a{ :href => '#controllers' } Controllers
+ %li
+ %a{ :href => '#before' } Before
+ %li
+ %a{ :href => '#layouts' } Layouts
+ %li
+ %a{ :href => '#ignore' } Ignore
+ %li
+ %a{ :href => '#render' } Render
+ %li
+ %a{ :href => '#instead' } Instead
+ %li
+ %a{ :href => '#helpers' } Helpers
+ %li
+ %a{ :href => '#priority' } Priority
+ %li
+ %a{ :href => '#more' } More
+ #title
+ %img{ :src => 'stasis.png' }>
+ stasis
+ %img.reverse{ :src => 'stasis.png' }>
+ #tm Static Sites Made Powerful
+ #body~ @readme
97 site/stasis.css.scss
View
@@ -0,0 +1,97 @@
+// normal: 400, semi-bold: 600, bold: 700
+// font-family: 'Amaranth', sans-serif;
+// font-family: 'Open Sans', sans-serif;
+
+a {
+ color: #2281D1;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+body {
+ background-color: #333435;
+ color: #CCD7E1;
+ font-family: 'Open Sans', sans-serif;
+ font-weight: 400;
+ margin: 0;
+}
+
+ul {
+ background-color: #CCD7E1;
+ font-size: 13px;
+ font-weight: 600;
+ margin: 0;
+ padding: 0;
+ text-align: center;
+
+ li {
+ display: inline;
+ line-height: 25px;
+ padding: 0 12px;
+ }
+}
+
+#title {
+ color: #3393E4;
+ font-family: 'Amaranth', sans-serif;
+ font-size: 110px;
+ font-weight: 400;
+ margin-top: 25px;
+ text-align: center;
+ text-shadow: 0px 5px 1px rgba(0,0,0,0.07);
+
+ -webkit-mask-image: -webkit-gradient(
+ linear,
+ left bottom,
+ left top,
+ color-stop(0, rgba(7,59,102,0.6)),
+ color-stop(0.6, rgba(255,255,255,1))
+ );
+
+ img {
+ margin: 0 10px;
+ }
+
+ img.reverse {
+ -moz-transform: scaleX(-1);
+ -webkit-transform: scaleX(-1);
+ -o-transform: scaleX(-1);
+ transform: scaleX(-1);
+ filter: fliph;
+ }
+}
+
+#tm {
+ font-size: 19.4px;
+ font-weight: 700;
+ margin-top: 30px;
+ text-align: center;
+}
+
+#body {
+ margin: 60px auto 0;
+ width: 800px;
+
+ h2 {
+ border-bottom: 1px solid #484C4F;
+ clear: both;
+ font-size: 19.4px;
+ padding: 20px 0 5px;
+ }
+
+ pre {
+ background-color: #282929;
+ clear: both;
+ float: right;
+ padding: 10px 15px 10px 20px;
+ width: 390px;
+
+ -webkit-box-shadow: rgba(0, 0, 0, 0.25) 0 1px 2px inset;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ }
+}
BIN  site/stasis.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.