From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001
From: ruki <waruqi@gmail.com>
Date: Thu, 8 Nov 2018 00:38:48 +0800
Subject: switch to vuepress

---
 .../vuepress/lib/default-theme/NavLink.vue         | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 node_modules/vuepress/lib/default-theme/NavLink.vue

(limited to 'node_modules/vuepress/lib/default-theme/NavLink.vue')

diff --git a/node_modules/vuepress/lib/default-theme/NavLink.vue b/node_modules/vuepress/lib/default-theme/NavLink.vue
new file mode 100644
index 00000000..d9fa4886
--- /dev/null
+++ b/node_modules/vuepress/lib/default-theme/NavLink.vue
@@ -0,0 +1,49 @@
+<template>
+  <router-link
+    class="nav-link"
+    :to="link"
+    v-if="!isExternal(link)"
+    :exact="exact"
+  >{{ item.text }}</router-link>
+  <a
+    v-else
+    :href="link"
+    class="nav-link external"
+    :target="isMailto(link) || isTel(link) ? null : '_blank'"
+    :rel="isMailto(link) || isTel(link) ? null : 'noopener noreferrer'"
+  >
+    {{ item.text }}
+    <OutboundLink/>
+  </a>
+</template>
+
+<script>
+import { isExternal, isMailto, isTel, ensureExt } from './util'
+
+export default {
+  props: {
+    item: {
+      required: true
+    }
+  },
+
+  computed: {
+    link () {
+      return ensureExt(this.item.link)
+    },
+
+    exact () {
+      if (this.$site.locales) {
+        return Object.keys(this.$site.locales).some(rootLink => rootLink === this.link)
+      }
+      return this.link === '/'
+    }
+  },
+
+  methods: {
+    isExternal,
+    isMailto,
+    isTel
+  }
+}
+</script>
-- 
cgit v1.2.3

