From 9e2e292c2c75e2f98f34d9ab377ff33b1ae2b8b3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 11 Apr 2018 15:00:55 +0200 Subject: [PATCH] external icon --- _src/_assets/images/icon-arrowout.svg | 6 ++++++ _src/_assets/styles/bigchain/_icons.scss | 4 ++++ _src/_assets/styles/bigchain/_typography.scss | 18 ++++++++++++++++++ _src/_data/menus.yml | 1 + _src/_includes/menu-main.html | 4 +++- 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 _src/_assets/images/icon-arrowout.svg diff --git a/_src/_assets/images/icon-arrowout.svg b/_src/_assets/images/icon-arrowout.svg new file mode 100644 index 0000000..14f6a5a --- /dev/null +++ b/_src/_assets/images/icon-arrowout.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/_src/_assets/styles/bigchain/_icons.scss b/_src/_assets/styles/bigchain/_icons.scss index 5d4bce3..e86e13b 100644 --- a/_src/_assets/styles/bigchain/_icons.scss +++ b/_src/_assets/styles/bigchain/_icons.scss @@ -39,3 +39,7 @@ stroke-width: 2px; stroke: currentColor; } + +.icon--external { + stroke: currentColor; +} diff --git a/_src/_assets/styles/bigchain/_typography.scss b/_src/_assets/styles/bigchain/_typography.scss index a43adfa..f64a2ef 100644 --- a/_src/_assets/styles/bigchain/_typography.scss +++ b/_src/_assets/styles/bigchain/_typography.scss @@ -90,6 +90,24 @@ a { } } +// External links +.dropdown, +.content--page { + [rel='external'], + [target='_blank'] { + &:after { + content: ''; + display: inline-block; + width: 9px; + height: 8px; + background: url('../img/icon-arrowout.svg') no-repeat center center; + background-size: contain; + transition: .15s ease-out; + margin-left: $spacer / 6; + } + } +} + // // Headings diff --git a/_src/_data/menus.yml b/_src/_data/menus.yml index 6c5a8b3..f0b1c74 100644 --- a/_src/_data/menus.yml +++ b/_src/_data/menus.yml @@ -11,6 +11,7 @@ main: url: /developers/guide/ - title: Docs url: https://docs.bigchaindb.com/ + external: true - title: Services url: /services/ diff --git a/_src/_includes/menu-main.html b/_src/_includes/menu-main.html index 7e43730..f335d8f 100644 --- a/_src/_includes/menu-main.html +++ b/_src/_includes/menu-main.html @@ -41,7 +41,9 @@ {% if page.url contains item.url %} {% assign active = 'active' %} {% endif %} - {{ item.title }} + + {{ item.title }} + {% endfor %}