Skip to content

Commit

Permalink
Add footer link, better list style and gtm script
Browse files Browse the repository at this point in the history
  • Loading branch information
javisperez committed Mar 13, 2024
1 parent 0ec7d32 commit a8a5bce
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 7 deletions.
8 changes: 5 additions & 3 deletions docs/.vitepress/config.mts
@@ -1,7 +1,8 @@
import { URL, fileURLToPath } from 'node:url'
import { resolve } from 'path'

import { defineConfig } from 'vitepress'
import { getSidebarItemsFromMdFiles } from './utils.mts'
import { resolve } from 'path'

// https://vitepress.dev/reference/site-config
export default defineConfig({
Expand All @@ -22,7 +23,8 @@ export default defineConfig({
['meta', { name: "msapplication-config", content: "/favicons/browserconfig.xml"}],
['meta', { name: "theme-color", content: "#000000"}],
['script', { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-QTDTMG01Z5' } ],
['script', {}, "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-QTDTMG01Z5');"]
['script', {}, "window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-QTDTMG01Z5');"],
['script', {}, "(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});\nvar f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\nj.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n})(window,document,'script','dataLayer','GTM-TFFZXCQW');"],
],

lastUpdated: true,
Expand Down Expand Up @@ -99,7 +101,7 @@ export default defineConfig({
{
icon: 'github',
link: 'https://github.com/jozu-ai/kitops'
},
}
],
footer: {
license: {
Expand Down
15 changes: 15 additions & 0 deletions docs/.vitepress/theme/components/Footer.vue
Expand Up @@ -59,6 +59,21 @@ const year = (new Date()).getFullYear()
</svg>
</a>
</li>
<li>
<a href="https://x.com/Kit_Ops">
<span class="sr-only">x</span>
<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#a)">
<path d="M13.482 10.464 20.701 2H18.99l-6.268 7.35L7.714 2H1.94l7.572 11.114L1.94 21.99h1.71l6.62-7.761 5.288 7.76h5.775l-7.852-11.525Zm-2.344 2.747-.767-1.106-6.104-8.806h2.628l4.926 7.107.767 1.106 6.403 9.238h-2.628l-5.225-7.538Z" fill="#ECECEC"/>
</g>
<defs>
<clipPath id="a">
<path fill="#fff" d="M1.94 2h19.393v20H1.94z"/>
</clipPath>
</defs>
</svg>
</a>
</li>
</ul>

<ul class="flex flex-wrap lg:flex-nowrap items-center justify-center text-white gap-x-4 gap-y-2 lg:gap-10 list-none">
Expand Down
6 changes: 3 additions & 3 deletions docs/.vitepress/theme/components/Home.vue
Expand Up @@ -38,16 +38,16 @@ import { VueMarqueeSlider } from 'vue3-marquee-slider'
</svg>
</div>
<div class="kit-card max-w-[370px] flex flex-col">
<h3>Kit cli</h3>
<h3 class="!text-salmon">Kit cli</h3>

<div class="flex-1 mt-8 space-y-4">
<p class="p2">The Kit CLI is a command line interface (CLI) that performs actions on ModelKits.</p>
<p class="p2">You can: build and version ModelKits; push or pull them from a model registry; run them locally with a RESTful API we generate for your model automatically, and deploy them to staging or production.</p>
</div>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 32" fill="none" class="mt-10 md:mt-16 xl:mt-20 size-8 md:size-12">
<path d="M36.1238 25.0052H54.7501" class="stroke-gold" stroke-width="6.7732" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M0 5.25L15.8041 16.8209L0 26.6985" class="stroke-gold" stroke-width="6.7732" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M36.1238 25.0052H54.7501" class="stroke-salmon" stroke-width="6.7732" stroke-linecap="square" stroke-linejoin="round"/>
<path d="M0 5.25L15.8041 16.8209L0 26.6985" class="stroke-salmon" stroke-width="6.7732" stroke-linecap="square" stroke-linejoin="round"/>
</svg>
</div>
</div>
Expand Down
12 changes: 11 additions & 1 deletion docs/.vitepress/theme/index.ts
Expand Up @@ -14,9 +14,19 @@ const isPlatformModalOpen = ref(false)
export default {
extends: DefaultTheme,
Layout: () => {
// Google tag manager
const noscript = document.createElement('noscript')
const ifr = document.createElement('iframe')
ifr.src = 'https://www.googletagmanager.com/ns.html?id=GTM-TFFZXCQW';
ifr.height = 0;
ifr.width = 0;
ifr.style = 'display:none;visibility:hidden;';
noscript.appendChild(ifr)
document.body.insertBefore(noscript, document.body.firstElementChild)

return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
'sidebar-nav-after': () => h(PlatformSelect),
'sidebar-nav-after': () => h(PlatformSelect)
})
},
enhanceApp({ app, router, siteData }) {
Expand Down
30 changes: 30 additions & 0 deletions docs/.vitepress/theme/style.css
Expand Up @@ -103,6 +103,36 @@
letter-spacing: normal;
}

.vp-doc ul,
.vp-doc ol {
margin-top: 2rem;
margin-bottom: 2rem;
margin-left: 1.25rem;
}

.vp-doc ul ::marker,
.vp-doc ol ::marker {
color: var(--color-cornflower);
}

.vp-doc ol ::marker {
font-weight: bold;
}

.vp-doc li {
padding-left: 0.5rem;
}

.vp-doc li+li {
margin-top: 2rem;
}

.vp-doc li > ol,
.vp-doc li > ul {
margin-top: 2rem;
list-style: circle;
}

/**
* Component: Button
* -------------------------------------------------------------------------- */
Expand Down

0 comments on commit a8a5bce

Please sign in to comment.