2021-11-12 09:13:22 +00:00
|
|
|
import { Options, Vue } from "vue-class-component";
|
2021-11-26 10:29:13 +00:00
|
|
|
import { Watch } from "vue-property-decorator";
|
|
|
|
import { RouteLocation } from "vue-router";
|
2021-11-12 09:13:22 +00:00
|
|
|
import HelloWorld from "./components/HelloWorld/HelloWorld.vue";
|
2021-11-23 16:30:19 +00:00
|
|
|
import HomeViewComponent from "./views/home-view/home-view-component.vue";
|
2021-11-25 11:08:58 +00:00
|
|
|
import HelpViewComponent from "./views/map-view/help-view-component.vue";
|
2021-11-24 15:01:53 +00:00
|
|
|
import SearchViewComponent from "./views/search-view/search-view-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-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/
|
2021-11-12 09:13:22 +00:00
|
|
|
@Options({
|
|
|
|
components: {
|
|
|
|
HelloWorld,
|
2021-11-23 16:30:19 +00:00
|
|
|
HomeViewComponent,
|
|
|
|
// VsInput,
|
|
|
|
// VsResult,
|
|
|
|
// FacetCategory,
|
|
|
|
// ActiveFacetCategory,
|
2021-11-25 11:08:58 +00:00
|
|
|
HelpViewComponent,
|
2021-11-24 15:01:53 +00:00
|
|
|
SearchViewComponent,
|
2021-11-25 11:08:58 +00:00
|
|
|
ServiceViewComponent,
|
|
|
|
OaiViewComponent,
|
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;
|
|
|
|
|
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");
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
public showMobilemenu(event: PointerEvent): void {
|
|
|
|
// 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")
|
|
|
|
protected oRouteChangedChanged(to: RouteLocation, from: RouteLocation): any {
|
|
|
|
// console.log("setting " + from.path + " to " + to.path);
|
|
|
|
this.active = false;
|
2021-11-25 11:08:58 +00:00
|
|
|
}
|
|
|
|
}
|