]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
docs: add missing sponsors
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 6 Nov 2020 17:54:23 +0000 (18:54 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 6 Nov 2020 17:54:23 +0000 (18:54 +0100)
docs/.vitepress/components/HomeSponsors.vue [new file with mode: 0644]
docs/.vitepress/components/sponsors.json [new file with mode: 0644]

diff --git a/docs/.vitepress/components/HomeSponsors.vue b/docs/.vitepress/components/HomeSponsors.vue
new file mode 100644 (file)
index 0000000..eb8a7b3
--- /dev/null
@@ -0,0 +1,108 @@
+<template>
+  <div id="sponsors">
+    <div class="inner">
+      <template v-if="sponsors.platinum">
+        <h3>Platinum Sponsors</h3>
+
+        <a
+          v-for="sponsor in sponsors.platinum"
+          :key="sponsor.href"
+          :href="sponsor.href"
+          target="_blank"
+          rel="sponsored noopener"
+          style="width: 160px"
+        >
+          <img :src="sponsor.imgSrc" style="width: 160px" :alt="sponsor.alt" />
+        </a>
+        <br />
+        <br />
+      </template>
+
+      <template v-if="sponsors.silver">
+        <h3>Silver Sponsors</h3>
+
+        <a
+          v-for="sponsor in sponsors.silver"
+          :href="sponsor.href"
+          target="_blank"
+          rel="sponsored noopener"
+          style="width: 120px"
+        >
+          <img :src="sponsor.imgSrc" style="width: 120px" :alt="sponsor.alt" />
+        </a>
+
+        <br />
+        <br />
+      </template>
+
+      <a
+        class="become-sponsor button white"
+        href="https://github.com/sponsors/posva"
+        >Become a Sponsor!</a
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import sponsors from './sponsors.json'
+
+export default {
+  name: 'HomeSponsors',
+
+  created() {
+    this.sponsors = sponsors
+  },
+}
+</script>
+
+<style>
+#sponsors {
+  text-align: center;
+  padding: 35px 40px 45px;
+  margin: 0 -2.5rem;
+  background-color: #f6f6f6;
+}
+
+#sponsors h3 {
+  color: #999;
+  margin: 0 0 10px;
+}
+
+#sponsors a,
+#sponsors img {
+  width: 100px;
+  text-decoration: none;
+  display: inline-block;
+  vertical-align: middle;
+}
+
+#sponsors img {
+  transition: all 0.3s ease;
+  filter: grayscale(100%);
+  opacity: 0.66;
+}
+
+#sponsors img:hover {
+  filter: none;
+  opacity: 1;
+}
+
+#sponsors .become-sponsor {
+  margin-top: 40px;
+  font-size: 0.9em;
+  font-weight: 700;
+  width: auto;
+  background-color: transparent;
+  padding: 0.75em 2em;
+  border-radius: 2em;
+  transition: all 0.15s ease;
+  box-sizing: border-box;
+  border: 1px solid #4fc08d;
+}
+
+#sponsors .become-sponsor:hover {
+  background-color: #4fc08d;
+  color: white;
+}
+</style>
diff --git a/docs/.vitepress/components/sponsors.json b/docs/.vitepress/components/sponsors.json
new file mode 100644 (file)
index 0000000..206e892
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "silver": [
+    {
+      "href": "https://www.vuemastery.com/",
+      "alt": "VueMastery",
+      "imgSrc": "https://www.vuemastery.com/images/vuemastery.svg"
+    },
+    {
+      "imgSrc": "https://cdn.vuetifyjs.com/docs/images/logos/vuetify-logo-light-text.svg",
+      "href": "https://www.vuetifyjs.com/",
+      "alt": "Vuetify"
+    }
+  ]
+}