Skip to content

Commit

Permalink
feat: Upgrade to [email protected].
Browse files Browse the repository at this point in the history
  • Loading branch information
xiCO2k committed Jan 3, 2024
1 parent 991d8f7 commit 843c4a4
Show file tree
Hide file tree
Showing 12 changed files with 448 additions and 463 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
'eslint:recommended',
'plugin:vue/vue3-recommended',
],
ignorePatterns: ['node_modules/**/*', 'vendor/**/*', 'public/**/*'],
ignorePatterns: ['node_modules/**/*', 'vendor/**/*', 'public/**/*', 'bootstrap/**/*'],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
Expand Down
279 changes: 137 additions & 142 deletions composer.lock

Large diffs are not rendered by default.

462 changes: 225 additions & 237 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions resources/js/Pages/Error.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
<template>
<Head :title="title" />
<h1 class="text-lg sm:text-2xl md:text-4xl lg:text-5xl font-bold text-center mt-8 mb-8">
{{ title }}
</h1>
<div class="text-center">
{{ description }}
</div>
<div class="mt-8 text-center">
<Link :href="route('home')" class="link-underline">
&larr; Go Back
</Link>
</div>
</template>

<script setup>
const props = defineProps({ status: Number });
Expand All @@ -30,3 +15,18 @@ const description = {
403: 'Sorry, you are forbidden from accessing this page.',
}[props.status];
</script>

<template>
<Head :title="title" />
<h1 class="text-lg sm:text-2xl md:text-4xl lg:text-5xl font-bold text-center mt-8 mb-8">
{{ title }}
</h1>
<div class="text-center">
{{ description }}
</div>
<div class="mt-8 text-center">
<Link :href="route('home')" class="link-underline">
&larr; Go Back
</Link>
</div>
</template>
16 changes: 8 additions & 8 deletions resources/js/Pages/GivenTalks.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<script setup>
import Markdown from '@/Shared/Markdown.vue'
defineProps({
posts: Object,
})
</script>

<template>
<Head title="Given Talks">
<meta property="og:title" content="Given Talks">
Expand Down Expand Up @@ -27,11 +35,3 @@
<Markdown>{{ post.text }}</Markdown>
</article>
</template>

<script setup>
import Markdown from '@/Shared/Markdown.vue'
defineProps({
posts: Object,
})
</script>
11 changes: 6 additions & 5 deletions resources/js/Pages/Post.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<script setup>
import Markdown from '@/Shared/Markdown.vue'
defineProps({ post: Object })
</script>

<template>
<Head :title="post.title">
<meta property="og:title" :content="post.title">
Expand All @@ -19,8 +25,3 @@
<Markdown>{{ post.text }}</Markdown>
</article>
</template>
<script setup>
import Markdown from '@/Shared/Markdown.vue'
defineProps({ post: Object })
</script>
61 changes: 31 additions & 30 deletions resources/js/Shared/CodeSnippet.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
<script setup>
import { ref, onMounted, useSlots, watch, inject } from 'vue';
const props = defineProps({
lang: String,
name: String,
lineNumbers: Boolean,
})
const lines = ref('');
const slots = useSlots();
const highlighter = inject('highlighter');
highlighter.install();
onMounted(() => setCode());
watch(highlighter.loaded, () => setCode());
const setCode = () => {
lines.value = highlighter.getLines(
slots.default().map(element => element.children).join('').replace(/\n$/, ''),
props.lang,
);
}
const tokenFontStyle = ({ fontStyle }) => ({
2: 'font-bold',
1: 'italic',
4: 'underline',
})[fontStyle];
</script>

<template>
<div class="code-snippet w-full">
<div class="px-6 pt-4 pb-2 bg-black rounded-lg bg-opacity-60 w-full">
Expand Down Expand Up @@ -37,33 +68,3 @@
</div>
</div>
</template>
<script setup>
import { ref, onMounted, useSlots, watch, inject } from 'vue';
const props = defineProps({
lang: String,
name: String,
lineNumbers: Boolean,
})
const lines = ref('');
const slots = useSlots();
const highlighter = inject('highlighter');
highlighter.install();
onMounted(() => setCode());
watch(highlighter.loaded, () => setCode());
const setCode = () => {
lines.value = highlighter.getLines(
slots.default().map(element => element.children).join('').replace(/\n$/, ''),
props.lang,
);
}
const tokenFontStyle = ({ fontStyle }) => ({
2: 'font-bold',
1: 'italic',
4: 'underline',
})[fontStyle];
</script>
12 changes: 6 additions & 6 deletions resources/js/Shared/HomeHeader.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<script setup>
import squareImgWebp from 'img/square.webp';
import squareImg from 'img/square.jpg';
import MainNav from './MainNav.vue'
</script>

<template>
<header class="flex flex-col items-center pt-4 sm:pt-8 px-4">
<picture>
Expand Down Expand Up @@ -28,9 +34,3 @@
<MainNav class="mt-8" />
</header>
</template>

<script setup>
import squareImgWebp from 'img/square.webp';
import squareImg from 'img/square.jpg';
import MainNav from './MainNav.vue'
</script>
8 changes: 4 additions & 4 deletions resources/js/Shared/MainFooter.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script setup>
const year = (new Date()).getFullYear()
</script>

<template>
<footer class="px-8 my-12 w-full max-w-7xl text-xs text-white text-opacity-50 text-center">
© {{ year }}. No tracking or ads.
</footer>
</template>

<script setup>
const year = (new Date()).getFullYear()
</script>
12 changes: 6 additions & 6 deletions resources/js/Shared/MainHeader.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<script setup>
import squareImgWebp from 'img/square.webp';
import squareImg from 'img/square.jpg';
import MainNav from './MainNav.vue'
</script>

<template>
<header class="pt-6 sm:pt-8 px-6 sm:px-8 flex flex-col sm:flex-row w-full max-w-7xl items-center sm:justify-between mb-4 sm:mb-8">
<Link
Expand All @@ -21,9 +27,3 @@
<MainNav />
</header>
</template>

<script setup>
import squareImgWebp from 'img/square.webp';
import squareImg from 'img/square.jpg';
import MainNav from './MainNav.vue'
</script>
10 changes: 5 additions & 5 deletions resources/js/Shared/MainLayout.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<script setup>
import MainHeader from './MainHeader.vue'
import MainFooter from './MainFooter.vue'
</script>

<template>
<MainHeader />
<div class="flex-1">
Expand All @@ -7,8 +12,3 @@
</div>
<MainFooter />
</template>

<script setup>
import MainHeader from './MainHeader.vue'
import MainFooter from './MainFooter.vue'
</script>
8 changes: 4 additions & 4 deletions resources/js/Shared/PostCard.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script setup>
defineProps({ post: Object })
</script>

<template>
<article>
<Link
Expand All @@ -16,7 +20,3 @@
</Link>
</article>
</template>

<script setup>
defineProps({ post: Object })
</script>

0 comments on commit 843c4a4

Please sign in to comment.