add static site generation including robots.txt and sitemap.xml

This commit is contained in:
survellow
2024-07-03 17:33:12 +02:00
parent a003ba736c
commit cf638cf93c
31 changed files with 846 additions and 923 deletions

View File

@@ -19,14 +19,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<script lang="ts" setup>
import tokenStore from "@/store/tokenStore.ts";
import { useToast } from "primevue/usetoast";
import { computed, onMounted } from "vue";
import router from "@/router";
import { computed, inject, onMounted } from "vue";
import { router } from "@/main";
import { useI18n } from "vue-i18n";
const { t } = useI18n({ useScope: "global" });
const toast = useToast();
const domain = window.location.hostname;
const domain = inject<string>("domain")!;
const getLink = () =>
"https://" + domain + "/api/feed?token=" + tokenStore().token;

View File

@@ -27,7 +27,7 @@ import ModuleSelection from "@/components/ModuleSelection.vue";
import { Module } from "@/model/module.ts";
import { useI18n } from "vue-i18n";
import moduleStore from "@/store/moduleStore";
import router from "@/router";
import { router } from "@/main";
async function getModules() {
modules.value = await fetchModulesByCourseAndSemester(

View File

@@ -42,7 +42,7 @@ const hasContent = computed(() => {
</script>
<template>
<heading class="flex flex-column align-items-center mt-0">
<div class="flex flex-column align-items-center mt-0">
<div
class="flex align-items-center justify-content-center gap-3 mx-2 mb-4 transition-rolldown"
:class="{ 'md:mt-8': hideContent }"
@@ -87,7 +87,7 @@ const hasContent = computed(() => {
>
<slot name="content"></slot>
</div>
</heading>
</div>
</template>
<style scoped>

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<script lang="ts" setup>
import moduleStore from "@/store/moduleStore";
import router from "@/router";
import {router} from "@/main";
import AdditionalModuleTable from "@/components/AdditionalModuleTable.vue";
const store = moduleStore();

View File

@@ -19,7 +19,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<script setup lang="ts">
import moduleStore from "@/store/moduleStore.ts";
import { createIndividualFeed } from "@/api/createFeed.ts";
import router from "@/router";
import { router } from "@/main";
import tokenStore from "@/store/tokenStore.ts";
import { Ref, computed, inject, ref, onMounted } from "vue";
import ModuleTemplateDialog from "@/components/ModuleTemplateDialog.vue";

View File

@@ -19,7 +19,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<script lang="ts" setup>
import { defineAsyncComponent } from "vue";
import moduleStore from "@/store/moduleStore";
import router from "@/router";
import { router } from "@/main";
const store = moduleStore();
const AdditionalModuleTable = defineAsyncComponent(

View File

@@ -21,7 +21,7 @@ import { Ref, ref } from "vue";
import { Module } from "@/model/module";
import moduleStore from "@/store/moduleStore";
import { getCalender } from "@/api/loadCalendar";
import router from "@/router";
import { router } from "@/main";
import tokenStore from "@/store/tokenStore";
import { useToast } from "primevue/usetoast";
import { useI18n } from "vue-i18n";

View File

@@ -23,7 +23,7 @@ import moduleStore from "@/store/moduleStore";
import { fetchAllModules } from "@/api/fetchCourse.ts";
import { deleteIndividualFeed, saveIndividualFeed } from "@/api/createFeed.ts";
import tokenStore from "@/store/tokenStore";
import router from "@/router";
import { router } from "@/main";
import ModuleTemplateDialog from "@/components/ModuleTemplateDialog.vue";
import { onlyWhitespace } from "@/helpers/strings.ts";
import { useI18n } from "vue-i18n";

View File

@@ -151,7 +151,7 @@ import DynamicPage from "@/view/DynamicPage.vue";
import { requestFreeRooms } from "@/api/requestFreeRooms.ts";
import { FilterMatchMode } from "primevue/api";
import { padStart } from "@fullcalendar/core/internal";
import router from "@/router";
import { router } from "@/main";
import { formatYearMonthDay } from "@/helpers/dates";
const mobilePage = inject("mobilePage") as Ref<boolean>;

View File

@@ -22,7 +22,7 @@ import { fetchRoom } from "@/api/fetchRoom.ts";
import DynamicPage from "@/view/DynamicPage.vue";
import RoomOccupation from "@/components/RoomOccupation.vue";
import { computedAsync } from "@vueuse/core";
import router from "@/router";
import { router } from "@/main";
type Room = {
name: string;