Skip to content

Commit

Permalink
simplify app
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Feb 11, 2024
1 parent fb9e8a3 commit 477ff38
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 92 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Compile Javascript assets
run: |
make
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './static/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

static
Ideen/~$kriterienkataloge.xlsx
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build-ui-docker:
docker run --rm -v ${PWD}/pupil-submission-page:/app -v ${PWD}/static/dist/:/app/dist -w /app --entrypoint vite mam10eks/github-page-tutorial:0.0.2 build
2 changes: 1 addition & 1 deletion pupil-submission-page/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "webis/tira-application:basis-0.0.97",
"image": "mam10eks/github-page-tutorial:0.0.2",
"customizations": {
"vscode": {
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "ms-toolsai.jupyter"]
Expand Down
22 changes: 6 additions & 16 deletions pupil-submission-page/src/components/MainStudentPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,16 @@ import Stepper_4 from "./Stepper_4.vue"

<!-- eslint-disable vue/valid-v-slot -->
<template>
<v-container>
<v-stepper :items="['Deine Aufgabe', 'Baue Deinen Datensatz', 'Trainiere Deine KI', 'Teste Deine KI']">
<template v-slot:item.1>
<Stepper_1/>
</template>
<v-stepper :items="['Deine Aufgabe', 'Baue Deinen Datensatz', 'Trainiere Deine KI', 'Teste Deine KI']" next-text="Weiter" prev-text="Zur&Uuml;ck">
<template v-slot:item.1><Stepper_1/></template>

<template v-slot:item.2>
<Stepper_2/>
</template>
<template v-slot:item.2><Stepper_2/></template>

<template v-slot:item.3>
<Stepper_3/>
</template>
<template v-slot:item.3><Stepper_3/></template>

<template v-slot:item.4>
<Stepper_4/>
</template>
<template v-slot:item.4><Stepper_4/></template>

</v-stepper>
</v-container>
</v-stepper>
</template>

<style></style>
4 changes: 2 additions & 2 deletions pupil-submission-page/src/components/Stepper_1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</v-row>
</template>
</v-img>
<v-card>
<div class="text-center">
<v-btn @click="downloadMyPdf" color="blue" class="mt-5">Download Aufgabe</v-btn>
</v-card>
</div>
</v-card>
</template>

Expand Down
6 changes: 3 additions & 3 deletions pupil-submission-page/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ import App from './App.vue';
import { createApp } from 'vue';
import { createVuetify } from 'vuetify'
import 'vuetify/styles' // Import Vuetify styles
import router from './router'

// Create a Vuetify instance with any options you want to include
const vuetify = createVuetify({
// theme, icons, etc.
});
// Plugins
import { registerPlugins } from '@/plugins'


// Create and mount the root instance of your Vue app
const app = createApp(App)

app.use(vuetify)
registerPlugins(app)
app.use(router)

app.mount('#app')
18 changes: 0 additions & 18 deletions pupil-submission-page/src/plugins/index.ts

This file was deleted.

26 changes: 0 additions & 26 deletions pupil-submission-page/src/plugins/vuetify.ts

This file was deleted.

8 changes: 2 additions & 6 deletions pupil-submission-page/src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { createRouter, createWebHistory } from "vue-router";


const router = createRouter({
history: createWebHistory(),
routes: [
{
path: "/",
name: "StudentPage",
component: () => import("../views/StudentPageView.vue"),
},
{path: "/", component: () => import("../views/StudentPageView.vue")},
{path: '/:pathMatch(.*)*', component: () => import("../views/StudentPageView.vue")},
],
});

Expand Down
21 changes: 2 additions & 19 deletions pupil-submission-page/src/views/StudentPageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,5 @@ import Header from "@/components/Header.vue";
</script>

<template>
<v-app>
<v-main>
<Header />
<StudentPage />
</v-main>
</v-app>
</template>


<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
<StudentPage />
</template>
17 changes: 17 additions & 0 deletions pupil-submission-page/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,21 @@ export default defineConfig({
},
port: 3000,
},
build: {
rollupOptions: {
output: {
// TODO: We would usually like to use assets/ here, but we first have to fix this disraptor problem: https://github.com/disraptor/disraptor/issues/33
assetFileNames: 'assets-public/[name].[ext]',
chunkFileNames: 'chunks/[name].js',
entryFileNames: 'entries/[name].js',
},
},
outDir: '/dist',
},
experimental: {
renderBuiltUrl(filename: string, { hostType }: { hostType: 'js' | 'css' | 'html' }) {
// Github pages places the resourecs/assets at this location
return '/tira-for-school/dist/' + filename
}
}
})
Empty file removed pupil-submission-page/
Empty file.

0 comments on commit 477ff38

Please sign in to comment.