diff --git a/.gitignore b/.gitignore
index 5cc51978774..339f1eb5e4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,6 @@
/config/deploy-secrets.yml
/coverage
+
+# Mac finder artifacts
+.DS_Store
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index af11c122be5..70c71142583 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -27,6 +27,7 @@ Cuando quieras resolver una incidencia mediante código:
* Crea una rama para resolver la incidencia desde la rama `master`
* Añade el código necesario para resolver la incidencia en tantos commits como sea preciso
* Asegúrate de que los tests pasan (y escribe más tests para probar la nueva funcionalidad si fuera preciso)
+* Sigue estas [buenas prácticas](https://github.com/styleguide/ruby)
* Envía una *pull request* al repositorio principal indicando la incidencia que se está arreglando
## Otras formas de contribuir sin código
diff --git a/CONTRIBUTING_EN.md b/CONTRIBUTING_EN.md
index 26e08fc119b..9d51a34da7e 100644
--- a/CONTRIBUTING_EN.md
+++ b/CONTRIBUTING_EN.md
@@ -27,6 +27,7 @@ If you want to contribute code to solve an issue:
* Create a topic branch based on master.
* Commit there your code to solve the issue.
* Make sure all test are passing (and add specs to test any new feature if needed).
+* Follow these [best practices](https://github.com/styleguide/ruby)
* Open a *pull request* to the main repository describing what issue you are addressing.
## Other ways of contributing without coding
diff --git a/Capfile b/Capfile
index b565fae2363..17e03a6f89d 100644
--- a/Capfile
+++ b/Capfile
@@ -6,9 +6,11 @@ require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/bundler'
-require 'capistrano/rails/assets'
+#require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
-require 'capistrano/passenger'
+#require 'capistrano/passenger'
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
+Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
+Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
diff --git a/Gemfile b/Gemfile
index 5ca7a1a6bd6..a4e9b0e203c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -21,14 +21,19 @@ gem 'turbolinks'
gem 'devise'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
+gem 'kaminari'
gem 'acts_as_commentable_with_threading'
gem 'acts-as-taggable-on'
gem "responders"
gem 'foundation-rails'
+gem 'foundation_rails_helper'
gem 'acts_as_votable'
-gem "recaptcha", require: "recaptcha/rails"
+gem 'simple_captcha2', require: 'simple_captcha'
gem 'ckeditor'
gem 'cancancan'
+gem 'social-share-button'
+gem 'initialjs-rails'
+gem 'unicorn'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
@@ -48,7 +53,6 @@ group :development, :test do
gem "capistrano-bundler", '1.1.4', require: false
gem "capistrano-rails", '1.1.3', require: false
gem "capistrano-rvm", require: false
- gem "capistrano-passenger", require: false
end
group :test do
@@ -60,4 +64,3 @@ end
group :test do
gem 'email_spec'
end
-
diff --git a/Gemfile.lock b/Gemfile.lock
index fd9842f3982..2bcab8ad0f2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -44,7 +44,7 @@ GEM
awesome_nested_set (>= 3.0)
acts_as_votable (0.10.0)
addressable (2.3.8)
- arel (6.0.2)
+ arel (6.0.3)
awesome_nested_set (3.0.2)
activerecord (>= 4.0.0, < 5)
bcrypt (3.1.10)
@@ -61,8 +61,6 @@ GEM
capistrano-bundler (1.1.4)
capistrano (~> 3.1)
sshkit (~> 1.2)
- capistrano-passenger (0.1.1)
- capistrano (~> 3.0)
capistrano-rails (1.1.3)
capistrano (~> 3.1)
capistrano-bundler (~> 1.1)
@@ -75,7 +73,7 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
- ckeditor (4.1.2)
+ ckeditor (4.1.3)
cocaine
orm_adapter (~> 0.5.0)
climate_control (0.0.3)
@@ -100,7 +98,7 @@ GEM
thor (~> 0.19.1)
database_cleaner (1.4.1)
debug_inspector (0.0.2)
- devise (3.5.1)
+ devise (3.5.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
@@ -128,25 +126,37 @@ GEM
foundation-rails (5.5.2.1)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
- globalid (0.3.5)
+ foundation_rails_helper (1.0.0)
+ actionpack (~> 4.1, >= 4.1.1)
+ activemodel (~> 4.1, >= 4.1.1)
+ activesupport (~> 4.1, >= 4.1.1)
+ railties (~> 4.1, >= 4.1.1)
+ tzinfo (~> 1.2, >= 1.2.2)
+ globalid (0.3.6)
activesupport (>= 4.1.0)
highline (1.7.3)
http-cookie (1.0.2)
domain_name (~> 0.5)
i18n (0.7.0)
- i18n-tasks (0.8.6)
- activesupport
+ i18n-tasks (0.8.7)
+ activesupport (>= 2.3.18)
easy_translate (>= 0.5.0)
erubis
- highline
+ highline (>= 1.7.3)
i18n
- term-ansicolor
+ term-ansicolor (>= 1.3.2)
terminal-table (>= 1.5.1)
+ initialjs-rails (0.1.0)
+ railties (>= 3.1, < 5.0)
jquery-rails (4.0.4)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
+ kaminari (0.16.3)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ kgio (2.9.3)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.4.1)
@@ -160,7 +170,7 @@ GEM
mime-types (>= 1.16, < 3)
mime-types (2.6.1)
mini_portile (0.6.2)
- minitest (5.7.0)
+ minitest (5.8.0)
multi_json (1.11.2)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
@@ -204,23 +214,23 @@ GEM
activesupport (= 4.2.3)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
+ raindrops (0.15.0)
rake (10.4.2)
- recaptcha (0.4.0)
responders (2.1.0)
railties (>= 4.2.0, < 5)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
- rspec-core (3.3.1)
+ rspec-core (3.3.2)
rspec-support (~> 3.3.0)
- rspec-expectations (3.3.0)
+ rspec-expectations (3.3.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
- rspec-mocks (3.3.1)
+ rspec-mocks (3.3.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
- rspec-rails (3.3.2)
+ rspec-rails (3.3.3)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
@@ -236,11 +246,16 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
+ simple_captcha2 (0.3.4)
+ rails (>= 4.1)
simplecov (0.10.0)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
+ social-share-button (0.1.8)
+ coffee-rails
+ sass-rails
spring (1.3.6)
sprockets (3.2.0)
rack (~> 1.0)
@@ -270,6 +285,10 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
+ unicorn (4.9.0)
+ kgio (~> 2.6)
+ rack
+ raindrops (~> 0.7)
warden (1.2.3)
rack (>= 1.0)
web-console (2.2.1)
@@ -294,7 +313,6 @@ DEPENDENCIES
cancancan
capistrano (= 3.4.0)
capistrano-bundler (= 1.1.4)
- capistrano-passenger
capistrano-rails (= 1.1.3)
capistrano-rvm
capybara
@@ -306,21 +324,26 @@ DEPENDENCIES
email_spec
factory_girl_rails
foundation-rails
+ foundation_rails_helper
i18n-tasks
+ initialjs-rails
jquery-rails
+ kaminari
launchy
letter_opener_web (~> 1.2.0)
pg
poltergeist
quiet_assets
rails (= 4.2.3)
- recaptcha
responders
rspec-rails (~> 3.0)
sass-rails (~> 5.0)
+ simple_captcha2
+ social-share-button
spring
turbolinks
uglifier (>= 1.3.0)
+ unicorn
web-console (~> 2.0)
BUNDLED WITH
diff --git a/LICENSE-AGPLv3.txt b/LICENSE-AGPLv3.txt
new file mode 100644
index 00000000000..885dfe40c77
--- /dev/null
+++ b/LICENSE-AGPLv3.txt
@@ -0,0 +1,663 @@
+ GNU AFFERO GENERAL PUBLIC LICENSE
+ Version 3, 19 November 2007
+
+ Copyright (c) 2015 Ayuntamiento de Madrid
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+ A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate. Many developers of free software are heartened and
+encouraged by the resulting cooperation. However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+ The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community. It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server. Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+ An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals. This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU Affero General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Remote Network Interaction; Use with the GNU General Public License.
+
+ Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software. This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source. For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code. There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+.
diff --git a/MIT-LICENSE.md b/MIT-LICENSE.md
deleted file mode 100644
index 8bdbc60430f..00000000000
--- a/MIT-LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# The MIT License (MIT)
-
-## Copyright (c) 2015 Ayuntamiento de Madrid
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/README.md b/README.md
index 66c1853dcd6..1d8ef040d66 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Las herramientas utilizadas para el frontend no están cerradas aún. Los estilo
## Configuración para desarrollo y tests
-Prerequisitos: tener instalado git, Ruby 2.2.2, la gema `bundler`, y una librería moderna de PostgreSQL.
+Prerequisitos: tener instalado git, ImageMagick, Ruby 2.2.2, la gema `bundler`, y una librería moderna de PostgreSQL.
```
cd participacion
@@ -43,7 +43,7 @@ bundle exec bin/rspec
## Licencia
-El código de este proyecto está publicado bajo la licencia MIT (ver MIT-license.md)
+El código de este proyecto está publicado bajo la licencia AFFERO GPL v3 (ver [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt))
## Contribuciones
diff --git a/README_EN.md b/README_EN.md
index b1b1521ffa9..e43be287583 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -21,7 +21,7 @@ Frontend tools used include [SCSS](http://sass-lang.com/) over [Foundation](http
## Configuration for development and test environments
-Prerequisites: install git, Ruby 2.2.2, bundler gem and PostgreSQL.
+Prerequisites: install git, ImageMagick, Ruby 2.2.2, bundler gem and PostgreSQL.
```
cd participacion
@@ -44,7 +44,7 @@ bundle exec bin/rspec
## Licence
-Code published under MIT license (see [MIT-license.md](MIT-license.md))
+Code published under AFFERO GPL v3 (see [LICENSE-AGPLv3.txt](LICENSE-AGPLv3.txt))
## Contributions
diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot
index 0bb2d0d644d..166eca82eab 100644
Binary files a/app/assets/fonts/icons.eot and b/app/assets/fonts/icons.eot differ
diff --git a/app/assets/fonts/icons.svg b/app/assets/fonts/icons.svg
index f4e4e48c170..498eb27a787 100644
--- a/app/assets/fonts/icons.svg
+++ b/app/assets/fonts/icons.svg
@@ -19,4 +19,6 @@
+
+
diff --git a/app/assets/fonts/icons.ttf b/app/assets/fonts/icons.ttf
index f69b18def69..285caed395a 100644
Binary files a/app/assets/fonts/icons.ttf and b/app/assets/fonts/icons.ttf differ
diff --git a/app/assets/fonts/icons.woff b/app/assets/fonts/icons.woff
index 32638055d5b..02c11f23e52 100644
Binary files a/app/assets/fonts/icons.woff and b/app/assets/fonts/icons.woff differ
diff --git a/app/assets/fonts/lato-bolditalic.eot b/app/assets/fonts/lato-bolditalic.eot
deleted file mode 100755
index f1cdddc5dde..00000000000
Binary files a/app/assets/fonts/lato-bolditalic.eot and /dev/null differ
diff --git a/app/assets/fonts/lato-bolditalic.svg b/app/assets/fonts/lato-bolditalic.svg
deleted file mode 100755
index ce68081e7f9..00000000000
--- a/app/assets/fonts/lato-bolditalic.svg
+++ /dev/null
@@ -1,4072 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/lato-bolditalic.ttf b/app/assets/fonts/lato-bolditalic.ttf
deleted file mode 100755
index 63b573b4302..00000000000
Binary files a/app/assets/fonts/lato-bolditalic.ttf and /dev/null differ
diff --git a/app/assets/fonts/lato-bolditalic.woff b/app/assets/fonts/lato-bolditalic.woff
deleted file mode 100755
index 4f6eb79d51b..00000000000
Binary files a/app/assets/fonts/lato-bolditalic.woff and /dev/null differ
diff --git a/app/assets/fonts/lato-bolditalic.woff2 b/app/assets/fonts/lato-bolditalic.woff2
deleted file mode 100755
index b58f714a7b8..00000000000
Binary files a/app/assets/fonts/lato-bolditalic.woff2 and /dev/null differ
diff --git a/app/assets/fonts/lato-italic.eot b/app/assets/fonts/lato-italic.eot
deleted file mode 100755
index 1e8e5ffa2d4..00000000000
Binary files a/app/assets/fonts/lato-italic.eot and /dev/null differ
diff --git a/app/assets/fonts/lato-italic.svg b/app/assets/fonts/lato-italic.svg
deleted file mode 100755
index 86a227f5069..00000000000
--- a/app/assets/fonts/lato-italic.svg
+++ /dev/null
@@ -1,4072 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/lato-italic.ttf b/app/assets/fonts/lato-italic.ttf
deleted file mode 100755
index f850f5da240..00000000000
Binary files a/app/assets/fonts/lato-italic.ttf and /dev/null differ
diff --git a/app/assets/fonts/lato-italic.woff b/app/assets/fonts/lato-italic.woff
deleted file mode 100755
index ae884069317..00000000000
Binary files a/app/assets/fonts/lato-italic.woff and /dev/null differ
diff --git a/app/assets/fonts/lato-italic.woff2 b/app/assets/fonts/lato-italic.woff2
deleted file mode 100755
index e5757d96c6d..00000000000
Binary files a/app/assets/fonts/lato-italic.woff2 and /dev/null differ
diff --git a/app/assets/fonts/lato-lightitalic.eot b/app/assets/fonts/lato-lightitalic.eot
deleted file mode 100755
index b81a79b7dc0..00000000000
Binary files a/app/assets/fonts/lato-lightitalic.eot and /dev/null differ
diff --git a/app/assets/fonts/lato-lightitalic.svg b/app/assets/fonts/lato-lightitalic.svg
deleted file mode 100755
index d284a05a5cf..00000000000
--- a/app/assets/fonts/lato-lightitalic.svg
+++ /dev/null
@@ -1,4072 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/lato-lightitalic.ttf b/app/assets/fonts/lato-lightitalic.ttf
deleted file mode 100755
index 691ba4d088f..00000000000
Binary files a/app/assets/fonts/lato-lightitalic.ttf and /dev/null differ
diff --git a/app/assets/fonts/lato-lightitalic.woff b/app/assets/fonts/lato-lightitalic.woff
deleted file mode 100755
index b52daecdb87..00000000000
Binary files a/app/assets/fonts/lato-lightitalic.woff and /dev/null differ
diff --git a/app/assets/fonts/lato-lightitalic.woff2 b/app/assets/fonts/lato-lightitalic.woff2
deleted file mode 100755
index 5f22f733e41..00000000000
Binary files a/app/assets/fonts/lato-lightitalic.woff2 and /dev/null differ
diff --git a/app/assets/fonts/opensans-bold.eot b/app/assets/fonts/opensans-bold.eot
new file mode 100755
index 00000000000..385d67f8ea9
Binary files /dev/null and b/app/assets/fonts/opensans-bold.eot differ
diff --git a/app/assets/fonts/opensans-bold.svg b/app/assets/fonts/opensans-bold.svg
new file mode 100755
index 00000000000..1b5c1ccb784
--- /dev/null
+++ b/app/assets/fonts/opensans-bold.svg
@@ -0,0 +1,1824 @@
+
+
+
\ No newline at end of file
diff --git a/app/assets/fonts/opensans-bold.ttf b/app/assets/fonts/opensans-bold.ttf
new file mode 100755
index 00000000000..875ce9339e2
Binary files /dev/null and b/app/assets/fonts/opensans-bold.ttf differ
diff --git a/app/assets/fonts/opensans-bold.woff b/app/assets/fonts/opensans-bold.woff
new file mode 100755
index 00000000000..d7eb013bcc2
Binary files /dev/null and b/app/assets/fonts/opensans-bold.woff differ
diff --git a/app/assets/fonts/opensans-bold.woff2 b/app/assets/fonts/opensans-bold.woff2
new file mode 100755
index 00000000000..3ff34eb9b1d
Binary files /dev/null and b/app/assets/fonts/opensans-bold.woff2 differ
diff --git a/app/assets/fonts/opensans-bolditalic.eot b/app/assets/fonts/opensans-bolditalic.eot
new file mode 100755
index 00000000000..e9da57fb033
Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.eot differ
diff --git a/app/assets/fonts/opensans-bolditalic.svg b/app/assets/fonts/opensans-bolditalic.svg
new file mode 100755
index 00000000000..7d483577fe1
--- /dev/null
+++ b/app/assets/fonts/opensans-bolditalic.svg
@@ -0,0 +1,1824 @@
+
+
+
\ No newline at end of file
diff --git a/app/assets/fonts/opensans-bolditalic.ttf b/app/assets/fonts/opensans-bolditalic.ttf
new file mode 100755
index 00000000000..66f65d8a56f
Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.ttf differ
diff --git a/app/assets/fonts/opensans-bolditalic.woff b/app/assets/fonts/opensans-bolditalic.woff
new file mode 100755
index 00000000000..d5a238eb80c
Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.woff differ
diff --git a/app/assets/fonts/opensans-bolditalic.woff2 b/app/assets/fonts/opensans-bolditalic.woff2
new file mode 100755
index 00000000000..0373e9ca533
Binary files /dev/null and b/app/assets/fonts/opensans-bolditalic.woff2 differ
diff --git a/app/assets/fonts/opensans-italic.eot b/app/assets/fonts/opensans-italic.eot
new file mode 100755
index 00000000000..1a515d895f4
Binary files /dev/null and b/app/assets/fonts/opensans-italic.eot differ
diff --git a/app/assets/fonts/opensans-italic.svg b/app/assets/fonts/opensans-italic.svg
new file mode 100755
index 00000000000..930528f495d
--- /dev/null
+++ b/app/assets/fonts/opensans-italic.svg
@@ -0,0 +1,1824 @@
+
+
+
\ No newline at end of file
diff --git a/app/assets/fonts/opensans-italic.ttf b/app/assets/fonts/opensans-italic.ttf
new file mode 100755
index 00000000000..2d2d2c00489
Binary files /dev/null and b/app/assets/fonts/opensans-italic.ttf differ
diff --git a/app/assets/fonts/opensans-italic.woff b/app/assets/fonts/opensans-italic.woff
new file mode 100755
index 00000000000..3e6c20b1990
Binary files /dev/null and b/app/assets/fonts/opensans-italic.woff differ
diff --git a/app/assets/fonts/opensans-italic.woff2 b/app/assets/fonts/opensans-italic.woff2
new file mode 100755
index 00000000000..7a2be4074bd
Binary files /dev/null and b/app/assets/fonts/opensans-italic.woff2 differ
diff --git a/app/assets/fonts/opensans-light.eot b/app/assets/fonts/opensans-light.eot
new file mode 100755
index 00000000000..e451e38ef4e
Binary files /dev/null and b/app/assets/fonts/opensans-light.eot differ
diff --git a/app/assets/fonts/opensans-light.svg b/app/assets/fonts/opensans-light.svg
new file mode 100755
index 00000000000..b3e3faabc3c
--- /dev/null
+++ b/app/assets/fonts/opensans-light.svg
@@ -0,0 +1,1824 @@
+
+
+
\ No newline at end of file
diff --git a/app/assets/fonts/opensans-light.ttf b/app/assets/fonts/opensans-light.ttf
new file mode 100755
index 00000000000..e5a8089f1ec
Binary files /dev/null and b/app/assets/fonts/opensans-light.ttf differ
diff --git a/app/assets/fonts/opensans-light.woff b/app/assets/fonts/opensans-light.woff
new file mode 100755
index 00000000000..b348ed271b7
Binary files /dev/null and b/app/assets/fonts/opensans-light.woff differ
diff --git a/app/assets/fonts/opensans-light.woff2 b/app/assets/fonts/opensans-light.woff2
new file mode 100755
index 00000000000..d81c2525084
Binary files /dev/null and b/app/assets/fonts/opensans-light.woff2 differ
diff --git a/app/assets/fonts/opensans-lightitalic.eot b/app/assets/fonts/opensans-lightitalic.eot
new file mode 100755
index 00000000000..cc8ab68e6c8
Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.eot differ
diff --git a/app/assets/fonts/opensans-lightitalic.svg b/app/assets/fonts/opensans-lightitalic.svg
new file mode 100755
index 00000000000..8cf6f521324
--- /dev/null
+++ b/app/assets/fonts/opensans-lightitalic.svg
@@ -0,0 +1,1824 @@
+
+
+
\ No newline at end of file
diff --git a/app/assets/fonts/opensans-lightitalic.ttf b/app/assets/fonts/opensans-lightitalic.ttf
new file mode 100755
index 00000000000..8c75ec79bc0
Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.ttf differ
diff --git a/app/assets/fonts/opensans-lightitalic.woff b/app/assets/fonts/opensans-lightitalic.woff
new file mode 100755
index 00000000000..3dc4e730720
Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.woff differ
diff --git a/app/assets/fonts/opensans-lightitalic.woff2 b/app/assets/fonts/opensans-lightitalic.woff2
new file mode 100755
index 00000000000..b91b6f8075f
Binary files /dev/null and b/app/assets/fonts/opensans-lightitalic.woff2 differ
diff --git a/app/assets/fonts/opensans-regular.eot b/app/assets/fonts/opensans-regular.eot
new file mode 100755
index 00000000000..18331ec52d2
Binary files /dev/null and b/app/assets/fonts/opensans-regular.eot differ
diff --git a/app/assets/fonts/opensans-regular.svg b/app/assets/fonts/opensans-regular.svg
new file mode 100755
index 00000000000..3e5d0ac3774
--- /dev/null
+++ b/app/assets/fonts/opensans-regular.svg
@@ -0,0 +1,1824 @@
+
+
+
\ No newline at end of file
diff --git a/app/assets/fonts/opensans-regular.ttf b/app/assets/fonts/opensans-regular.ttf
new file mode 100755
index 00000000000..12c9ba0093a
Binary files /dev/null and b/app/assets/fonts/opensans-regular.ttf differ
diff --git a/app/assets/fonts/opensans-regular.woff b/app/assets/fonts/opensans-regular.woff
new file mode 100755
index 00000000000..ce026ebbb9c
Binary files /dev/null and b/app/assets/fonts/opensans-regular.woff differ
diff --git a/app/assets/fonts/opensans-regular.woff2 b/app/assets/fonts/opensans-regular.woff2
new file mode 100755
index 00000000000..90d4d672d54
Binary files /dev/null and b/app/assets/fonts/opensans-regular.woff2 differ
diff --git a/app/assets/fonts/roboto-blackitalic.eot b/app/assets/fonts/roboto-blackitalic.eot
deleted file mode 100755
index a2aebfb7da3..00000000000
Binary files a/app/assets/fonts/roboto-blackitalic.eot and /dev/null differ
diff --git a/app/assets/fonts/roboto-blackitalic.svg b/app/assets/fonts/roboto-blackitalic.svg
deleted file mode 100755
index c9cc3cdb7b0..00000000000
--- a/app/assets/fonts/roboto-blackitalic.svg
+++ /dev/null
@@ -1,642 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/roboto-blackitalic.ttf b/app/assets/fonts/roboto-blackitalic.ttf
deleted file mode 100755
index 2020dcbc9cc..00000000000
Binary files a/app/assets/fonts/roboto-blackitalic.ttf and /dev/null differ
diff --git a/app/assets/fonts/roboto-blackitalic.woff b/app/assets/fonts/roboto-blackitalic.woff
deleted file mode 100755
index 1875c0b9506..00000000000
Binary files a/app/assets/fonts/roboto-blackitalic.woff and /dev/null differ
diff --git a/app/assets/fonts/roboto-bold.eot b/app/assets/fonts/roboto-bold.eot
deleted file mode 100755
index b73776ee3bc..00000000000
Binary files a/app/assets/fonts/roboto-bold.eot and /dev/null differ
diff --git a/app/assets/fonts/roboto-bold.svg b/app/assets/fonts/roboto-bold.svg
deleted file mode 100755
index 43b5ed22224..00000000000
--- a/app/assets/fonts/roboto-bold.svg
+++ /dev/null
@@ -1,593 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/roboto-bold.ttf b/app/assets/fonts/roboto-bold.ttf
deleted file mode 100755
index 1da72769a88..00000000000
Binary files a/app/assets/fonts/roboto-bold.ttf and /dev/null differ
diff --git a/app/assets/fonts/roboto-bold.woff b/app/assets/fonts/roboto-bold.woff
deleted file mode 100755
index 0c6994871e3..00000000000
Binary files a/app/assets/fonts/roboto-bold.woff and /dev/null differ
diff --git a/app/assets/fonts/roboto-bolditalic.eot b/app/assets/fonts/roboto-bolditalic.eot
deleted file mode 100755
index b803ec16873..00000000000
Binary files a/app/assets/fonts/roboto-bolditalic.eot and /dev/null differ
diff --git a/app/assets/fonts/roboto-bolditalic.svg b/app/assets/fonts/roboto-bolditalic.svg
deleted file mode 100755
index f877a3c821f..00000000000
--- a/app/assets/fonts/roboto-bolditalic.svg
+++ /dev/null
@@ -1,642 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/roboto-bolditalic.ttf b/app/assets/fonts/roboto-bolditalic.ttf
deleted file mode 100755
index 78bab05c8c7..00000000000
Binary files a/app/assets/fonts/roboto-bolditalic.ttf and /dev/null differ
diff --git a/app/assets/fonts/roboto-bolditalic.woff b/app/assets/fonts/roboto-bolditalic.woff
deleted file mode 100755
index 99de61af52d..00000000000
Binary files a/app/assets/fonts/roboto-bolditalic.woff and /dev/null differ
diff --git a/app/assets/fonts/roboto-italic.eot b/app/assets/fonts/roboto-italic.eot
deleted file mode 100755
index b708f047ff7..00000000000
Binary files a/app/assets/fonts/roboto-italic.eot and /dev/null differ
diff --git a/app/assets/fonts/roboto-italic.svg b/app/assets/fonts/roboto-italic.svg
deleted file mode 100755
index 49ddd4ab763..00000000000
--- a/app/assets/fonts/roboto-italic.svg
+++ /dev/null
@@ -1,642 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/roboto-italic.ttf b/app/assets/fonts/roboto-italic.ttf
deleted file mode 100755
index ae258e84163..00000000000
Binary files a/app/assets/fonts/roboto-italic.ttf and /dev/null differ
diff --git a/app/assets/fonts/roboto-italic.woff b/app/assets/fonts/roboto-italic.woff
deleted file mode 100755
index dd742443826..00000000000
Binary files a/app/assets/fonts/roboto-italic.woff and /dev/null differ
diff --git a/app/assets/fonts/roboto-light b/app/assets/fonts/roboto-light
deleted file mode 100755
index 072cdc480c8..00000000000
Binary files a/app/assets/fonts/roboto-light and /dev/null differ
diff --git a/app/assets/fonts/roboto-light.svg b/app/assets/fonts/roboto-light.svg
deleted file mode 100755
index db6a6171ed8..00000000000
--- a/app/assets/fonts/roboto-light.svg
+++ /dev/null
@@ -1,641 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/roboto-light.ttf b/app/assets/fonts/roboto-light.ttf
deleted file mode 100755
index 3b2fea0ace1..00000000000
Binary files a/app/assets/fonts/roboto-light.ttf and /dev/null differ
diff --git a/app/assets/fonts/roboto-light.woff b/app/assets/fonts/roboto-light.woff
deleted file mode 100755
index cc534a38154..00000000000
Binary files a/app/assets/fonts/roboto-light.woff and /dev/null differ
diff --git a/app/assets/fonts/roboto-lightitalic b/app/assets/fonts/roboto-lightitalic
deleted file mode 100755
index 77396a1ff9c..00000000000
Binary files a/app/assets/fonts/roboto-lightitalic and /dev/null differ
diff --git a/app/assets/fonts/roboto-lightitalic.svg b/app/assets/fonts/roboto-lightitalic.svg
deleted file mode 100755
index 4bd14bcca70..00000000000
--- a/app/assets/fonts/roboto-lightitalic.svg
+++ /dev/null
@@ -1,641 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/roboto-lightitalic.ttf b/app/assets/fonts/roboto-lightitalic.ttf
deleted file mode 100755
index b9b38118a37..00000000000
Binary files a/app/assets/fonts/roboto-lightitalic.ttf and /dev/null differ
diff --git a/app/assets/fonts/roboto-lightitalic.woff b/app/assets/fonts/roboto-lightitalic.woff
deleted file mode 100755
index 3071ff4f231..00000000000
Binary files a/app/assets/fonts/roboto-lightitalic.woff and /dev/null differ
diff --git a/app/assets/fonts/roboto-regular.eot b/app/assets/fonts/roboto-regular.eot
deleted file mode 100755
index 9b5e8e41389..00000000000
Binary files a/app/assets/fonts/roboto-regular.eot and /dev/null differ
diff --git a/app/assets/fonts/roboto-regular.svg b/app/assets/fonts/roboto-regular.svg
deleted file mode 100755
index de7d77fea50..00000000000
--- a/app/assets/fonts/roboto-regular.svg
+++ /dev/null
@@ -1,621 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/assets/fonts/roboto-regular.ttf b/app/assets/fonts/roboto-regular.ttf
deleted file mode 100755
index 44dd78d5e1e..00000000000
Binary files a/app/assets/fonts/roboto-regular.ttf and /dev/null differ
diff --git a/app/assets/fonts/roboto-regular.woff b/app/assets/fonts/roboto-regular.woff
deleted file mode 100755
index bfa05d53f4e..00000000000
Binary files a/app/assets/fonts/roboto-regular.woff and /dev/null differ
diff --git a/app/assets/images/comments_divider.png b/app/assets/images/comments_divider.png
deleted file mode 100644
index 1d2bffd9b83..00000000000
Binary files a/app/assets/images/comments_divider.png and /dev/null differ
diff --git a/app/assets/images/footer.jpg b/app/assets/images/footer.jpg
deleted file mode 100644
index 5364cc23375..00000000000
Binary files a/app/assets/images/footer.jpg and /dev/null differ
diff --git a/app/assets/images/user_default.jpg b/app/assets/images/user_default.jpg
deleted file mode 100644
index c67f27f5553..00000000000
Binary files a/app/assets/images/user_default.jpg and /dev/null differ
diff --git a/app/assets/images/user_default_2.jpg b/app/assets/images/user_default_2.jpg
deleted file mode 100644
index ed164ab5797..00000000000
Binary files a/app/assets/images/user_default_2.jpg and /dev/null differ
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index 08153c4ec6f..11bbe4cad88 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -15,16 +15,22 @@
//= require foundation
//= require turbolinks
//= require ckeditor/init
+//= require social-share-button
+//= require initial
//= require app
//= require_tree .
var initialize_modules = function() {
App.Comments.initialize();
+ App.Users.initialize();
+ App.Votes.initialize();
+ App.Tags.initialize();
};
$(function(){
$(document).foundation();
- $(document).ready(initialize_modules)
- $(document).on('page:load', initialize_modules)
+ $(document).ready(initialize_modules);
+ $(document).on('page:load', initialize_modules);
+ $(document).on('ajax:complete', initialize_modules);
});
diff --git a/app/assets/javascripts/comments.js.coffee b/app/assets/javascripts/comments.js.coffee
index 7a8743f882d..377fa4d1a00 100644
--- a/app/assets/javascripts/comments.js.coffee
+++ b/app/assets/javascripts/comments.js.coffee
@@ -3,18 +3,29 @@ App.Comments =
add_response: (parent_id, response_html) ->
$(response_html).insertAfter($("#js-comment-form-#{parent_id}"))
+ display_error: (field_with_errors, error_html) ->
+ $(error_html).insertAfter($("#{field_with_errors}"))
+
reset_and_hide_form: (id) ->
- form = $("#js-comment-form-#{id}")
- form.val('')
- form.hide()
+ form_container = $("#js-comment-form-#{id}")
+ input = form_container.find("form textarea")
+ input.val('')
+ form_container.hide()
+
+ reset_form: (id) ->
+ input = $("#js-comment-form-#{id} form textarea")
+ input.val('')
toggle_form: (id) ->
$("#js-comment-form-#{id}").toggle()
initialize: ->
- $('body').on 'click', '.js-add-comment-link', ->
- id = $(this).data().id
- App.Comments.toggle_form(id)
- false
-
+ $('body .js-add-comment-link').each ->
+ $this = $(this)
+ unless $this.data('initialized') is 'yes'
+ $this.on('click', ->
+ id = $(this).data().id
+ App.Comments.toggle_form(id)
+ false
+ ).data 'initialized', 'yes'
diff --git a/app/assets/javascripts/tags.js.coffee b/app/assets/javascripts/tags.js.coffee
new file mode 100644
index 00000000000..12c4c311560
--- /dev/null
+++ b/app/assets/javascripts/tags.js.coffee
@@ -0,0 +1,21 @@
+App.Tags =
+
+ initialize: ->
+ $tag_input = $('input#debate_tag_list')
+
+ $('body .js-add-tag-link').each ->
+ $this = $(this)
+
+ unless $this.data('initialized') is 'yes'
+ $this.on('click', ->
+ name = $(this).text()
+ current_tags = $tag_input.val().split(',').filter(Boolean)
+
+ if $.inArray(name, current_tags) >= 0
+ current_tags.splice($.inArray(name, current_tags), 1);
+ else
+ current_tags.push name
+
+ $tag_input.val(current_tags.join(','))
+ false
+ ).data 'initialized', 'yes'
diff --git a/app/assets/javascripts/users.js.coffee b/app/assets/javascripts/users.js.coffee
new file mode 100644
index 00000000000..9c4fa42b0be
--- /dev/null
+++ b/app/assets/javascripts/users.js.coffee
@@ -0,0 +1,5 @@
+App.Users =
+
+ initialize: ->
+ $('.initialjs-avatar').initial();
+ false
diff --git a/app/assets/javascripts/votes.js.coffee b/app/assets/javascripts/votes.js.coffee
new file mode 100644
index 00000000000..5005ad5b8c0
--- /dev/null
+++ b/app/assets/javascripts/votes.js.coffee
@@ -0,0 +1,15 @@
+App.Votes =
+
+ hoverize: (votes) ->
+ $(votes).hover ->
+ $("div.not-logged", votes).show()
+ , ->
+ $("div.not-logged", votes).hide()
+
+ initialize: ->
+ App.Votes.hoverize votes for votes in $("div.votes")
+ false
+
+
+
+
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index 1bcdc722a3f..e4379397e9b 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -1,6 +1,10 @@
+/*
+ *= require social-share-button
+ */
+
@import "foundation_and_overrides";
@import "fonts";
@import "icons";
@import "variables";
@import "participacion";
-@import "debates";
\ No newline at end of file
+@import "debates";
diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss
index 8e68dc5bb59..f242e875725 100644
--- a/app/assets/stylesheets/debates.scss
+++ b/app/assets/stylesheets/debates.scss
@@ -11,16 +11,17 @@
// - - - - - - - - - - - - - - - - - - - - - - - - -
@mixin votes {
+ background: $votes-bg;
border-top: 1px solid $votes-border;
+ margin: 0 rem-calc(-12);
padding: rem-calc(14) rem-calc(12);
- background: $votes-background;
- margin: 0 -12px;
+ position: relative;
.icon-like {
background: white;
border: 2px solid $votes-border;
border-radius: rem-calc(3);
- color: $votes-neutral;
+ color: $text-light;
display: inline-block;
font-size: rem-calc(30);
line-height: rem-calc(30);
@@ -44,7 +45,7 @@
background: white;
border: 2px solid $votes-border;
border-radius: rem-calc(3);
- color: $votes-neutral;
+ color: $text-light;
display: inline-block;
font-size: rem-calc(30);
line-height: rem-calc(30);
@@ -69,7 +70,7 @@
vertical-align: super;
span {
- color: $votes-text;
+ color: white;
display: inline-block;
font-size: rem-calc(16);
font-weight: lighter;
@@ -106,7 +107,7 @@
}
.total-votes {
- color: $votes-text;
+ color: white;
float: right;
line-height: $line-height*2;
}
@@ -114,25 +115,45 @@
.divider {
margin: 0 rem-calc(6);
}
+
+ .not-logged {
+ background: rgba(22,99,135,.9);
+ color: white;
+ height: 100%;
+ left: 0;
+ line-height: $line-height*2;
+ padding-top: rem-calc(12);
+ position: absolute;
+ text-align: center;
+ top: 0;
+ width: 100%;
+
+ a {
+ color: white;
+ text-decoration: underline;
+ }
+ }
}
// 02. Index
// - - - - - - - - - - - - - - - - - - - - - - - - -
-.debate-featured {
- margin-bottom: rem-calc(34);
+.featured-debates {
margin-top: rem-calc(23);
+}
+
+.debate-featured {
.panel {
background: white;
border: 1px solid;
border-color: #e5e6e9 #dfe0e4 #d0d1d5;
border-radius: rem-calc(3);
- margin-bottom: $line-height;
+ margin-bottom: rem-calc(24);
padding: rem-calc(24) rem-calc(12) 0 rem-calc(12);
.debate-content {
- min-height: $line-height*14.71;
+ min-height: rem-calc(353);
}
.label {
@@ -152,7 +173,7 @@
line-height: $line-height;
position: absolute;
right: rem-calc(18);
- top: rem-calc(24);
+ top: rem-calc(12);
}
h3 {
@@ -162,7 +183,7 @@
a {
clear: both;
- color: $header-color;
+ color: $text;
display: block;
font-size: rem-calc(16);
line-height: $line-height;
@@ -170,7 +191,7 @@
}
.debate-info {
- color: $text-light;
+ color: $text-medium;
font-weight: lighter;
margin-bottom: 0;
@@ -178,20 +199,24 @@
font-size: rem-calc(16);
vertical-align: top;
}
+
+ a {
+ color: $text-medium;
+ }
}
.debate-description {
- color: $text-color;
+ color: $text;
font-size: rem-calc(13);
- height: $line-height*6.5;
+ height: rem-calc(156);
line-height: $line-height;
- margin-bottom: $line-height/2;
- margin-top: $line-height;
+ margin-bottom: rem-calc(12);
+ margin-top: rem-calc(24);
overflow: hidden;
position: relative;
a {
- color: $text-color;
+ color: $text;
}
}
@@ -205,10 +230,10 @@
}
p {
- color: $text-color;
+ color: $text;
font-size: rem-calc(13);
line-height: $line-height;
- margin-bottom: $line-height/2;
+ margin-bottom: rem-calc(12);
}
}
@@ -218,7 +243,8 @@
}
.debates-list {
- margin-bottom: $line-height*2;
+ margin-bottom: rem-calc(48);
+ margin-top: rem-calc(24);
}
.debate {
@@ -227,12 +253,13 @@
margin-top: 0;
.panel {
+ border: 0;
margin-bottom: 0;
- min-height: $line-height*8;
+ min-height: rem-calc(192);
padding: 0 rem-calc(12) rem-calc(2) rem-calc(12);
&:first-child {
- padding-top: $line-height;
+ padding-top: rem-calc(24);
}
.label {
@@ -242,7 +269,7 @@
h3 {
margin-top: 0;
- min-height: $line-height*2;
+ min-height: rem-calc(48);
}
p {
@@ -265,13 +292,29 @@
}
.debate-description {
- height: $line-height*3;
+ height: rem-calc(72);
margin-top: 0;
}
}
.votes {
- border: 0;
+ border: 1px solid $votes-border;
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+ margin: 0 rem-calc(-24) 0 rem-calc(12);
+
+ &:after {
+ content: "";
+ position: absolute;
+ display: block;
+ border-style: solid;
+ border-color: #166387 transparent transparent transparent;
+ bottom: rem-calc(-14);
+ border-left-width: 0;
+ border-right-color: transparent;
+ right: rem-calc(-1);
+ border-width: 1em 1em 0 0;
+ }
.total-votes {
display: block;
@@ -282,11 +325,16 @@
.like {
span {
- color: $votes-text;
+ color: white;
display: block;
line-height: $line-height/2;
}
}
+
+ .not-logged {
+ line-height: $line-height;
+ padding-top: rem-calc(36);
+ }
}
}
@@ -295,7 +343,7 @@
.debate-show {
background: white;
- padding: rem-calc(24) rem-calc(12) 0 rem-calc(12);
+ padding: rem-calc(24) rem-calc(12) 0;
.back {
@include back;
@@ -309,17 +357,20 @@
clear: both;
font-size: rem-calc(24);
font-weight: bold;
- line-height: $line-height*2;
margin: 0;
}
.debate-info {
clear: both;
- color: $text-light;
+ color: $text-medium;
font-weight: lighter;
line-height: $line-height*2;
text-align: justify;
+ a {
+ color: $text-medium;
+ }
+
.bullet {
color: $border;
}
@@ -332,30 +383,30 @@
}
.author-photo {
- border-radius: 2px;
- display: inline-block;
- height: 32px;
line-height: $line-height*2;
- margin-right: $line-height/4;
+ margin-right: rem-calc(6);
vertical-align: middle;
width: 32px;
}
.author {
- color: $text-color;
+ color: $text;
font-weight: bold;
}
h3 {
- border-bottom: 2px solid $votes-border;
- font-size: rem-calc(18);
- margin: 0;
+ border-top: 1px solid $votes-border;
+ display: inline-block;
+ font-size: rem-calc(16);
+ margin: -1px 0 rem-calc(12);
+ padding-top: rem-calc(6);
text-transform: uppercase;
}
.votes {
@include votes;
- border: 0;
+ border: 1px solid $votes-border;
+ border-radius: rem-calc(3);
margin: 0;
.total-votes {
@@ -363,11 +414,25 @@
float: none;
line-height: $line-height;
}
+
+ .not-logged {
+ line-height: $line-height;
+ padding: rem-calc(24);
+ }
}
.leave-comment {
display: inline-block;
- margin-top: $line-height;
+ margin-top: rem-calc(24);
+ }
+
+ .tags {
+ display: block;
+ margin-top: rem-calc(24);
+
+ a {
+ margin-right: rem-calc(6);
+ }
}
}
@@ -376,7 +441,7 @@
.debate-new {
background: white;
- padding-top: $line-height;
+ padding-top: rem-calc(24);
.back {
@include back;
@@ -387,7 +452,7 @@
font-size: rem-calc(36);
font-weight: bold;
line-height: $line-height*2;
- margin-bottom: $line-height;
+ margin-bottom: rem-calc(24);
}
.icon-comment-quotes {
@@ -408,7 +473,7 @@
.recommendations {
list-style-type: none;
margin-left: 0;
- margin-top: $line-height;
+ margin-top: rem-calc(24);
li {
font-size: rem-calc(12);
@@ -427,64 +492,83 @@
// - - - - - - - - - - - - - - - - - - - - - - - - -
.comments {
- background: $comments-bg;
- background-image: url('comments_divider.png');
+ background: $white;
background-repeat: repeat-x;
- padding-top: $line-height;
- padding-bottom: $line-height*4;
+ padding-top: rem-calc(24);
+ padding-bottom: rem-calc(96);
h2 {
margin: 0;
font-weight: bold;
+
+ span {
+ font-size: rem-calc(14);
+ font-weight: normal;
+ opacity: .8;
+ }
}
.comment {
- margin: $line-height/4 0;
+ margin: rem-calc(6) 0;
p {
- color: $comments-text;
- font-size: rem-calc(15);
margin-bottom: 0;
}
- a {
- color: $comments-info;
- }
+ .comment-votes {
+ color: $text-medium;
+ font-weight: lighter;
+ margin: rem-calc(15) rem-calc(6) 0;
- .user-photo {
- border-radius: 2px;
- display: inline-block;
- height: 32px;
- line-height: $line-height*2;
- margin-right: $line-height/4;
- vertical-align: top;
- width: 32px;
+ a {
+ color: $text-light;
+ display: inline-block;
+ vertical-align: top;
+
+ &:hover {
+ color: $text-medium;
+ }
+ }
+
+ [class^="icon-"] {
+ font-size: rem-calc(20);
+ vertical-align: top;
+ }
}
.comment-body {
- margin-left: $line-height*1.6;
+ margin-left: rem-calc(36);
.reply {
+ background: white;
+ border: 1px solid $border;
font-size: rem-calc(12);
font-weight: lighter;
+ margin: rem-calc(6) 0;
+ padding: rem-calc(6);
}
}
.comment-children {
- border-left: 1px dotted $border;
- margin-left: $line-height*1.6;
- padding-left: $line-height/4;
+ border-left: 1px dashed $border;
+ margin-left: rem-calc(36);
+ padding-left: rem-calc(6);
@media only screen and (max-width: 40em) {
- margin-left: $line-height/1.5;
+ margin-left: rem-calc(16);
}
}
.comment-info {
- color: $comments-info;
+ color: $text-light;
font-size: rem-calc(13);
font-weight: lighter;
vertical-align: middle;
+
+ span {
+ color: $text;
+ font-weight: bold;
+ }
}
}
-}
\ No newline at end of file
+}
diff --git a/app/assets/stylesheets/fonts.scss b/app/assets/stylesheets/fonts.scss
index b6fc2d97309..80d1259a906 100644
--- a/app/assets/stylesheets/fonts.scss
+++ b/app/assets/stylesheets/fonts.scss
@@ -1,160 +1,119 @@
-// List of fonts
+// List of fonts
+//
+// 01. Open Sans (http://www.fontsquirrel.com/fonts/open-sans)
+// 02. Lato (http://www.fontsquirrel.com/fonts/lato)
//
-// 01. Roboto (https://www.google.com/fonts/specimen/Roboto)
-// 02. Lato (https://www.google.com/fonts/specimen/Lato)
-
-// 01. Roboto
+// 01. Open Sans
// - - - - - - - - - - - - - - - - - - - - - - - - -
@font-face {
- font-family: 'Roboto';
- src: font-url('roboto-light.eot');
- src: font-url('roboto-light.eot?#iefix') format('embedded-opentype'),
- font-url('roboto-light.woff') format('woff'),
- font-url('roboto-light.ttf') format('truetype'),
- font-url('roboto-light.svg#latolight') format('svg');
- font-weight: 300;
- font-style: normal;
+ font-family: 'Open Sans';
+ src: font-url('opensans-light.eot');
+ src: font-url('opensans-light.eot?#iefix') format('embedded-opentype'),
+ font-url('opensans-light.woff2') format('woff2'),
+ font-url('opensans-light.woff') format('woff'),
+ font-url('opensans-light.ttf') format('truetype'),
+ font-url('opensans-light.svg#open_sanslight') format('svg');
+ font-weight: lighter;
+ font-style: normal;
}
@font-face {
- font-family: 'Roboto';
- src: font-url('roboto-lightitalic.eot');
- src: font-url('roboto-lightitalic.eot?#iefix') format('embedded-opentype'),
- font-url('roboto-lightitalic.woff') format('woff'),
- font-url('roboto-lightitalic.ttf') format('truetype'),
- font-url('roboto-lightitalic.svg#latolight_italic') format('svg');
- font-weight: 300;
- font-style: italic;
+ font-family: 'Open Sans';
+ src: font-url('opensans-lightitalic.eot');
+ src: font-url('opensans-lightitalic.eot?#iefix') format('embedded-opentype'),
+ font-url('opensans-lightitalic.woff2') format('woff2'),
+ font-url('opensans-lightitalic.woff') format('woff'),
+ font-url('opensans-lightitalic.ttf') format('truetype'),
+ font-url('opensans-lightitalic.svg#open_sanslight_italic') format('svg');
+ font-weight: lighter;
+ font-style: italic;
}
@font-face {
- font-family: 'Roboto';
- src: font-url('roboto-regular.eot');
- src: font-url('roboto-regular.eot?#iefix') format('embedded-opentype'),
- font-url('roboto-regular.woff') format('woff'),
- font-url('roboto-regular.ttf') format('truetype'),
- font-url('roboto-regular.svg#latoregular') format('svg');
- font-weight: 400;
- font-style: normal;
+ font-family: 'Open Sans';
+ src: font-url('opensans-regular.eot');
+ src: font-url('opensans-regular.eot?#iefix') format('embedded-opentype'),
+ font-url('opensans-regular.woff2') format('woff2'),
+ font-url('opensans-regular.woff') format('woff'),
+ font-url('opensans-regular.ttf') format('truetype'),
+ font-url('opensans-regular.svg#open_sansregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
}
@font-face {
- font-family: 'Roboto';
- src: font-url('roboto-italic.eot');
- src: font-url('roboto-italic.eot?#iefix') format('embedded-opentype'),
- font-url('roboto-italic.woff') format('woff'),
- font-url('roboto-italic.ttf') format('truetype'),
- font-url('roboto-italic.svg#latoitalic') format('svg');
- font-weight: 400;
- font-style: italic;
+ font-family: 'Open Sans';
+ src: url('opensans-italic.eot');
+ src: url('opensans-italic.eot?#iefix') format('embedded-opentype'),
+ url('opensans-italic.woff2') format('woff2'),
+ url('opensans-italic.woff') format('woff'),
+ url('opensans-italic.ttf') format('truetype'),
+ url('opensans-italic.svg#open_sansitalic') format('svg');
+ font-weight: normal;
+ font-style: italic;
}
@font-face {
- font-family: 'Roboto';
- src: font-url('roboto-bold.eot');
- src: font-url('roboto-bold.eot?#iefix') format('embedded-opentype'),
- font-url('roboto-bold.woff') format('woff'),
- font-url('roboto-bold.ttf') format('truetype'),
- font-url('roboto-bold.svg#latobold') format('svg');
- font-weight: bold;
- font-style: normal;
+ font-family: 'Open Sans';
+ src: font-url('opensans-bold.eot');
+ src: font-url('opensans-bold.eot?#iefix') format('embedded-opentype'),
+ font-url('opensans-bold.woff2') format('woff2'),
+ font-url('opensans-bold.woff') format('woff'),
+ font-url('opensans-bold.ttf') format('truetype'),
+ font-url('opensans-bold.svg#open_sansbold') format('svg');
+ font-weight: bold;
+ font-style: normal;
}
@font-face {
- font-family: 'Roboto';
- src: font-url('roboto-bolditalic.eot');
- src: font-url('roboto-bolditalic.eot?#iefix') format('embedded-opentype'),
- font-url('roboto-bolditalic.woff') format('woff'),
- font-url('roboto-bolditalic.ttf') format('truetype'),
- font-url('roboto-bolditalic.svg#latobold_italic') format('svg');
- font-weight: bold;
- font-style: italic;
-}
-
-@font-face {
- font-family: 'Roboto';
- src: font-url('roboto-blackitalic.eot');
- src: font-url('roboto-blackitalic.eot?#iefix') format('embedded-opentype'),
- font-url('roboto-blackitalic.woff') format('woff'),
- font-url('roboto-blackitalic.ttf') format('truetype'),
- font-url('roboto-blackitalic.svg#latobold_italic') format('svg');
- font-weight: bolder;
- font-style: italic;
+ font-family: 'Open Sans';
+ src: url('opensans-bolditalic.eot');
+ src: url('opensans-bolditalic.eot?#iefix') format('embedded-opentype'),
+ url('opensans-bolditalic.woff2') format('woff2'),
+ url('opensans-bolditalic.woff') format('woff'),
+ url('opensans-bolditalic.ttf') format('truetype'),
+ url('opensans-bolditalic.svg#open_sansbold_italic') format('svg');
+ font-weight: bold;
+ font-style: italic;
}
// 02. Lato
// - - - - - - - - - - - - - - - - - - - - - - - - -
@font-face {
- font-family: 'Lato';
- src: font-url('lato-light.eot');
- src: font-url('lato-light.eot?#iefix') format('embedded-opentype'),
- font-url('lato-light.woff2') format('woff2'),
- font-url('lato-light.woff') format('woff'),
- font-url('lato-light.ttf') format('truetype'),
- font-url('lato-light.svg#latolight') format('svg');
- font-weight: 300;
- font-style: normal;
+ font-family: 'Lato';
+ src: font-url('lato-light.eot');
+ src: font-url('lato-light.eot?#iefix') format('embedded-opentype'),
+ font-url('lato-light.woff2') format('woff2'),
+ font-url('lato-light.woff') format('woff'),
+ font-url('lato-light.ttf') format('truetype'),
+ font-url('lato-light.svg#latolight') format('svg');
+ font-weight: lighter;
+ font-style: normal;
}
@font-face {
- font-family: 'Lato';
- src: font-url('lato-lightitalic.eot');
- src: font-url('lato-lightitalic.eot?#iefix') format('embedded-opentype'),
- font-url('lato-lightitalic.woff2') format('woff2'),
- font-url('lato-lightitalic.woff') format('woff'),
- font-url('lato-lightitalic.ttf') format('truetype'),
- font-url('lato-lightitalic.svg#latolight_italic') format('svg');
- font-weight: 300;
- font-style: italic;
+ font-family: 'Lato';
+ src: font-url('lato-regular.eot');
+ src: font-url('lato-regular.eot?#iefix') format('embedded-opentype'),
+ font-url('lato-regular.woff2') format('woff2'),
+ font-url('lato-regular.woff') format('woff'),
+ font-url('lato-regular.ttf') format('truetype'),
+ font-url('lato-regular.svg#latoregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
}
@font-face {
- font-family: 'Lato';
- src: font-url('lato-regular.eot');
- src: font-url('lato-regular.eot?#iefix') format('embedded-opentype'),
- font-url('lato-regular.woff2') format('woff2'),
- font-url('lato-regular.woff') format('woff'),
- font-url('lato-regular.ttf') format('truetype'),
- font-url('lato-regular.svg#latoregular') format('svg');
- font-weight: normal;
- font-style: normal;
+ font-family: 'Lato';
+ src: font-url('lato-bold.eot');
+ src: font-url('lato-bold.eot?#iefix') format('embedded-opentype'),
+ font-url('lato-bold.woff2') format('woff2'),
+ font-url('lato-bold.woff') format('woff'),
+ font-url('lato-bold.ttf') format('truetype'),
+ font-url('lato-bold.svg#latobold') format('svg');
+ font-weight: bold;
+ font-style: normal;
}
-
-@font-face {
- font-family: 'Lato';
- src: font-url('lato-italic.eot');
- src: font-url('lato-italic.eot?#iefix') format('embedded-opentype'),
- font-url('lato-italic.woff2') format('woff2'),
- font-url('lato-italic.woff') format('woff'),
- font-url('lato-italic.ttf') format('truetype'),
- font-url('lato-italic.svg#latoitalic') format('svg');
- font-weight: normal;
- font-style: italic;
-}
-
-@font-face {
- font-family: 'Lato';
- src: font-url('lato-bold.eot');
- src: font-url('lato-bold.eot?#iefix') format('embedded-opentype'),
- font-url('lato-bold.woff2') format('woff2'),
- font-url('lato-bold.woff') format('woff'),
- font-url('lato-bold.ttf') format('truetype'),
- font-url('lato-bold.svg#latobold') format('svg');
- font-weight: bold;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Lato';
- src: font-url('lato-bolditalic.eot');
- src: font-url('lato-bolditalic.eot?#iefix') format('embedded-opentype'),
- font-url('lato-bolditalic.woff2') format('woff2'),
- font-url('lato-bolditalic.woff') format('woff'),
- font-url('lato-bolditalic.ttf') format('truetype'),
- font-url('lato-bolditalic.svg#latobold_italic') format('svg');
- font-weight: bold;
- font-style: italic;
-}
\ No newline at end of file
diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss
index c1c0d4f1e37..cfebe4e83d5 100644
--- a/app/assets/stylesheets/icons.scss
+++ b/app/assets/stylesheets/icons.scss
@@ -72,4 +72,10 @@
}
.icon-check:before {
content: "l";
-}
\ No newline at end of file
+}
+.icon-edit:before {
+ content: "m";
+}
+.icon-star:before {
+ content: "n";
+}
diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss
index 09518ad238c..6e5ad3d7b08 100644
--- a/app/assets/stylesheets/participacion.scss
+++ b/app/assets/stylesheets/participacion.scss
@@ -2,7 +2,7 @@
//
// 01. Variables
// 02. Mixins
-// 02. Global styles
+// 03. Global styles
// 04. Header
// 05. Footer
// 06. Tags
@@ -30,7 +30,7 @@
a {
color: white;
- font-family: 'Lato';
+ font-family: 'Lato' !important;
font-size: rem-calc(20);
font-weight: lighter;
line-height: $line-height*4;
@@ -43,7 +43,7 @@
}
@media (min-width: 480px) {
- font-size: rem-calc(30);
+ font-size: rem-calc(28);
span {
font-size: rem-calc(20);
}
@@ -60,17 +60,34 @@
}
body {
- background: $background;
+ background: $body;
font-family: $font-family-sans-serif;
font-size: rem-calc(13);
font-weight: normal;
text-rendering: optimizeLegibility;
+
+ &::selection, ::-moz-selection {
+ background: $brand !important;
+ color: white !important;
+ }
}
p {
font-size: rem-calc(13);
line-height: $line-height;
- margin-bottom: $line-height/2;
+ margin-bottom: rem-calc(12);
+}
+
+a {
+ color: $link;
+
+ &:hover {
+ color: $link-hover;
+ }
+}
+
+h1, h2, h3, h4, h5, h6 {
+ font-family: $font-family-sans-serif;
}
.button {
@@ -93,9 +110,18 @@ p {
max-width: 100% !important;
}
-::selection, ::-moz-selection {
- background: $brand;
- color: white;
+.sidebar {
+ margin-top: rem-calc(24);
+ margin-bottom: rem-calc(48);
+}
+
+.sidebar-divider {
+ border-top: 1px solid $border;
+ margin-top: rem-calc(24);
+
+ &:first-child {
+ margin-top: 0;
+ }
}
// 04. Header
@@ -105,10 +131,10 @@ header {
background: url('home_header_bg.jpg');
background-position: 50% 50%;
background-size: cover;
- min-height: $line-height*20;
+ min-height: rem-calc(480);
&.results {
- min-height: $line-height*8;
+ min-height: rem-calc(192);
}
h1 {
@@ -116,7 +142,7 @@ header {
font-size: rem-calc(45);
font-weight: bolder;
line-height: $line-height*3;
- margin: $line-height 0 0 0;
+ margin: rem-calc(24) 0 0 0;
padding: 0;
}
@@ -131,14 +157,14 @@ header {
.button {
color: white;
font-family: inherit;
- margin-top: $line-height;
+ margin-top: rem-calc(24);
}
.home-page {
.button {
color: white;
font-family: inherit;
- margin-top: $line-height*2;
+ margin-top: rem-calc(48);
}
}
@@ -184,7 +210,7 @@ header {
.top-bar {
background: rgba(0,0,0,.5);
color: white;
- height: $line-height*4;
+ height: rem-calc(96);
max-width: 1170px !important;
.name a {
@@ -201,13 +227,13 @@ header {
}
img {
- margin-right: $line-height/2;
+ margin-right: rem-calc(12);
}
}
}
.top-bar-section {
- margin-right: $line-height;
+ margin-right: rem-calc(24);
ul li > a {
font-size: rem-calc(14);
@@ -230,7 +256,7 @@ header {
li.active:not(.has-form) a:not(.button) {
background: none;
- height: $line-height*4;
+ height: rem-calc(96);
line-height: $line-height*4;
}
}
@@ -238,11 +264,11 @@ header {
.top-links {
color: white;
font-size: rem-calc(14);
- height: $line-height*3;
- padding: $line-height/2 0;
+ height: rem-calc(72);
+ padding: rem-calc(12) 0;
@media (min-width: 480px) {
- height: $line-height*2;
+ height: rem-calc(48);
}
a {
@@ -281,28 +307,26 @@ footer {
padding-top: $line-height;
}
-
// 06. Tags
// - - - - - - - - - - - - - - - - - - - - - - - - -
.tags {
a {
- background: $tags-bg;
- border: 1px solid $tags-border;
+ background: $background;
+ border: 1px solid $border;
border-radius: 3px;
- color: $tags-color;
+ color: $text-medium;
display: inline-block;
font-size: rem-calc(13);
line-height: rem-calc(22);
margin-bottom: rem-calc(8);
- margin-right: rem-calc(8);
padding: 0 rem-calc(6);
&:hover {
color: $link;
cursor: pointer;
- background: #e5f1f8;
+ background: #E5F1F8;
border: 1px solid $brand;
}
}
@@ -312,14 +336,28 @@ footer {
@extend .tags;
h3 {
- font-size: rem-calc(24);
- font-weight: bold;
- line-height: $line-height*2;
- margin: 0;
+ border-top: 1px solid $votes-border;
+ display: inline-block;
+ font-family: $font-family-sans-serif;
+ font-size: rem-calc(16);
+ margin: -1px 0 rem-calc(12);
+ padding-top: rem-calc(6);
+ text-transform: uppercase;
}
a {
- padding: $line-height/4 $line-height/3;
+ padding: rem-calc(6) rem-calc(8);
+
+ .label {
+ color: white;
+ }
+
+ &:hover {
+
+ .label {
+ background: $brand;
+ }
+ }
}
}
@@ -328,10 +366,10 @@ footer {
.auth-page {
background: url('auth_bg.jpg');
- margin-top: $line-height;
+ margin-top: rem-calc(24);
@media (min-width: 480px) {
- margin-top: $line-height*2;
+ margin-top: rem-calc(48);
}
h1 {
@@ -340,10 +378,22 @@ footer {
}
.auth {
- min-height: $line-height*20;
+ min-height: rem-calc(480);
+
+ h2 {
+ clear: both;
+ font-size: rem-calc(30);
+ font-weight: bold;
+ line-height: $line-height*2;
+ }
+
+ .back, .icon-angle-left {
+ @include back;
+ }
.panel {
background: white;
+ border: 0;
h1 {
font-size: rem-calc(30);
@@ -362,12 +412,21 @@ form {
line-height: $line-height;
}
- input[type]:not([type=submit]) {
+ input[type]:not([type=submit]):not([type=file]) {
background: $input-bg;
- height: $line-height*2;
+ height: rem-calc(48);
margin-bottom: rem-calc(16);
}
+ input[type="checkbox"] {
+ height: rem-calc(24) !important;
+ margin: 0 !important;
+ }
+
+ input[type=file] {
+ margin: rem-calc(12) 0;
+ }
+
.note {
display: block;
font-size: rem-calc(13);
@@ -375,17 +434,31 @@ form {
}
.ckeditor {
- margin-bottom: $line-height;
- min-height: $line-height*14;
+ margin-bottom: rem-calc(24);
+ min-height: rem-calc(336);
}
.checkbox {
display: inline-block;
font-size: rem-calc(14);
- line-height: $line-height*2;
+ font-weight: normal;
+ line-height: $line-height;
margin: 0 0 0 rem-calc(6);
vertical-align: top;
}
+
+ .captcha {
+ border: 0;
+ padding: rem-calc(12) 0;
+
+ input {
+ margin-bottom: 0 !important;
+ }
+ }
+
+ .button {
+ margin-top: rem-calc(24);
+ }
}
// 09. Alerts
@@ -423,23 +496,14 @@ form {
.account {
background: white;
- min-height: $line-height*23;
- padding-top: $line-height;
-
- input[type="checkbox"], .checkbox {
- margin-top: -(rem-calc(12));
- }
-
- .back, .icon-angle-left {
- @include back;
- }
+ padding-top: rem-calc(24);
h1 {
clear: both;
font-size: rem-calc(36);
font-weight: bold;
line-height: $line-height*2;
- margin-bottom: $line-height;
+ margin-bottom: rem-calc(24);
}
.icon-comment-quotes {
@@ -449,18 +513,36 @@ form {
opacity: .5;
}
+ .avatar {
+ margin-bottom: rem-calc(24);
+ }
+
+ .initialjs-avatar {
+ margin-bottom: $line-height;
+ }
+
h2 {
+ clear: both;
+ font-size: rem-calc(30);
+ font-weight: bold;
+ line-height: $line-height;
+ margin: 0;
+ margin-bottom: rem-calc(12);
+ }
+
+ h3 {
clear: both;
font-size: rem-calc(20);
font-weight: bold;
line-height: $line-height;
margin: 0;
+ margin-bottom: rem-calc(12);
}
.recommendations {
list-style-type: none;
margin-left: 0;
- margin-top: $line-height;
+ margin-top: rem-calc(24);
li {
font-size: rem-calc(12);
@@ -473,4 +555,4 @@ form {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss
index 6251d669daa..ca40c4e538a 100644
--- a/app/assets/stylesheets/variables.scss
+++ b/app/assets/stylesheets/variables.scss
@@ -9,44 +9,35 @@
// 01. Fonts
// - - - - - - - - - - - - - - - - - - - - - - - - -
-$font-family-sans-serif: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+$font-family-sans-serif: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
$line-height: rem-calc(24);
// 02. Colors
// - - - - - - - - - - - - - - - - - - - - - - - - -
+$body: #E9E9E9;
$background: #EDEFF0;
$border: #DEE0E3;
$brand: #0077B9;
-$check: #46DB91;
-$debates: #008CCF;
-$comments-bg: #F1F1F1;
-$comments-info: #A5B2B9;
-$comments-text: #3F4549;
+$text: #222222;
+$text-medium: #999999;
+$text-light: #CCCCCC;
-$header-color: #292B33;
$link: #2895F1;
-$link-hover: #2178BF;
-
-$tags-bg: #FAFAFA;
-$tags-border: #F0F0F0;
-$tags-color: #8F8F8F;
-
-$text-color: #222222;
-$text-medium: #999999;
-$text-light: #A3A6AD;
+$link-hover: #2178BF;
-$votes: #31708f;
-$votes-background: #26AEEE;
+$debates: #008CCF;
+$votes-bg: #26AEEE;
$votes-border: #1F94CB;
+
$votes-like: #7BD2A8;
$votes-like-act: #5D9E7F;
-$votes-neutral: #CCCCCC;
-$votes-text: #FFFFFF;
$votes-unlike: #EF8585;
$votes-unlike-act: #BD6A6A;
+$check: #46DB91;
+
// 03. Forms
// - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -59,7 +50,7 @@ $success-bg: #DFF0D8;
$success-border: #D6E9C6;
$success-color: #3C763D;
-$info-bg: #D9EDF7;
+$info-bg: #D9EDF7;
$info-border: #BCE8F1;
$info-color: #31708F;
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 3c81da2912d..091a280e697 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -11,17 +11,23 @@ def update
if @account.update(account_params)
redirect_to account_path, notice: t("flash.actions.save_changes.notice")
else
+ @account.errors.messages.delete(:organization)
render :show
end
end
private
+
def set_account
@account = current_user
end
def account_params
- params.require(:account).permit(:first_name, :last_name, :phone_number, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply)
+ if @account.organization?
+ params.require(:account).permit(:phone_number, :email_on_debate_comment, :email_on_comment_reply, organization_attributes: [:name])
+ else
+ params.require(:account).permit(:first_name, :last_name, :phone_number, :nickname, :use_nickname, :email_on_debate_comment, :email_on_comment_reply)
+ end
end
end
diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb
index 91524b6d3f3..f4322efe71d 100644
--- a/app/controllers/admin/base_controller.rb
+++ b/app/controllers/admin/base_controller.rb
@@ -10,4 +10,4 @@ def verify_administrator
raise CanCan::AccessDenied unless current_user.try(:administrator?)
end
-end
+end
\ No newline at end of file
diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb
index f7aa5c440b1..870d7ef5597 100644
--- a/app/controllers/admin/dashboard_controller.rb
+++ b/app/controllers/admin/dashboard_controller.rb
@@ -1,4 +1,5 @@
class Admin::DashboardController < Admin::BaseController
+ layout 'admin'
def index
end
diff --git a/app/controllers/admin/tags_controller.rb b/app/controllers/admin/tags_controller.rb
new file mode 100644
index 00000000000..ecacdbdb2bd
--- /dev/null
+++ b/app/controllers/admin/tags_controller.rb
@@ -0,0 +1,37 @@
+class Admin::TagsController < Admin::BaseController
+ layout 'admin'
+ before_action :find_tag, only: [:update, :destroy]
+
+ respond_to :html, :js
+
+ def index
+ @tags = ActsAsTaggableOn::Tag.order(featured: :desc)
+ @tag = ActsAsTaggableOn::Tag.new
+ end
+
+ def create
+ ActsAsTaggableOn::Tag.create(tag_params)
+ redirect_to admin_tags_path
+ end
+
+ def update
+ @tag.update(tag_params)
+ redirect_to admin_tags_path
+ end
+
+ def destroy
+ @tag.destroy
+ redirect_to admin_tags_path
+ end
+
+ private
+
+ def tag_params
+ params.require(:tag).permit(:featured, :name)
+ end
+
+ def find_tag
+ @tag = ActsAsTaggableOn::Tag.find(params[:id])
+ end
+
+end
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index ad69fd5118c..b879a4a8d17 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,9 +1,8 @@
require "application_responder"
class ApplicationController < ActionController::Base
-
check_authorization unless: :devise_controller?
-
+ include SimpleCaptcha::ControllerHelpers
self.responder = ApplicationResponder
respond_to :html
@@ -20,27 +19,25 @@ class ApplicationController < ActionController::Base
private
- def set_locale
- if params[:locale] && I18n.available_locales.include?(params[:locale].to_sym)
- session[:locale] = params[:locale]
- end
+ def set_locale
+ if params[:locale] && I18n.available_locales.include?(params[:locale].to_sym)
+ session[:locale] = params[:locale]
+ end
- session[:locale] ||= I18n.default_locale
-
- I18n.locale = session[:locale]
- end
+ session[:locale] ||= I18n.default_locale
- def set_layout
- if devise_controller?
- "devise"
- else
- "application"
+ I18n.locale = session[:locale]
end
- end
- def verify_captcha?(resource)
- return true unless recaptcha_keys?
- verify_recaptcha(model: resource)
- end
+ def set_layout
+ if devise_controller?
+ "devise"
+ else
+ "application"
+ end
+ end
+ def set_debate_votes(debates)
+ @voted_values = current_user ? current_user.debate_votes(debates) : {}
+ end
end
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index abee2974de4..71de112a9c9 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -1,17 +1,19 @@
class CommentsController < ApplicationController
before_action :authenticate_user!
before_action :build_comment, only: :create
+ before_action :parent, only: :create
load_and_authorize_resource
respond_to :html, :js
def create
- @comment.save!
- @comment.move_to_child_of(parent) if reply?
+ if @comment.save
+ @comment.move_to_child_of(parent) if reply?
- Mailer.comment(@comment).deliver_now if email_on_debate_comment?
- Mailer.reply(@comment).deliver_now if email_on_comment_reply?
-
- respond_with @comment
+ Mailer.comment(@comment).deliver_now if email_on_debate_comment?
+ Mailer.reply(@comment).deliver_now if email_on_comment_reply?
+ else
+ render :new
+ end
end
def vote
@@ -20,12 +22,13 @@ def vote
end
private
+
def comment_params
- params.require(:comments).permit(:commentable_type, :commentable_id, :body)
+ params.require(:comment).permit(:commentable_type, :commentable_id, :body)
end
def build_comment
- @comment = Comment.build(debate, current_user, params[:comment][:body])
+ @comment = Comment.build(debate, current_user, comment_params[:body])
end
def debate
@@ -33,7 +36,7 @@ def debate
end
def parent
- @parent ||= Comment.find_parent(params[:comment])
+ @parent ||= Comment.find_parent(comment_params)
end
def reply?
diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb
index d7296543267..0816245c739 100644
--- a/app/controllers/debates_controller.rb
+++ b/app/controllers/debates_controller.rb
@@ -1,61 +1,60 @@
class DebatesController < ApplicationController
- include RecaptchaHelper
before_action :authenticate_user!, except: [:index, :show]
load_and_authorize_resource
def index
- if params[:tag]
- @debates = Debate.tagged_with(params[:tag]).order("created_at DESC")
- set_voted_values @debates.map(&:id)
- else
- @debates = Debate.all.order("created_at DESC")
- set_voted_values @debates.map(&:id)
- @featured_debates = @debates.to_a.shift(3)
- end
+ @debates = Debate.search(params)
+ set_debate_votes(@debates)
end
def show
- set_voted_values [@debate.id]
+ set_debate_votes(@debate)
end
def new
@debate = Debate.new
+ load_featured_tags
end
def edit
+ load_featured_tags
end
def create
@debate = Debate.new(debate_params)
@debate.author = current_user
- if verify_captcha?(@debate) and @debate.save
+ if @debate.save_with_captcha
redirect_to @debate, notice: t('flash.actions.create.notice', resource_name: 'Debate')
else
+ load_featured_tags
render :new
end
end
def update
- @debate.update(debate_params)
- respond_with @debate
+ @debate.assign_attributes(debate_params)
+ if @debate.save_with_captcha
+ redirect_to @debate, notice: t('flash.actions.update.notice', resource_name: 'Debate')
+ else
+ load_featured_tags
+ render :edit
+ end
end
def vote
@debate.vote_by(voter: current_user, vote: params[:value])
- set_voted_values [@debate.id]
+ set_debate_votes(@debate)
end
private
- def set_debate
- @debate = Debate.find(params[:id])
- end
def debate_params
- params.require(:debate).permit(:title, :description, :tag_list, :terms_of_service)
+ params.require(:debate).permit(:title, :description, :tag_list, :terms_of_service, :captcha, :captcha_key)
end
- def set_voted_values(debates_ids)
- @voted_values = current_user ? current_user.votes_on_debates(debates_ids) : {}
+ def load_featured_tags
+ @featured_tags = ActsAsTaggableOn::Tag.where(featured: true)
end
+
end
diff --git a/app/controllers/moderation/dashboard_controller.rb b/app/controllers/moderation/dashboard_controller.rb
index ceaddd6f411..86196af376a 100644
--- a/app/controllers/moderation/dashboard_controller.rb
+++ b/app/controllers/moderation/dashboard_controller.rb
@@ -1,4 +1,5 @@
class Moderation::DashboardController < Moderation::BaseController
+ layout 'admin'
def index
end
diff --git a/app/controllers/organizations/registrations_controller.rb b/app/controllers/organizations/registrations_controller.rb
index 2751bc988d0..8602ba4bad2 100644
--- a/app/controllers/organizations/registrations_controller.rb
+++ b/app/controllers/organizations/registrations_controller.rb
@@ -1,6 +1,4 @@
class Organizations::RegistrationsController < Devise::RegistrationsController
- include RecaptchaHelper
-
def new
super do |user|
user.build_organization
@@ -8,22 +6,21 @@ def new
end
def create
- if verify_captcha?(resource)
+ build_resource(sign_up_params)
+ if resource.valid_with_captcha?
super do |user|
# Removes unuseful "organization is invalid" error message
user.errors.messages.delete(:organization)
end
else
- build_resource(sign_up_params)
- flash.now[:alert] = t('recaptcha.errors.verification_failed')
- respond_with resource
+ render :new
end
end
private
def sign_up_params
- params.require(:user).permit(:email, :password, :phone_number, :password_confirmation, organization_attributes: [:name])
+ params.require(:user).permit(:email, :password, :phone_number, :password_confirmation, :captcha, :captcha_key, organization_attributes: [:name])
end
end
diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb
index 916b5128b0b..65da7e1e05f 100644
--- a/app/controllers/users/registrations_controller.rb
+++ b/app/controllers/users/registrations_controller.rb
@@ -1,12 +1,10 @@
class Users::RegistrationsController < Devise::RegistrationsController
- include RecaptchaHelper
def create
- if verify_captcha?(resource)
+ build_resource(sign_up_params)
+ if resource.valid_with_captcha?
super
else
- build_resource(sign_up_params)
- flash.now[:alert] = t('recaptcha.errors.verification_failed')
render :new
end
end
@@ -14,7 +12,7 @@ def create
private
def sign_up_params
- params.require(:user).permit(:first_name, :last_name, :email, :phone_number, :password, :password_confirmation, :use_nickname, :nickname)
+ params.require(:user).permit(:first_name, :last_name, :email, :phone_number, :password, :password_confirmation, :use_nickname, :nickname, :captcha, :captcha_key)
end
end
diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb
new file mode 100644
index 00000000000..923609fab54
--- /dev/null
+++ b/app/controllers/welcome_controller.rb
@@ -0,0 +1,9 @@
+class WelcomeController < ApplicationController
+ skip_authorization_check
+
+ def index
+ @featured_debates = Debate.limit(9)
+ set_debate_votes(@featured_debates)
+ end
+
+end
\ No newline at end of file
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb
new file mode 100644
index 00000000000..a7fef3aa245
--- /dev/null
+++ b/app/helpers/admin_helper.rb
@@ -0,0 +1,13 @@
+module AdminHelper
+
+ def side_menu
+ render "/#{namespace}/menu"
+ end
+
+ private
+
+ def namespace
+ controller.class.parent.name.downcase
+ end
+
+end
\ No newline at end of file
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 70828c01a42..cee6db1991e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,9 +1,4 @@
module ApplicationHelper
-
- def tags(debate)
- debate.tag_list.sort.map { |tag| link_to sanitize(tag), debates_path(tag: tag) }.join('').html_safe
- end
-
def percentage(vote, debate)
return "0%" if debate.total_votes == 0
debate.send(vote).percent_of(debate.total_votes).to_s + "%"
diff --git a/app/helpers/recaptcha_helper.rb b/app/helpers/recaptcha_helper.rb
deleted file mode 100644
index fb4cceb2028..00000000000
--- a/app/helpers/recaptcha_helper.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-module RecaptchaHelper
-
- def recaptchable?(resource)
- resource.new_record?
- end
-
- def recaptcha_keys?
- Recaptcha.configuration.public_key.present? &&
- Recaptcha.configuration.private_key.present?
- end
-
-end
\ No newline at end of file
diff --git a/app/models/comment.rb b/app/models/comment.rb
index c2cf7529223..b8182b04fa6 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -1,5 +1,5 @@
class Comment < ActiveRecord::Base
- acts_as_nested_set scope: [:commentable_id, :commentable_type]
+ acts_as_nested_set scope: [:commentable_id, :commentable_type], counter_cache: :children_count
acts_as_votable
validates :body, presence: true
@@ -8,6 +8,8 @@ class Comment < ActiveRecord::Base
belongs_to :commentable, polymorphic: true
belongs_to :user
+ scope :recent, -> { order(id: :desc) }
+
def self.build(commentable, user, body)
new commentable: commentable,
user_id: user.id,
@@ -26,4 +28,16 @@ def author
user
end
+ def total_votes
+ votes_for.size
+ end
+
+ # TODO: faking counter cache since there is a bug with acts_as_nested_set :counter_cache
+ # Remove when https://github.com/collectiveidea/awesome_nested_set/issues/294 is fixed
+ # and reset counters using
+ # > Comment.find_each { |comment| Comment.reset_counters(comment.id, :children) }
+ def children_count
+ children.count
+ end
+
end
diff --git a/app/models/debate.rb b/app/models/debate.rb
index 28181101af0..b0d022c5199 100644
--- a/app/models/debate.rb
+++ b/app/models/debate.rb
@@ -1,7 +1,9 @@
require 'numeric'
class Debate < ActiveRecord::Base
+ default_scope { order('created_at DESC') }
- TITLE_LENGTH = Debate.columns.find{|c| c.name == 'title'}.limit
+ apply_simple_captcha
+ TITLE_LENGTH = Debate.columns.find { |c| c.name == 'title' }.limit
acts_as_votable
acts_as_commentable
@@ -18,6 +20,14 @@ class Debate < ActiveRecord::Base
before_validation :sanitize_description
before_validation :sanitize_tag_list
+ def self.search(params)
+ if params[:tag]
+ tagged_with(params[:tag])
+ else
+ all
+ end
+ end
+
def likes
get_likes.size
end
@@ -42,6 +52,17 @@ def description
super.try :html_safe
end
+ def tag_list_with_limit(limit = nil)
+ tags.most_used(limit).pluck :name
+ end
+
+ def tags_count_out_of_limit(limit = nil)
+ return 0 unless limit
+
+ count = tags.count - limit
+ count < 0 ? 0 : count
+ end
+
protected
def sanitize_description
@@ -49,7 +70,7 @@ def sanitize_description
end
def sanitize_tag_list
- self.tag_list = TagSanitizer.new.sanitize_tag_list(self.tag_list)
+ self.tag_list = TagSanitizer.new.sanitize_tag_list(self.tag_list)
end
end
diff --git a/app/models/user.rb b/app/models/user.rb
index ef1afc5ee82..764454874a6 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,4 +1,5 @@
class User < ActiveRecord::Base
+ apply_simple_captcha
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable
@@ -23,20 +24,15 @@ class User < ActiveRecord::Base
attr_accessor :organization_name
attr_accessor :is_organization
- after_save :create_associated_organization
-
def name
return nickname if use_nickname?
return organization.name if organization?
"#{first_name} #{last_name}"
end
- def votes_on_debates(debates_ids = [])
- debates_ids = debates_ids.flatten.compact.uniq
- return {} if debates_ids.empty?
-
- voted = votes.where("votable_type = ? AND votable_id IN (?)", "Debate", debates_ids)
- voted.each_with_object({}){ |v,_| _[v.votable_id] = v.vote_flag }
+ def debate_votes(debates)
+ voted = votes.for_debates.in(debates)
+ voted.each_with_object({}) { |v, _| _[v.votable_id] = v.value }
end
def administrator?
diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb
index aae6ae28a65..fb647ef1d9e 100644
--- a/app/views/account/show.html.erb
+++ b/app/views/account/show.html.erb
@@ -1,57 +1,51 @@
-
\ No newline at end of file
+
diff --git a/app/views/debates/_form.html.erb b/app/views/debates/_form.html.erb
index c38d2c476f6..096d88b22b8 100644
--- a/app/views/debates/_form.html.erb
+++ b/app/views/debates/_form.html.erb
@@ -1,20 +1,11 @@
<%= form_for(@debate) do |f| %>
- <% if @debate.errors.any? %>
-
-<% end %>
\ No newline at end of file
+<% end %>
diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb
index 7f47e26492d..4c252c8b59f 100644
--- a/app/views/debates/_votes.html.erb
+++ b/app/views/debates/_votes.html.erb
@@ -18,6 +18,14 @@
+ <% end %>
\ No newline at end of file
diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb
index 9f521727069..3a3881b768e 100644
--- a/app/views/debates/index.html.erb
+++ b/app/views/debates/index.html.erb
@@ -1,13 +1,10 @@
-
\ No newline at end of file
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb
index 48ffa41d574..b88dcded4ad 100644
--- a/app/views/layouts/_header.html.erb
+++ b/app/views/layouts/_header.html.erb
@@ -11,9 +11,10 @@
]
\ No newline at end of file
diff --git a/app/views/organizations/registrations/new.html.erb b/app/views/organizations/registrations/new.html.erb
index f8ca107be61..4f8b05862ca 100644
--- a/app/views/organizations/registrations/new.html.erb
+++ b/app/views/organizations/registrations/new.html.erb
@@ -1,64 +1,36 @@
-
\ No newline at end of file
diff --git a/app/views/shared/_captcha.html.erb b/app/views/shared/_captcha.html.erb
deleted file mode 100644
index 42ccb593682..00000000000
--- a/app/views/shared/_captcha.html.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<% if recaptchable?(resource) and recaptcha_keys? %>
- <%= recaptcha_tags ajax: true, hl: I18n.locale %>
-<% end %>
\ No newline at end of file
diff --git a/app/views/shared/_errors.html.erb b/app/views/shared/_errors.html.erb
new file mode 100644
index 00000000000..4e22c3038fa
--- /dev/null
+++ b/app/views/shared/_errors.html.erb
@@ -0,0 +1,10 @@
+<% if resource.errors.any? %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/shared/_tag_cloud.html.erb b/app/views/shared/_tag_cloud.html.erb
index c113a76bb92..9fb4ff37130 100644
--- a/app/views/shared/_tag_cloud.html.erb
+++ b/app/views/shared/_tag_cloud.html.erb
@@ -1,6 +1,8 @@
¡Hola! hemos creado algunas directrices de cómo usar el diseño en los diferentes elementos.
+
IMPORTANTE Esta guía de estilo no es definitiva ya que irá creciendo junto al proyecto, por lo que algunos elementos pueden tener modificaciones en el futuro.
+
En este proyecto para el maquetar el front utilizamos como base el framework Foundation. Puedes leer toda su documentación pero te recomendamos que leas con atención los siguientes enlaces, ya que resumen muy bien el funcionamiento del framework:
Para desarrollar el CSS utilizamos SASS. Si clonas el repositorio verás la siguiente estructura en las hojas de estilo:
+
+
+
application.sccs hace un @import del resto de SCSS para compilarlos en un solo fichero.
+
debates.sccs todos los estilos relacionados con la sección de debates.
+
fonts.sccs desde aquí se important todas las fuentes.
+
foundation_and_overrides.sccs fichero SCSS de Foundation con todas sus variables por defecto.
+
icons.sccs fuente de iconos personalizada para el proyecto, creada en Fontastic.me.
+
variables.sccs lista de variables para utilizar en el resto de SCSS.
+
+
+
2. Tipografía
+
La fuente que utilizamos para el texto es Open Sans y utlizamos Lato para el logotipo: gobierno abierto
+
+
Heading 1
+ h1 {font-size: 32px;}
+
+
Heading 2
+ h2 {font-size: 24px;}
+
+
Heading 3
+ h3 {font-size: 18px;}
+
+
Heading 4
+ h4 {font-size: 16px;}
+
+
Heading 5
+ h5 {font-size: 14px;}
+
+
Heading 6
+ h6 {font-size: 13px;}
+
+
Ejemplo de texto
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
+
+ p {font-size: 13px; line-height: 24px;}
+
+
3. Enlaces
+
Los enlaces sobre fondo blanco utilizan el color #2895F1; y al hacer hover cambian al color #2178BF; Ejemplo: Esto es un enlace
+
+
Los enlaces sobre fondo oscuro utilizan el color #FFFFF;/white y al hacer hover cambian al color #2178BF; Ejemplo: Esto es un enlace
+
+
4. Botones
+
+
Utilizamos los botones con bordes redondeados por defecto en Foundation, en varios tamaños.
<%= comment.body %>
+<%= comment.body %>
- - <%= render 'comments/votes', comment: comment %> - + + <%= render 'comments/votes', comment: comment %> + - <% if user_signed_in? %> -<%= render 'comments/form', {parent: comment, toggeable: true} %>
- <% end %> -+ <%= t("debates.comment.responses", count: comment.children_count) %> + <% if user_signed_in? %> + | + <%= render 'comments/form', {parent: comment, toggeable: true} %> + <% end %> +
+