Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/hossainemruz/toha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommy Chu <tommychu2256@gmail.com>2021-04-05 19:25:27 +0300
committerGitHub <noreply@github.com>2021-04-05 19:25:27 +0300
commitd6706e05ee8240d2e3d657b58e5c77c253823184 (patch)
treed0dc5f7ef5c77161353b23e12b88d90e409fe588 /layouts/partials/cards/skill.html
parentcb3df73d53171379304ef4b0ac0b55097847eb34 (diff)
Fix redirections to empty tabs (#290)
Whenever href (url) attribute was omitted or had no value the click action would do nothing. With no URLs defined and `target="_blank"` attributes, which were recently added, anchor tags now redirect users to new blank tabs (side effect). This PR solves the issues by adding conditions before applying `target="_blank"` or in some cases by ommiting entire entities (e.g. the view_certificate button).
Diffstat (limited to 'layouts/partials/cards/skill.html')
-rw-r--r--layouts/partials/cards/skill.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/cards/skill.html b/layouts/partials/cards/skill.html
index 1056f4a..0dc873a 100644
--- a/layouts/partials/cards/skill.html
+++ b/layouts/partials/cards/skill.html
@@ -1,5 +1,5 @@
<div class="col-xs-12 col-sm-6 col-lg-4 pt-2">
- <a class="skill-card-link" href="{{ if .url }}{{ .url }}{{ else }}javascript:void(0){{ end }}" target="_blank">
+ <a class="skill-card-link" href="{{ if .url }}{{ .url }}{{ else }}javascript:void(0){{ end }}" {{ if .url }}target="_blank"{{ end }}>
<div class="card">
<div class="card-head d-flex">
{{ if .logo }}