Commit graph

32 commits

Author SHA1 Message Date
Andreas Gohr
63c9c46151 ignore JS only links when simplifying the sidebar 2021-11-09 12:16:26 +01:00
Frieder Schrempf
11b00783f8
Use direct links for sidebar elements with only a single subitem
If a sidebar toggler contains only a single item with a link, there
is no need to create a toggler with subnav at all. Let's just remove
the subnav and link to the target directly.

Signed-off-by: Frieder Schrempf <dev@fris.de>
2021-04-18 17:22:48 +02:00
Anna Dabrowska
e78ffc6c79 Separate states of different sidebars 2019-05-13 18:19:31 +02:00
Andreas Gohr
4ac10cf3be use a smooth animation to fade in the navigation
This avoids the flash of unstyled/unprocessed content
2019-03-21 11:36:05 +01:00
Michael Große
bd04be26c6
Remember that the content was narrow before
Steps to reproduce bug:
----------------------
1. View page with narrow content
2. Edit page --> wide content (this is correct)
3. Cancel/Save
4. Page has now wide content, but should have narrow content

Fix
---
Only remember width of content when we are view a page, i.e. `do=show`

SPR-982
2017-05-29 17:48:34 +02:00
Jana Deutschländer
7d802b57a2 keyboard access + direct link scrolling 2017-05-02 16:29:02 +02:00
Jana Deutschländer
7ed058942a SPR-953: bugfixes for content-wide nav 2017-05-02 10:26:13 +02:00
Jana Deutschländer
30aa8e9544 SPR-953: bugfixes for content-wide nav 2017-04-27 17:40:46 +02:00
Jana Deutschländer
13c822c242 SPR-953: sessionStorage handling for template menus 2017-04-27 16:06:10 +02:00
Jana Deutschländer
045d16c471 SPR-953: menu state is-active and span.curid for site tools and user tools 2017-04-27 15:14:18 +02:00
Jana Deutschländer
645e161a49 SPR-953: menu states is-open and is-active for contentMenu $toggler 2017-04-27 12:19:05 +02:00
Andreas Gohr
9e264cdc04 show sidebar label on collapsed sidebar SPR-957
This removes the base z-indexes as they seem not to be needed (source
order defines initial heights) and interfered with the sidbar functionality.

Removing it was suggested in SPR-899 as well
2017-04-24 15:53:27 +02:00
Michael Große
6df4603459
Explicitly refer to the global sessionStorage
Using this as a local variable might break in some browsers.
2017-04-20 16:30:50 +02:00
Michael Große
fdf5eaea74
Remember sidebar toggle-state
While browsing a wiki, it would be nice if it would remember whether the
content is wide or not.

SPR-883
2017-04-20 16:23:26 +02:00
Michael Große
b8a4cc913e
Fix not correctly forgetting section-open state
The sidebar is intended to close all sections when the content is wide
and set their default back to closed.

SPR-883
2017-04-20 15:50:53 +02:00
Michael Große
2bd7f884e5
Remember sidebar section state when browsing the wiki
So we do not have to open the same section of the sidebar every time, we click
 a link to a new page.
It forgets the toggle-state if the content is manually or automatically
widened, for example by clicking on an edit-button.

SPR-883
2017-04-12 17:20:36 +02:00
Michael Große
cb7cc643bf
Make sidebar toggle elements configurable
Current options are h1, h1 and h2, h1-h5, top-level list items

SPR-754
2017-04-12 13:35:33 +02:00
Andreas Gohr
0503402fda fixed wrong scope for function definition 2017-03-08 10:34:23 +01:00
Jana Deutschländer
d19c9b956a SPR-840: debug IE10 (vendor extensions for flex) 2017-03-02 17:11:45 +01:00
Jana Deutschländer
b10c27f3f2 SPR-840: debug sidebar script IE10, styling for mobile menu
debug background-color: qc
2017-03-02 16:45:22 +01:00
Jana Deutschländer
75a1a114df Merge remote-tracking branch 'origin/mobilesidebar' 2017-03-02 12:11:51 +01:00
Andreas Gohr
1b74bdc158 fixed clicking links in sidebar 2017-02-23 09:52:02 +01:00
Andreas Gohr
4055de39fa mobile handling of the sidebar SPR-840 2017-02-22 14:58:43 +01:00
Andreas Gohr
06938c6d7c use a instead of h6 in navigation
this makes focusing and selecting in assistive technologies easier
2017-02-22 12:12:04 +01:00
Andreas Gohr
bed1717f37 make sidebar headers toggable via keyboard 2017-02-22 11:48:17 +01:00
Andreas Gohr
a36c5fa052 reveal sidebar when clicking the search icon 2017-02-21 15:09:01 +01:00
Andreas Gohr
fa1028ad60 finally align the menu items correctly
I had to wrap the labels in their own span and use flex box to make them
behave correctly. Simplifications welcome.
2017-02-16 16:58:36 +01:00
Andreas Gohr
6c61749bf2 complete refactor of the sidebar behaviour javascript RES-754
Now all toggling of the sidebar and the related menus is done through
the same click handler. HTML has been unified. All sidebar related
content is now in a single include file instead of several. Icons for
the site tools user tools and trace have been added.

The CSS for the whole sidebar still has to be refactored.
2017-02-16 14:40:25 +01:00
Andreas Gohr
285c4f96a7 style the fake icon
When no icon is provided, we use the first two letters as icon. A fancy
border makes it look more like an icon.
2017-02-15 14:58:36 +01:00
Andreas Gohr
f293a16b9c use jQuery slector to define the elements
This makes it possible to use multiple. For now I just use all headlines
2017-02-14 11:59:08 +01:00
Andreas Gohr
9fd3d99b8f directly embed SVGs for better styling
Now the SVGs are loaded via AJAX and are directly embedded into the
HTML. This allows for styling them via CSS and we can apply proper hover
styles.

The svg dispatcher was extended with an embed option (boolean parameter
'e') which will return an absolute minimum svg with absolutely no
styles.
2017-02-13 16:19:43 +01:00
Andreas Gohr
9d8dba1489 New sidebar JavaScript logic
This implements the JS logic as discussed in our meeting. A sidebar can
now contain virtually any wiki syntax. (currently hardcoded) H2 elements
will toggle all their following content which is wrapped in a wrapper
div.

This is currently implemented on top of the old JavaScript which should
be removed.

The toggle element should be made configurable.

We probably want to reuse some of the toggle logic for the user tools.
2017-02-13 15:17:18 +01:00