Commit Graph

110 Commits

Author SHA1 Message Date
Javi Martín
a4eff3aa19 Simplify subnavigation layout
Using `flex` instead of a fixed width for the navigation, the elements
take all the available space when the search form isn't present. That
wasn't the case before and produced a strange effect on medium-sized
screens.

This way we also align the search to the right.
2021-07-08 18:57:21 +02:00
Javi Martín
b4203c07b4 Remove unnecessary classes in header
Since the top-bar already includes a layout positioning the elements,
these classes are redundant and actually confusing, since the element
floating to the right was on the left.

This solves a problem where the outline wasn't correctly displayed when
focusing on the logo using the keyboard. Firefox was displaying two
vertical lines together above the logo, while recent Chrome versions
displayed the outline to the right of the logo.
2021-07-08 18:56:16 +02:00
Javi Martín
d31d73c4e5 Simplify HTML in top links
In the case of the public layout, the row element was originally there
so the content of the top links had a maximum width. Since now the body
has that maximum width, we no longer need the row element.

In the other layouts I guess the row elements were added because there
were float elements inside them. We can use a flexbox layout instead and
these elements are no longer necessary. This also makes the layout more
robust when there isn't enough space on one line for both the language
selector and the external links.

Note we're using `flex-grow: 1` to make one element appear on the left
of the screen and the other one on the right. It would be easier to use
`justify-content: space-between`. However, there's a bug in Internet
Explorer and old versions of Firefox; they include the
absolutely-positioned `::before` element we use to set the full width
background when calculating where to position the elements. The bug was
fixed in Firefox 52 (released in 2017).
2021-07-07 23:04:00 +02:00
Javi Martín
8a3b9f6abf Remove no longer necessary row classes
These element had no columns inside and the row classes had only been
added to give them a maximum width. That's no longer necessary since now
the body has that maximum width.
2021-07-07 23:03:58 +02:00
Javi Martín
26a8f2eace Increase menu button touch area on small screens
Some users might not be able to touch the icon due to a motor
disability. Other users might think the "Menu" text is part of the
button and try to touch it instead.

Making the "Menu" text part of the button makes it easier to show/hide
this menu. Besides, it lets screen reader users with a small screen hear
the word "Menu" associated to the button.

We could simplify the HTML a bit more but Foundation's `hamburger` mixin
uses the `::after` element with `position: absolute`, so we can't apply
it directly to the button without making the CSS more complex.
2021-06-02 17:06:40 +02:00
Javi Martín
cc69b81ec1 Simplify styles for the menu button
Using `currentcolor` and `color: inherit` is IMHO more expressive (we're
saying we want to use the same color as the text) and makes it easier to
customize these colors in other CONSUL installations. We also remove
duplication as we can use the same styles for both the admin and the
public layouts.
2021-06-02 17:06:40 +02:00
Javi Martín
6ea9383743 Allow toggling elements with the keyboard
Using `<a>` tags with no `href` means these elements cannot be activated
by keyboard users, so we're replacing them with buttons.

In the future we probably want to add more consistency so all toggle
buttons use the same code. We might also add styles depending on the
`aria-expanded` property.
2021-03-31 13:38:38 +02:00
Javi Martín
bb2e2fa0a3 Move main <h1> tag inside main header
A <header> tag is the natural place to have headings.

Since we already had the logo there, IMHO it makes sense to merge both
the <h1> tag and the logo together. We were already doing so in the
devise layout.

From the sceen reader users' point of view, having a link with the text
"CONSUL logo" is a bit confusing, since it seems to imply the link will
get us to the CONSUL logo. Using the organization name as the text of
the link makes more sense.

One thing changes, though. Before this commit, the first thing on the
page a screen reader user would hear about would be the organization
name. Now the language selector and the top links are announced before
the organization name is read. That's fine, since the actual first thing
these users will hear is the content of the <title> tag, which contains
the organization name as well.
2020-11-23 18:05:43 +01:00
Javi Martín
c62da726b8 Apply SpaceAroundErbTag ERB Lint rule 2019-09-10 20:02:15 +02:00
taitus
72d1893703 Manage the remote translation button display
- Add remote_translation_button partial to layout
- Only display button when we have remote_translations and if current
  locale is include on available locales from remote translations service.
- Recover available locales from remote translations service.
  Use daily_cache to detect every day if remote translation service has
  added new available locale.

Co-Authored-By: alessandro <agileontheweb@gmail.com>
2019-06-27 09:21:18 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
25ed245689 Use double quotes in app/views/layouts 2019-03-19 12:16:50 +01:00
Juan Salvador Pérez García
92c0e34c7a Fixed error in layout
An error was introduced while trying to fix merge conflicts. It is fixed
now.
2018-10-01 10:13:45 +02:00
Juan Salvador Pérez García
488e7e081f Merge branch 'dashboard' into rebase_consul_master 2018-09-27 09:18:27 +02:00
decabeza
dcec003d0e Updates header markup and includes new logo 2018-07-20 18:50:49 +02:00
Juan Salvador Pérez García
89f3da25b9 Implements #138 and #139
Implements graph with supports for the given  period.
2018-07-17 17:52:47 +02:00
decabeza
fcae2c0ac2 Updates top bar html and styles 2018-06-06 12:00:39 +02:00
rgarcia
09c44ee583 Extend notifications to be marked as read and unread 2018-03-23 11:47:06 +01:00
decabeza
6c2384fd74 uses underscore for ids names 2017-10-17 13:26:27 +02:00
decabeza
548fd03ac8 fixes admin login items menu on mobile size 2017-10-17 13:25:09 +02:00
decabeza
631ea77cf7 adds dropdown on admin menu items 2017-07-19 18:34:07 +02:00
Amaia Castro
8143fe1037 Site customization: images uploads 2017-04-06 17:00:04 +02:00
Alberto Garcia Cabeza
02cb83c683 changes accesskey letters to numbers 2017-03-14 18:43:02 +01:00
Alberto Garcia Cabeza
92133b2e0a shows locale switcher and top links on mobile version 2017-02-15 21:15:32 +01:00
Alberto Garcia Cabeza
aa1f09fccf removes duplicated search form on header 2016-12-19 16:57:23 +01:00
Alberto Garcia Cabeza
45ae3688f5 removes unused text on header 2016-12-19 16:27:41 +01:00
Juanjo Bazán
7f01dbdca2 makes sure setting helper is used in views 2016-07-08 14:42:28 +02:00
Alberto Garcia Cabeza
08a17f3b0e Makes generic logos and avatars, and removes unused images 2016-04-21 14:05:30 +02:00
Alberto Garcia Cabeza
4a013a65bc Fixes subnavigation layout 2016-04-19 23:45:03 +02:00
Alberto Garcia Cabeza
84f044c131 Improves website accessibility 2016-03-08 14:00:06 +01:00
Alberto Garcia Cabeza
3752f3a53b Adds foundation 6 🎉 2016-02-26 19:33:33 +01:00
Juanjo Bazán
0325dd6199 refactors settings/flags helper to memoize values 2016-02-04 17:45:43 +01:00
Josep Jaume Rey Peroy
57f5296e49 Feature flag spending proposals 2016-01-18 13:05:00 +01:00
Josep Jaume Rey Peroy
2d45828cad Feature-flag debates 2016-01-18 13:05:00 +01:00
Josep Jaume Rey Peroy
ba74542c3d Parameterize social links 2016-01-18 12:43:36 +01:00
Juanjo Bazán
c9950f8c11 activate header menus for all actions 2016-01-11 12:16:31 +01:00
Juanjo Bazán
864ef6e73b adds basic spending proposals index 2016-01-11 12:16:31 +01:00
Alberto Garcia Cabeza
b84730aac0 Merge branch 'master' into design_layout 2016-01-07 16:21:00 +01:00
Alberto Garcia Cabeza
c9f9433f96 Improves styles for submenu links 2016-01-07 13:49:42 +01:00
Alberto Garcia Cabeza
6bb4baa809 Removes social icons from header 2016-01-05 17:07:27 +01:00
Alberto Garcia Cabeza
833d7e0f01 Improves navigation for mobile version 2016-01-05 07:37:49 +01:00
Alberto Garcia Cabeza
66acbdbb66 Removes unused classes 2015-12-16 11:58:36 +01:00
Alberto Garcia Cabeza
e40f411ecc Removes unused header css method 2015-12-15 17:04:03 +01:00
Alberto Garcia Cabeza
ca18eb99de Cleans and improves styles for header and homepage 2015-12-15 16:35:55 +01:00
Josep Jaume Rey Peroy
80104d100f Normalize page paths
Normalize page paths so they can be accessed by `page_path(:id)`.

The benefit of this is that we can add any arbitrary amount of pages
without affecting the routing layer.
2015-12-12 10:22:27 +01:00
Alberto Garcia Cabeza
9ad798d26d Fixes conflicts 2015-12-03 20:50:21 +01:00
Alberto Garcia Cabeza
7beff47af6 Removes unused keys 2015-12-03 20:46:36 +01:00
Alberto Garcia Cabeza
1bbd36fd11 Improves header and footer styles 2015-12-03 20:46:36 +01:00
Juanjo Bazán
c47f5e84b6 removes provisional transparency page 2015-12-03 20:46:19 +01:00
Alberto Garcia Cabeza
bf5aac32c0 Improves header and footer styles 2015-12-03 19:30:01 +01:00