Permalink
Browse files

init

  • Loading branch information...
0 parents commit 8db891c033dca6d93381ad507ad2728200d17734 @stefl committed May 26, 2012
@@ -0,0 +1,7 @@
+---
+:orm: mongoid
+:test: none
+:mock: none
+:script: none
+:renderer: haml
+:stylesheet: none
@@ -0,0 +1,7 @@
+.DS_Store
+log/**/*
+tmp/**/*
+bin/*
+vendor/gems/*
+!vendor/gems/cache/
+.sass-cache/*
@@ -0,0 +1,11 @@
+source :rubygems
+gem 'rake'
+gem 'sinatra-flash', :require => 'sinatra/flash'
+gem 'haml'
+gem 'mongoid'
+gem 'bson_ext', :require => "mongo"
+gem 'dalli'
+gem "jekyll", :git => "git://github.com/stefl/jekyll.git"
+gem "compass", "0.12.2.rc.0"
+gem "susy", "1.0.rc.0"
+gem 'padrino', '0.10.5'
@@ -0,0 +1,131 @@
+GIT
+ remote: git://github.com/stefl/jekyll.git
+ revision: 8ba90245024290776bf380d5876509cc4e6c2930
+ specs:
+ jekyll (0.11.2)
+ albino (~> 1.3)
+ classifier (~> 1.3)
+ directory_watcher (~> 1.1)
+ kramdown (~> 0.13)
+ liquid (~> 2.3)
+ maruku (~> 0.5)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activemodel (3.1.4)
+ activesupport (= 3.1.4)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activesupport (3.1.4)
+ multi_json (~> 1.0)
+ albino (1.3.3)
+ posix-spawn (>= 0.3.6)
+ bson (1.6.2)
+ bson_ext (1.6.2)
+ bson (~> 1.6.2)
+ builder (3.0.0)
+ chunky_png (1.2.5)
+ classifier (1.3.3)
+ fast-stemmer (>= 1.0.0)
+ compass (0.12.2.rc.0)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ dalli (2.0.3)
+ diff-lcs (1.1.3)
+ directory_watcher (1.4.1)
+ fast-stemmer (1.0.1)
+ fssm (0.2.9)
+ grit (2.4.1)
+ diff-lcs (~> 1.1)
+ mime-types (~> 1.15)
+ haml (3.1.4)
+ http_router (0.10.2)
+ rack (>= 1.0.0)
+ url_mount (~> 0.2.1)
+ i18n (0.6.0)
+ kramdown (0.13.6)
+ liquid (2.3.0)
+ mail (2.3.3)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ maruku (0.6.0)
+ syntax (>= 1.0.0)
+ mime-types (1.18)
+ mongo (1.6.2)
+ bson (~> 1.6.2)
+ mongoid (2.4.9)
+ activemodel (~> 3.1)
+ mongo (~> 1.3)
+ tzinfo (~> 0.3.22)
+ multi_json (1.3.4)
+ padrino (0.10.5)
+ padrino-admin (= 0.10.5)
+ padrino-cache (= 0.10.5)
+ padrino-core (= 0.10.5)
+ padrino-gen (= 0.10.5)
+ padrino-helpers (= 0.10.5)
+ padrino-mailer (= 0.10.5)
+ padrino-admin (0.10.5)
+ padrino-core (= 0.10.5)
+ padrino-helpers (= 0.10.5)
+ padrino-cache (0.10.5)
+ padrino-core (= 0.10.5)
+ padrino-core (0.10.5)
+ activesupport (~> 3.1.0)
+ http_router (~> 0.10.2)
+ sinatra (~> 1.3.1)
+ thor (~> 0.14.3)
+ tilt (~> 1.3.0)
+ padrino-gen (0.10.5)
+ bundler (~> 1.0)
+ grit (~> 2.4.1)
+ padrino-core (= 0.10.5)
+ padrino-helpers (0.10.5)
+ i18n (~> 0.6)
+ padrino-core (= 0.10.5)
+ padrino-mailer (0.10.5)
+ mail (~> 2.3.0)
+ padrino-core (= 0.10.5)
+ polyglot (0.3.3)
+ posix-spawn (0.3.6)
+ rack (1.4.1)
+ rack-protection (1.2.0)
+ rack
+ rake (0.9.2.2)
+ sass (3.2.0.alpha.242)
+ sinatra (1.3.2)
+ rack (~> 1.3, >= 1.3.6)
+ rack-protection (~> 1.2)
+ tilt (~> 1.3, >= 1.3.3)
+ sinatra-flash (0.3.0)
+ sinatra (>= 1.0.0)
+ susy (1.0.rc.0)
+ compass (>= 0.12.2.rc.0)
+ sass (>= 3.2.0.alpha.237)
+ syntax (1.0.0)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.33)
+ url_mount (0.2.1)
+ rack
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bson_ext
+ compass (= 0.12.2.rc.0)
+ dalli
+ haml
+ jekyll!
+ mongoid
+ padrino (= 0.10.5)
+ rake
+ sinatra-flash
+ susy (= 1.0.rc.0)
@@ -0,0 +1 @@
+web: bundle exec unicorn -p $PORT -c ./unicorn.rb
@@ -0,0 +1,16 @@
+class Sketching < Padrino::Application
+ register Padrino::Rendering
+ register Padrino::Mailer
+ register Padrino::Helpers
+ register Padrino::Cache
+
+ enable :caching
+ set :cache, Padrino::Cache::Store::Memcache.new(::Dalli::Client.new(ENV["MEMCACHE_SERVERS"] || '127.0.0.1:11211', :exception_retry_limit => 1))
+
+ disable :sessions
+ disable :flash
+
+ before do
+ headers 'Cache-Control' => 'public, max-age=300'
+ end
+end
@@ -0,0 +1,34 @@
+# encoding: utf-8
+
+Sketching.controllers :blog do
+
+ blog_path = File.join(File.dirname(__FILE__), '..', '..', 'blog', "_site")
+ blog_posts_path = File.join(File.dirname(__FILE__), '..', '..', 'blog', "_posts")
+
+ get :index, :map=>"/" do
+ index_path = File.join(blog_path, "index.html")
+ @content = File.open(index_path).read
+ haml :"blog/index", :layout => !request.xhr?
+ end
+
+ get :page, :map => "/blog/page:number" do
+ file_path = File.join(blog_path, request.path.sub("blog/",""))
+ file_path = File.join(file_path, 'index.html') unless file_path =~ /\.[a-z]+$/i
+ pass unless File.exist?(file_path)
+ @content = File.open(file_path).read
+ haml :"blog/index", :layout => !request.xhr?
+ end
+
+ get :show, :map => "/:year/:month/:day/:slug" do
+ file_path = File.join(blog_path, request.path)
+ file_path = File.join(file_path, 'index.html') unless file_path =~ /\.[a-z]+$/i
+ pass unless File.exist?(file_path)
+ @content = File.open(file_path).read
+ haml :"blog/post", :layout => !request.xhr?
+ end
+
+ get :sitemap, :map => "/blog/sitemap", :provides => [:xml] do
+ File.open(blog_path + "/sitemap.xml").read
+ end
+
+end
@@ -0,0 +1,87 @@
+@import "compass/reset";
+@import "compass/typography";
+@import "compass/css3";
+@import "compass/typography/vertical_rhythm";
+@import "compass/utilities/links/link-colors";
+
+$total-columns : 12; // a 12-column grid
+$column-width : 4em; // each column is 4em wide
+$gutter-width : 1em; // 1em gutters between columns
+$grid-padding : $gutter-width; // grid-padding equal to gutters
+
+$media-layout: 12; // Use 12-col layout at matching min-width.
+$media-layout: 30em; // At min 30em, use closest fitting layout.
+$media-layout: 30em 12; // At min 30em, use 12-col layout.
+$media-layout: 12 60em; // Use 12 cols up to max 60em.
+$media-layout: 30em 60em; // Between min 30em & max 60em, use closest layout.
+$media-layout: 30em 12 60em;// Use 12 cols between min 30em & max 60em.
+$media-layout: 60em 12 30em;// Same. Larger length will always be max-width.
+$media-layout: 12 lt-ie9; // Output is included under `.lt-ie9` class,
+$container-style: magic;
+
+$link-color: #686945;
+
+@import "susy";
+
+@include establish-baseline;
+
+body {
+ background-color: #f8faf4;
+ a {
+ @include link-colors($link-color, lighten($link-color,10), lighten($link-color,15), lighten($link-color,20), lighten($link-color,25));
+ }
+ h1 a {
+ text-decoration: none;
+ }
+}
+
+.page {
+ font-family: "ff-tisa-web-pro",serif;
+ // page acts as a container for our grid.
+ @include container;
+
+ // header and footer are full-width by default.
+ header, footer {
+ clear: both;
+ background-color: rgba(255,255,255,0.7);
+ @include box-shadow(rgba(0,0,0,0.05) 0px 0px 8px);
+ }
+
+ // nav spans 3 columns of total 12.
+ nav { @include span-columns(2,12); }
+
+ .content {
+ @include post(2);
+ @include span-columns(8,12);
+ }
+}
+
+h1 {
+ @include adjust-font-size-to($base-font-size * 6, $lines:4);
+ font-family: "learning-curve-dashed", cursive;
+}
+
+header {
+ h1 {
+ &#logo {
+ @include adjust-font-size-to($base-font-size * 8, $lines:4);
+ text-align: center;
+ }
+ }
+ h2 {
+ @include adjust-font-size-to($base-font-size * 1.33, $lines:2);
+ text-weight: light;
+ text-align: center;
+ }
+ @include padding-leader(1);
+ @include padding-trailer(1);
+ @include leader(1);
+ @include trailer(1);
+}
+
+p {
+ &:first-child {
+ @include leader;
+ }
+ @include trailer;
+}
@@ -0,0 +1,2 @@
+-# coding: utf-8
+= @content
@@ -0,0 +1,15 @@
+- @section = "blog"
+
+- if ENV["RACK_ENV"] == "development"
+ :javascript
+ var disqus_developer = true;
+
+%article
+ = @content
+ #disqus_thread
+ %script{:src => "http://disqus.com/forums/stef/embed.js", :type => "text/javascript"}
+ %noscript
+ %a{:href => "http://stef.disqus.com/?url=ref"} View the discussion thread.
+ %a.dsq-brlink{:href => "http://disqus.com"}
+ blog comments powered by
+ %span.logo-disqus Disqus
@@ -0,0 +1,65 @@
+-# coding: utf-8
+!!! 5
+%html{:lang => "en", :xmlns => "http://www.w3.org/1999/xhtml"}
+ %head
+ %title
+ = @title + " | " if @title
+ Sketching with Code
+ %meta{:charset => "utf-8"}/
+ %link{:rel => "canonical", :href => @canonical || "http://sketchingwithcode.com#{request.path}"}
+ %link{:rel => "shortcut icon", :href=>"/icons/icon57x57.png"}/
+ %link{:rel => "apple-touch-icon-precomposed", :sizes=>"57x57", :href=>"/icons/icon57x57.png"}/
+ %link{:rel => "apple-touch-icon-precomposed", :sizes=>"72x72", :href=>"/icons/icon72x72.png"}/
+ %link{:rel => "apple-touch-icon-precomposed", :sizes=>"114x114", :href=>"/icons/icon114x114.png"}/
+
+ %meta{:name => "keywords", :value => "Sketching with Code"}
+ %meta{:name => "description", :value => "A blog about culture and code"}
+ %meta{:name => "MSSmartTagsPreventParsing", :content => "true"}/
+ %meta{:"http-equiv" => "X-UA-Compatible", :content => "chrome=1"}/
+ %meta{:name=>"viewport", :content=>"width=device-width,initial-scale=1;maximum-scale=1;minimum-scale=1;user-scalable=no;"}/
+ %meta{:name=>"apple-mobile-web-app-capable", :content=>"yes"}/
+ %meta{:name=>"apple-mobile-web-app-status-bar-style", :content=>"black"}/
+ %link{:href => "/stylesheets/application.css", :media => "screen, projection", :rel => "stylesheet", :type => "text/css"}/
+
+ = favicon_tag 'favicon.ico'
+ %script{:src=>"/assets/modernizr-2.0.6.min.js",:type=>"text/javascript"}
+
+ <script type="text/javascript" src="http://use.typekit.com/sla1ora.js"></script>
+ <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+ <![endif]-->
+
+ %body{:id=>(request.path.split("/")[1] rescue "")}
+ .page
+ %header
+ %h1#logo
+ %a{:title=>"Sketching with code", :href=>"/"} Sketching with Code
+ %h2
+ Culture, hack days and what happens next…
+ %nav
+ %div#follow_button
+ <a href="https://twitter.com/stef" class="twitter-follow-button" data-button="grey" data-text-color="#FFFFFF" data-link-color="#FFFFFF" data-show-count="false">Follow @stef</a>
+
+ %section.content
+ = yield
+
+ %script{:src=>"/assets/libraries.js", :type=>"text/javascript"}
+ = yield_content :scripts
+ %script{:src=>"/assets/application.js", :type=>"text/javascript"}
+ %script{:src=>"//platform.twitter.com/widgets.js", :charset=>"utf-8", :type=>"text/javascript"}
+ - if false && Padrino.env == :production
+ :javascript
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-666119-5']);
+ _gaq.push(['_setDomainName', 'none']);
+ _gaq.push(['_setAllowLinker', true]);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+ = "<!-- Rendered at #{Time.now} -->"
Oops, something went wrong. Retry.

0 comments on commit 8db891c

Please sign in to comment.