Skip to content

Commit

Permalink
Improve conditionals in template to support an empty cell2 (#601)
Browse files Browse the repository at this point in the history
* Improve conditionals in template to support an empty cell2
* Update tugboat builds.
  • Loading branch information
sherakama authored Jan 9, 2020
1 parent 7fee3c4 commit 9171104
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 41 deletions.
77 changes: 38 additions & 39 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
@@ -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/
6 changes: 4 additions & 2 deletions core/src/templates/components/lockup/lockup.twig
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
</div>

{#- Cell container #2 -#}
{% block cell2 %}
{% if line1 is not empty or line2 is not empty or line3 is not empty %}
<div class="su-lockup__cell2">
{% block cell2 %}
{% if line1 is not empty %}
<span class="su-lockup__line1" {{ region_attributes.line1 }}>{{ line1 }}</span>
{% endif %}
Expand All @@ -72,8 +73,9 @@
{% if line3 is not empty %}
<span class="su-lockup__line3" {{ region_attributes.line3 }}>{{ line3 }}</span>
{% endif %}
{% endblock %}
</div>
{% endif %}
{% endblock %}

{#- Line 5 of Site Name - Optional -#}
{% if line5 is not empty %}
Expand Down

0 comments on commit 9171104

Please sign in to comment.