From 6b9fb142930bcb21d9ded497dff8eba56085d638 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 5 Oct 2022 11:25:22 +0200 Subject: [PATCH] refactor: global link style --- src/App.vue | 31 +++++++++++++++++++++++++++++++ src/components/Timeline.vue | 18 ------------------ 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/App.vue b/src/App.vue index 108b616..851a012 100644 --- a/src/App.vue +++ b/src/App.vue @@ -42,4 +42,35 @@ export default class App extends Vue { background: #fff; } + + a { + display: inline-block; + position: relative; + color: #fff; + + cursor: pointer; + + &:visited { + color: #fefefa; + } + + &:after { + content: ''; + + display: block; + position: absolute; + margin-left: 5%; + width: 90%; + height: .15rem; + + background: #3333be; + + transition: width .2s ease-in-out, margin-left .2s ease-in-out; + } + + &:hover:after { + margin-left: 0; + width: 100%; + } + } diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index a7bc05d..92dd003 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -333,24 +333,6 @@ .src, .doc { color: #999999; - a { - display: inline-block; - position: relative; - color: #fff; - - &:after { - content: ''; - - display: block; - position: absolute; - margin-left: 0; - width: 100%; - height: .15rem; - - background: #3333be; - } - } - span { margin-left: .5em; color: #4d4d4d;