sibu 0.9.5 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/sibu/sibu.js.erb +17 -3
  3. data/app/assets/javascripts/tabs/van11y-accessible-tab-panel-aria.js +122 -124
  4. data/app/assets/stylesheets/sibu/defaults.scss +72 -80
  5. data/app/assets/stylesheets/sibu/sibu.css +8 -0
  6. data/app/controllers/sibu/application_controller.rb +8 -0
  7. data/app/controllers/sibu/pages_controller.rb +4 -3
  8. data/app/controllers/sibu/sites_controller.rb +1 -0
  9. data/app/helpers/sibu/pages_helper.rb +61 -12
  10. data/app/models/sibu/page.rb +0 -1
  11. data/app/models/sibu/site.rb +7 -0
  12. data/app/models/sibu/site_template.rb +1 -1
  13. data/app/views/layouts/sibu/edit_content.html.erb +189 -117
  14. data/app/views/sibu/images/edit.js.erb +5 -3
  15. data/app/views/sibu/pages/_code_edit_panel.html.erb +2 -2
  16. data/app/views/sibu/pages/_link_edit_panel.html.erb +6 -6
  17. data/app/views/sibu/pages/_map_edit_panel.html.erb +2 -2
  18. data/app/views/sibu/pages/_media_edit_panel.html.erb +2 -2
  19. data/app/views/sibu/pages/_new_section_panel.html.erb +1 -1
  20. data/app/views/sibu/pages/_paragraph_edit_panel.html.erb +2 -2
  21. data/app/views/sibu/pages/_text_edit_panel.html.erb +2 -2
  22. data/app/views/sibu/pages/child_element.js.erb +2 -2
  23. data/app/views/sibu/pages/clone_element.js.erb +2 -2
  24. data/app/views/sibu/pages/create_section.js.erb +1 -1
  25. data/app/views/sibu/pages/delete_element.js.erb +1 -1
  26. data/app/views/sibu/pages/delete_section.js.erb +1 -1
  27. data/app/views/sibu/pages/edit_element.js.erb +68 -66
  28. data/app/views/sibu/pages/edit_section.js.erb +6 -5
  29. data/app/views/sibu/pages/index.html.erb +1 -1
  30. data/app/views/sibu/pages/new_section.js.erb +22 -13
  31. data/app/views/sibu/pages/update_element.js.erb +2 -2
  32. data/app/views/sibu/pages/update_section.js.erb +3 -3
  33. data/db/migrate/20200401130601_add_ref_to_site_templates.rb +5 -0
  34. data/lib/sibu/engine.rb +0 -2
  35. data/lib/sibu/version.rb +1 -1
  36. metadata +3 -18
  37. data/app/views/sibu/pages/destroy.html.erb +0 -2
  38. data/app/views/sibu/pages/update.html.erb +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed61a8ed060882bc3f4eaa48e90e2e91193e0af6
4
- data.tar.gz: ff7bcbcb03080feee6786bfafdc8c26dac35373f
3
+ metadata.gz: e6eb3cad54639de1385e45c0465b10aabeb58612
4
+ data.tar.gz: 456b3d03e871ddf4d74efec50ac7439361843591
5
5
  SHA512:
6
- metadata.gz: a9c9f0cc63ef7b0df355d5dc02f3be1031b91e8f929c36b8c41cbbe80e5b969456a8a6f4c8718fef02f04db0d89f429e65695adf2906563e904b4e0050c33a4d
7
- data.tar.gz: 9306934fc10e73c5f02960fe4d40bc0c2c9d148f542066dd27deff6e82ac54690dae7d051273056602c8f715076c7214d1a748d0d84d568a825f02314a10c8ec
6
+ metadata.gz: 6ac41267562d922d72f7b6d61fc70a9adf039b53b6f2b23fdb611e7630667545831a1fb7d337aa65fdde806d32612cc0f32261b8147d26332966f4e4d1749c19
7
+ data.tar.gz: c8bd6917787c516117e671d09ebe3a57c4fd402f28dfbe2b6065260cc57d54c561b0016b478e71ce33dd6bb56764a049bec7492e507a0debb2934407f03c9632
@@ -1,5 +1,3 @@
1
- //= require rails-ujs
2
- //= require jquery
3
1
  //= require sibu/common
4
2
  //= require ../quill/quill
5
3
  //= require ../tabs/van11y-accessible-tab-panel-aria
@@ -140,7 +138,7 @@ function displayCurrentCenter(img, centerPos) {
140
138
  }
141
139
 
142
140
  function refreshAfterEdit(reload, sectionId) {
143
- var baseUrl = window.location.href.split('?')[0];
141
+ var baseUrl = window.location.href.split('?')[0].replace(/#.+/, '');
144
142
  if (reload) {
145
143
  if (sectionId) {
146
144
  window.location.href = baseUrl + '?edit_section=' + sectionId;
@@ -152,6 +150,22 @@ function refreshAfterEdit(reload, sectionId) {
152
150
  }
153
151
  }
154
152
 
153
+ function setLinkMode(elt) {
154
+ var selected = elt.value,
155
+ enabledElts = document.querySelector("#link_" + selected).querySelectorAll("#element_value, #element_target");
156
+ for (var i = 0; i < enabledElts.length; i++) {
157
+ enabledElts[i].removeAttribute("disabled");
158
+ }
159
+
160
+ var linkModes = document.querySelectorAll(".sibu_edit_form .link_mode");
161
+ for (var j = 0; j < linkModes.length; j++) {
162
+ if(linkModes[j].getAttribute("id") !== ("link_" + selected)) {
163
+ linkModes[j].querySelector("#element_value").setAttribute("disabled", "disabled");
164
+ linkModes[j].querySelector("#element_target").setAttribute("disabled", "disabled");
165
+ }
166
+ }
167
+ }
168
+
155
169
  function initSectionsPanel() {
156
170
 
157
171
  }
@@ -160,9 +160,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
160
160
  * @param {Node} node Default document
161
161
  * @return {Array}
162
162
  */
163
+ // Note : patched to target only direct child nodes having .js-tabs class
163
164
  var $listTabs = function $listTabs() {
164
165
  var node = arguments.length <= 0 || arguments[0] === undefined ? doc : arguments[0];
165
- return [].slice.call(node.querySelectorAll('.' + TABS_JS));
166
+ return [].slice.call(node.querySelectorAll(':scope > .' + TABS_JS));
166
167
  };
167
168
 
168
169
  /**
@@ -178,10 +179,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
178
179
  var hx = tabs_node.hasAttribute(TABS_DATA_HX) === true ? tabs_node.getAttribute(TABS_DATA_HX) : '';
179
180
  var hxGeneratedClass = tabs_node.hasAttribute(TABS_DATA_GENERATED_HX_CLASS) === true ? tabs_node.getAttribute(TABS_DATA_GENERATED_HX_CLASS) : TABS_HX_DEFAULT_CLASS;
180
181
  var existingHx = tabs_node.hasAttribute(TABS_DATA_EXISTING_HX) === true ? tabs_node.getAttribute(TABS_DATA_EXISTING_HX) : '';
181
- var $tabList = [].slice.call(tabs_node.querySelectorAll('.' + TABS_JS_LIST));
182
- var $tabListItems = [].slice.call(tabs_node.querySelectorAll('.' + TABS_JS_LISTITEM));
183
- var $tabListLinks = [].slice.call(tabs_node.querySelectorAll('.' + TABS_JS_LISTLINK));
184
- var $tabListPanels = [].slice.call(tabs_node.querySelectorAll('.' + TABS_JS_CONTENT));
182
+ var $tabList = [].slice.call(tabs_node.querySelectorAll(':scope > .' + TABS_JS_LIST));
183
+ var $tabListItems = [].slice.call(tabs_node.querySelectorAll(':scope > .' + TABS_JS_LIST + ' > .' + TABS_JS_LISTITEM));
184
+ var $tabListLinks = [].slice.call(tabs_node.querySelectorAll(':scope > .' + TABS_JS_LIST + ' > .' + TABS_JS_LISTITEM + ' > .' + TABS_JS_LISTLINK));
185
+ var $tabListPanels = [].slice.call(tabs_node.querySelectorAll(':scope > .' + TABS_JS_CONTENT));
185
186
  var noTabSelected = true;
186
187
 
187
188
  // container
@@ -300,35 +301,91 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
300
301
  };
301
302
 
302
303
  /* listeners */
303
- var bindListeners = function() {
304
- ['click', 'keydown'].forEach(function (eventName) {
305
- //let isCtrl = false;
306
-
307
- doc.body.addEventListener(eventName, function (e) {
304
+ ['click', 'keydown'].forEach(function (eventName) {
305
+ //let isCtrl = false;
306
+
307
+ doc.body.addEventListener(eventName, function (e) {
308
+
309
+ // click on a tab link or on something IN a tab link
310
+ var parentLink = searchParent(e.target, TABS_JS_LISTLINK);
311
+ if ((hasClass(e.target, TABS_JS_LISTLINK) === true || parentLink !== '') && eventName === 'click') {
312
+ var linkSelected = hasClass(e.target, TABS_JS_LISTLINK) === true ? e.target : findById(parentLink);
313
+ var parentTabId = searchParent(e.target, TABS_JS);
314
+ var parentTab = findById(parentTabId);
315
+ //let $parentListItems = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTITEM));
316
+ var $parentListLinks = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTLINK));
317
+ var $parentListContents = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_CONTENT));
318
+
319
+ // aria selected false on all links
320
+ unSelectLinks($parentListLinks);
321
+ // add aria-hidden on all tabs contents
322
+ unSelectContents($parentListContents);
323
+ // add aria selected on selected link + show linked panel
324
+ selectLink(linkSelected);
325
+
326
+ e.preventDefault();
327
+ }
308
328
 
309
- // click on a tab link or on something IN a tab link
310
- var parentLink = searchParent(e.target, TABS_JS_LISTLINK);
311
- if ((hasClass(e.target, TABS_JS_LISTLINK) === true || parentLink !== '') && eventName === 'click') {
312
- var linkSelected = hasClass(e.target, TABS_JS_LISTLINK) === true ? e.target : findById(parentLink);
313
- var parentTabId = searchParent(e.target, TABS_JS);
314
- var parentTab = findById(parentTabId);
315
- //let $parentListItems = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTITEM));
316
- var $parentListLinks = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTLINK));
317
- var $parentListContents = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_CONTENT));
329
+ // Key down on tabs
330
+ if ((hasClass(e.target, TABS_JS_LISTLINK) === true || parentLink !== '') && eventName === 'keydown') {
331
+ //let linkSelected = hasClass( e.target, TABS_JS_LISTLINK) === true ? e.target : findById( parentLink );
332
+ var parentTabId = searchParent(e.target, TABS_JS);
333
+ var parentTab = findById(parentTabId);
334
+ var $parentListItems = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTITEM));
335
+ var $parentListLinks = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTLINK));
336
+ var $parentListContents = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_CONTENT));
337
+ var firstLink = $parentListItems[0].querySelector('.' + TABS_JS_LISTLINK);
338
+ var lastLink = $parentListItems[$parentListItems.length - 1].querySelector('.' + TABS_JS_LISTLINK);
339
+
340
+ // strike home on a tab => 1st tab
341
+ if (e.keyCode === 36) {
342
+ unSelectLinks($parentListLinks);
343
+ unSelectContents($parentListContents);
344
+ selectLink(firstLink);
318
345
 
319
- // aria selected false on all links
346
+ e.preventDefault();
347
+ }
348
+ // strike end on a tab => last tab
349
+ else if (e.keyCode === 35) {
320
350
  unSelectLinks($parentListLinks);
321
- // add aria-hidden on all tabs contents
322
351
  unSelectContents($parentListContents);
323
- // add aria selected on selected link + show linked panel
324
- selectLink(linkSelected);
352
+ selectLink(lastLink);
325
353
 
326
354
  e.preventDefault();
327
355
  }
356
+ // strike up or left on the tab => previous tab
357
+ else if ((e.keyCode === 37 || e.keyCode === 38) && !e.ctrlKey) {
358
+ if (firstLink.getAttribute(ATTR_SELECTED) === 'true') {
359
+ unSelectLinks($parentListLinks);
360
+ unSelectContents($parentListContents);
361
+ selectLink(lastLink);
362
+
363
+ e.preventDefault();
364
+ } else {
365
+ selectLinkInList($parentListItems, $parentListLinks, $parentListContents, 'prev');
366
+ e.preventDefault();
367
+ }
368
+ }
369
+ // strike down or right in the tab => next tab
370
+ else if ((e.keyCode === 40 || e.keyCode === 39) && !e.ctrlKey) {
371
+ if (lastLink.getAttribute(ATTR_SELECTED) === 'true') {
372
+ unSelectLinks($parentListLinks);
373
+ unSelectContents($parentListContents);
374
+ selectLink(firstLink);
375
+
376
+ e.preventDefault();
377
+ } else {
378
+ selectLinkInList($parentListItems, $parentListLinks, $parentListContents, 'next');
379
+ e.preventDefault();
380
+ }
381
+ }
382
+ }
328
383
 
329
- // Key down on tabs
330
- if ((hasClass(e.target, TABS_JS_LISTLINK) === true || parentLink !== '') && eventName === 'keydown') {
331
- //let linkSelected = hasClass( e.target, TABS_JS_LISTLINK) === true ? e.target : findById( parentLink );
384
+ // Key down in tab panels
385
+ var parentTabPanelId = searchParent(e.target, TABS_JS_CONTENT);
386
+ if (parentTabPanelId !== '' && eventName === 'keydown') {
387
+ (function () {
388
+ var linkSelected = findById(findById(parentTabPanelId).getAttribute(ATTR_LABELLEDBY));
332
389
  var parentTabId = searchParent(e.target, TABS_JS);
333
390
  var parentTab = findById(parentTabId);
334
391
  var $parentListItems = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTITEM));
@@ -337,130 +394,71 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
337
394
  var firstLink = $parentListItems[0].querySelector('.' + TABS_JS_LISTLINK);
338
395
  var lastLink = $parentListItems[$parentListItems.length - 1].querySelector('.' + TABS_JS_LISTLINK);
339
396
 
340
- // strike home on a tab => 1st tab
341
- if (e.keyCode === 36) {
342
- unSelectLinks($parentListLinks);
343
- unSelectContents($parentListContents);
344
- selectLink(firstLink);
345
-
397
+ // strike up + ctrl => go to header
398
+ if (e.keyCode === 38 && e.ctrlKey) {
399
+ setTimeout(function () {
400
+ linkSelected.focus();
401
+ }, 0);
346
402
  e.preventDefault();
347
403
  }
348
- // strike end on a tab => last tab
349
- else if (e.keyCode === 35) {
350
- unSelectLinks($parentListLinks);
351
- unSelectContents($parentListContents);
352
- selectLink(lastLink);
353
-
404
+ // strike pageup + ctrl => go to prev header
405
+ if (e.keyCode === 33 && e.ctrlKey) {
406
+ // go to header
407
+ linkSelected.focus();
354
408
  e.preventDefault();
355
- }
356
- // strike up or left on the tab => previous tab
357
- else if ((e.keyCode === 37 || e.keyCode === 38) && !e.ctrlKey) {
409
+ // then previous
358
410
  if (firstLink.getAttribute(ATTR_SELECTED) === 'true') {
359
411
  unSelectLinks($parentListLinks);
360
412
  unSelectContents($parentListContents);
361
413
  selectLink(lastLink);
362
-
363
- e.preventDefault();
364
414
  } else {
365
415
  selectLinkInList($parentListItems, $parentListLinks, $parentListContents, 'prev');
366
- e.preventDefault();
367
416
  }
368
417
  }
369
- // strike down or right in the tab => next tab
370
- else if ((e.keyCode === 40 || e.keyCode === 39) && !e.ctrlKey) {
418
+ // strike pagedown + ctrl => go to next header
419
+ if (e.keyCode === 34 && e.ctrlKey) {
420
+ // go to header
421
+ linkSelected.focus();
422
+ e.preventDefault();
423
+ // then next
371
424
  if (lastLink.getAttribute(ATTR_SELECTED) === 'true') {
372
425
  unSelectLinks($parentListLinks);
373
426
  unSelectContents($parentListContents);
374
427
  selectLink(firstLink);
375
-
376
- e.preventDefault();
377
428
  } else {
378
429
  selectLinkInList($parentListItems, $parentListLinks, $parentListContents, 'next');
379
- e.preventDefault();
380
430
  }
381
431
  }
382
- }
383
-
384
- // Key down in tab panels
385
- var parentTabPanelId = searchParent(e.target, TABS_JS_CONTENT);
386
- if (parentTabPanelId !== '' && eventName === 'keydown') {
387
- (function () {
388
- var linkSelected = findById(findById(parentTabPanelId).getAttribute(ATTR_LABELLEDBY));
389
- var parentTabId = searchParent(e.target, TABS_JS);
390
- var parentTab = findById(parentTabId);
391
- var $parentListItems = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTITEM));
392
- var $parentListLinks = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTLINK));
393
- var $parentListContents = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_CONTENT));
394
- var firstLink = $parentListItems[0].querySelector('.' + TABS_JS_LISTLINK);
395
- var lastLink = $parentListItems[$parentListItems.length - 1].querySelector('.' + TABS_JS_LISTLINK);
396
-
397
- // strike up + ctrl => go to header
398
- if (e.keyCode === 38 && e.ctrlKey) {
399
- setTimeout(function () {
400
- linkSelected.focus();
401
- }, 0);
402
- e.preventDefault();
403
- }
404
- // strike pageup + ctrl => go to prev header
405
- if (e.keyCode === 33 && e.ctrlKey) {
406
- // go to header
407
- linkSelected.focus();
408
- e.preventDefault();
409
- // then previous
410
- if (firstLink.getAttribute(ATTR_SELECTED) === 'true') {
411
- unSelectLinks($parentListLinks);
412
- unSelectContents($parentListContents);
413
- selectLink(lastLink);
414
- } else {
415
- selectLinkInList($parentListItems, $parentListLinks, $parentListContents, 'prev');
416
- }
417
- }
418
- // strike pagedown + ctrl => go to next header
419
- if (e.keyCode === 34 && e.ctrlKey) {
420
- // go to header
421
- linkSelected.focus();
422
- e.preventDefault();
423
- // then next
424
- if (lastLink.getAttribute(ATTR_SELECTED) === 'true') {
425
- unSelectLinks($parentListLinks);
426
- unSelectContents($parentListContents);
427
- selectLink(firstLink);
428
- } else {
429
- selectLinkInList($parentListItems, $parentListLinks, $parentListContents, 'next');
430
- }
431
- }
432
- })();
433
- }
434
-
435
- // click on a tab link
436
- var parentLinkToPanelId = searchParent(e.target, TABS_JS_LINK_TO_TAB);
437
- if ((hasClass(e.target, TABS_JS_LINK_TO_TAB) === true || parentLinkToPanelId !== '') && eventName === 'click') {
438
- var panelSelectedId = hasClass(e.target, TABS_JS_LINK_TO_TAB) === true ? e.target.getAttribute('href').replace('#', '') : findById(parentLinkToPanelId).replace('#', '');
439
- var panelSelected = findById(panelSelectedId);
440
- var buttonPanelSelected = findById(panelSelected.getAttribute(ATTR_LABELLEDBY));
441
- var parentTabId = searchParent(e.target, TABS_JS);
442
- var parentTab = findById(parentTabId);
443
- //let $parentListItems = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTITEM));
444
- var $parentListLinks = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTLINK));
445
- var $parentListContents = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_CONTENT));
446
-
447
- unSelectLinks($parentListLinks);
448
- unSelectContents($parentListContents);
449
- selectLink(buttonPanelSelected);
432
+ })();
433
+ }
450
434
 
451
- e.preventDefault();
452
- }
453
- }, true);
454
- });
455
- };
435
+ // click on a tab link
436
+ var parentLinkToPanelId = searchParent(e.target, TABS_JS_LINK_TO_TAB);
437
+ if ((hasClass(e.target, TABS_JS_LINK_TO_TAB) === true || parentLinkToPanelId !== '') && eventName === 'click') {
438
+ var panelSelectedId = hasClass(e.target, TABS_JS_LINK_TO_TAB) === true ? e.target.getAttribute('href').replace('#', '') : findById(parentLinkToPanelId).replace('#', '');
439
+ var panelSelected = findById(panelSelectedId);
440
+ var buttonPanelSelected = findById(panelSelected.getAttribute(ATTR_LABELLEDBY));
441
+ var parentTabId = searchParent(e.target, TABS_JS);
442
+ var parentTab = findById(parentTabId);
443
+ //let $parentListItems = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTITEM));
444
+ var $parentListLinks = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_LISTLINK));
445
+ var $parentListContents = [].slice.call(parentTab.querySelectorAll('.' + TABS_JS_CONTENT));
446
+
447
+ unSelectLinks($parentListLinks);
448
+ unSelectContents($parentListContents);
449
+ selectLink(buttonPanelSelected);
450
+
451
+ e.preventDefault();
452
+ }
453
+ }, true);
454
+ });
456
455
 
457
456
  var onLoad = function onLoad() {
458
457
  attach();
459
- bindListeners();
460
458
  document.removeEventListener('DOMContentLoaded', onLoad);
461
459
  };
462
460
 
463
461
  document.addEventListener('DOMContentLoaded', onLoad);
464
462
 
465
- window.van11yAccessibleTabPanelAria = attach;
463
+ window.sibuVan11yAccessibleTabPanelAria = attach;
466
464
  })(document);
@@ -238,101 +238,93 @@ $sibu-color3 : #333 !default;
238
238
  }
239
239
 
240
240
  #sections_panel {
241
- position: relative;
242
-
243
- &:before {
244
- box-shadow: 0 -15px 15px -15px inset;
245
- content: " ";
246
- width: 100%;
247
- left: 0;
248
- top: -15px;
249
- position: absolute;
250
- z-index: 0;
251
- height: 15px;
252
- opacity: 0.4;
253
- color: $sibu-color3;
254
- }
255
-
256
- .sibu_sections_tabs, .tabs {
257
- height: 100%;
258
- }
259
-
260
- .sibu_sections {
241
+ .sibu_site_content {
261
242
  padding: 2rem;
262
243
  max-height: 60vh;
263
244
  overflow-y: scroll;
264
245
 
265
- .tabs__list {
266
- margin: 0;
267
- padding: 0;
268
- display: table;
269
- width: 100%;
270
- }
271
- .tabs__item {
272
- display: table-cell;
273
- > a {
274
- text-decoration: none;
275
- }
276
- }
246
+ & > .sibu_sections_tabs {
247
+ height: 100%;
277
248
 
278
- .tabs__link {
279
- display: inline-block;
280
- cursor: pointer;
281
- margin-bottom: -2px;
282
- padding: 1rem 2.5rem;
283
- border-bottom: 4px solid transparent;
284
- color: $sibu-color1;
285
- text-decoration: none;
286
- border-radius: 0 0 0 0;
287
- transition: .25s;
288
- transition-property: color, border, background-color;
289
- font-size: 2rem;
290
- &:focus {
291
- border-bottom-color: $sibu-color2;
292
- color: $sibu-color2;
293
- outline: 0;
294
- }
295
- }
249
+ & > .tabs {
250
+ height: 100%;
296
251
 
297
- [aria-selected="true"].tabs__link {
298
- border-bottom-color: $sibu-color2;
299
- color: $sibu-color2;
300
- outline: 0;
301
- }
252
+ & > .tabs__list {
253
+ margin: 0;
254
+ padding: 0;
255
+ display: table;
256
+ width: 100%;
302
257
 
303
- .tabs__content {
304
- padding: 2rem 0;
305
- background-color: white;
306
- max-height: calc(100% - 40px);
307
- overflow-y: scroll;
258
+ .tabs__item {
259
+ display: table-cell;
308
260
 
309
- > * {
310
- padding: 4px 0;
311
- margin: 0 1rem 2rem 1rem;
312
- min-height: auto;
313
- box-shadow: 0 0 5px #cdcdcd;
261
+ > a {
262
+ text-decoration: none;
263
+ }
264
+ }
314
265
 
315
- &:hover {
316
- cursor: pointer;
317
- outline: dashed $sibu-color2 4px;
318
- outline-offset: -5px;
319
- }
266
+ .tabs__link {
267
+ display: inline-block;
268
+ cursor: pointer;
269
+ margin-bottom: -2px;
270
+ padding: 1rem 2.5rem;
271
+ border-bottom: 4px solid transparent;
272
+ color: $sibu-color1;
273
+ text-decoration: none;
274
+ border-radius: 0 0 0 0;
275
+ transition: .25s;
276
+ transition-property: color, border, background-color;
277
+ font-size: 2rem;
278
+
279
+ &:focus {
280
+ border-bottom-color: $sibu-color2;
281
+ color: $sibu-color2;
282
+ outline: 0;
283
+ }
284
+ }
320
285
 
321
- &.selected {
322
- outline: solid $sibu-color1 5px;
323
- outline-offset: -5px;
286
+ [aria-selected="true"].tabs__link {
287
+ border-bottom-color: $sibu-color2;
288
+ color: $sibu-color2;
289
+ outline: 0;
290
+ }
324
291
  }
325
292
 
326
- > * {
327
- margin-top: 0 !important;
328
- margin-bottom: 0 !important;
293
+ & > .tabs__content {
294
+ padding: 2rem 0;
295
+ background-color: white;
296
+ max-height: calc(100% - 40px);
297
+ overflow-y: scroll;
298
+
299
+ > * {
300
+ padding: 4px 0;
301
+ margin: 0 1rem 2rem 1rem;
302
+ min-height: auto;
303
+ box-shadow: 0 0 5px #cdcdcd;
304
+
305
+ &:hover {
306
+ cursor: pointer;
307
+ outline: dashed $sibu-color2 4px;
308
+ outline-offset: -5px;
309
+ }
310
+
311
+ &.selected {
312
+ outline: solid $sibu-color1 5px;
313
+ outline-offset: -5px;
314
+ }
315
+
316
+ > * {
317
+ margin-top: 0 !important;
318
+ margin-bottom: 0 !important;
319
+ }
320
+ }
321
+
322
+ &[aria-hidden="true"] {
323
+ display: none;
324
+ }
329
325
  }
330
326
  }
331
327
  }
332
-
333
- [aria-hidden="true"].tabs__content {
334
- display: none;
335
- }
336
328
  }
337
329
 
338
330
  .sibu_actions {