Skip to content

Commit 84bea42

Browse files
authored
feat: add CSS reset & update styles accordingly (#24)
1 parent 23a9fa9 commit 84bea42

File tree

7 files changed

+35
-20
lines changed

7 files changed

+35
-20
lines changed

app/app.vue

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<script setup lang="ts">
2+
useHead({
3+
bodyAttrs: {
4+
class: 'bg-shark-500 text-white',
5+
},
6+
})
7+
28
useSeoMeta({
39
title: 'unsight.dev',
410
description: 'Detect duplicate GitHub issues, areas of concern and more across related repositories',
@@ -9,9 +15,9 @@ const { data: repos } = useRepos()
915

1016
<template>
1117
<div class="min-h-screen flex flex-col">
12-
<main class="flex flex-col font-sans m-2 flex-grow">
18+
<main class="flex flex-col font-sans m-4 flex-grow">
1319
<nav class="flex flex-row items-center gap-2 ">
14-
<h1 class="text-lg">
20+
<h1 class="text-lg font-bold my-4">
1521
<NuxtLink
1622
to="/"
1723
class="no-underline color-current"
@@ -44,10 +50,3 @@ const { data: repos } = useRepos()
4450
</footer>
4551
</div>
4652
</template>
47-
48-
<style>
49-
:root {
50-
background-color: #202830;
51-
color: white;
52-
}
53-
</style>

app/pages/[owner]/[repo]/[issue].vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const { data: issues, status } = useFetch(`/api/similarity/${route.params.owner}
1414
class="flex flex-col gap-4 md:rounded-md md:border-solid border border-gray-700 md:px-4 pb-8 mt-6 columns-1 lg:columns-2 border-b-solid animate-pulse"
1515
:style="{ '--section-index': 1 }"
1616
>
17-
<h2 class="flex items-center">
17+
<h2 class="flex items-center my-4 font-bold text-2xl">
1818
<span class="text-gray-500 inline-block mr-1 font-normal">#</span>
1919
<span class="inline-block rounded-md h-5 bg-gray-500 w-5" />
2020
</h2>
@@ -28,7 +28,7 @@ const { data: issues, status } = useFetch(`/api/similarity/${route.params.owner}
2828
class="flex flex-col gap-4 md:rounded-md md:border-solid border border-gray-700 md:px-4 pb-8 mt-6 columns-1 lg:columns-2 border-b-solid"
2929
:style="{ '--section-index': 1 }"
3030
>
31-
<h2 class="flex items-center">
31+
<h2 class="flex items-center my-4 font-bold text-2xl">
3232
<span class="text-gray-500 inline-block mr-1 font-normal">#</span>
3333
{{ issues[0]?.title }}
3434
</h2>

app/pages/[owner]/[repo]/index.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const openState = reactive<Record<string, boolean>>({})
3535
<div>
3636
<form @submit.prevent="() => refresh()">
3737
<div class="flex gap-2 items-center">
38-
<h2 class="text-base font-normal">
38+
<h2 class="text-base my-3 font-normal">
3939
{{ selectedRepo }}
4040
</h2>
4141
<button
@@ -50,7 +50,7 @@ const openState = reactive<Record<string, boolean>>({})
5050
<span class="sr-only">refresh data</span>
5151
</button>
5252
</div>
53-
<label class="w-full border-solid border border-gray-600 rounded-md flex flex-row items-center relative">
53+
<label class="w-full text-xs border-solid border border-gray-600 rounded-md flex flex-row items-center relative">
5454
<span class="sr-only">pick a repository to cluster issues</span>
5555
<select
5656
:value="selectedRepo"
@@ -77,7 +77,7 @@ const openState = reactive<Record<string, boolean>>({})
7777
:style="{ '--section-index': i }"
7878
class="flex flex-col gap-4 md:rounded-md md:border-solid border border-gray-700 md:px-4 pb-8 mt-6 columns-1 lg:columns-2 border-b-solid animate-pulse"
7979
>
80-
<h2 class="flex items-center">
80+
<h2 class="flex items-center my-4 font-bold text-2xl">
8181
<span class="text-gray-500 inline-block mr-1 font-normal">#</span>
8282
<span class="inline-block rounded-md h-5 bg-gray-500 w-5" />
8383
</h2>
@@ -91,7 +91,7 @@ const openState = reactive<Record<string, boolean>>({})
9191
<section
9292
class="flex flex-col gap-4 md:rounded-md md:border-solid border border-gray-700 md:px-4 pb-8 mt-6 columns-1 lg:columns-2 border-b-solid"
9393
>
94-
<h2 class="flex items-center">
94+
<h2 class="flex items-center my-4 font-bold text-2xl">
9595
<span class="text-gray-500 inline-block mr-1 font-normal">#</span>
9696
</h2>
9797
<p class="flex flex-row gap-2 leading-tightest">
@@ -109,7 +109,7 @@ const openState = reactive<Record<string, boolean>>({})
109109
:style="{ '--section-index': c }"
110110
class="flex flex-col gap-4 md:rounded-md md:border-solid border border-gray-700 md:px-4 pb-8 mt-6 columns-1 lg:columns-2 border-b-solid"
111111
>
112-
<h2>
112+
<h2 class="my-4 font-bold text-2xl">
113113
<span class="text-gray-500 inline-block mr-1 font-normal">#</span>{{ c + 1 }}
114114
</h2>
115115
<GitHubIssue
@@ -126,7 +126,7 @@ const openState = reactive<Record<string, boolean>>({})
126126
/>
127127
<button
128128
v-if="cluster.length > 5 && openState[c] !== true"
129-
class="rounded-md border-solid border border-gray-700 bg-transparent color-gray-400 py-2 hover:color-gray-200 active:color-white focus:color-gray-200 hover:border-gray-400 active:border-white focus:border-gray-400 transition-colors"
129+
class="rounded-md text-sm border-solid border border-gray-700 bg-transparent color-gray-400 py-2 hover:color-gray-200 active:color-white focus:color-gray-200 hover:border-gray-400 active:border-white focus:border-gray-400 transition-colors"
130130
type="button"
131131
@click="openState[c] = !openState[c]"
132132
>

app/pages/index.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const repos = computed(() => allowedRepos.value.filter(r => r.issuesIndexed > 10
3131
cluster issues by similarity across multiple repositories
3232
</p>
3333
<NuxtLink
34-
class="bg-green-700 rounded-md px-5 py-3 font-medium flex flex-row gap-2 items-center color-white no-underline focus:bg-green-800 hover:bg-green-800 transition-colors shadow-lg"
34+
class="bg-green-700 rounded-md px-5 py-2.5 font-medium flex flex-row gap-2 items-center color-white no-underline focus:bg-green-800 hover:bg-green-800 transition-colors shadow-lg"
3535
:href="isCallback ? '' : installationURL"
3636
:class="{ 'pointer-events-none opacity-50': isCallback }"
3737
>
@@ -44,13 +44,13 @@ const repos = computed(() => allowedRepos.value.filter(r => r.issuesIndexed > 10
4444
install as a github app
4545
</template>
4646
</NuxtLink>
47-
<hr>
47+
<hr class="w-32 border-shark-400">
4848
<section
4949
v-if="allowedRepos.length"
5050
class="text-center"
5151
>
5252
or pick a repository to browse issue clusters
53-
<ul class="p-0 flex flex-row flex-wrap gap-4 justify-center px-10">
53+
<ul class="p-0 flex flex-row flex-wrap gap-x-4 gap-y-3 justify-center px-10 my-4">
5454
<li
5555
v-for="repo in repos"
5656
:key="repo.repo"

nuxt.config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export default defineNuxtConfig({
1919
htmlAttrs: { lang: 'en' },
2020
},
2121
},
22+
css: [
23+
'@unocss/reset/tailwind-compat.css',
24+
],
2225
runtimeConfig: {
2326
public: {
2427
remote: '/',
@@ -69,5 +72,14 @@ export default defineNuxtConfig({
6972
},
7073
unocss: {
7174
icons: true,
75+
theme: {
76+
colors: {
77+
'shark-500': '#202830',
78+
'shark-400': '#333c45',
79+
'shark-300': '#3F4953',
80+
'shark-200': '#4F5A65',
81+
'shark-100': '#636E7A',
82+
},
83+
},
7284
},
7385
})

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@octokit/rest": "^21.0.2",
2121
"@octokit/webhooks-types": "^7.6.1",
2222
"@unocss/nuxt": "^0.65.1",
23+
"@unocss/reset": "^0.65.1",
2324
"hex-rgb": "^5.0.0",
2425
"ml-distance": "^4.0.1",
2526
"ml-kmeans": "^6.0.0",

pnpm-lock.yaml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)