Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

exploration of printing button on the pages to strip the css and print text on pages #137

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"register-service-worker": "^1.7.1",
"vue": "^2.6.12",
"vue-cheetah-grid": "^0.22.3",
"vue-html-to-paper": "^1.4.3",
"vue-prism-component": "^1.2.0",
"vue-router": "^3.1.6",
"vuetify": "^2.2.21",
Expand Down
12 changes: 12 additions & 0 deletions src/components/FAQ/faqInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<v-container fluid>
<v-btn @click="expandAll">Expand All</v-btn>
<v-expansion-panels focusable hover tile multiple v-model="panel">
<v-expansion-panel v-for="(faq, index) in faqs" :key="index">
<v-expansion-panel-header class="" style="font-weight: 300; font-size:120% ">
Expand Down Expand Up @@ -77,6 +78,12 @@ export default {
}
}
},
mounted() {
Event.$on('printPrep', () => {
this.panel = [1,2,3]
console.log(this.panel)
})
},
methods : {
lookupOrder(name) {
var i;
Expand All @@ -86,6 +93,11 @@ export default {
return i;
}
}
},
expandAll() {
console.log(this.faqs.length)
this.panel = [1,2,3,4,5,6]//Array(this.faqs.length)
console.log(this.panel)
}
}
};
Expand Down
22 changes: 22 additions & 0 deletions src/components/core/PrintButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<template>
<v-btn outlined @click="print"><slot></slot></v-btn>
</template>

<script>
export default {
data () {
return {
output: null
}
},
props: {
printId: String,
},
methods: {
async print () {
Event.$emit('printPrep')
await this.$htmlToPaper(this.printId);
}
}
}
</script>
3 changes: 3 additions & 0 deletions src/components/core/Toolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
@click="onClick($event, link)"
>{{ link.text }}</v-btn>
<!--<PushNotification />-->
<PrintButton :printId="this.$route.name">Print Page</PrintButton>
<v-btn icon v-on:click="darkMode" class="ml-2">
<v-icon v-if="this.$vuetify.theme.dark">mdi-brightness-7</v-icon>
<v-icon v-else>mdi-brightness-4</v-icon>
Expand All @@ -49,6 +50,7 @@
<script>
import communityData from "@/assets/data/communityData.json";
import feedbackModal from "@/components/core/FeedbackModal.vue";
import PrintButton from "@/components/core/PrintButton.vue"
// import PushNotification from "@/components/core/PushNotifications";
import { mapMutations, mapGetters } from "vuex";
export default {
Expand All @@ -59,6 +61,7 @@ export default {
},
components: {
feedbackModal: feedbackModal,
PrintButton: PrintButton
},
computed: {
metalinks() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/homeScreen.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="py-0">
<v-container fluid class="py-0" id="homepage-template">
<v-row align="center">
<!-- <v-col md="3" sm="5">
<v-img
Expand Down
12 changes: 11 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,31 @@ import "./style.css";
// import firebase from "@/firebase";
import cssVars from "css-vars-ponyfill";
import Prism from 'prismjs';
import VueHtmlToPaper from 'vue-html-to-paper';
Prism.highlightAll();

cssVars({
watch: true,
});

// const printOptions = {
// "styles": [
// // "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css",
// // "https://unpkg.com/kidlat-css/css/kidlat.css",
// "src/style.css"
// ]
// }

IntersectionObserver.prototype.POLL_INTERVAL = 100; // time in ms

Vue.config.productionTip = false;

// firebase.auth.onAuthStateChanged(() => {
new Vue({
window.Event = new Vue({
router,
store,
vuetify,
render: h => h(App)
}).$mount("#app");
Vue.use(VueHtmlToPaper);
// });
2 changes: 1 addition & 1 deletion src/views/Faq.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10" class="pa-0">
<Header>
Expand Down
2 changes: 1 addition & 1 deletion src/views/GettingStarted.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10" class="pa-0">
<Header>
Expand Down
4 changes: 2 additions & 2 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10">
<homeStartScreen class="mb-4" />
Expand Down Expand Up @@ -118,7 +118,7 @@
components: {
homeStartScreen,
whatwedo,
wwdBasicCard,
wwdBasicCard
//aboutCommunity,
//events,
//featureEvents,
Expand Down
2 changes: 1 addition & 1 deletion src/views/Implementation.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10" class="pa-0 ma-0">
<Header>
Expand Down
2 changes: 1 addition & 1 deletion src/views/News.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10" class="pa-0">
<Header>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Normalize.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10" class="pa-0 ma-0">
<Header>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Training.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10" class="pa-0">
<Header>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Validation.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container fluid class="pa-0 ma-0">
<v-container fluid class="pa-0 ma-0" :id="this.$route.name">
<v-row justify="center" align="center" class="mx-0">
<v-col cols="12" lg="10" class="pa-0 ma-0">
<Header>
Expand Down