39 Commits

Author SHA1 Message Date
Lucía Luzuriaga
1152cf48d6 Create publiccode.yml 2025-10-01 09:38:56 +02:00
Javi Martín
45c1f93562 Add a link to skip to the main content
While people using screen readers already have keyboard shortcuts to
jump to the <main> tag, there are people who navigate the page with the
keyboard using just the tab key, and for them, this link provides a way
to save time and start reading the main content instead of having to
manually go through all the navigation links every time a new page is
loaded.

Note that we had to add an additional `width: 0` rule because
Foundation's `element-invisible` would apply `1px` and the test checking
for `visible: :hidden` would faile.
2024-03-23 00:35:47 +01:00
Javi Martín
2b962f2789 Use a <main> tag on every page
Many pages had this tag, but many other didn't, which made navigation
inconsistent for people using screen readers.

Note that there are slight changes in two pages:

* The homepage now includes the banner and the content of the
  `shared/header` element inside the <main> tag
* The budgets index now includes the banner inside the <main> tag

I see both potential advantages and disadvantages of this approach,
since banners aren't necessarily related to the main content of a page
but on the other hand they aren't the same across pages and people using
screen readers might accidentally skip them if they jump to the <main>
tag.

So I'm choosing the option that is easier to implement.

Note we're adding a `public-content` class to the <main> element in the
application layout. This might be redundat because the element could
already be accessed through the `.public main` selector, but this is
consistent with the `admin-content` class used in the admin section, and
without it the <main> element would sometimes have an empty class
attribute and we'd have to use `if content_for?(:main_class)` or
`tag.main` which IMHO makes the code less consistent.

The Capybara::DSL monkey-patch is only done on the `visit` method
because it's the only reliable one. Other methods like `click_link`
generate AJAX requests, so `expect(page).to have_css "main", count: 1`
might be executed before the AJAX request is finished, meaning it
wouldn't properly test anything.
2024-03-23 00:35:43 +01:00
Javi Martín
ce7b37f6f8 Change name in English and Spanish texts 2023-07-07 15:07:46 +02:00
decabeza
41dd51b189 Update consul democracy logo 2022-12-22 12:42:58 +01:00
cronopioelectronico
479ee80fba change name 2022-12-06 14:01:57 +00:00
Javi Martín
2f312bf474 Use a different machine learning folder per tenant
We're using the "tenants" subfolder for consistency with the folder
structure we use in ActiveStorage and because some CONSUL installations
might have folders inside the `data` folder which might conflict with
the folders created by tenants.

Note that the Python scripts have a lot of duplication, meaning we need
to change all of them. I'm not refactoring them because I'm not familiar
enough with these scripts (or with Python, for that matter).

Also note that the scripts folder is still shared by all tenants,
meaning it isn't possible to have different scripts for different
tenants. I'm not sure how this situation should be handled; again, I'm
not familiar enough with this feature.
2022-11-11 01:40:04 +01:00
Javi Martín
468761253b Add per-tenant sitemap to robots.txt file
While we ping some search engines (currently, only Google) when
generating the sitemap files, we weren't telling search engines
accessing through the `robots.txt` file where to find the sitemap. Now
we're doing so, using the right sitemap file for the right tenant.
2022-11-09 18:19:20 +01:00
Javi Martín
05474b377c Remove Madrid City Council docs
They were added when CONSUL was only used in Madrid, but that hasn't
been the case for more than five years.
2021-12-20 14:42:53 +01:00
cronopioelectronico
b6f0b1b063 Update machine learning ini files 2021-09-07 18:24:04 +02:00
cronopioelectronico
6d6888f201 Update machine learning scripts with NNMF and TextRank-GloVe techniques 2021-09-07 18:18:47 +02:00
Machine Learning
4d27bbebad Add experimental machine learning 2021-08-16 16:31:04 +02:00
Javi Martín
7bb7548d00 Respond with 403 when features are disabled
When administrators disabled features and users tried to access them
with the browser, we were responding with a 500 "Internal Server Error"
page, which in my humble opinion was incorrect. There was no error at
all; the server worked exactly as expected.

I think a 403 "Forbidden" code is better; since that feature is
disabled, we're refusing to let users access it.

We could also respond with a 404 "Not found", although I wonder whether
that'll be confusing when administrators temporarily or accidentally
disable a feature.

A similar thing might happen if we responded with a 410 "Gone" code.
Actually this case might be more confusing since users aren't that
familiar with this code.

In any case, all these options are better than the 500 error.
2021-06-16 20:45:15 +02:00
Bertocq
18a9564061 Remove brand guidelines from readme on to decide.es website 2017-09-13 19:48:06 +02:00
decabeza
ab013bd48a adds brand guidelines 2017-09-01 12:46:06 +02:00
decabeza
bd274bdde6 replaces consul images with new logo 2017-09-01 12:45:22 +02:00
decabeza
32445661e9 adds disallow filter to robots.txt 2017-07-18 17:08:55 +02:00
decabeza
2844c03e43 adds consistency on social media filenames 2017-07-18 11:40:19 +02:00
decabeza
edaf420f50 adds more disallow urls on robots.txt 2017-05-17 17:07:53 +02:00
decabeza
6dc7afdb50 improves seo updating robots.txt 2017-05-17 12:49:51 +02:00
Alberto Garcia Cabeza
3d0b7f1034 prevents pages indexation on robots.txt 2017-04-21 16:40:16 +02:00
Alberto Garcia Cabeza
5cf9a98e6a adds lang attribute on error pages 2017-03-06 13:38:40 +01:00
rgarcia
ac6b75e8f9 updates image url for error pages 2016-10-04 18:38:10 +02:00
Alberto Garcia Cabeza
219f4e2c15 Deletes sitemap 2016-07-06 12:32:14 +02:00
Alberto Garcia Cabeza
ece2f6f019 Removes Madrid references on pages 2016-07-04 18:07:45 +02:00
Juanjo Bazán
23c6a04179 removes highlights 2016-03-04 18:46:27 +01:00
Alberto Garcia Cabeza
4614ab45f0 Updates consul logo 2015-12-02 16:32:26 +01:00
Alberto Garcia Cabeza
c2f00ee97d Adds consul logo 2015-12-02 16:28:00 +01:00
Alberto Garcia Cabeza
6a486a0fab Adds maintenance page 2015-11-25 13:46:33 +01:00
Juanjo Bazán
937731c31e adds static sitemap.xml 2015-09-28 13:22:54 +02:00
Alberto Garcia Cabeza
5d138decbd Adds new pdf document on proposals info page 2015-09-28 12:37:05 +02:00
Juanjo Bazán
651c3e184f moves social media icon to public 2015-09-23 12:25:42 +02:00
Juanjo Bazán
b7185bfdf1 moves social media icon to asset pipeline 2015-09-18 13:06:29 +02:00
Juanjo Bazán
d6c38b17ba adds social media meta tags for proposals 2015-09-18 11:48:42 +02:00
Alberto Garcia Cabeza
dfe4977310 Adds downloadable pdf on pages and back link 2015-09-14 11:35:27 +02:00
Alberto Garcia Cabeza
c8fb73fe8f Adds background image for errors page 2015-09-08 14:46:58 +02:00
kikito
1f70bbaf50 adds favicon.ico to public, so that layout-less views get it without error 2015-09-07 13:39:24 +02:00
Alberto Garcia Cabeza
d1b84b7398 Adds 404 and 500 error pages 2015-09-05 00:30:11 +02:00
rgarcia
8db3630837 initial commit 2015-07-15 13:32:13 +02:00