Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feeds page refactored and feeds form created #16

Merged
merged 1 commit into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ html, body, #lefine {
}

.page {
@apply w-full h-full mx-auto max-w-[1500px] pt-14;
@apply w-full h-full mx-auto max-w-[1500px] pt-20;
}
2 changes: 1 addition & 1 deletion components/Auth/Login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function onSubmit() {
</script>

<template>
<UForm ref="form" :schema="loginSchema" :state="values" class="relative w-full h-full flex flex-col items-center justify-center bg-black text-white z-0" @submit.prevent="onSubmit">
<UForm ref="form" :schema="loginSchema" :state="values" class="relative w-full h-full flex flex-col items-center justify-center text-white z-0" @submit.prevent="onSubmit">
<NuxtLink to="/" class="mx-auto absolute top-20">
<img src="~assets/logo.svg">
</NuxtLink>
Expand Down
2 changes: 1 addition & 1 deletion components/Auth/Register/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function onSubmit() {
</script>

<template>
<UForm ref="form" :schema="registerSchema" :state="values" class="relative w-full h-full flex items-center justify-center bg-black text-white z-0" @submit.prevent="onSubmit">
<UForm ref="form" :schema="registerSchema" :state="values" class="relative w-full h-full flex items-center justify-center text-white z-0" @submit.prevent="onSubmit">
<NuxtLink to="/" class="mx-auto absolute top-20">
<img src="~assets/logo.svg">
</NuxtLink>
Expand Down
61 changes: 61 additions & 0 deletions components/Cards/feed.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<script setup lang="ts">
interface Props {
name: string
avatar: string
source: string
createDate: string
description: string
}
// defineProps<Props>()
withDefaults(defineProps<Props>(), {
name: 'Cansu Altun',
avatar: '',
source: '',
viewers: '',
description: 'Selamlar , Ben deneme yazısıyım :)',
createDate: '2 Days Ago',
})
</script>

<template>
<div
class="w-full p-5 flex flex-col gap-4 rounded-3xl bg-white/5 border border-white/5"
>
<div class="flex justify-between">
<div class="flex gap-2 items-center">
<UAvatar
src="https://avatars.githubusercontent.com/u/739984?v=4"
size="xl"
/>
<div>
<p class="text-lg">
{{ name }}
</p>
<p class="text-xs text-gray-500">
Recommended
</p>
</div>
</div>
<p class="text-sm text-[#ffffff80]">
{{ createDate }}
</p>
</div>
<p class="text-sm">
{{ description }}
</p>
<div class="flex flex-wrap items-center justify-center gap-4">
<img
class="h-60 flex-1 object-cover rounded-3xl"
src="../../assets/testimage.svg"
>
<img
class="h-60 flex-1 object-cover rounded-3xl"
src="../../assets/testimage.svg"
>
</div>
<div>
<UButton variant="ghost" color="white" icon="i-ph-heart" label="154" />
<UButton variant="ghost" color="white" icon="i-ph-chat-teardrop-dots" label="40" />
</div>
</div>
</template>
23 changes: 23 additions & 0 deletions components/Feeds/Form/Create/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script setup lang="ts">
const value = ref('')
</script>

<template>
<div
class="w-full flex flex-col rounded-3xl bg-white/5"
>
<div class="p-4">
<UTextarea v-model="value" variant="none" placeholder="Write something or ask..." />
</div>

<hr class="border-white/5">

<div class="flex items-center justify-between p-4">
<div>
<UButton variant="ghost" color="white" icon="i-ph-image-square-fill" label="Add Photo" />
<UButton variant="ghost" color="white" icon="i-ph-calendar" label="Create Activity" />
</div>
<UButton>Create Feed</UButton>
</div>
</div>
</template>
56 changes: 0 additions & 56 deletions components/Feeds/index.vue

This file was deleted.

2 changes: 1 addition & 1 deletion components/layout/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import logo from '@/assets/logo.svg'
</script>

<template>
<div class="bg-black/5 border-b border-white/5 shadow-sm backdrop-blur-md fixed inset-x-0 top-0 z-10 flex justify-between items-center px-6 py-3">
<div class="bg-black/5 border-b border-white/5 shadow-sm backdrop-blur-md fixed inset-x-0 top-0 z-10 flex justify-between items-center px-6 py-3 h-16">
<div class="flex items-center gap-3">
<img :src="logo" class="h-9">
</div>
Expand Down
59 changes: 40 additions & 19 deletions pages/community-feeds/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,46 @@ const data2 = [
</script>

<template>
<div class="grid grid-cols-12">
<div class="p-5 col-span-8 max-w-7xl mx-auto space-y-6">
<Feeds
v-for="(item, idx) in data2"
:key="idx"
:name="item.name"
:create-date="item.createDate"
/>
</div>
<div class="col-span-3 flex flex-col space-y-4">
<div class="flex flex-col space-y-2">
<h2 class="font-bold font-base">
Recomennded Lefiners
</h2>
<CardsProfile
v-for="(item, idx) in data"
:key="idx"
:name="item.name"
/>
<div class="page">
<div class="grid grid-cols-12 gap-12">
<div class="col-span-12 lg:col-span-9 flex flex-col gap-8">
<div>
<div class="flex items-center justify-between mb-4">
<h1 class="font-bold text-xl">
Community Feeds
</h1>
<div class="flex items-center justify-between gap-2">
<UButton variant="secondary">
All
</UButton>
<UButton variant="secondary" icon="i-ph-funnel-simple-bold" />
</div>
</div>
<FeedsFormCreate />
</div>

<div class="flex flex-col gap-8">
<CardsFeed
v-for="(item, idx) in data2"
:key="idx"
:name="item.name"
:create-date="item.createDate"
/>
</div>
</div>
<div class="col-span-12 lg:col-span-3 flex flex-col">
<div class="flex flex-col">
<h2 class="font-bold text-xl mb-4">
Recommended Lefiners
</h2>
<div class="flex flex-col gap-8">
<CardsProfile
v-for="(item, idx) in data"
:key="idx"
:name="item.name"
/>
</div>
</div>
</div>
</div>
</div>
Expand Down