Added Header.vue
parent
675199c569
commit
3517dfae69
@ -1,10 +1,12 @@
|
|||||||
export default defineAppConfig({
|
export default defineAppConfig({
|
||||||
nuxtIcon: {
|
nuxtIcon: {
|
||||||
size: '24px', // default <Icon> size applied
|
size: '24px', // default <Icon> size applied
|
||||||
class: 'icon', // default <Icon> class applied
|
class: 'icon', // default <Icon> class applied
|
||||||
aliases: {
|
aliases: {
|
||||||
nuxt: 'logos:nuxt-icon',
|
nuxt: 'logos:nuxt-icon',
|
||||||
loading: 'svg-spinners:90-ring-with-bg',
|
loading: 'svg-spinners:90-ring-with-bg',
|
||||||
},
|
twitter: 'logos:twitter',
|
||||||
},
|
github: 'mdi:github',
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
const openUrl = (url: string) => {
|
||||||
|
window.open(url, '_blank')
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="bg-secondary border-b-lightgray fixed top-0 flex h-16 w-screen items-center justify-between border-b-2 px-4">
|
||||||
|
<div class="flex gap-4">
|
||||||
|
<Icon name="twitter" />
|
||||||
|
<div class="font-bold"> Twitter Clone </div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Icon name="github" @click="openUrl('https://github.com/TZGyn/twitter-clone')" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@ -1,21 +1,21 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
type Post = {
|
type Post = {
|
||||||
title: String
|
title: String
|
||||||
description: String | null | undefined
|
description: String | null | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<Post>()
|
const props = defineProps<Post>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="flex w-full flex-col gap-6 bg-secondary p-6">
|
<div class="flex w-full flex-col gap-6 rounded-md border border-lightgray bg-secondary p-6">
|
||||||
<div class="h-full truncate text-xl font-bold">
|
<div class="h-full truncate text-xl font-bold">
|
||||||
{{ props.title }}
|
{{ props.title }}
|
||||||
</div>
|
</div>
|
||||||
<div class="h-full">
|
<div class="h-full">
|
||||||
{{ props.description }}
|
{{ props.description }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: [],
|
content: [],
|
||||||
important: false,
|
important: false,
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
primary: '#000000',
|
primary: '#000000',
|
||||||
secondary: '#0c0c0d',
|
secondary: '#0c0c0d',
|
||||||
darkgray: '#18181b',
|
darkgray: '#18181b',
|
||||||
lightgray: '#27272a',
|
lightgray: '#27272a',
|
||||||
light: '#e5e7eb',
|
light: '#e5e7eb',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue