Browse Source

put gallery under facilities tabs

master
Keith 3 years ago
parent
commit
9e86cdb62d
  1. 10636
      user/themes/goku/css-compiled/goku.css
  2. 1
      user/themes/goku/css-compiled/goku.css.map
  3. 17
      user/themes/goku/resources/js/tabs.js
  4. 2
      user/themes/goku/resources/sass/_bulma-modules.scss
  5. 10
      user/themes/goku/resources/sass/_custom.scss
  6. 24
      user/themes/goku/resources/sass/_variables.sass
  7. 58
      user/themes/goku/templates/modular/facilities.html.twig
  8. 1
      user/themes/goku/templates/partials/base.html.twig

10636
user/themes/goku/css-compiled/goku.css

File diff suppressed because it is too large Load Diff

1
user/themes/goku/css-compiled/goku.css.map

File diff suppressed because one or more lines are too long

17
user/themes/goku/resources/js/tabs.js

@ -0,0 +1,17 @@
$(document).ready(function() {
$('.tabs').each(function(index) {
var $tabParent = $(this);
var $tabs = $tabParent.find('li');
var $contents = $tabParent.next('.tabs-content').find('.tab-content');
$tabs.click(function() {
var curIndex = $(this).index();
// toggle tabs
$tabs.removeClass('is-active');
$tabs.eq(curIndex).addClass('is-active');
// toggle contents
$contents.removeClass('is-active');
$contents.eq(curIndex).addClass('is-active');
});
});
});

2
user/themes/goku/resources/sass/_bulma-modules.scss

@ -54,7 +54,7 @@
@import "../../../../../node_modules/bulma/sass/components/navbar.sass";
/* @import "../../../../../node_modules/bulma/sass/components/pagination.sass"; */
/* @import "../../../../../node_modules/bulma/sass/components/panel.sass"; */
/* @import "../../../../../node_modules/bulma/sass/components/tabs.sass"; */
@import "../../../../../node_modules/bulma/sass/components/tabs.sass";
// Grid
/* @import "../../../../../node_modules/bulma/sass/grid/_all.sass"; */

10
user/themes/goku/resources/sass/_custom.scss

@ -110,3 +110,13 @@ table th {
.collapse {
display: none;
}
.tab-content {
display: none;
&.is-active {
display: block;
}
}
.tabs ul {
margin-left: 0
}

24
user/themes/goku/resources/sass/_variables.sass

@ -1,5 +1,5 @@
// Fonts
@import url('https://fonts.googleapis.com/css?family=Amatic+SC|Marcellus|Marcellus+SC|Source+Code+Pro|Rancho&display=swap');
@import url('https://fonts.googleapis.com/css?family=Amatic+SC|Marcellus|Marcellus+SC|Source+Code+Pro|Rancho&display=swap')
// Set your brand colors
$grey-dark: hsl(0, 0%, 29%) !default
$black-ter: hsl(0, 0%, 14%) !default
@ -7,12 +7,12 @@ $black-ter: hsl(0, 0%, 14%) !default
// Update some of Bulma's component variables
$family-primary: "Marcellus", sans-serif;
$family-secondary: "Rancho", cursive;
$family-monospace: "Source Code Pro", monospace;
$family-primary: "Marcellus", sans-serif
$family-secondary: "Rancho", cursive
$family-monospace: "Source Code Pro", monospace
$navbar-height: 4rem;
$navbar-item-img-max-height: 3.5rem;
$navbar-height: 4rem
$navbar-item-img-max-height: 3.5rem
//$navbar-padding-horizontal: 8rem;
//$navbar-background-color: $grey-dark;
//$navbar-item-color: white;
@ -20,10 +20,10 @@ $navbar-item-img-max-height: 3.5rem;
//$navbar-item-hover-color: white;
//$navbar-item-active-color: $black-ter;
//$navbar-item-active-background-color: white;
$navbar-tab-active-border-bottom-color: white;
$navbar-tab-active-border-bottom-width: 8px;
$navbar-tab-active-border-bottom-style: double;
$navbar-tab-active-border-bottom-color: white
$navbar-tab-active-border-bottom-width: 8px
$navbar-tab-active-border-bottom-style: double
$footer-background-color: $grey-dark;
$footer-color: white;
$footer-padding: 1rem 2rem 2rem;
$footer-background-color: $grey-dark
$footer-color: white
$footer-padding: 1rem 2rem 2rem

58
user/themes/goku/templates/modular/facilities.html.twig

@ -1,28 +1,30 @@
{{ page.content }}
{# <br>
{% set facilities = page.header.facilities %}
<table class="table">
<thead>
<tr>
<th>The Glade</th>
<th>The Camping Meadow</th>
</tr>
</thead>
<tr>
<td>{{ facilities.glade.toilet }}</td>
<td>{{ facilities.meadow.toilet }}</td>
</tr>
<tr>
<td>{{ facilities.glade.oven }}</td>
<td>-</td>
</tr>
<tr>
<td>{{ facilities.glade.shelter }}</td>
<td>-</td>
</tr>
<tr>
<td>{{ facilities.glade.fire }}</td>
<td>{{ facilities.meadow.fire }}</td>
</tr>
</table>#}
<div class="tabs">
<ul>
<li class="is-active is-family-secondary is-size-4"><a>Wagon #1</a></li>
<li class="is-family-secondary is-size-4"><a>Wagon #2</a></li>
</ul>
</div>
<div class="tabs-content">
<div class="tab-content is-active">
<div class="modular-row gallery-container is-hidden-touch {{ page.header.class }}">
{% set my_images = page.children.nth(0).media.images %}
{{ unite_gallery(my_images, '{"gallery_theme":"tiles", "tiles_type":"justified", "tile_enable_textpanel":"true","tile_textpanel_source":"desc"}', 'gallery3') }}
</div>
<div class="modular-row gallery-container is-hidden-desktop {{ page.header.class }}">
{{ unite_gallery(my_images, '{"gallery_theme":"slider", "gallery_autoplay":"false"}', 'gallery4') }}
</div>
{{ page.content|split('</h2>')[1]|default|raw|split('<h2>')[0] }}
</div>
<div class="tab-content">
<div class="modular-row gallery-container is-hidden-touch {{ page.header.class }}">
{% set my_images = page.children.nth(1).media.images %}
{{ unite_gallery(my_images, '{"gallery_theme":"tiles", "tiles_type":"justified", "tile_enable_textpanel":"true","tile_textpanel_source":"desc"}', 'gallery5') }}
</div>
<div class="modular-row gallery-container is-hidden-desktop {{ page.header.class }}">
{{ unite_gallery(my_images, '{"gallery_theme":"slider", "gallery_autoplay":"false"}', 'gallery6') }}
</div>
{{ page.content|split('</h2>')[2]|default|raw|split('<h2>')[0] }}
</div>
</div>

1
user/themes/goku/templates/partials/base.html.twig

@ -14,6 +14,7 @@
{% do assets.addJs('jquery', 100) %}
{% do assets.addJs('https://widget.freetobook.com/widget.js', 100) %}
{% do assets.addJs('theme://resources/js/main.js', {group:'bottom'}) %}
{% do assets.addJs('theme://resources/js/tabs.js', {group:'bottom'}) %}
{% endblock javascripts %}
{% block assets deferred %}

Loading…
Cancel
Save