Skip to content

Commit

Permalink
Capítulos. Zona de remezclas
Browse files Browse the repository at this point in the history
  • Loading branch information
danigb committed Mar 7, 2012
1 parent 4a42214 commit 499a7df
Show file tree
Hide file tree
Showing 23 changed files with 146 additions and 75 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ log/*.log
tmp/**/*
tmp/**
public/uploads/**
.DS_Store

6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'http://rubygems.org'

gem 'rails', '3.1.1'
gem 'rails', '3.2.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
Expand All @@ -11,8 +11,8 @@ gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end

Expand Down
136 changes: 66 additions & 70 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,142 +1,138 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
actionmailer (3.2.2)
actionpack (= 3.2.2)
mail (~> 2.4.0)
actionpack (3.2.2)
activemodel (= 3.2.2)
activesupport (= 3.2.2)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
activemodel (3.1.1)
activesupport (= 3.1.1)
sprockets (~> 2.1.2)
activemodel (3.2.2)
activesupport (= 3.2.2)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
arel (~> 2.2.1)
activerecord (3.2.2)
activemodel (= 3.2.2)
activesupport (= 3.2.2)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
activesupport (3.1.1)
activeresource (3.2.2)
activemodel (= 3.2.2)
activesupport (= 3.2.2)
activesupport (3.2.2)
i18n (~> 0.6)
multi_json (~> 1.0)
ansi (1.4.1)
arel (2.2.1)
ansi (1.4.2)
arel (3.0.2)
builder (3.0.0)
capistrano (2.9.0)
capistrano (2.11.2)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
coffee-rails (3.1.1)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.3)
coffee-script-source (1.2.0)
erubis (2.7.0)
execjs (1.2.9)
execjs (1.3.0)
multi_json (~> 1.0)
highline (1.6.2)
highline (1.6.11)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.17)
railties (~> 3.0)
journey (1.0.3)
jquery-rails (2.0.1)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.6.1)
kgio (2.6.0)
mail (2.3.0)
json (1.6.5)
kgio (2.7.2)
mail (2.4.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.3)
multi_json (1.1.0)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.2.1)
net-ssh (2.3.0)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
newrelic_rpm (3.3.0)
newrelic_rpm (3.3.2)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.1)
actionmailer (= 3.1.1)
actionpack (= 3.1.1)
activerecord (= 3.1.1)
activeresource (= 3.1.1)
activesupport (= 3.1.1)
rails (3.2.2)
actionmailer (= 3.2.2)
actionpack (= 3.2.2)
activerecord (= 3.2.2)
activeresource (= 3.2.2)
activesupport (= 3.2.2)
bundler (~> 1.0)
railties (= 3.1.1)
railties (3.1.1)
actionpack (= 3.1.1)
activesupport (= 3.1.1)
railties (= 3.2.2)
railties (3.2.2)
actionpack (= 3.2.2)
activesupport (= 3.2.2)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
raindrops (0.8.0)
rake (0.9.2.2)
rdoc (3.11)
rdoc (3.12)
json (~> 1.4)
sass (3.1.10)
sass-rails (3.1.4)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.4)
sprockets (~> 2.0.0)
tilt (~> 1.3.2)
sprockets (2.0.3)
sass (3.1.15)
sass-rails (3.2.4)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.4)
sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.8.3)
turn (0.9.3)
ansi
tzinfo (0.3.31)
uglifier (1.0.4)
tzinfo (0.3.32)
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
unicorn (4.1.1)
kgio (~> 2.4)
unicorn (4.2.0)
kgio (~> 2.6)
rack
raindrops (~> 0.6)
raindrops (~> 0.7)

PLATFORMS
ruby

DEPENDENCIES
capistrano
coffee-rails (~> 3.1.1)
coffee-rails (~> 3.2.1)
jquery-rails
newrelic_rpm
rails (= 3.1.1)
sass-rails (~> 3.1.4)
rails (= 3.2.2)
sass-rails (~> 3.2.3)
sqlite3
turn
uglifier (>= 1.0.3)
Expand Down
32 changes: 30 additions & 2 deletions app/assets/stylesheets/application/application.css.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

$s-width: 975px;
$c-link: #0c0;
$c-text: rgb(64, 64, 64);

html {
font: 13px/1.5 Helvetica Neue,Arial,Helvetica,'Liberation Sans',FreeSans,sans-serif;
Expand All @@ -17,13 +18,17 @@ div.container {width: 100%; overflow: hidden;}
background-color: white;
}

#session {
.name {font-weight: bold;}
}

#header {
width: 100%; overflow: hidden;
height: 170px;
}

div.publication {
margin-top: 10px;
margin-top: 20px;
padding-bottom: 50px;
div.main {float: left; width: 500px; margin-left: 20px; }
div.cover { float: left; width: 300px; }
Expand All @@ -43,4 +48,27 @@ div.publication {

div.licenses {margin-top: 30px;}

}
}

div.links {
width: 100%; overflow: hidden;
margin-bottom: 10px;
a {
display: block;
padding: 5px 10px;
float: left;
border: 1px solid $c-link;
margin: -1px 0 0 -1px;
color: $c-text;
}
}

div.chapters {
margin: 10px 0 30px 0;
div.chapter {
padding: 0px 0;

img {margin-top: 5px; margin-bottom: -3px;}
}
}

20 changes: 20 additions & 0 deletions app/controllers/static_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
# encoding: utf-8
class StaticController < ApplicationController
caches_page :elsur

CHAPTER = {
names: ['0. Prefacio: Itinerario del empoderamiento posible ',
'1. Arquetipo de una plaga', '2. Puentes que amanecen mientras dormimos',
'3. El Dentista zurdo', '4. La sombra de Aniko', '5. ¿Por qué no hablamos todos de Marion?',
'6. La vida africana', '7. La vida londinense', '8. Mediana', '9. San Juan',
'10. Primaveras exquisitas', '11. Mano de santo', '12. Ahora', 'Postfacio: Bienvenidos al sudoeste'],
files: ['ElSur-00_PREFACIO_ITINERARIO DEL EMPODERAMIENTO POSIBLE',
'ElSur-01_ARQUETIPO DE UNA PLAGA', 'ElSur-02_PUENTES QUE AMANECEN MIENTRAS DORMIMOS',
'ElSur-03_EL DENTISTA ZURDO', 'ElSur-04_LA SOMBRA DE ANIKO',
'ElSur-05_¿POR QUÉ NO HABLAMOS TODOS DE MARION?', 'ElSur-06_LA VIDA AFRICANA',
'ElSur-07_LA VIDA LONDINENSE', 'ElSur-08_MEDIANA', 'ElSur-09_SAN JUAN',
'ElSur-10_PRIMAVERAS EXQUISITAS', 'ElSur-11_MANO DE SANTO', 'ElSur-12_AHORA',
'ElSur-13_POSTFACIO_BIENVENIDOS AL SUDOESTE']
}

def elsur
@chapters = Hash[*CHAPTER[:names].zip(CHAPTER[:files]).flatten]
end

def remix

end
end
Expand Down
6 changes: 6 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
<body>

<div id="page">
<div id="session">
<span class="name">Autoediciones Bucólicas:</span>
<%= link_to_unless_current 'El Sur', '/' %> /
<%= link_to_unless_current 'Remezclas', '/remezclas' %> /
<%= link_to_unless_current 'Blog' %>
</div>
<div id="header">
<%= image_tag 'cabeceras/libros.jpg' %>
</div>
Expand Down
14 changes: 14 additions & 0 deletions app/views/static/elsur.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,31 @@
Prólogo de Carolina León</p>
</div>

<div class="chapters">
<% @chapters.each do |name, file| %>
<div class="chapter">
<a href="/capitulos/<%= file %>.pdf">
<%= image_tag 'ui/play.png', alt: 'Descargar PDF del capítulo', width: 17, height: 17 %>
<%= name %>
</a>
</div>
<% end %>
</div>


<ul class="links">
<li>&rArr;&nbsp;<%= link_to 'Comprar edición impresa', 'http://tinypay.me/~UGJ5Rbk' %> 11.0€</li>
<li>&rArr;&nbsp;<%= link_to 'Descargar PDF completo', '/pdf/El-sur.pdf' %> Gratuíto</li>
</ul>


<div class="licenses">
<%= image_tag 'licencias/CC-BY-SA-icon-80x15.png' %>
</div>

</div>
<div class="cover">
<%= image_tag 'elsur/portada.jpg', width: '259', height: '400' %>
<%= link_to '¡Nuevo! Zona de remezclas', '/remezclas', class: 'remix' %>
</div>
</div>
4 changes: 4 additions & 0 deletions app/views/static/remix.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="container">
<h1>Zona de remezclas</h1>
<p>En construcción</p>
</div>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Bucolicas::Application.routes.draw do

match '/' => 'static#elsur'
match '/remezclas' => 'static#remix'
match '*path' => redirect('/')
end
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added public/capitulos/ElSur-03_EL DENTISTA ZURDO.pdf
Binary file not shown.
Binary file added public/capitulos/ElSur-04_LA SOMBRA DE ANIKO.pdf
Binary file not shown.
Binary file not shown.
Binary file added public/capitulos/ElSur-06_LA VIDA AFRICANA.pdf
Binary file not shown.
Binary file added public/capitulos/ElSur-07_LA VIDA LONDINENSE.pdf
Binary file not shown.
Binary file added public/capitulos/ElSur-08_MEDIANA.pdf
Binary file not shown.
Binary file added public/capitulos/ElSur-09_SAN JUAN.pdf
Binary file not shown.
Binary file not shown.
Binary file added public/capitulos/ElSur-11_MANO DE SANTO.pdf
Binary file not shown.
Binary file added public/capitulos/ElSur-12_AHORA.pdf
Binary file not shown.
Binary file not shown.

0 comments on commit 499a7df

Please sign in to comment.