Skip to content

Commit 3500eda

Browse files
AllanKoderCopilot
andauthored
Quality of Life (#38)
* Quality of Life * Storage * Dark mode * Dark mode in progress * Dark Moding * Dark mode done! * Clickable Header * Small fix * More little fixes * Update resources/js/Components/Resources/Reviews/CreateResourceReview.vue Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * more text --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d0b9298 commit 3500eda

50 files changed

Lines changed: 1493 additions & 418 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ yarn-error.log
2323
/.nova
2424
/.vscode
2525
/.zed
26-
sail
26+
sail
27+
/prod_backups

‎app/Http/Controllers/TagFrequencyController.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function search(string $type, string $query = '')
2121
$prefixed_tags = TagFrequency::where('tag', 'like', $escaped.'%')
2222
->where('type', $type)
2323
->orderByDesc('count')
24-
->limit(30)
24+
->limit(50)
2525
->get();
2626

2727
return response()->json([

‎public/images/LogoTitleDark.svg‎

Lines changed: 635 additions & 0 deletions
Loading

‎resources/css/app.css‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@
88
[x-cloak] {
99
display: none;
1010
}
11+
12+
html.dark {
13+
--surface-ground: #374151 !important;
14+
--surface-card: #374151 !important;
15+
--surface-overlay: #374151 !important;
16+
--surface-border: #4b5563 !important; /* gray-600 for borders */
17+
}
18+
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<template>
2-
<img src="/images/LogoTitle.svg" alt="Computer Science Resources" class="w-min sm:w-64 md:w-72 lg:w-80 xl:w-96" />
2+
<img src="/images/LogoTitle.svg" alt="Computer Science Resources" class="h-10 sm:h-12 w-auto block dark:hidden" />
3+
<img src="/images/LogoTitleDark.svg" alt="Computer Science Resources" class="h-10 sm:h-12 w-auto hidden dark:block" />
34
</template>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup>
2+
import { Icon } from "@iconify/vue";
3+
import { Link } from "@inertiajs/vue3";
4+
5+
const props = defineProps({
6+
href: { type: String, required: true }
7+
});
8+
</script>
9+
10+
<template>
11+
<Link :href="href" class="group flex items-center gap-1">
12+
<slot />
13+
<Icon icon="mdi:chevron-right" class="text-primary group-hover:translate-x-1 transition-transform duration-200" width="22" height="22" />
14+
</Link>
15+
</template>

‎resources/js/Components/Comments/CommentList.vue‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const toggleCollapse = () => {
3535
class="absolute left-0 top-0 bottom-0 flex items-center"
3636
>
3737

38+
3839
<div
3940
v-if="!isCollapsed"
4041
class="relative h-full cursor-pointer"
@@ -49,17 +50,17 @@ const toggleCollapse = () => {
4950

5051
<!-- Visible line -->
5152
<div
52-
class="w-[1.2px] h-full bg-gray-300 transition-colors duration-200"
53-
:class="{'bg-primary': isNearCollapsing}"
53+
class="w-[1.2px] h-full bg-gray-300 dark:bg-gray-800 transition-colors duration-200"
54+
:class="{'bg-primary': isNearCollapsing, 'dark:bg-primary': isNearCollapsing}"
5455
></div>
5556
</div>
5657

5758
<button
5859
v-else
59-
class="p-1 rounded-full border border-gray-300 bg-white hover:border-gray-500 hover:bg-gray-100 transition-colors duration-200"
60+
class="p-1 rounded-full border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900 hover:border-gray-500 dark:hover:border-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors duration-200"
6061
@click="toggleCollapse"
6162
>
62-
<Icon icon="mdi:chevron-right" width="20" height="20" class="text-gray-500 hover:text-blue-500" />
63+
<Icon icon="mdi:chevron-right" width="20" height="20" class="text-gray-500 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400" />
6364
</button>
6465
</div>
6566

‎resources/js/Components/Comments/Commentable.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ onMounted(() => {
202202
</script>
203203
204204
<template>
205-
<div class="comments-section bg-white rounded-lg p-1">
205+
<div class="comments-section bg-white dark:bg-gray-900 rounded-lg p-1">
206206
<SortByDropdown
207207
v-if="props.hasSortByDropdown && hasOpenedComments"
208208
@change="handleSortChange"
209209
></SortByDropdown>
210210
211211
<!-- Error State -->
212-
<div v-if="error" class="text-red-500 mb-4">{{ error }}</div>
212+
<div v-if="error" class="text-red-500 dark:text-red-400 mb-4">{{ error }}</div>
213213
214214
<!-- Comments List -->
215215
<CommentList :id-to-children="idToChildren" />
@@ -231,7 +231,7 @@ onMounted(() => {
231231
<button
232232
v-if="canLoadMoreComments && !isLoading"
233233
@click="loadComments"
234-
class="w-full py-2 text-center text-primary hover:bg-background/50 transition-colors"
234+
class="w-full py-2 text-center text-primary dark:text-primaryLight hover:bg-background/50 dark:hover:bg-gray-800/50 transition-colors"
235235
>
236236
View {{ commentsLeft }} Comments
237237
</button>

‎resources/js/Components/Comments/SingleComment.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const users = inject("users");
2222

2323
<template>
2424
<div
25-
class="py-4 border-b border-gray-300 flex flex-row gap-4 w-full"
25+
class="py-4 border-b border-gray-300 dark:border-gray-800 flex flex-row gap-4 w-full"
2626
:key="comment.id"
2727
:id="'comment_' + comment.id"
2828
>
@@ -43,7 +43,7 @@ const users = inject("users");
4343
</div>
4444

4545
<!-- Comment Content -->
46-
<p class="mt-2 text-gray-700 break-words">{{ comment.content }}</p>
46+
<p class="mt-2 text-gray-700 dark:text-gray-100 break-words">{{ comment.content }}</p>
4747

4848
<!-- Actions Form -->
4949
<CommentActionsForm

‎resources/js/Components/Comments/SortUpvotesByDropdown.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const emit = defineEmits(['change'])
2727

2828
<template>
2929
<div class="flex items-center gap-2 py-4">
30-
<label class="font-semibold text-gray-700">Sort by:</label>
30+
<label class="font-semibold text-gray-700 dark:text-gray-100">Sort by:</label>
3131
<Select
3232
v-model="selectedSort"
3333
:options="sortOptions"

0 commit comments

Comments
 (0)