From b8b0cab90517169e9ba28239becba7e7950c53ed Mon Sep 17 00:00:00 2001 From: Hannah Henderson Date: Tue, 27 Nov 2018 11:04:01 +0100 Subject: [PATCH] Add new-window accessibility icon For when tabs open in a new window --- data/webpack_assets.json | 2 +- layouts/partials/new-window-icon.html | 7 +++++ layouts/partials/social-follow.html | 31 +++++++++++++------ layouts/partials/svg/new-window.svg | 3 ++ src/css/_social-icons.css | 10 ++++++ ... app.955516233bcafa4d2a1c13cea63c7b50.css} | 10 ++++++ 6 files changed, 53 insertions(+), 10 deletions(-) create mode 100644 layouts/partials/new-window-icon.html create mode 100644 layouts/partials/svg/new-window.svg rename static/dist/css/{app.ae770804a077276f2ef3c76521c57fda.css => app.955516233bcafa4d2a1c13cea63c7b50.css} (99%) diff --git a/data/webpack_assets.json b/data/webpack_assets.json index a96a3de4d..253d14fb4 100644 --- a/data/webpack_assets.json +++ b/data/webpack_assets.json @@ -1,6 +1,6 @@ { "app": { "js": "js/app.3fc0f988d21662902933.js", - "css": "css/app.ae770804a077276f2ef3c76521c57fda.css" + "css": "css/app.955516233bcafa4d2a1c13cea63c7b50.css" } } \ No newline at end of file diff --git a/layouts/partials/new-window-icon.html b/layouts/partials/new-window-icon.html new file mode 100644 index 000000000..48b64a619 --- /dev/null +++ b/layouts/partials/new-window-icon.html @@ -0,0 +1,7 @@ + + + + + +{{ $new_window_icon_size := "8px" }} +{{ partial "svg/new-window.svg" (dict "size" $new_window_icon_size) }} \ No newline at end of file diff --git a/layouts/partials/social-follow.html b/layouts/partials/social-follow.html index 962049733..f087fa7b0 100644 --- a/layouts/partials/social-follow.html +++ b/layouts/partials/social-follow.html @@ -1,42 +1,55 @@ + {{ $icon_size := "32px" }} {{ with .Param "facebook" }} - + {{ partial "svg/facebook.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} {{ end }} {{ with .Param "twitter" }} - + {{ partial "svg/twitter.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} {{ end }} {{ with .Param "instagram" }} - + {{ partial "svg/instagram.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} {{ end }} {{ with .Param "youtube" }} - + {{ partial "svg/youtube.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} {{ end }} {{ with .Param "linkedin" }} - + {{ partial "svg/linkedin.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} {{ end }} {{ with .Param "github" }} - + {{ partial "svg/github.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} {{ end }} {{ with .Param "gitlab" }} - + {{ partial "svg/gitlab.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} {{ end }} {{ with .Param "medium" }} - + {{ partial "svg/medium.svg" (dict "size" $icon_size) }} + {{- partial "new-window-icon.html" . -}} -{{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/svg/new-window.svg b/layouts/partials/svg/new-window.svg new file mode 100644 index 000000000..ba148ad7a --- /dev/null +++ b/layouts/partials/svg/new-window.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/css/_social-icons.css b/src/css/_social-icons.css index f60875518..dcd299ee8 100644 --- a/src/css/_social-icons.css +++ b/src/css/_social-icons.css @@ -1,6 +1,16 @@ .facebook, .twitter, .instagram, .youtube, .github, .gitlab, .linkedin, .medium { fill: #BABABA; } + +.new-window { + opacity: 0; + display: inline-block; + vertical-align: top; +} +.link-transition:hover .new-window{ + opacity: 1; +} + .facebook:hover { fill: #3b5998; } diff --git a/static/dist/css/app.ae770804a077276f2ef3c76521c57fda.css b/static/dist/css/app.955516233bcafa4d2a1c13cea63c7b50.css similarity index 99% rename from static/dist/css/app.ae770804a077276f2ef3c76521c57fda.css rename to static/dist/css/app.955516233bcafa4d2a1c13cea63c7b50.css index 22a1ee568..be3f14968 100644 --- a/static/dist/css/app.ae770804a077276f2ef3c76521c57fda.css +++ b/static/dist/css/app.955516233bcafa4d2a1c13cea63c7b50.css @@ -5898,6 +5898,16 @@ pre { fill: #BABABA; } +.new-window { + opacity: 0; + display: inline-block; + vertical-align: top; +} + +.link-transition:hover .new-window{ + opacity: 1; +} + .facebook:hover { fill: #3b5998; }