update(docs): styling of sidebar and header

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>

update(docs): target server generation

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-06 15:42:05 +01:00
parent ea7db92b6e
commit 412a84a898
6 changed files with 46 additions and 66 deletions
+2 -40
View File
@@ -1,4 +1,3 @@
#root,
#__nuxt { #__nuxt {
text-transform: uppercase; text-transform: uppercase;
font-family: 'JetBrains Mono', monospace; font-family: 'JetBrains Mono', monospace;
@@ -11,8 +10,8 @@
html, html,
body, body,
#root,
#__nuxt { #__nuxt {
position: relative;
margin: 0; margin: 0;
height: 100%; height: 100%;
color: #111; color: #111;
@@ -22,10 +21,6 @@ body,
background-image: url('./polygon-scatter.svg'); background-image: url('./polygon-scatter.svg');
} }
#__nuxt {
position: relative;
}
.backround-img { .backround-img {
background-position: center; background-position: center;
background-size: cover; background-size: cover;
@@ -33,29 +28,6 @@ body,
background-image: url('./polygon-scatter.svg'); background-image: url('./polygon-scatter.svg');
} }
#root {
display: flex;
flex-direction: column;
}
header {
font-weight: 700;
}
.logo {
text-decoration: none;
display: block;
line-height: 1;
}
header a:hover {
color: #c9c9c9;
}
header select {
margin-left: 1em;
}
.overview-example__add { .overview-example__add {
display: none; display: none;
} }
@@ -93,18 +65,8 @@ header select {
} }
} }
.edgebutton {
border-radius: 999px;
cursor: pointer;
}
.edgebutton:hover {
box-shadow: 0 0 0 2px pink , 0 0 0 4px #f05f75;
}
#vue-flow-docs { #vue-flow-docs {
display: flex; @apply flex m-0 bg-white h-full;
margin:0;
background: #fff;
} }
.button { .button {
+21 -4
View File
@@ -1,5 +1,5 @@
<template> <template>
<header class="flex items-center py-4 px-8 text-white"> <header class="flex border-b-1 border-black border-solid items-center py-4 px-8 font-semibold text-white">
<div class="flex flex-col"> <div class="flex flex-col">
<a class="logo text-xl" href="https://github.com/bcakmakoglu/vue-flow"> Vue Flow </a> <a class="logo text-xl" href="https://github.com/bcakmakoglu/vue-flow"> Vue Flow </a>
<span class="text-xs text-gray-800 mt-2" <span class="text-xs text-gray-800 mt-2"
@@ -7,10 +7,27 @@
Based on <a href="https://reactflow.dev">React Flow</a> Based on <a href="https://reactflow.dev">React Flow</a>
</span> </span>
</div> </div>
<div class="flex-1">Docs</div> <div class="flex-1"><span class="button text-gray-400">Docs</span></div>
<div class="flex-1"> <div class="flex-1">
<router-link to="/examples"> Examples </router-link> <router-link class="link" to="/examples"> Examples</router-link>
</div> </div>
<div class="flex-1"><a href="https://github.com/bcakmakoglu/vue-flow">Github</a></div> <div class="flex-1"><a class="link" href="https://github.com/bcakmakoglu/vue-flow">Github</a></div>
</header> </header>
</template> </template>
<style scoped>
a {
@apply hover:text-gray-300;
}
.logo {
text-decoration: none;
display: block;
line-height: 1;
}
.link {
@apply bg-gray-200 rounded-lg px-4 py-2 !hover:text-yellow-500 text-black;
}
.router-link-active {
@apply rounded-lg bg-white font-semibold text-yellow-500;
}
</style>
+13 -14
View File
@@ -44,10 +44,13 @@ const examples = [
path: '/interaction', path: '/interaction',
label: 'Interaction', label: 'Interaction',
}, },
/*
todo: layouting example not working with dagre for some reason so it's disabled for now
{ {
path: '/layouting', path: '/layouting',
label: 'Layouting', label: 'Layouting',
}, },
*/
{ {
path: '/multi-flows', path: '/multi-flows',
label: 'Multi Flows', label: 'Multi Flows',
@@ -104,28 +107,24 @@ const examples = [
</script> </script>
<template> <template>
<aside> <aside>
<div class="flex flex-col justify-center items-start"> <div class="flex flex-col text-left items-start">
<router-link <router-link v-for="(e, i) of examples" :key="`example-link-${i}`" class="example-link" :to="`/examples${e.path}`">
v-for="(example, i) of examples" {{ e.label }}
:key="`example-link-${i}`"
class="example-link"
:to="`/examples${example.path}`"
>
{{ example.label }}
</router-link> </router-link>
</div> </div>
<slot></slot> <slot></slot>
</aside> </aside>
</template> </template>
<style> <style scoped>
.example-link { .example-link {
@apply text-lg text-white hover:text-black py-2 underline; @apply w-full text-lg text-white hover:text-yellow-500 px-3 py-2;
}
.router-link-active {
@apply rounded-lg bg-white font-semibold text-yellow-500;
} }
aside { aside {
border-right: 1px solid #eee; @apply w-[280px] h-full px-[10px] py-[15px];
padding: 15px 10px; background: rgba(0, 0, 0, 0.25);
height: 100%; /* Full-height: remove this if you want "auto" height */
width: 280px; /* Set the width of the sidebar */
overflow-x: hidden; /* Disable horizontal scroll */ overflow-x: hidden; /* Disable horizontal scroll */
} }
</style> </style>
+1
View File
@@ -18,6 +18,7 @@ export default defineNuxtConfig({
preserveSymlinks: false, preserveSymlinks: false,
}, },
}, },
target: 'server',
ssr: true, ssr: true,
buildModules: ['nuxt-windicss'], buildModules: ['nuxt-windicss'],
}) })
+9
View File
@@ -73,3 +73,12 @@ const center = computed(() =>
</body> </body>
</foreignObject> </foreignObject>
</template> </template>
<style>
.edgebutton {
border-radius: 999px;
cursor: pointer;
}
.edgebutton:hover {
box-shadow: 0 0 0 2px pink, 0 0 0 4px #f05f75;
}
</style>
-8
View File
@@ -90,11 +90,3 @@ header select {
display: block; display: block;
} }
} }
.edgebutton {
border-radius: 999px;
cursor: pointer;
}
.edgebutton:hover {
box-shadow: 0 0 0 2px pink , 0 0 0 4px #f05f75;
}