Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial commit

  • Loading branch information...
commit 1728c0de51b5aa90a29b9e7034eb622415e3b7d9 0 parents
Rodrigo Pinto rodrigopinto authored
13 .gitignore
@@ -0,0 +1,13 @@
+.rvmrc*
+.DS_Store
+coverage
+solr
+public/javascripts/*_packaged.js
+tags
+*.swp
+.bundle
+specifications
+cache
+gems
+tmp/restart.txt
+
8 Gemfile
@@ -0,0 +1,8 @@
+source :gemcutter
+gem 'haml'
+gem 'rcov'
+gem 'sinatra'
+
+gem 'rake'
+gem 'rack-test'
+
11 Rakefile
@@ -0,0 +1,11 @@
+gem 'rspec'
+require 'spec'
+require 'spec/rake/spectask'
+
+desc "Default Task"
+task :default => [ :spec ]
+
+desc "Run all specs"
+Spec::Rake::SpecTask.new do |t|
+ t.spec_files = FileList['spec/**/*_spec.rb']
+end
2  Readme.md
@@ -0,0 +1,2 @@
+just released!
+
18 almoceitor.rb
@@ -0,0 +1,18 @@
+require 'rubygems'
+gem 'haml'
+gem 'rcov'
+gem 'sinatra'
+
+require 'yaml'
+require 'haml'
+require 'rcov'
+require 'sinatra'
+
+
+configure :production do
+end
+
+get '/' do
+ haml :index
+end
+
3  config.ru
@@ -0,0 +1,3 @@
+require 'almoceitor'
+run Sinatra::Application
+
69 public/css/almoceitor.css
@@ -0,0 +1,69 @@
+body {
+ background-color: #78ADBE;
+ font: .625em Times, serif;
+}
+
+#certificate {
+ position: absolute;
+ top: 50%;
+ margin-top: -297px;
+ left : 50%;
+ margin-left: -421px;
+ width: 842px;
+ height: 594px;
+ border: 4px solid #1E706E;
+ background-color: #fff;
+ padding: 20px;
+ font-size: 1.4em;
+ color: #061615;
+}
+
+#certificate #content {
+ border: 30px solid #1E706E;
+ width: 782px;
+ height: 534px;
+ text-align: center;
+}
+
+#certificate #content p {
+ margin: 1em;
+ line-height: 1em;
+ font-size: 1.4em;
+}
+
+#certificate #content .complement {
+ font-style: italic;
+ font-size: 1.8em;
+ font-weight: bold;
+ margin: 1em 0;
+}
+
+#certificate #content h1 {
+ font-size: 2.6em;
+}
+
+#certificate #content h2 {
+ margin: 0;
+ font-size: 3.8em;
+ color: #3D819F;
+}
+
+#certificate #content #date {
+ font-size: 1.8em;
+ font-style: italic;
+}
+
+#certificate #content #signature {
+ margin: 60px;
+ padding: 10px;
+ border-top: 1px solid #061615;
+}
+
+@media print {
+ #certificate {
+ position: relative;
+ top: auto;
+ margin: 0;
+ left : auto;
+ }
+}
0  public/css/mobile.css
No changes.
242 public/css/styles.css
@@ -0,0 +1,242 @@
+/*
+CSS
+*/
+
+html {
+ background-color: #fff;
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ font: .625em helvetica, arial, sans-serif;
+}
+
+#page {
+ margin: 0 auto;
+ padding: 20px 0 0 0;
+ width: 960px;
+ font-size: 1.2em;
+}
+
+/*
+General
+*/
+
+p {
+ margin: 1.4em 0;
+ padding: 0;
+ line-height: 1.4em;
+}
+
+img {
+ border: 0;
+}
+
+hr {
+ display: none;
+}
+
+a,
+a:link,
+a:active,
+a:visited {
+ color: #033649;
+ text-decoration: none;
+ border-bottom: 1px dotted #033649;
+}
+
+a:hover {
+ border-bottom: 1px solid #033649;
+}
+
+blockquote {
+ margin: 0 0 25px 0;
+ padding: 0 0 0 40px;
+ background: transparent url(../images/quote-left.gif) no-repeat 0 0;
+}
+
+blockquote p {
+ margin: 0;
+ padding: 0 25px 0 0;
+ background: transparent url(../images/quote-right.gif) no-repeat right bottom;
+}
+
+/*
+Header
+*/
+
+#header {
+ border-bottom: 1px dotted #26ADE4;
+}
+
+#header h1 {
+ font-size: 6em;
+ text-align: center;
+ font-weight: normal;
+ letter-spacing: -0.05em;
+ margin: .4em;
+}
+#header h1 a {
+ border: none;
+}
+#header h1 a strong {
+ color: #78ADBE;
+
+}
+
+/*
+Content
+*/
+
+#content {
+ margin: 0 20px;
+ font-size: 1.4em;
+ text-shadow: 1px 1px 0 #fff;
+}
+
+dl#horoscopo dt {
+ font-size: 1.4em;
+ width: 140px;
+ float: left;
+ background-color: #4DBCE9;
+ color: #fff;
+ text-shadow: none;
+ margin: 0 20px 0 0;
+ padding: 10px;
+ clear: left;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ text-align: center;
+}
+
+dl#horoscopo dd {
+ display: inline;
+ float: left;
+ width: 680px;
+ border-bottom: 1px dotted #e9e9e9;
+ margin: 0 0 15px 0;
+}
+
+a.tweet-link {
+ border: none;
+}
+
+/*
+Forms
+*/
+
+form {
+ margin: 20px auto;
+ padding: 0;
+ width: 440px;
+}
+
+fieldset {
+ margin: 0;
+ padding: 20px;
+ border: none;
+}
+
+form div {
+ padding: 0 0 5px 0;
+}
+
+form input {
+ font-size: 1.1em;
+ padding: 2px;
+ display: block;
+ width: 400px;
+}
+
+.error {
+ color: #900;
+}
+
+form p {
+ margin: -35px 0 0 440px;
+ padding: 8px;
+ width: 300px;
+ position: absolute;
+ border: 1px solid #033649;
+ background-color: #036564;
+ color: #fff;
+ font-size: .9em;
+ font-family: Arial, Helvetica, Sans-Serif;
+}
+
+form p em {
+ font-size: 1.2em;
+ display: block;
+}
+
+.info_label {
+ display: none;
+ text-shadow: none;
+}
+
+.button {
+ width: 200px;
+ text-align: center;
+ margin: 4px;
+ padding: 4px;
+ font-size: 1.1em;
+ background-color: #031634;
+ color: #fff;
+ border: none;
+ text-shadow: -1px -1px 0 #000;
+ float: right;
+}
+
+/*
+Footer
+*/
+
+#footer {
+ clear: both;
+ font-size: .9em;
+ padding: 0 20px;
+ border-top: 1px dotted #26ADE4;
+ text-align: center;
+}
+
+#footer img {
+ vertical-align: middle;
+}
+
+/*
+Clearfix
+*/
+
+.clearfix:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+.clearfix {
+ display: inline-table;
+}
+
+/* Hides from IE-mac \*/
+.clearfix {
+ height: 1%;
+}
+
+.clearfix {
+ display: block;
+}
+/* End hide from IE-mac */
+
+#he {
+ float: right;
+ margin: 10px 10px 0 0;
+ background: url(/images/he.png) no-repeat;
+ width: 72px;
+ height: 27px;
+ display: block;
+ text-indent: -153000px;
+}
0  public/favicon.ico
No changes.
BIN  public/images/he.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2  public/javascripts/application.js
@@ -0,0 +1,2 @@
+// Place your application-specific JavaScript functions and classes here
+// This file is automatically included by javascript_include_tag :defaults
4 public/javascripts/mobile.js
@@ -0,0 +1,4 @@
+if(navigator.userAgent.match(/iPhone|iPod|iPad/i)) {
+ $("#page").css("width","95%");
+ $("#page").css("font-size","1.2em");
+}
16 spec/almoceitor_spec.rb
@@ -0,0 +1,16 @@
+require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
+
+describe "almoceitor" do
+ include Rack::Test::Methods
+
+ def app
+ @app ||= Sinatra::Application
+ end
+
+ it "deve responder a url '/' " do
+ get "/"
+ last_response.should be_ok
+ end
+
+end
+
2  spec/rcov.opts
@@ -0,0 +1,2 @@
+--exclude "spec/*,gems/*"
+--rails
4 spec/spec.opts
@@ -0,0 +1,4 @@
+--colour
+--format progress
+--loadby mtime
+--reverse
5 spec/spec_helper.rb
@@ -0,0 +1,5 @@
+require File.expand_path(File.dirname(__FILE__) + "/../almoceitor")
+
+require 'spec'
+require 'rack/test'
+
35 views/index.haml
@@ -0,0 +1,35 @@
+- require 'cgi'
+<!doctype html>
+%html
+ %head
+ %meta{ :content => "text/html; charset=utf-8", "http-equiv" => "Content-Type" }
+ %meta{ :name => "description", :content => "" }
+ %meta{ :name => "keywords", :content => "" }
+ %meta{ :content => "en-US", "http-equiv" => "content-Language" }
+ %meta{ :content => "width=device-width, initial-scale = 1.0, user-scalable=yes", "name" => "viewport" }
+
+ %link{ :href => "favicon.ico", :rel => "shortcut icon", :type => "image/x-icon" }
+ %title
+ almoceitor
+ %link{ :href => "/css/styles.css", :rel => "stylesheet", :type => "text/css", :media => "screen, print" }
+ %script{ :src => "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"}
+ %script{ :src => "/javascripts/mobile.js"}
+
+ %body
+ #page
+ #header
+ %h1
+ %a{ :href => "/" }
+ =# TODO: gambiarra detected!
+ = "<strong>al</strong>moceitor"
+ %hr
+ #content
+ %br
+ %hr
+ #footer
+ %p
+ &copy; 2010.
+ %a{ :href => "/", :rel => "license" }
+ almoceitor
+ , coisa nenhuma reserved.
+
Please sign in to comment.
Something went wrong with that request. Please try again.