Skip to content

feat: rewrite #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions renovate.json → .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"config:base",
"schedule:weekly",
"group:allNonMajor",
":maintainLockFilesWeekly",
":rebaseStalePrs",
":semanticCommits"
],
"labels": ["dependencies"],
"packageRules": [
{
"matchUpdateTypes": ["patch", "lockFileMaintenance"],
"matchUpdateTypes": ["patch"],
"automerge": true
}
]
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
linting:
name: Linting
should-deploy:
name: Check if should deploy page
runs-on: ubuntu-lastest
if: github.event_name == 'push' || contains(github.ref, '/heads/master')
steps:
- name: Write output
run: echo "deploy=true" >> "$GITHUB_OUTPUT"

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -29,7 +38,7 @@ jobs:
typecheck:
name: Typecheck
runs-on: ubuntu-latest
needs: linting
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -42,13 +51,12 @@ jobs:
run: yarn --immutable
- name: Run typechecking
continue-on-error: true
run: yarn typecheck
run: yarn run typecheck

building:
name: Building
build:
name: Build
runs-on: ubuntu-latest
needs: linting
if: github.event_name != 'push' || !contains(github.ref, '/heads/master')
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -66,3 +74,18 @@ jobs:
run: yarn --immutable
- name: Building
run: yarn run generate
- name: Upload artifact
if: ${{ steps.should-deploy.outputs.deploy }}
uses: actions/upload-pages-artifact@v3
with:
path: .output/public

deploy-pages:
name: Deploy pages
runs-on: ubuntu-lastest
needs:
- build
- should-deploy
steps:
- name: Deploy artifact to GitHub Pages
uses: actions/deploy-pages@v4
51 changes: 0 additions & 51 deletions .github/workflows/deploy-pages.yml

This file was deleted.

894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.1.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.4.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ enableGlobalCache: true

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.1.cjs
yarnPath: .yarn/releases/yarn-4.4.1.cjs
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023-present HigherOrderLogic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
26 changes: 0 additions & 26 deletions app.vue

This file was deleted.

5 changes: 5 additions & 0 deletions app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<nuxt-layout>
<nuxt-page />
</nuxt-layout>
</template>
5 changes: 5 additions & 0 deletions app/assets/css/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
html {
&.dark-mode {
--at-apply: "bg-#050505"
}
}
5 changes: 5 additions & 0 deletions app/components/cd.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<nuxt-link v-if="$route.path !== '/'" :to="$route.path.split('/').slice(0, -1).join('/') || '/'">
cd ..
</nuxt-link>
</template>
21 changes: 21 additions & 0 deletions app/components/navbar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<header class="block p-4 flex">
<nuxt-link to="/">
<img
src="https://github.com/HigherOrderLogic.png"
alt="Logo"
class="border-rd-full w-12 h-a dark:(outline-#f5f5f5 outline-solid)"
>
</nuxt-link>
<div class="w-full" />
<nav class="flex flex-items-center gap-4 dark:text-#f5f5f5">
<nuxt-link to="/blogs">
Blogs
</nuxt-link>
<nuxt-link to="https://github.com/HigherOrderLogic">
<div class="i-mdi-github font-size-[24px]" />
</nuxt-link>
<theme-toggle />
</nav>
</header>
</template>
11 changes: 11 additions & 0 deletions app/components/theme-toggle.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<color-scheme>
<button
class="i-mdi-weather-sunny dark:i-mdi-weather-night font-size-[24px]"
@click="$colorMode.preference = $colorMode.preference === 'dark' ? 'light' : 'dark'"
/>
<template #placeholder>
<div class="i-mdi-weather-sunny font-size-[24px]" />
</template>
</color-scheme>
</template>
14 changes: 14 additions & 0 deletions app/error.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup lang="ts">
const { statusCode = 404, statusMessage = 'Page not found' } = useError().value
</script>

<template>
<nuxt-layout>
<h1>
{{ statusCode }}
</h1>
<p>
{{ statusMessage }}
</p>
</nuxt-layout>
</template>
11 changes: 11 additions & 0 deletions app/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<div class="font-normal font-[Inter_Variable] w-full">
<div>
<navbar />
<div class="m-a lg:prose lt-md:px-4 prose-neutral dark:prose-invert">
<slot />
<cd />
</div>
</div>
</div>
</template>
23 changes: 23 additions & 0 deletions app/pages/blogs/[...slugs].vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script setup lang="ts">
const ContentNotFound = defineComponent({
setup() {
showError({
statusCode: 404,
statusMessage: 'Blog not found',
})
},
})
</script>

<template>
<content-doc>
<template #default="{ doc }">
<h1>{{ doc.title }}</h1>
<p>{{ useDateFormat(doc.date, 'ddd, DD MMM YYYY') }}</p>
<content-renderer :value="doc" />
</template>
<template #not-found>
<content-not-found />
</template>
</content-doc>
</template>
21 changes: 21 additions & 0 deletions app/pages/blogs/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script setup lang="ts">
useHead({ title: 'Blogs' })
</script>

<template>
<div>
<h1>Blogs</h1>
<content-list v-slot="{ list }" path="/blogs">
<template v-for="blog in list.sort((a, b) => +new Date(a.date) - +new Date(b.date))" :key="blog._path">
<h2>
<nuxt-link :to="blog._path">
{{ blog.title }}
</nuxt-link>
</h2>
<p class="pl-4">
{{ useDateFormat(blog.date, 'DD MMM YYYY') }}
</p>
</template>
</content-list>
</div>
</template>
11 changes: 11 additions & 0 deletions app/pages/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<div>
<h1>
Hello!
</h1>
<p>
<!-- eslint-disable-next-line vue/singleline-html-element-content-newline -->
I'm <nuxt-link to="https://github.com/HigherOrderLogic">HigherOrderLogic</nuxt-link>.
</p>
</div>
</template>
51 changes: 0 additions & 51 deletions assets/css/index.scss

This file was deleted.

Loading