From: Ben Beltran Date: Wed, 1 Dec 2010 05:47:45 +0000 (-0700) Subject: Primer Commit. X-Git-Url: https://git.r.bdr.sh/rbdr/grita/commitdiff_plain/3e43ab35988daae6dc69e6682aad4285f693ee8e Primer Commit. Agregando el primer commit del app. Un "Hello World" por asi decirlo. --- 3e43ab35988daae6dc69e6682aad4285f693ee8e diff --git a/grita.rb b/grita.rb new file mode 100644 index 0000000..17ed55e --- /dev/null +++ b/grita.rb @@ -0,0 +1,20 @@ +require 'sinatra' +require 'haml' +require 'less' +require 'mongo' + +#config +set :haml, :format => :html5 + +#app +get '/' do + haml :index +end + +get '/style.css' do + less :style +end + +not_found do + "Estos no son los droides que estás buscando." +end \ No newline at end of file diff --git a/public/images/logo.png b/public/images/logo.png new file mode 100644 index 0000000..dfece35 Binary files /dev/null and b/public/images/logo.png differ diff --git a/views/index.haml b/views/index.haml new file mode 100644 index 0000000..a8e5eb5 --- /dev/null +++ b/views/index.haml @@ -0,0 +1,8 @@ +%h1 The Sorrows of Young Werther +%p + :markdown + A **wonderful serenity** has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in this spot, which was created for the bliss of souls like mine. + + I am so happy, *my dear friend*, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now. + + When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow familiar with the countless indescribable forms of the insects and flies, then I feel the presence of the Almighty, who formed us in his own image, \ No newline at end of file diff --git a/views/layout.haml b/views/layout.haml new file mode 100644 index 0000000..2954a06 --- /dev/null +++ b/views/layout.haml @@ -0,0 +1,18 @@ +!!! 5 +%html + %head + %title ¡Grita! + %link{:rel => 'stylesheet', :type => 'text/css', :href => '/style.css', :title => 'default'} + %meta{'http-equiv' => 'Contet-Type', :content => 'text/html; charset=utf-8' }/ + %body + #wrapper + #header + %a{:id => 'logo', :href=> '/'}< + %span Grita! + #description + :markdown + Un servicio sencillo: **(1)** Encuentra algo que quieras decir. **(2)** escribelo en el espacio que se encuentra abajo. **(3a)** Compartelo por medio de internet con un sencillo link. **(3b)** Compartelo físicamente con códigos que puedes imprimir para que sean leídos con un celular. + %hr/ + #body + =yield + #footer \ No newline at end of file diff --git a/views/style.css b/views/style.css new file mode 100644 index 0000000..35f810c --- /dev/null +++ b/views/style.css @@ -0,0 +1,49 @@ +* { + margin: 0; + padding: 0; +} +body { + color: #666666; + background-color: #ffffff; + text-align: center; + font-size: 0.625em; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +#wrapper { + margin: 0 auto; + width: 960px; + text-align: left; +} +#header #logo { + background-image: url(/images/logo.png); + background-repeat: no-repeat; + width: 460px; + height: 212px; + display: block; + margin: 10px 250px; +} +#header #logo span { display: none; } +#header #description p { + font-size: 1.4em; + line-height: 1.8em; + margin: 10px 170px; + width: 620px; + color: #999999; +} +#body h1 { + margin: 20px 90px; + font-size: 2.4em; + color: #222222; +} +#body p { + margin: 20px 90px; + font-size: 1.6em; + line-height: 2.4em; + text-indent: 3em; + text-align: justify; +} +hr { + margin: 10px; + border: 0; + border-bottom: 1px solid #eeeeee; +} diff --git a/views/style.less b/views/style.less new file mode 100644 index 0000000..0963093 --- /dev/null +++ b/views/style.less @@ -0,0 +1,65 @@ +@text_color: #666; +@background_color: #fff; +@emphasis_color: #222; +@light_color: #999; +@border_color: #eee; + +*{ + margin: 0; + padding: 0; +} + +body{ + color: @text_color; + background-color: @background_color; + text-align: center; + font-size: .625em; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +#wrapper{ + margin: 0 auto; + width: 960px; + text-align: left; +} + +#header #logo{ + background-image: url(/images/logo.png); + background-repeat: no-repeat; + width: 460px; + height: 212px; + display: block; + margin: 10px 250px; +} + +#header #logo span{ + display: none; +} + +#header #description p{ + font-size: 1.4em; + line-height: 1.8em; + margin: 10px 170px; + width: 620px; + color: @light_color; +} + +#body h1{ + margin: 20px 90px; + font-size: 2.4em; + color: @emphasis_color; +} + +#body p{ + margin: 20px 90px; + font-size: 1.6em; + line-height: 2.4em; + text-indent: 3em; + text-align: justify; +} + +hr{ + margin: 10px; + border: 0; + border-bottom: 1px solid @border_color; +} \ No newline at end of file