Skip to content

Commit

Permalink
Updated to include wetnotes and support recurrence
Browse files Browse the repository at this point in the history
  • Loading branch information
mpieters3 committed Sep 25, 2023
1 parent 0b7ef6e commit 2aa7875
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 13 deletions.
88 changes: 88 additions & 0 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"beautiful-dom": "^1.0.9",
"core-js": "^3.6.5",
"feather-icons": "^4.28.0",
"ical": "^0.8.0",
"ical.js": "^1.5.0",
"rrule": "^2.7.2",
"vee-validate": "^3.4.5",
"vue": "^2.6.14",
"vue-axios": "^2.1.5",
Expand Down
3 changes: 1 addition & 2 deletions src/components/blog/BlogThree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@
];
const BeautifulDom = require('beautiful-dom');
const filteredResult = result.data.items.filter(blog => !!!blog.labels || !!this.showHidden || !blog.labels.includes('hidden'));
const filteredResult = result.data.items.filter(blog => !!this.showHidden || !!!blog.labels || !blog.labels.includes('hidden'));
filteredResult.forEach(function(blog, index){
const dom = new BeautifulDom(blog.content);
Expand Down
22 changes: 17 additions & 5 deletions src/components/events/Events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
import 'vue-slick-carousel/dist/vue-slick-carousel.css'
// optional style for arrows & dots
import 'vue-slick-carousel/dist/vue-slick-carousel-theme.css'
import { RRule, rrulestr } from 'rrule';
export default {
components: {
Expand Down Expand Up @@ -167,13 +169,23 @@
},
);
result.data.items.forEach(function(event, index){
if (event.start.date) {
event.startTime = event.start.date
} else {
event.startTime = event.start.dateTime
}
if (event.recurrence !== undefined) {
const rrule = rrulestr(event.recurrence[0]);
const now = new Date();
const nextOccurrence = rrule.after(now, { inc: true });
event.startTime = nextOccurrence;
}
else {
if (event.start.date) {
event.startTime = event.start.date
} else {
event.startTime = event.start.dateTime
}
}
const dateObj = new Date(event.startTime);
event.startFriendly = dateObj.toDateString();
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
{ title: "Home", to: "/#home" },
{ title: "About", to: "/#about" },
{ title: "Events", to: "/#events" },
// { title: "Wetnotes", to: "/#blog" },
{ title: "Wetnotes", to: "/#wetnotes" },
],
icon: "menu",
closeIcon: "x",
Expand Down
4 changes: 2 additions & 2 deletions src/views/Blog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<v-row>
<v-col lg="12">
<div class="text-center section-title pt--80 pb--60">
<h2 class="heading-title">Wetnotes Preview</h2>
<h2 class="heading-title">Wetnotes</h2>
</div>
</v-col>
</v-row>

<v-container>
<BlogThree showHidden="true" />
<BlogThree v-bind:showHidden="false" />
</v-container>
</div>
<!-- Start blog Area -->
Expand Down
4 changes: 1 addition & 3 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@
<!-- Start Service Area -->

<!-- Start Blog Area -->
<!--
<div class="rn-blog-area bg_color--8" id="blog" style="margin-top: -10rem !important;">
<div class="rn-blog-area bg_color--8" id="wetnotes" style="margin-top: -10rem !important;">
<v-container>
<v-row align="end" class="mb--20">
<v-col md="12">
Expand All @@ -135,7 +134,6 @@
<BlogThree />
</v-container>
</div>
-->
<!-- End Blog Area -->

<!-- Start Footer Area -->
Expand Down

0 comments on commit 2aa7875

Please sign in to comment.