2023-01-13 10:55:31 +00:00
|
|
|
import { Component, Vue, Watch } from "vue-facing-decorator";
|
2021-12-10 10:57:19 +00:00
|
|
|
// import { RouteLocation } from "vue-router";
|
2021-11-23 16:30:19 +00:00
|
|
|
import HomeViewComponent from "./views/home-view/home-view-component.vue";
|
2022-01-25 16:22:44 +00:00
|
|
|
import HelpViewComponent from "./views/help-view/help-view-component.vue";
|
2022-01-26 15:32:19 +00:00
|
|
|
import MapViewComponent from "./views/map-view/map-view.component.vue";
|
2021-11-24 15:01:53 +00:00
|
|
|
import SearchViewComponent from "./views/search-view/search-view-component.vue";
|
2022-01-14 15:49:31 +00:00
|
|
|
import DatasetDetailComponent from "./views/dataset-detail.component/dataset-detail.component.vue";
|
2021-11-25 11:08:58 +00:00
|
|
|
import ServiceViewComponent from "./views/services-view/service-view-component.vue";
|
|
|
|
import OaiViewComponent from "./views/oai-view/oai-view-component.vue";
|
2021-11-30 14:26:40 +00:00
|
|
|
import ContactViewComponent from "./views/contact-view/contact-view-component.vue";
|
2021-12-01 14:45:01 +00:00
|
|
|
import SitelinkViewComponent from "./views/sitelink-view/sitelink-view-component.vue";
|
2021-12-02 10:35:44 +00:00
|
|
|
import ImprintViewComponent from "./views/imprint-view/imprint-view-component.vue";
|
2021-12-06 13:11:20 +00:00
|
|
|
import TermsViewComponent from "./views/terms-view/terms-view-component";
|
2024-03-18 09:04:36 +00:00
|
|
|
// import { VUE_API } from "./constants";
|
2021-11-23 16:30:19 +00:00
|
|
|
// import VsInput from "./components/vs-input/vs-input.vue";
|
|
|
|
// import VsResult from "./components/vs-result/vs-result.vue";
|
|
|
|
// import FacetCategory from "./components/face-category/facet-category.vue";
|
|
|
|
// import ActiveFacetCategory from "./components/active-facet-category/active-facet-category.vue";
|
|
|
|
|
|
|
|
// import { SolrSettings } from "@/models/solr";
|
|
|
|
// import { DatasetService } from "./services/dataset.service";
|
|
|
|
// import { Suggestion } from "./models/dataset";
|
|
|
|
// import { SolrResponse, FacetFields, FacetItem, FacetResults, FacetInstance } from "./models/headers";
|
|
|
|
// import { ActiveFilterCategories } from "@/models/solr";
|
2021-11-12 09:13:22 +00:00
|
|
|
|
2021-11-26 10:29:13 +00:00
|
|
|
// https://devsoniq.com/how-to-toggle-bulma-css-navbar-in-your-vue-js-project/
|
2023-01-13 10:55:31 +00:00
|
|
|
@Component({
|
2021-11-12 09:13:22 +00:00
|
|
|
components: {
|
2023-01-16 14:19:14 +00:00
|
|
|
// HelloWorld,
|
2021-11-23 16:30:19 +00:00
|
|
|
HomeViewComponent,
|
|
|
|
// VsInput,
|
|
|
|
// VsResult,
|
|
|
|
// FacetCategory,
|
|
|
|
// ActiveFacetCategory,
|
2021-11-25 11:08:58 +00:00
|
|
|
HelpViewComponent,
|
2022-01-25 16:22:44 +00:00
|
|
|
MapViewComponent,
|
2021-11-24 15:01:53 +00:00
|
|
|
SearchViewComponent,
|
2021-12-10 15:43:02 +00:00
|
|
|
DatasetDetailComponent,
|
2021-11-25 11:08:58 +00:00
|
|
|
ServiceViewComponent,
|
|
|
|
OaiViewComponent,
|
2021-11-30 14:26:40 +00:00
|
|
|
ContactViewComponent,
|
2021-12-01 14:45:01 +00:00
|
|
|
SitelinkViewComponent,
|
2021-12-02 10:35:44 +00:00
|
|
|
ImprintViewComponent,
|
2021-12-06 13:11:20 +00:00
|
|
|
TermsViewComponent,
|
2021-11-12 09:13:22 +00:00
|
|
|
},
|
|
|
|
})
|
2021-11-25 11:08:58 +00:00
|
|
|
export default class App extends Vue {
|
2021-11-26 10:29:13 +00:00
|
|
|
public active = false;
|
2024-03-18 09:04:36 +00:00
|
|
|
public portal = "https://data.tethys.at/login"; // VUE_API + "/login";
|
|
|
|
|
|
|
|
get currentYear() {
|
|
|
|
return new Date().getFullYear();
|
|
|
|
}
|
2021-11-26 10:29:13 +00:00
|
|
|
|
2021-11-25 11:08:58 +00:00
|
|
|
mounted(): void {
|
2021-11-26 10:29:13 +00:00
|
|
|
// const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"), 0);
|
|
|
|
// // Check if there are any navbar burgers
|
|
|
|
// if ($navbarBurgers.length > 0) {
|
|
|
|
// // Add a click event on each of them
|
|
|
|
// $navbarBurgers.forEach((elNavBurger) => {
|
|
|
|
// elNavBurger.addEventListener("click", () => {
|
|
|
|
// // Get the target from the "data-target" attribute
|
|
|
|
// const targetNavbar = elNavBurger.dataset.target;
|
|
|
|
// const $target = document.getElementById(targetNavbar);
|
|
|
|
// // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
|
|
|
|
// elNavBurger.classList.toggle("is-active");
|
|
|
|
// $target?.classList.toggle("is-active");
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
2024-03-16 15:42:25 +00:00
|
|
|
public showMobilemenu(event: MouseEvent): void {
|
2021-11-26 10:29:13 +00:00
|
|
|
// Don't follow the link
|
|
|
|
event.preventDefault();
|
|
|
|
this.active = !this.active;
|
|
|
|
}
|
2021-11-25 11:08:58 +00:00
|
|
|
|
2021-11-26 10:29:13 +00:00
|
|
|
@Watch("$route")
|
2021-12-10 10:57:19 +00:00
|
|
|
protected oRouteChangedChanged(): void {
|
|
|
|
//(to: RouteLocation, from: RouteLocation): void {
|
2021-11-26 10:29:13 +00:00
|
|
|
// console.log("setting " + from.path + " to " + to.path);
|
|
|
|
this.active = false;
|
2021-11-25 11:08:58 +00:00
|
|
|
}
|
|
|
|
}
|