Skip to content

Commit 679ead2

Browse files
authored
Merge pull request #124 from netervati/feat/add-landing-page
Add initial landing page
2 parents 2e5d937 + 90cd31c commit 679ead2

File tree

16 files changed

+124
-43
lines changed

16 files changed

+124
-43
lines changed

app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts" setup>
22
const config = useRuntimeConfig();
33
4-
if (config.public.onMaintenance) {
4+
if (config.public.onMaintenance === 'true') {
55
throw createError({
66
statusCode: 503,
77
statusMessage:

components/footer.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<footer class="footer footer-center p-4 bg-base-300 text-base-content">
3+
<aside>
4+
<p>Copyright © 2023 - All right reserved by Netervati</p>
5+
</aside>
6+
</footer>
7+
</template>

components/landing-page/code.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<template>
2+
<div class="p-4">
3+
<div class="m-auto mockup-code text-xs md:text-lg w-full overflow-hidden">
4+
<pre data-prefix="$"><code>curl -X GET \</code></pre>
5+
<pre data-prefix=">"><code> <span class="text-cyan-500">https://gateway.pseudorestapi.com/api/users</span> \</code></pre>
6+
<pre data-prefix=">"><code> -H "Accept: application/json" \</code></pre>
7+
<pre data-prefix=">"><code> -u myapikey:mysecretkey</code></pre>
8+
<pre data-prefix=">"><code>[</code></pre>
9+
<pre data-prefix=">"><code> {</code></pre>
10+
<pre data-prefix=">"><code> <span class="text-green-500">"id"</span>: <span class="text-yellow-500">"8b710bdf-0ea0-4cfc-859c-74b9dc6a597d"</span>,</code></pre>
11+
<pre data-prefix=">"><code> <span class="text-green-500">"full_name"</span>: <span class="text-yellow-500">"Carroll Bergstrom"</span>,</code></pre>
12+
<pre data-prefix=">"><code> <span class="text-green-500">"email"</span>: <span class="text-yellow-500">"Keon.Osinski-Jenkins@hotmail.com"</span></code></pre>
13+
<pre data-prefix=">"><code> },</code></pre>
14+
<pre data-prefix=">"><code> {</code></pre>
15+
<pre data-prefix=">"><code> <span class="text-green-500">"id"</span>: <span class="text-yellow-500">"b09ee0c6-f274-4ae2-933c-027e7d5bfe9b"</span>,</code></pre>
16+
<pre data-prefix=">"><code> <span class="text-green-500">"full_name"</span>: <span class="text-yellow-500">"Luis Littel"</span>,</code></pre>
17+
<pre data-prefix=">"><code> <span class="text-green-500">"email"</span>: <span class="text-yellow-500">"Mabel19@gmail.com"</span></code></pre>
18+
<pre data-prefix=">"><code> },</code></pre>
19+
<pre data-prefix=">"><code>]</code></pre>
20+
</div>
21+
</div>
22+
</template>

components/nav/bar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<template>
4040
<div class="bg-base-100 border-b border-gray-300 navbar">
4141
<div class="flex-1">
42-
<NuxtLink class="btn btn-ghost normal-case text-xl" to="/">
42+
<NuxtLink class="btn btn-ghost normal-case text-xl" to="/dashboard">
4343
<img width="200" src="/full-logo.png" />
4444
</NuxtLink>
4545
</div>

components/nav/barPublic.vue

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<script lang="ts" setup>
2+
import { Bars3Icon, ComputerDesktopIcon } from '@heroicons/vue/24/outline';
3+
</script>
4+
5+
<template>
6+
<div class="navbar bg-base-100">
7+
<div class="navbar-start">
8+
<div class="dropdown">
9+
<label tabindex="0" class="btn btn-ghost lg:hidden">
10+
<Bars3Icon class="h-6 w-6" />
11+
</label>
12+
<ul tabindex="0" class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
13+
<li><NuxtLink to="/docs">Docs</NuxtLink></li>
14+
<li><NuxtLink to="https://github.com/netervati/pseudo-rest-api">Source</NuxtLink></li>
15+
</ul>
16+
</div>
17+
<NuxtLink class="btn btn-ghost normal-case text-xl" to="/">
18+
<img width="200" src="/full-logo.png" />
19+
</NuxtLink>
20+
</div>
21+
<div class="navbar-center hidden lg:flex">
22+
<ul class="menu menu-horizontal px-1">
23+
<li><NuxtLink to="/docs">Docs</NuxtLink></li>
24+
<li><NuxtLink to="https://github.com/netervati/pseudo-rest-api">Source</NuxtLink></li>
25+
</ul>
26+
</div>
27+
<div class="navbar-end">
28+
<NuxtLink class="btn btn-sm" to="/dashboard">
29+
<ComputerDesktopIcon class="h-6 w-6" />
30+
<span class="hidden md:block md:ml-2">Dashboard</span>
31+
</NuxtLink>
32+
</div>
33+
</div>
34+
</template>

components/project/grid.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
projectStore.target = project;
1313
14-
navigateTo(`/project/${project.project_keys[0].api_key}/apis`);
14+
navigateTo(`/dashboard/project/${project.project_keys[0].api_key}/apis`);
1515
};
1616
</script>
1717

components/side/bar.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@
99
const route = useRoute();
1010
1111
const links = computed(() => {
12-
const base = [{ name: 'Home', icon: HomeIcon, to: '/' }];
12+
const base = [{ name: 'Home', icon: HomeIcon, to: '/dashboard' }];
1313
1414
if (route.path.includes('project') && route.params.urlpath !== null) {
1515
base.push(
1616
...[
1717
{
1818
name: 'APIs',
1919
icon: ServerStackIcon,
20-
to: `/project/${route.params.urlpath}/apis`,
20+
to: `/dashboard/project/${route.params.urlpath}/apis`,
2121
},
2222
{
2323
name: 'Resources',
2424
icon: CircleStackIcon,
25-
to: `/project/${route.params.urlpath}/resources`,
25+
to: `/dashboard/project/${route.params.urlpath}/resources`,
2626
},
2727
{
2828
name: 'Settings',
2929
icon: WrenchScrewdriverIcon,
30-
to: `/project/${route.params.urlpath}/settings`,
30+
to: `/dashboard/project/${route.params.urlpath}/settings`,
3131
},
3232
]
3333
);

composables/useSignIn.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function (): SignInProgressProps {
2424

2525
url = url.includes('http') ? url : `https://${url}`;
2626
url = url.charAt(url.length - 1) === '/' ? url : `${url}/`;
27+
url = `${url}dashboard`;
2728

2829
return url;
2930
};
@@ -55,7 +56,7 @@ export default function (): SignInProgressProps {
5556
}
5657

5758
if (user.value) {
58-
navigateTo('/');
59+
navigateTo('/dashboard');
5960
}
6061
});
6162

middleware/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
66
return navigateTo('/login');
77
}
88

9-
if (from.path === '/login' && to.path === '/') {
9+
if (from.path === '/login' && to.path === '/dashboard') {
1010
toast.dark('Successfully signed in');
1111
}
1212
});

middleware/validateProject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ export default defineNuxtRouteMiddleware(async (to) => {
2727

2828
toast.error('Project does not exists!');
2929

30-
return navigateTo('/');
30+
return navigateTo('/dashboard');
3131
});

0 commit comments

Comments
 (0)