From 91711048e330616ffe96a1e2e9053a00a93b03f1 Mon Sep 17 00:00:00 2001 From: Sherakama Date: Thu, 9 Jan 2020 12:57:22 -0800 Subject: [PATCH] Improve conditionals in template to support an empty cell2 (#601) * Improve conditionals in template to support an empty cell2 * Update tugboat builds. --- .tugboat/config.yml | 77 +++++++++---------- .../templates/components/lockup/lockup.twig | 6 +- 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/.tugboat/config.yml b/.tugboat/config.yml index be0128f5e..97b6817fa 100644 --- a/.tugboat/config.yml +++ b/.tugboat/config.yml @@ -1,59 +1,58 @@ services: - apache: - image: tugboatqa/httpd + node: + image: tugboatqa/node + expose: 3000 + checkout: false commands: # Used in the base image as setup. init: + - mkdir -p /etc/service/node - | + sudo apt-get install g++ build-essential + git clone https://github.com/su-sws/decanter-web.git styleguide curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" nvm install 11.14.0 + cd styleguide nvm use npm install - npm run build - npm run styleguide - - rm -R node_modules - - ln -snf "${TUGBOAT_ROOT}/styleguide" "${DOCROOT}" + # Used in each of the preview builds. build: - | NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + cd styleguide nvm use - npm install - npm run build - npm run styleguide - - rm -R node_modules + npm install "https://github.com/su-sws/decanter.git#${TUGBOAT_GITHUB_HEAD}" --save --force + npm audit fix + npm run export + - echo "#!/bin/sh" > /etc/service/node/run + - echo "npm run start --prefix ${TUGBOAT_ROOT}/styleguide" >> /etc/service/node/run + - chmod +x /etc/service/node/run + # Collection of urls to compare visual results. visualdiffs: - / - # Core - - /item-core-colors.html - - /item-core-flexgrid.html - - /item-core-fonts.html - - /item-core-helpers-aspect-ratio.html - # Elements - - /item-elements-embedcontainer.html - - /item-elements-image.html - - /item-elements-list.html - - /item-elements-typography.html - # Components - - /item-components-alert.html - - /item-components-brand-bar.html - - /item-components-button.html - - /item-components-card.html - - /item-components-cta.html - - /item-components-date-stacked.html - - /item-components-global-footer.html - - /item-components-hero.html - - /item-components-link.html - - /item-components-local-footer.html - - /item-components-lockup.html - - /item-components-logo.html - - /item-components-main-navigation.html - - /item-components-masthead.html - - /item-components-quote.html - - /item-components-signup-form.html - - /item-components-site-search.html - - /item-components-skiplinks.html + - /component/composite-card/ + - /component/composite-hero/ + - /component/composite-main-navigation/ + - /component/composite-secondary-navigation/ + - /component/composite-signup-form/ + - /component/identity-brand-bar/ + - /component/identity-global-footer/ + - /component/identity-local-footer/ + - /component/identity-lockup/ + - /component/identity-logo/ + - /component/identity-masthead/ + - /component/simple-alert/ + - /component/simple-button/ + - /component/simple-cta/ + - /component/simple-date-stacked/ + - /component/simple-link/ + - /component/simple-media/ + - /component/simple-nav-toggle/ + - /component/simple-quote/ + - /component/simple-site-search/ + - /component/simple-skiplinks/ diff --git a/core/src/templates/components/lockup/lockup.twig b/core/src/templates/components/lockup/lockup.twig index b6cae6235..7c03f808d 100644 --- a/core/src/templates/components/lockup/lockup.twig +++ b/core/src/templates/components/lockup/lockup.twig @@ -59,8 +59,9 @@ {#- Cell container #2 -#} + {% block cell2 %} + {% if line1 is not empty or line2 is not empty or line3 is not empty %}
- {% block cell2 %} {% if line1 is not empty %} {{ line1 }} {% endif %} @@ -72,8 +73,9 @@ {% if line3 is not empty %} {{ line3 }} {% endif %} - {% endblock %}
+ {% endif %} + {% endblock %} {#- Line 5 of Site Name - Optional -#} {% if line5 is not empty %}