Compare commits

...

4 commits

Author SHA1 Message Date
73c9315fbf Add file copyright notice headers 2025-07-23 23:20:51 +02:00
3469a9f946 Remove some old READMEs 2025-07-23 23:20:26 +02:00
0fe03fdd5b Remove unplugin-vue-router leftovers
Dynamic routing is not my thing
2025-07-23 23:11:42 +02:00
1b2f7a7941 Add simple layout system 2025-07-23 23:02:53 +02:00
17 changed files with 157 additions and 80 deletions

View file

@ -1,3 +1,12 @@
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
package app
import (

View file

@ -1,3 +1,12 @@
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
package main
import "git.zervo.org/zervo/alpacca/app"

View file

@ -1,3 +1,12 @@
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
package alpacca
import "embed"

View file

@ -1,3 +1,12 @@
<!--
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
-->
<!DOCTYPE html>
<html lang="en">
<head>

View file

@ -1,3 +1,12 @@
<!--
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
-->
<template>
<v-app>
<v-main>

View file

@ -1,3 +1,12 @@
<!--
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
-->
<template>
<v-container class="fill-height" max-width="900">
<div>

View file

@ -1,35 +0,0 @@
# Components
Vue template files in this folder are automatically imported.
## 🚀 Usage
Importing is handled by [unplugin-vue-components](https://github.com/unplugin/unplugin-vue-components). This plugin automatically imports `.vue` files created in the `src/components` directory, and registers them as global components. This means that you can use any component in your application without having to manually import it.
The following example assumes a component located at `src/components/MyComponent.vue`:
```vue
<template>
<div>
<MyComponent />
</div>
</template>
<script lang="ts" setup>
//
</script>
```
When your template is rendered, the component's import will automatically be inlined, which renders to this:
```vue
<template>
<div>
<MyComponent />
</div>
</template>
<script lang="ts" setup>
import MyComponent from '@/components/MyComponent.vue'
</script>
```

View file

@ -0,0 +1,16 @@
<!--
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
-->
<template>
<v-app>
<v-main>
<slot />
</v-main>
</v-app>
</template>

View file

@ -1,9 +1,14 @@
/**
* main.ts
*
* Bootstraps Vuetify and other plugins then mounts the App`
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
/* main.ts: Bootstraps Vuetify and other plugins then mounts the App */
// Composables
import { createApp } from 'vue'

View file

@ -1,3 +0,0 @@
# Plugins
Plugins are a way to extend the functionality of your Vue application. Use this folder for registering plugins that you want to use globally.

View file

@ -1,9 +1,14 @@
/**
* plugins/index.ts
*
* Automatically included in `./src/main.ts`
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
/* plugins/index.ts: Registers Vue plugins */
// Types
import type { App } from 'vue'

View file

@ -1,9 +1,14 @@
/**
* plugins/vuetify.ts
*
* Framework documentation: https://vuetifyjs.com`
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
/* plugins/vuetify.ts: Plugin initializer for vuetify */
// Composables
import { createVuetify } from 'vuetify'

View file

@ -1,8 +1,20 @@
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
/* router/index.ts: Registers the Vue router and routes */
import { createRouter, createWebHistory } from 'vue-router'
import Index from '@/views/Index.vue'
import { withLayout } from './layoutWrapper'
const routes = [
{ path: '/', component: Index },
{ path: '/', component: withLayout(Index) },
]
const router = createRouter({

View file

@ -0,0 +1,24 @@
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
/* router/layoutWrapper.ts: Simple layout implementation that wraps views in layouts */
import { defineComponent, h } from 'vue'
import DefaultLayout from '@/layouts/DefaultLayout.vue'
export function withLayout (pageComponent: any, layoutComponent: any = DefaultLayout) {
return defineComponent({
name: 'WrappedWithLayout',
render () {
return h(layoutComponent, {}, {
default: () => h(pageComponent),
})
},
})
}

View file

@ -1,23 +0,0 @@
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
// It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
declare module 'vue-router/auto-routes' {
import type {
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'vue-router'
/**
* Route name map generated by unplugin-vue-router
*/
export interface RouteNamedMap {
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
}
}

View file

@ -1,3 +1,12 @@
<!--
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
-->
<template>
<HelloWorld />
</template>

View file

@ -1,3 +1,14 @@
/*
Alpacca: The modern package repository hosting platform.
Copyright (C) 2025, Zervó Zadachin
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
The full copyright notice can be found at https://git.zervo.org/zervo/Alpacca/src/branch/main/COPYRIGHT.
*/
/* vite.config.ts: Vite configuration */
/* eslint-disable perfectionist/sort-imports */
// Plugins
import Vue from '@vitejs/plugin-vue'
@ -41,9 +52,6 @@ export default defineConfig({
exclude: [
'vuetify',
'vue-router',
'unplugin-vue-router/runtime',
'unplugin-vue-router/data-loaders',
'unplugin-vue-router/data-loaders/basic',
],
},
define: { 'process.env': {} },