diff --git a/.gitignore b/.gitignore
index 7c666cd..ad58a49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,5 +4,4 @@ dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
-static/*heute.json
-static/*morgen.json
+static/*mensa*.json
diff --git a/src/App.vue b/src/App.vue
index 5d99911..173bc88 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,9 +3,7 @@
Essen in Göttingen
@@ -18,17 +16,30 @@
+
diff --git a/src/assets/links.css b/src/assets/links.css
new file mode 100644
index 0000000..2a85c24
--- /dev/null
+++ b/src/assets/links.css
@@ -0,0 +1,15 @@
+/* mrmrs.io/links */
+a {
+ transition: color .4s;
+ color: #265C83;
+}
+
+a:link,
+a:visited { color: #265C83; }
+a:hover { color: #7FDBFF; }
+a:active {
+ transition: color .3s;
+ color: #007BE6;
+}
+
+.link { text-decoration: none; }
diff --git a/src/components/Mensa.vue b/src/components/Mensa.vue
index fb4cf27..0d8fef9 100644
--- a/src/components/Mensa.vue
+++ b/src/components/Mensa.vue
@@ -1,8 +1,8 @@
- Heute
- Morgen
- Übermorgen
+
@@ -12,11 +12,33 @@ export default {
name: 'mensa',
data () {
return {
+ days: [1, 2, 3, 4, 5, 6],
+ dayOfWeek: {
+ 1: 'Montag',
+ 2: 'Dienstag',
+ 3: 'Mittwoch',
+ 4: 'Donnerstag',
+ 5: 'Freitag',
+ 6: 'Samstag'
+ }
}
},
- created () {
+ watch: {
+ '$route': function () {
+ if (!this.$route.fullPath.endsWith('/')) {
+ this.$router.replace(this.$route.fullPath + '/')
+ }
+ if (!this.$route.params.tag) {
+ this.$router.push('' + new Date().getDay())
+ }
+ }
+ },
+ mounted () {
+ if (!this.$route.fullPath.endsWith('/')) {
+ this.$router.replace(this.$route.fullPath + '/')
+ }
if (!this.$route.params.tag) {
- this.$router.replace(`heute`)
+ this.$router.push('' + new Date().getDay())
}
}
}
diff --git a/src/lib/Mensen.js b/src/lib/Mensen.js
index bc48d56..3757cc4 100644
--- a/src/lib/Mensen.js
+++ b/src/lib/Mensen.js
@@ -1,22 +1,22 @@
export default {
nordmensa: {
name: 'Nordmensa',
- url: name
+ url: 'nordmensa'
},
zentralmensa: {
name: 'Zentralmensa',
- url: name
+ url: 'zentralmensa'
},
turmmensa: {
name: 'Mensa am Turm',
- url: 'Mensa%20am%20Turm'
+ url: 'turmmensa'
},
mensaItalia: {
name: 'Mensa Italia',
- url: 'Mensa%20Italia'
+ url: 'mensaitalia'
},
bistroHAWK: {
name: 'Bistro HAWK',
- url: 'Bistro%20HAWK'
+ url: 'bistrohawk'
}
}