Skip to content

Commit 73b21eb

Browse files
committed
Simplify layout implementation
1 parent 4e3fdb7 commit 73b21eb

15 files changed

Lines changed: 35 additions & 26 deletions

File tree

components/ExternalIndicator.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const props = defineProps({
1212
class="inline-flex items-center gap-1 rounded border border-orange-500/30 bg-orange-500/20 px-2 py-0.5"
1313
>
1414
<span
15-
class="text-[10px] leading-none uppercase tracking-wide text-orange-300"
15+
class="text-[10px] uppercase leading-none tracking-wide text-orange-300"
1616
>External - {{ site }}</span
1717
>
1818
<svg

components/Header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const route = useRoute();
33
</script>
44

55
<template>
6-
<nav class="container mx-auto py-3">
6+
<nav class="container py-3">
77
<div class="flex items-center text-gray-700 dark:text-gray-200">
88
<div class="flex-1" />
99
<div class="flex items-center space-x-2">

components/section/BlogPosts.vue

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ const props = defineProps({
55
});
66
77
function externalSite(article) {
8-
if (!article?.external_url) return ''
9-
if (article?.external_site) return article.external_site
8+
if (!article?.external_url) return "";
9+
if (article?.external_site) return article.external_site;
1010
try {
11-
const u = new URL(article.external_url)
12-
return u.hostname.replace(/^www\./, '')
11+
const u = new URL(article.external_url);
12+
return u.hostname.replace(/^www\./, "");
1313
} catch {
14-
return article.external_url
14+
return article.external_url;
1515
}
1616
}
1717
</script>
1818
1919
<template>
20-
<section class="container mx-auto space-y-2">
20+
<section class="container space-y-2">
2121
<div class="grid grid-cols-1 gap-3">
2222
<div v-for="(article, ix) of articles" :key="ix">
2323
<NuxtLink :to="article.path">
@@ -32,7 +32,10 @@ function externalSite(article) {
3232
{{ article.title }}
3333
</div>
3434
<div class="flex items-center gap-2 md:ml-auto">
35-
<ExternalIndicator v-if="article.external_url" :site="externalSite(article)" />
35+
<ExternalIndicator
36+
v-if="article.external_url"
37+
:site="externalSite(article)"
38+
/>
3639
</div>
3740
</div>
3841
<template v-if="show_dates">

components/section/Interests.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<section class="text-white">
33
<div class="bg-gradient-to-b from-background to-transparent">
44
<div
5-
class="container mx-auto grid grid-cols-1 space-y-6 py-8 md:grid-cols-3 md:space-x-6 md:space-y-0"
5+
class="container grid grid-cols-1 space-y-6 py-8 md:grid-cols-3 md:space-x-6 md:space-y-0"
66
>
77
<div>
88
<div

components/section/Playground.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const filtered_links = computed(() => {
110110
<section
111111
class="to-background-dark bg-gradient-to-b from-transparent text-white"
112112
>
113-
<div class="container mx-auto py-8 text-white">
113+
<div class="container py-8 text-white">
114114
<div class="mb-2 grid grid-cols-1 gap-3 sm:grid-cols-3">
115115
<nuxt-link
116116
class="relative text-orange-500 ring-2 ring-white hover:text-white hover:ring-orange-500"

layouts/light.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<main>
33
<Header />
4-
<div class="container mx-auto h-screen font-display">
4+
<div class="container h-screen font-display">
55
<div class="flex flex-col border-2">
66
<slot />
77
</div>

pages/about.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="container mx-auto space-y-5 rounded-lg bg-white/20 py-5">
2+
<div class="container space-y-5 rounded-lg bg-white/20 py-5">
33
<SectionAboutMe />
44
<div class="flex flex-row items-center justify-center">
55
<div class="text-orange-500">

pages/blog/[...slug].vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function externalSite(p: any) {
3636

3737
<template>
3838
<div
39-
class="container mx-auto mb-10 max-w-[1024px] space-y-6 text-white shadow-lg"
39+
class="container mb-10 max-w-[1024px] space-y-6 text-white shadow-lg"
4040
v-if="page"
4141
>
4242
<!-- title -->
@@ -111,8 +111,9 @@ function externalSite(p: any) {
111111
rel="noopener noreferrer"
112112
class="font-semibold text-orange-300"
113113
>
114-
{{ externalSite(page) }} </a
115-
> blog.
114+
{{ externalSite(page) }}
115+
</a>
116+
blog.
116117
</div>
117118
</div>
118119

pages/blog/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ watch(
209209
<section
210210
class="min-h-screen bg-emerald-950 bg-[url('/images/noise.svg')] py-10 text-white"
211211
>
212-
<div class="container mx-auto space-y-8">
212+
<div class="container space-y-8">
213213
<div class="space-y-4">
214214
<div class="grid gap-4">
215215
<template v-for="article in paginatedArticles" :key="article._id">

pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const articles = await queryCollection("content")
88
<template>
99
<div class="min-h-screen bg-emerald-950 bg-[url('/images/noise.svg')]">
1010
<section class="bg-gradient-to-b from-background to-transparent py-2">
11-
<div class="container mx-auto my-7">
11+
<div class="container my-7">
1212
<div class="text-orange-500">
1313
<Logo />
1414
</div>

0 commit comments

Comments
 (0)