]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: fix button
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 4 Jan 2022 22:34:19 +0000 (23:34 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 4 Jan 2022 22:34:19 +0000 (23:34 +0100)
packages/docs/.vitepress/components/HomeSponsors.vue
packages/docs/.vitepress/theme/Layout.ts
packages/docs/.vitepress/theme/custom.css

index 6727b22a9e2e1bd6f6a86bb57427769cce30667b..0240c4b3177034315db4faed4b88c5179d9a77cc 100644 (file)
@@ -48,24 +48,5 @@ onMounted(() => {
 .cta {
   margin-top: 1rem;
 }
-
-.become-sponsor {
-  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: 2px solid var(--c-text);
-  color: var(--c-text);
-}
-
-.become-sponsor:hover {
-  background-color: var(--c-yellow);
-  text-decoration: none;
-  border-color: var(--c-yellow);
-  color: var(--c-text-light-1);
-}
 </style>
+
index 1fc82fba67b1ce0a02515daabf3837e28f682d19..5cb4cc428c64f726444630ccf887b52b43fedd60 100644 (file)
@@ -25,17 +25,36 @@ export const Layout: FunctionalComponent = () => {
       'sidebar-top': () =>
         h('div', { class: 'sponsors sponsors-top' }, [
           h('span', 'Platinum Sponsors'),
-          ...sponsors.platinum.map(({ href, imgSrcDark, imgSrcLight, alt }) =>
-            h(
-              'a',
-              {
-                href,
-                target: '_blank',
-                rel: 'noopener',
-              },
-              [h('img', { src: isDark.value ? imgSrcDark : imgSrcLight, alt })]
-            )
-          ),
+          ...(sponsors.platinum.length
+            ? sponsors.platinum.map(({ href, imgSrcDark, imgSrcLight, alt }) =>
+                h(
+                  'a',
+                  {
+                    href,
+                    target: '_blank',
+                    rel: 'noopener',
+                  },
+                  [
+                    h('img', {
+                      src: isDark.value ? imgSrcDark : imgSrcLight,
+                      alt,
+                    }),
+                  ]
+                )
+              )
+            : [
+                h(
+                  'a',
+                  {
+                    class: 'become-sponsor',
+                    href: 'https://github.com/sponsors/posva',
+                    target: '_blank',
+                    rel: 'noopener',
+                    alt: 'Your logo here',
+                  },
+                  'Become a Sponsor!'
+                ),
+              ]),
         ]),
       'sidebar-bottom': () =>
         h('div', { class: 'sponsors' }, [
index daa23f773cc1698acb22fde5d6918ecc34c12e76..331e09a8fb1c18d99b683efbddd86911c2a95ec8 100644 (file)
@@ -183,3 +183,31 @@ code {
   font-size: 0.95em;
   padding: 0.175em 0.35em;
 }
+
+.become-sponsor {
+  font-size: 0.9em;
+  font-weight: 700;
+  width: auto;
+  text-align: center;
+  background-color: transparent;
+  padding: 0.75em 2em;
+  border-radius: 2em;
+  transition: all 0.15s ease;
+  box-sizing: border-box;
+  border: 2px solid var(--c-text);
+  color: var(--c-text);
+}
+
+.become-sponsor:hover {
+  background-color: var(--c-yellow);
+  text-decoration: none;
+  border-color: var(--c-yellow);
+  color: var(--c-text-light-1);
+}
+
+.sponsors-top .become-sponsor {
+  font-size: 0.75em;
+  padding: 0.2em;
+  width: auto;
+  max-width: 150px;
+}