Skip to content

Commit

Permalink
deploy via script
Browse files Browse the repository at this point in the history
  • Loading branch information
kaangiray26 committed Jun 29, 2023
1 parent b062812 commit 7172ef4
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 30 deletions.
4 changes: 4 additions & 0 deletions src/assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ textarea {
padding-left: 12px;
}

.p-similar {
padding: 3.25rem;
}

.invisible {
visibility: hidden;
}
Expand Down
11 changes: 6 additions & 5 deletions src/components/CommentedPost.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<template>
<div class="d-flex">
<div class="d-flex square p-1">
<img class="cover icon" :src="obj.image" @error="placeholder">
<div class="d-flex square p-1 me-1">
<img class="cover icon" :src="obj.image" @error="placeholder" loading="lazy">
</div>
<div class="d-flex flex-fill align-items-center">
<h6 class="text-break p-1 m-0">{{ obj.title }}</h6>
<div class="d-flex flex-column align-items-start p-1 ps-0">
<small class="text-muted">{{ obj.author }}</small>
<h6 class="text-break m-0">{{ obj.title }}</h6>
</div>
</div>
<div class="d-flex p-theme border-top">
<div class="d-flex p-theme">
<span v-html="obj.comment" class="text-break"></span>
</div>
<div class="d-flex justify-content-around bg-light rounded">
Expand Down
19 changes: 12 additions & 7 deletions src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@
<ul class="list-group list-group-flush border-0 pt-0">
<Post :obj="item" />
<li v-for="post in posts" class="list-group-item border rounded p-0 mt-3">
<div class="d-flex flex-column p-theme">
<h6 class="text-break m-0">{{ post.post }}</h6>
<small class="text-muted">{{ get_details(post) }}</small>
<div class="d-flex">
<div class="d-flex square p-1 me-1">
<img ref="target" class="cover icon" src="/favicon.svg" loading="lazy">
</div>
<div class="d-flex flex-column align-items-start p-1 ps-0">
<small class="text-muted">{{ get_details(post) }}</small>
<h6 class="text-break m-0">{{ post.post }}</h6>
</div>
</div>
<div class="d-flex justify-content-around bg-light rounded">
<button type="button" class="btn btn-touch bi bi-heart invisible"></button>
Expand Down Expand Up @@ -84,24 +89,24 @@ function format_date(dt) {
hour12: true,
})
return `${date_string} ${time_string}`
return `🕐 ${date_string} ${time_string}`
}
function get_details(post) {
if (sort.value == 'hot') {
return `${post.count} pts`
return `🚀 ${post.count} pts`
}
if (sort.value == 'new') {
return format_date(post.last_created_at)
}
if (sort.value == 'top') {
return `${post.count} pts`
return `🚀 ${post.count} pts`
}
if (sort.value == 'controversial') {
return `${post.count} comments`
return `📝 ${post.count} comments`
}
}
Expand Down
22 changes: 10 additions & 12 deletions src/components/SinglePost.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<template>
<div class="card border-0 theme-shadow rounded">
<div class="card border-0">
<div class="card-body p-0">
<div class="border-bottom px-2 py-1">
<span class="fw-bold">{{ obj.author }}</span>
<div class="d-flex flex-column align-items-start p-3 pb-0">
<small class="text-muted">{{ obj.author }}</small>
<h6 class="text-break m-0">{{ obj.title }}</h6>
</div>
<div class="px-2 py-1">
<span>{{ obj.title }}</span>
<div class="d-flex px-3 py-1">
<small class="me-2">🚀 {{ points }} pts</small>
<small>📝 {{ comments.length }} cts</small>
</div>
<div class="d-flex square">
<img class="img-post" :src="obj.image" @error="placeholder">
<div class="d-flex square p-3">
<img class="img-post rounded theme-shadow" :src="obj.image" @error="placeholder">
</div>
<div class="d-flex justify-content-between bg-dark">
<span class="text-light font-monospace ms-2">{{ points }} pts</span>
<span class="text-light font-monospace me-2">{{ comments.length }} cts</span>
</div>
<div class="d-flex justify-content-around bg-light">
<div class="d-flex justify-content-around rounded bg-light mx-3 mb-3">
<button type="button" class="btn btn-touch bi"
:class="{ 'bi-heart-fill': is_upvoted, 'bi-heart': !is_upvoted }" @click="upvote"></button>
<button type="button" class="btn btn-touch bi bi-chat"></button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/SingleShortPost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<div class="d-flex square p-1 me-1">
<img ref="target" class="cover icon" :src="obj.image" @error="placeholder" loading="lazy">
</div>
<div class="d-flex flex-column align-items-start">
<div class="d-flex flex-column align-items-start p-1 ps-0">
<small class="text-muted">{{ obj.author }}</small>
<h6 class="text-break p-1 m-0">{{ obj.title }}</h6>
<h6 class="text-break m-0">{{ obj.title }}</h6>
</div>
</div>
<div class="d-flex justify-content-around bg-light rounded">
Expand Down
9 changes: 5 additions & 4 deletions src/components/UpvotedSavedPost.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<template>
<div class="d-flex">
<div class="d-flex square p-1">
<img class="cover icon" :src="obj.image" @error="placeholder">
<div class="d-flex square p-1 me-1">
<img class="cover icon" :src="obj.image" @error="placeholder" loading="lazy">
</div>
<div class="d-flex flex-fill align-items-center">
<h6 class="text-break p-1 m-0">{{ obj.title }}</h6>
<div class="d-flex flex-column align-items-start p-1 ps-0">
<small class="text-muted">{{ obj.author }}</small>
<h6 class="text-break m-0">{{ obj.title }}</h6>
</div>
</div>
<div class="d-flex justify-content-around bg-light rounded">
Expand Down

0 comments on commit 7172ef4

Please sign in to comment.