-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
93 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,5 @@ | ||
<template> | ||
<span class="inline-block px-2 space-x-1 text-white rounded"> | ||
<i v-if="props.icon" :class="props.icon" class="text-sm" /> | ||
<span><slot /></span> | ||
<span class="inline-flex items-center gap-0.5 py-1 px-2 h-6 space-x-1 text-md text-white rounded"> | ||
<slot /> | ||
</span> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { defineProps } from 'vue' | ||
const props = defineProps<{ | ||
icon?: string | ||
}>() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,29 @@ | ||
<template> | ||
<div class="container min-h-screen p-6 mx-auto"> | ||
<ul class="flex"> | ||
<div class="flex-1 space-x-6"> | ||
<router-link class="nav" :to="{ name: 'search' }"> | ||
<i class="nav-icon fas fa-search"></i> | ||
<span>search</span> | ||
</router-link> | ||
<router-link class="nav" :to="{ name: 'settings' }"> | ||
<i class="nav-icon fas fa-cogs"></i> | ||
<span>settings</span> | ||
</router-link> | ||
<div class="flex flex-1 space-x-6"> | ||
<nav-item :to="{ name: 'search' }"> | ||
<template v-slot:icon><search-icon class="h-5" /></template> | ||
<template v-slot:name>search</template> | ||
</nav-item> | ||
<nav-item :to="{ name: 'settings' }"> | ||
<template v-slot:icon><cog-icon class="h-5" /></template> | ||
<template v-slot:name>settings</template> | ||
</nav-item> | ||
</div> | ||
<div class="sm:block hidden"> | ||
<router-link class="nav" :to="{ name: 'logout' }"> | ||
<i class="nav-icon fas fa-sign-out-alt"></i> | ||
<span>logout</span> | ||
</router-link> | ||
<nav-item :to="{ name: 'logout' }"> | ||
<template v-slot:icon><logout-icon class="h-5" /></template> | ||
<template v-slot:name>logout</template> | ||
</nav-item> | ||
</div> | ||
</ul> | ||
<hr class="mt-3" /> | ||
<router-view /> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.nav { | ||
@apply text-gray-500; | ||
} | ||
.nav:hover { | ||
@apply text-blue-400; | ||
} | ||
.nav-icon { | ||
@apply mr-2; | ||
} | ||
.router-link-active { | ||
@apply text-blue-500; | ||
} | ||
</style> | ||
<script setup lang="ts"> | ||
import NavItem from './NavItem.vue' | ||
import { SearchIcon, CogIcon, LogoutIcon } from 'heroicons-vue3/outline' | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<template> | ||
<router-link class="hover:text-blue-400 flex items-center h-5 space-x-2 text-gray-500" active-class="text-blue-500"> | ||
<slot name="icon"></slot> | ||
<span><slot name="name"></slot></span> | ||
</router-link> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
<template> | ||
<div class="padded w-full space-x-3 text-gray-800 cursor-pointer"> | ||
<i :class="props.icon"></i> | ||
<div class="padded flex items-center w-full space-x-3 text-gray-800 cursor-pointer"> | ||
<component :is="props.icon" class="h-5" /> | ||
<span class="select-none">{{ props.label }}</span> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { defineProps } from 'vue' | ||
import type { Component } from 'vue' | ||
const props = defineProps<{ | ||
label: string | ||
icon: string | ||
icon: Component | ||
}>() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters