]> git.r.bdr.sh - rbdr/grita/commitdiff
Cambio de Layout + Favicon
authorBen Beltran <redacted>
Wed, 1 Dec 2010 22:58:21 +0000 (15:58 -0700)
committerBen Beltran <redacted>
Wed, 1 Dec 2010 22:58:21 +0000 (15:58 -0700)
Agregué el favicon nuevo y cambié un poco el layout para darle más enfasis al texto.

grita.rb
public/images/favicon.ico [new file with mode: 0644]
public/images/favicon.png [new file with mode: 0644]
public/images/logomini.png [new file with mode: 0644]
views/layout.haml
views/layoutmini.haml [new file with mode: 0644]
views/style.css
views/style.less

index 406dde7b846c411021445e47be29fe07cde6b8cb..6e4d3671de132de7ffddcef7f6ace1d62af69fe3 100644 (file)
--- a/grita.rb
+++ b/grita.rb
@@ -47,7 +47,7 @@ get '/:grito' do
     
     @markdown = RDiscount.new(@grito.text)
     
-    haml :grito
+    haml :grito, :layout => :layoutmini
 end
 
 error do
diff --git a/public/images/favicon.ico b/public/images/favicon.ico
new file mode 100644 (file)
index 0000000..9cb8445
Binary files /dev/null and b/public/images/favicon.ico differ
diff --git a/public/images/favicon.png b/public/images/favicon.png
new file mode 100644 (file)
index 0000000..024f0da
Binary files /dev/null and b/public/images/favicon.png differ
diff --git a/public/images/logomini.png b/public/images/logomini.png
new file mode 100644 (file)
index 0000000..862403f
Binary files /dev/null and b/public/images/logomini.png differ
index 6fed8088883c95025c516d69cb37c112131421c5..160b85847c0f4c989b1997cd9029b0d450e12cbc 100644 (file)
@@ -6,7 +6,9 @@
                                %title= "#{@grito.title} - ¡Grita!"
                        -else
                                %title ¡Grita!
-               %link{:rel => 'stylesheet', :type => 'text/css', :href => '/style.css', :title => 'default'}
+               %link{:rel => 'stylesheet', :type => 'text/css', :href => '/style.css', :title => 'default'}            
+               %link{:rel => "icon", :href => "/images/favicon.ico", :type => "image/x-icon"}
+               %link{:rel => "icon", :href => "/images/favicon.png", :type => "image/png"}
                %meta{'http-equiv' => 'Contet-Type', :content => 'text/html; charset=utf-8' }/
        %body
                #wrapper
diff --git a/views/layoutmini.haml b/views/layoutmini.haml
new file mode 100644 (file)
index 0000000..23fbe14
--- /dev/null
@@ -0,0 +1,21 @@
+!!! 5
+%html
+       %head
+               -unless @grito.nil?
+                       -if @grito.errors.empty?
+                               %title= "#{@grito.title} - ¡Grita!"
+                       -else
+                               %title ¡Grita!
+               %link{:rel => 'stylesheet', :type => 'text/css', :href => '/style.css', :title => 'default'}            
+               %link{:rel => "icon", :href => "/images/favicon.ico", :type => "image/x-icon"}
+               %link{:rel => "icon", :href => "/images/favicon.png", :type => "image/png"}
+               %meta{'http-equiv' => 'Contet-Type', :content => 'text/html; charset=utf-8' }/
+       %body
+               #wrapper
+                       #header
+                               %a{:id => 'logomini', :href=> '/'}<
+                                       %span Grita!
+                       %hr/
+                       #body 
+                               =yield
+                       #footer
\ No newline at end of file
index 3a1f6e72f4bd14f105a6216999eb00a280e86785..7582af31e5a168fe52b7fb936097375b866e8bb9 100644 (file)
@@ -23,7 +23,16 @@ body {
   display: block;
   margin: 10px 250px;
 }
+#header #logomini {
+  background-image: url(/images/logomini.png);
+  background-repeat: no-repeat;
+  width: 140px;
+  height: 65px;
+  display: block;
+  margin: 10px 380px;
+}
 #header #logo span { display: none; }
+#header #logomini span { display: none; }
 #header #description p {
   font-size: 1.4em;
   line-height: 1.8em;
index 972269ce62e4c7153542ec1bff5db22f9afe5cc2..516cbbc3bd89bcb1227d64b413a89f4b1274882c 100644 (file)
@@ -41,7 +41,16 @@ body{
        margin: 10px 250px;
 }
 
-#header #logo span{
+#header #logomini{
+       background-image: url(/images/logomini.png);
+       background-repeat: no-repeat;
+       width: 140px;
+       height: 65px;
+       display: block;
+       margin: 10px 380px;
+}
+
+#header #logo span, #header #logomini span{
        display: none;
 }