Fix redirect issue
This commit is contained in:
parent
c8c1fb7f75
commit
d270581a71
|
@ -10,9 +10,11 @@
|
|||
<div class="max-w-2xl mx-auto mt-4">
|
||||
<div class="flex flex-wrap items-center justify-center">
|
||||
<span class="ml-2" v-for="route in routes" :key="route.path">
|
||||
<router-link class="inline-block mt-2 px-3 py-1 rounded text-sm cursor-pointer hover:bg-gray-700 hover:text-gray-200" :class="currentPage == route.path ? 'bg-gray-700 text-gray-200' : 'bg-gray-200 text-gray-700'" :to="route.path">
|
||||
{{ route.name }}
|
||||
</router-link>
|
||||
<span v-if="route.path != '/'">
|
||||
<router-link class="inline-block mt-2 px-3 py-1 rounded text-sm cursor-pointer hover:bg-gray-700 hover:text-gray-200" :class="currentPage == route.path ? 'bg-gray-700 text-gray-200' : 'bg-gray-200 text-gray-700'" :to="route.path">
|
||||
{{ route.name }}
|
||||
</router-link>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
<template>
|
||||
<div class="container mx-auto px-6" id="main">
|
||||
<div class="py-16 text-center">
|
||||
<h1 class="text-xl md:text-3xl text-gray-800 font-medium">Discover new components. Build amazing things 🔥</h1>
|
||||
|
||||
<div class="max-w-2xl mx-auto">
|
||||
<div class="mt-4">
|
||||
<span v-for="i in categories" :key="i.name">
|
||||
<button @click="category = i.name" class="ml-2 mt-2 px-3 py-1 cursor-pointer hover:bg-gray-700 hover:text-gray-200 rounded text-sm focus:outline-none" :class="i.name === category? 'bg-gray-700 text-gray-200' : 'bg-gray-200 text-gray-700'">{{ i.name }}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="mt-8 text-gray-700">Header components require simple <span class="font-semibold">- don't panic please 😎 -</span> <a class="text-blue-600 hover:underline" href="https://gist.github.com/Miaababikir/052e31b345781c0f73180b80a285781b" target="_blank">configuration</a></p>
|
||||
</div>
|
||||
|
||||
<div class="w-full max-w-5xl mx-auto">
|
||||
<div class="mb-16" v-for="category in list" :key="category.name">
|
||||
<h1 class="text-2xl text-gray-800 font-semibold mb-6 capitalize" v-text="category.name"></h1>
|
||||
|
||||
<view-component v-for="component in category.components" :key="component.name" :name="component.name" class="mt-6">
|
||||
<div slot="component">
|
||||
<div class="my-6">
|
||||
<component :is="component.name | toId"></component>
|
||||
</div>
|
||||
</div>
|
||||
</view-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
|
@ -17,5 +17,3 @@ Vue.use(VueClipboard);
|
|||
Vue.use(VueAnalytics, { id: 'UA-167213766-1' });
|
||||
|
||||
new Vue({ render: h => h(App), router }).$mount('#app');
|
||||
|
||||
router.replace('/alerts');
|
||||
|
|
|
@ -12,6 +12,7 @@ const Footers = () => import("./components/categories/Footers");
|
|||
export default new VueRouter({
|
||||
mode: 'history',
|
||||
routes: [
|
||||
{ path: "/", redirect: "/alerts" },
|
||||
{ path: "/alerts", component: Alerts, name: "Alerts" },
|
||||
{ path: "/cards", component: Cards, name: "Cards" },
|
||||
{ path: "/forms", component: Forms, name: "Forms" },
|
||||
|
|
Loading…
Reference in a new issue