diff --git a/.gitignore b/.gitignore index 57872d0..e9f3210 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ /vendor/ +/node_modules/ +package-lock.json +composer.lock +npm-debug.log +css/style.css.map \ No newline at end of file diff --git a/README.md b/README.md index e1e09a3..48e319c 100644 --- a/README.md +++ b/README.md @@ -1 +1,42 @@ -# funkywave_theme +# Funkywave theme + +Drupal 8 theme with Sass and Gulp task runner. + +## Development setup + +Requirements: +- [Node.js](https://nodejs.org/en/): `>= 8` +- Gulp + +#### How to install node.js? + +To find out if node is allready installed, open a terminal window and type: +``` +node -v +``` +If you see a see a version >=8, you are ok. If not install or update your node. The following article is helpfull. +https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04 + +#### Install gulp globally + +``` +sudo npm install -g gulp +``` + +#### Install the node dependencies: +Make sure you are in the theme folder before you enter the following command +All packages in package.json will be installed. + +``` +$ npm install +``` + +#### Start watching your Sass and JS files: + +``` +$ gulp +``` + +Watch your terminal to see what happens if you change sass and js files. + +# funkywave_theme \ No newline at end of file diff --git a/composer.json b/composer.json index 4c3364a..2f56445 100644 --- a/composer.json +++ b/composer.json @@ -7,5 +7,8 @@ "email": "peter.neyens@telenet.be" } ], - "require": {} + "require": { + "drupal/group": "^1.0", + "drupal/components": "^1.0" + } } diff --git a/css/autocomplete.css b/css/autocomplete.css new file mode 100644 index 0000000..b7f0b95 --- /dev/null +++ b/css/autocomplete.css @@ -0,0 +1,12 @@ +/** + * @file + * Table drag behavior. + * + * @see tabledrag.js + */ +.field-multiple-drag, +.tabledrag-hide, +.tabledrag-toggle-weight-wrapper, +a.tabledrag-handle .handle { + display: none; +} diff --git a/css/override.css b/css/override.css new file mode 100644 index 0000000..87040af --- /dev/null +++ b/css/override.css @@ -0,0 +1,297 @@ +/** + * @file + * Seven styles for Tables. + */ + +table { + width: 100%; + margin: 0 0 10px; +} + +/* custom */ + +table h4 { + margin: 0; + padding: 0; +} + +button.link { + background: transparent; + border: 0; + cursor: pointer; + margin: 0; + margin-bottom: 0px; + padding: 0; + font-size: 1em; +} + +caption { + text-align: left; /* LTR */ +} +[dir="rtl"] caption { + text-align: right; +} +th { + text-align: left; /* LTR */ + padding: 10px 12px; +} +[dir="rtl"] th { + text-align: right; +} +thead th { + background: #26252B; + border: solid #bfbfba; + border-width: 1px 0; + color: #ffffff; + text-transform: uppercase; +} + +fieldset thead th { + background: none; + color: #333333; +} + +tr { + border-bottom: 1px solid #e6e4df; + padding: 0.1em 0.6em; +} +thead > tr { + border-bottom: 1px solid #000; +} +tbody tr:hover, +tbody tr:focus { + background: #f7fcff; +} +/* See colors.css */ +tbody tr.color-warning:hover, +tbody tr.color-warning:focus { + background: #fdf8ed; +} +tbody tr.color-error:hover, +tbody tr.color-error:focus { + background: #fcf4f2; +} + +table.no-highlight tr.selected td { + background: transparent; +} + +td, +th { + vertical-align: middle; +} +td { + padding: 10px 12px; + text-align: left; /* LTR */ +} +[dir="rtl"] td { + text-align: right; +} +th > a { + position: relative; + display: block; +} + +/* 1. Must match negative bottom padding of the parent
+ {% if event_end_date is null %} + + {% else %} + {# same month same year #} + {% if (event_start_date_month == event_end_date_month) and (event_start_date_year == event_end_date_year) %} + + - + + {# different month same year #} + {% elseif (event_start_date_month != event_end_date_month) and (event_start_date_year == event_end_date_year) %} + + - + + {# different year for event start date & end date #} + {% elseif (event_start_date_year != event_end_date_year) %} + + - + + {% endif %} + {% endif %} +
+ {% endif %} + + {% if content.field_ngf_address['#items'] is not empty %} +{{ content.field_ngf_introtext|field_value }}
+ {% endif %} + {% endblock eventintrotext %} + + {# Show more button (will only be printed in teaser view mode) #} + {% if content.show_more %} + {% include "@patterns/button/pattern-button.html.twig" + with { + url: path('entity.group.canonical', {'group': content.show_more['#url'].routeParameters.group }), + label: content.show_more['#title'], + container_class: 'btn-list btn-list--right', + button_class: 'btn--green', + } + %} + {% endif %} + + {# Event Description #} + {% block eventdescritption %} + {% if content.field_ngf_description is not empty %} + {{ content.field_ngf_description }} + {% endif %} + {% endblock eventdescritption %} + + {# Event speakers #} + {% block eventspeakers %} + {# todo needs development #} + {% endblock eventspeakers %} + + {# Event register #} + {% block eventregister %} + {% set event_registration_url = content.field_ngf_registration_link|field_raw('uri') %} + {% set event_registration_title = content.field_ngf_registration_link|field_raw('title') %} + {% if event_registration_url is not empty %} + {% include "@patterns/button/pattern-button.html.twig" + with{ + url: event_registration_url, + label: event_registration_title, + container_class: 'btn-list--center extra-space--top', + button_class: 'btn--blue btn--large', + } + %} + {% endif %} + {% endblock eventregister %} + + {% block related_topics %} + + {# TODO + + {% include "@patterns/list/pattern-list.html.twig" + with { + items: content.field_ngf_interests['#items'], + css_class: sub-section sub-section--related-taxonomy, + label: content.field_ngf_interests['#title'], + list_class: list list--taxonomy, + item_class: list__item list__item--tag, + link_class: tag tag__link, + url: '', + title: '', + } + %} + #} + + {% set label = content.field_ngf_interests['#title'] %} + {% set items = content.field_ngf_interests['#items'] %} + {% set css_class = 'sub-section sub-section--related-taxonomy' %} + + {% if items is not empty %} ++ {% if content.field_ngf_copyrights|render is not empty %} + {{ content.field_ngf_copyrights|field_value }} + {% endif %} + {% if content.field_ngf_author|render is not empty %} + {{ content.field_ngf_author|field_value }} + {% endif %} +
+ {% endif %} +{{ content.field_ngf_introtext|field_value }}
+ {% endif %} + {% endblock introtext %} + + {% block show_more %} + {# Show more button (will only be printed in teaser view mode) #} + {% if content.show_more %} + {% include "@patterns/button/pattern-button.html.twig" + with { + url: path('entity.node.canonical', {'node': content.show_more['#url'].routeParameters.node }), + label: content.show_more['#title'], + container_class: 'btn-list btn-list--right', + button_class: 'btn--green', + } + %} + {% endif %} + {% endblock show_more %} + + {# Show description (paragraphs) #} + {{ content.field_ngf_description }} + + {% if view_mode == "full" %} + + {% endif %} + + {% block related_topics %} + + {# TODO + + {% include "@patterns/list/pattern-list.html.twig" + with { + items: content.field_ngf_interests['#items'], + css_class: sub-section sub-section--related-taxonomy, + label: content.field_ngf_interests['#title'], + list_class: list list--taxonomy, + item_class: list__item list__item--tag, + link_class: tag tag__link, + url: '', + title: '', + } + %} + #} + + {{ content.field_ngf_interests }} + + {% endblock related_topics %} + + {# Call view related content #} + {% block related_content %} + {# to avoid endless loop #} + {% if view_mode == "full" %} + {# checks if the view returns a result, it needs a wrapper. needs improvement #} + {% if drupal_view_result('ngf_discussion_related_content', 'block') %} + + {% endif %} + {% endif %} + {% endblock related_content %} + + + {# Comments #} + {{ content.field_comments }} + + +