housekeeping
This commit is contained in:
parent
73147144e7
commit
a47a9918e7
19
index.html
19
index.html
|
@ -1,19 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div data-vue-component="archive-list"
|
|
||||||
data-base_url="https://dev-archive.hangar.org">
|
|
||||||
</div>
|
|
||||||
<script src="/dist/archive-list.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
http-server -o
|
|
||||||
-->
|
|
|
@ -13,7 +13,7 @@ This file is part of ArciveList.
|
||||||
<section class="collections-list">
|
<section class="collections-list">
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h2> Latest in collections</h2>
|
<h2>Latest in collections</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="">
|
<main class="">
|
||||||
|
@ -109,25 +109,10 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.setSites(JSON.parse(this.collections))
|
this.setSites(JSON.parse(this.collections))
|
||||||
/*
|
|
||||||
var self = this;
|
|
||||||
axios.get(this.api_endpoint +'/sites', {
|
|
||||||
})
|
|
||||||
.then(function (response) {
|
|
||||||
console.log(response.data)
|
|
||||||
self.sites = response.data
|
|
||||||
})
|
|
||||||
.catch(function (error) {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/*
|
|
||||||
site_url: function(slug) {
|
|
||||||
return this.base_url + '/s/' + slug
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'getDisplayedSites'
|
'getDisplayedSites'
|
||||||
]),
|
]),
|
||||||
|
@ -139,9 +124,7 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
api_endpoint: function() {
|
|
||||||
return this.base_url + '/api'
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -6,25 +6,12 @@ This file is part of ArchiveList.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
//import VueMq from 'vue-mq'
|
|
||||||
import ArchiveList from "../components/archiveList.vue";
|
import ArchiveList from "../components/archiveList.vue";
|
||||||
|
|
||||||
//import 'es6-promise/auto'
|
|
||||||
import store from "../store.js"
|
import store from "../store.js"
|
||||||
//import i18n from "../i18n.js"
|
|
||||||
export const bus = new Vue();
|
export const bus = new Vue();
|
||||||
|
|
||||||
var ComponentClass = Vue.extend(ArchiveList)
|
var ComponentClass = Vue.extend(ArchiveList)
|
||||||
/*
|
|
||||||
.use(VueMq, {
|
|
||||||
breakpoints: { // default breakpoints - customize this
|
|
||||||
sm: 450,
|
|
||||||
md: 1250,
|
|
||||||
lg: Infinity,
|
|
||||||
},
|
|
||||||
defaultBreakpoint: 'sm' // customize this for SSR
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
document.querySelectorAll("[data-vue-component=archive-list]")
|
document.querySelectorAll("[data-vue-component=archive-list]")
|
||||||
.forEach((element) => {
|
.forEach((element) => {
|
||||||
new ComponentClass({
|
new ComponentClass({
|
||||||
|
@ -32,8 +19,5 @@ document.querySelectorAll("[data-vue-component=archive-list]")
|
||||||
propsData: { ...element.dataset },
|
propsData: { ...element.dataset },
|
||||||
props: ["collections"],
|
props: ["collections"],
|
||||||
store: store,
|
store: store,
|
||||||
/*
|
|
||||||
i18n: i18n,
|
|
||||||
*/
|
|
||||||
}).$mount(element);
|
}).$mount(element);
|
||||||
});
|
});
|
||||||
|
|
|
@ -38,11 +38,6 @@ const store = new Vuex.Store({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
/*
|
|
||||||
getSites: state => {
|
|
||||||
return state.sites
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
getDisplayedSites: state => {
|
getDisplayedSites: state => {
|
||||||
if (state.search_text === "") {
|
if (state.search_text === "") {
|
||||||
return state.sites
|
return state.sites
|
||||||
|
|
Loading…
Reference in New Issue