diff --git a/client/client.js b/client/client.js index 0ebc439..e402767 100644 --- a/client/client.js +++ b/client/client.js @@ -24,13 +24,15 @@ import '/imports/util/simplegrid.css'; import 'dragula/dist/dragula.css'; //import 'malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css'; +import '/imports/util/tinymce/tinymce.min.js'; +import '/imports/util/tinymce/jquery.tinymce.min.js'; +import '/imports/util/tinymce/themes/modern/theme.min.js'; + +tinymce.baseURL='/tinymce'; +tinymce.suddix='.min'; + Blaze._allowJavascriptUrls(); -Meteor.subscribe("measures"); -Meteor.subscribe("venues"); -Meteor.subscribe("categories"); -Meteor.subscribe("subcategories"); -Meteor.subscribe("items"); Meteor.startup(function () { sAlert.config({ diff --git a/client/main.styl b/client/main.styl index 8f76ff3..ef21330 100644 --- a/client/main.styl +++ b/client/main.styl @@ -36,6 +36,12 @@ body #__blaze-root height: 100% +h3 + font-family: "Arial Black", "Arial Bold", Gadget, sans-serif + font-size: 19px + text-transform: uppercase + background-color: #EEE + .textView border: 1px solid #DDD padding: 6px 20px @@ -139,6 +145,8 @@ body .mCSB_1_scrollbar z-index: 999 + + @import "../imports/ui/styles/effects.import.styl" @import "../imports/ui/styles/buttons.import.styl" @import "../imports/ui/styles/maxHeightLayout.import.styl" @@ -157,6 +165,10 @@ body @import "../imports/ui/InternshipJobs.import.styl" @import "../imports/ui/Admin/UserManagement.import.styl" @import "../imports/ui/Admin/AppreciationEditor.import.styl" +@import "../imports/ui/Admin/DatesEditor.import.styl" +@import "../imports/ui/Admin/InternshipsEditor.import.styl" +@import "../imports/ui/Admin/NewsEditor.import.styl" +@import "../imports/ui/Admin/BoardEditor.import.styl" @import "../imports/ui/Grants.import.styl" @import "../imports/ui/Internships.import.styl" @@ -166,6 +178,7 @@ body @import "../imports/ui/PhotoGallery.import.styl" @import "../imports/ui/Appreciation.import.styl" @import "../imports/ui/Support.import.styl" +@import "../imports/ui/CurrentBoard.import.styl" @import "../imports/ui/About.import.styl" @import "../imports/ui/Contact.import.styl" diff --git a/imports/api/ContactUsMessages.js b/imports/api/ContactUsMessages.js new file mode 100644 index 0000000..c99142f --- /dev/null +++ b/imports/api/ContactUsMessages.js @@ -0,0 +1,53 @@ +import { Meteor } from 'meteor/meteor'; +import { Mongo } from 'meteor/mongo'; +import { check } from 'meteor/check'; +import SimpleSchema from 'simpl-schema'; + +let ContactUsMessages = new Mongo.Collection('ContactUsMessages'); + +ContactUsMessages.attachSchema(new SimpleSchema({ + name: { + type: String, + label: "Name", + optional: false, + trim: false, + }, + email: { + type: String, + label: "Email", + optional: false, + trim: false + }, + message: { + type: String, + label: "Message", + optional: false, + trim: false + }, + createdAt: { + type: Date, + label: "Created On", + optional: true + } +})); + +if(Meteor.isServer) Meteor.publish('contactUsMessages', function() { + return ContactUsMessages.find({}); +}); + +if(Meteor.isServer) { + Meteor.methods({ + submitContactForm: function(name, email, message) { + check(name, String); + check(email, String); + check(message, String); + + if(Roles.userIsInRole(this.userId, [Meteor.UserRoles.ROLE_UPDATE])) { + ContactUsMessages.insert({name, email, message, createdAt: new Date()}); + } + else throw new Meteor.Error(403, "Not authorized."); + } + }); +} + +export default ContactUsMessages; diff --git a/imports/api/index.js b/imports/api/index.js index 4844611..d94247c 100644 --- a/imports/api/index.js +++ b/imports/api/index.js @@ -2,9 +2,10 @@ import Users from "./User.js"; import UserRoles from "./Roles.js"; import Pages from "./Page.js"; +import ContactUsMessages from "./ContactUsMessages.js"; //Save the collections in the Meteor.collections property for easy access without name conflicts. -Meteor.collections = {Users, UserRoles, Pages}; +Meteor.collections = {Users, UserRoles, Pages, ContactUsMessages}; //If this is the server then setup the default admin user if none exist. if(Meteor.isServer) { diff --git a/imports/startup/client/routes.js b/imports/startup/client/routes.js index 0e28dd8..2731f01 100644 --- a/imports/startup/client/routes.js +++ b/imports/startup/client/routes.js @@ -149,7 +149,7 @@ pub.route("/News&Notices", { name: 'News&Notices', action: function(params, queryParams) { require("/imports/ui/News&Notices.js"); - BlazeLayout.render("Public", {content: "News&Notices"}); + BlazeLayout.render("Public", {content: "NewsNotices"}); } }); pub.route("/PhotoGallery", { @@ -173,3 +173,10 @@ pub.route("/HowCanYouHelp", { BlazeLayout.render("Public", {content: "Support"}); } }); +pub.route("/CurrentBoard", { + name: 'CurrentBoard', + action: function(params, queryParams) { + require("/imports/ui/CurrentBoard.js"); + BlazeLayout.render("Public", {content: "CurrentBoard"}); + } +}); diff --git a/imports/ui/About.html b/imports/ui/About.html index 5c11259..0435f03 100644 --- a/imports/ui/About.html +++ b/imports/ui/About.html @@ -13,7 +13,7 @@
  • to raise and allocate revenue to support educational programs and scholarships.
  • to receive, hold, and disperse gifts, bequests, grants and other funds for these purposes."
  • -

    The Foundation is managed by a board of directors according to the aforementioned Bylaws. Particular effort has been made to include on the board individuals who can share different perspectives on education in the valley. Typically this has included students, parents, teachers and retired school administrators. The board serves without compensation and meets monthly.

    +

    The Foundation is managed by a board of directors according to the aforementioned Bylaws. Particular effort has been made to include on the board individuals who can share different perspectives on education in the valley. Typically this has included students, parents, teachers and retired school administrators. The board serves without compensation and meets monthly.

    Since its inception the Foundation has developed and maintained a variety of effective programs: Grants, Internships, Fellowships and Scholarships. These are detailed elsewhere on this website. In addition, the Foundation has succeeded in attracting financial support sufficient to maintain these programs. The majority of this support has come from the residents and businesses in Anderson Valley.

    diff --git a/imports/ui/Admin/AppreciationEditor.html b/imports/ui/Admin/AppreciationEditor.html index 5ea226f..2cee5f1 100644 --- a/imports/ui/Admin/AppreciationEditor.html +++ b/imports/ui/Admin/AppreciationEditor.html @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/imports/ui/Admin/AppreciationEditor.js b/imports/ui/Admin/AppreciationEditor.js index 3603a4c..3578db5 100644 --- a/imports/ui/Admin/AppreciationEditor.js +++ b/imports/ui/Admin/AppreciationEditor.js @@ -12,22 +12,32 @@ Template.AppreciationEditor.onRendered(function() { let _this = this; //#appreciationEditor' - CKEditor.create(document.querySelector('#editor'), {}).then(editor => { - _this.ckEditor = editor; + // CKEditor.create(document.querySelector('#editor'), {}).then(editor => { + // _this.ckEditor = editor; + // + // Tracker.autorun(function() { + // let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'}); + // + // originalData = (doc === undefined ? "" : doc.html); + // editor.setData(originalData); + // }); + // }).catch(err => { + // console.error(err); + // }); + $('.editor').tinymce({ + inline: true + }); + Tracker.autorun(function() { + let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'}); - Tracker.autorun(function() { - let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'}); - - originalData = (doc === undefined ? "" : doc.html); - editor.setData(originalData); - }); - }).catch(err => { - console.error(err); + originalData = (doc === undefined ? "" : doc.html); + $('.editor').html(originalData); }); }); Template.AppreciationEditor.onDestroyed(function() { - let data = this.ckEditor.getData(); + // let data = this.ckEditor.getData(); + let data = $('.editor').html(); if(data != originalData) { swal({ @@ -62,7 +72,8 @@ Template.AppreciationEditor.helpers({ Template.AppreciationEditor.events({ 'click #save': function(event, template) { - let data = template.ckEditor.getData(); + // let data = template.ckEditor.getData(); + let data = $('.editor').html(); if(data != originalData) { Meteor.call('updatePage', 'Appreciation', data, function (error, result) { diff --git a/imports/ui/Admin/BoardEditor.html b/imports/ui/Admin/BoardEditor.html index e0b2a83..daad986 100644 --- a/imports/ui/Admin/BoardEditor.html +++ b/imports/ui/Admin/BoardEditor.html @@ -1,4 +1,7 @@ \ No newline at end of file diff --git a/imports/ui/Admin/BoardEditor.import.styl b/imports/ui/Admin/BoardEditor.import.styl index c8c32ae..0f86a81 100644 --- a/imports/ui/Admin/BoardEditor.import.styl +++ b/imports/ui/Admin/BoardEditor.import.styl @@ -1,2 +1,6 @@ #boardEditor - display: block \ No newline at end of file + display: block + .ck.ck-editor__editable_inline + border-color: rgba(0,0,0,.2) + .ck.ck-editor__editable_inline.ck-focused + border-color: rgba(0,0,0,1) \ No newline at end of file diff --git a/imports/ui/Admin/BoardEditor.js b/imports/ui/Admin/BoardEditor.js index c7ef97f..4b1cb6d 100644 --- a/imports/ui/Admin/BoardEditor.js +++ b/imports/ui/Admin/BoardEditor.js @@ -1,2 +1,69 @@ -import './BoardEditor.html'; \ No newline at end of file +import CKEditor from '@ckeditor/ckeditor5-build-balloon'; +import './BoardEditor.html'; +import swal from "sweetalert2"; + +let originalData = ""; + +Tracker.autorun(function() { + Meteor.subscribe("pages"); +}); + +Template.BoardEditor.onRendered(function() { + let _this = this; + + CKEditor.create(document.querySelector('#editor'), {}).then(editor => { + _this.ckEditor = editor; + + Tracker.autorun(function() { + let doc = Meteor.collections.Pages.findOne({name: 'Board'}); + + originalData = (doc === undefined ? "" : doc.html); + editor.setData(originalData); + }); + }).catch(err => { + console.error(err); + }); +}); + +Template.BoardEditor.onDestroyed(function() { + let data = this.ckEditor.getData(); + + if(data != originalData) { + swal({ + title: "Save Changes", + text: "Would you like to save any changes you have made to this sheet?", + type: "question", + showCancelButton: true, + confirmButtonColor: "#7cdd7f", + confirmButtonText: "Yes", + cancelButtonText: "No" + }).then( + function(isConfirm) { + if(isConfirm) { + Meteor.call('updatePage', 'Board', data, function (error, result) { + if (error) sAlert.error(error); + else sAlert.success("Content Saved Successfully"); + }); + } + }, + function(dismiss) {} + ); + } +}); + +Template.BoardEditor.events({ + 'click #save': function(event, template) { + let data = template.ckEditor.getData(); + + if(data != originalData) { + Meteor.call('updatePage', 'Board', data, function (error, result) { + if (error) sAlert.error(error); + else sAlert.success("Content Saved Successfully"); + }); + } + else { + sAlert.success("Data has not changed!"); + } + } +}); diff --git a/imports/ui/Admin/DatesEditor.html b/imports/ui/Admin/DatesEditor.html index c29576f..d516866 100644 --- a/imports/ui/Admin/DatesEditor.html +++ b/imports/ui/Admin/DatesEditor.html @@ -1,4 +1,7 @@ \ No newline at end of file diff --git a/imports/ui/Admin/DatesEditor.import.styl b/imports/ui/Admin/DatesEditor.import.styl index ad4d48a..cbacbbc 100644 --- a/imports/ui/Admin/DatesEditor.import.styl +++ b/imports/ui/Admin/DatesEditor.import.styl @@ -1,2 +1,6 @@ #datesEditor - display: block \ No newline at end of file + display: block + .ck.ck-editor__editable_inline + border-color: rgba(0,0,0,.2) + .ck.ck-editor__editable_inline.ck-focused + border-color: rgba(0,0,0,1) \ No newline at end of file diff --git a/imports/ui/Admin/DatesEditor.js b/imports/ui/Admin/DatesEditor.js index 7460760..228d778 100644 --- a/imports/ui/Admin/DatesEditor.js +++ b/imports/ui/Admin/DatesEditor.js @@ -1,2 +1,70 @@ -import './DatesEditor.html'; \ No newline at end of file +import CKEditor from '@ckeditor/ckeditor5-build-balloon'; +import './DatesEditor.html'; +import swal from "sweetalert2"; + +let originalData = ""; + +Tracker.autorun(function() { + Meteor.subscribe("pages"); +}); + +Template.DatesEditor.onRendered(function() { + let _this = this; + + CKEditor.create(document.querySelector('#editor'), {}).then(editor => { + _this.ckEditor = editor; + + Tracker.autorun(function() { + let doc = Meteor.collections.Pages.findOne({name: 'Dates'}); + + originalData = (doc === undefined ? "" : doc.html); + editor.setData(originalData); + }); + }).catch(err => { + console.error(err); + }); +}); + +Template.DatesEditor.onDestroyed(function() { + let data = this.ckEditor.getData(); + + if(data != originalData) { + swal({ + title: "Save Changes", + text: "Would you like to save any changes you have made to this sheet?", + type: "question", + showCancelButton: true, + confirmButtonColor: "#7cdd7f", + confirmButtonText: "Yes", + cancelButtonText: "No" + }).then( + function(isConfirm) { + if(isConfirm) { + Meteor.call('updatePage', 'Dates', data, function (error, result) { + if (error) sAlert.error(error); + else sAlert.success("Content Saved Successfully"); + }); + } + }, + function(dismiss) {} + ); + } +}); + +Template.DatesEditor.events({ + 'click #save': function(event, template) { + let data = template.ckEditor.getData(); + + if(data != originalData) { + Meteor.call('updatePage', 'Dates', data, function (error, result) { + if (error) sAlert.error(error); + else sAlert.success("Content Saved Successfully"); + }); + } + else { + sAlert.success("Data has not changed!"); + } + } +}); +s \ No newline at end of file diff --git a/imports/ui/Admin/NewsEditor.html b/imports/ui/Admin/NewsEditor.html index d2a0f5f..e039ff2 100644 --- a/imports/ui/Admin/NewsEditor.html +++ b/imports/ui/Admin/NewsEditor.html @@ -1,4 +1,7 @@ \ No newline at end of file diff --git a/imports/ui/Admin/NewsEditor.import.styl b/imports/ui/Admin/NewsEditor.import.styl index 6c08457..3c665ec 100644 --- a/imports/ui/Admin/NewsEditor.import.styl +++ b/imports/ui/Admin/NewsEditor.import.styl @@ -1,2 +1,6 @@ #newsEditor - display: block \ No newline at end of file + display: block + .ck.ck-editor__editable_inline + border-color: rgba(0,0,0,.2) + .ck.ck-editor__editable_inline.ck-focused + border-color: rgba(0,0,0,1) \ No newline at end of file diff --git a/imports/ui/Admin/NewsEditor.js b/imports/ui/Admin/NewsEditor.js index 431619b..7cb4380 100644 --- a/imports/ui/Admin/NewsEditor.js +++ b/imports/ui/Admin/NewsEditor.js @@ -1,2 +1,87 @@ -import './NewsEditor.html'; \ No newline at end of file +import CKEditor from '@ckeditor/ckeditor5-build-balloon'; +import './NewsEditor.html'; +import swal from "sweetalert2"; + +let originalData = ""; + +Tracker.autorun(function() { + Meteor.subscribe("pages"); +}); + +Template.NewsEditor.onRendered(function() { + let _this = this; + + //#appreciationEditor' + // CKEditor.create(document.querySelector('#editor'), {}).then(editor => { + // _this.ckEditor = editor; + // + // Tracker.autorun(function() { + // let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'}); + // + // originalData = (doc === undefined ? "" : doc.html); + // editor.setData(originalData); + // }); + // }).catch(err => { + // console.error(err); + // }); + $('.editor').tinymce({ + inline: true + }); + Tracker.autorun(function() { + let doc = Meteor.collections.Pages.findOne({name: 'News'}); + + originalData = (doc === undefined ? "" : doc.html); + $('.editor').html(originalData); + }); +}); + +Template.NewsEditor.onDestroyed(function() { + let data = this.ckEditor.getData(); + + if(data != originalData) { + swal({ + title: "Save Changes", + text: "Would you like to save any changes you have made to this sheet?", + type: "question", + showCancelButton: true, + confirmButtonColor: "#7cdd7f", + confirmButtonText: "Yes", + cancelButtonText: "No" + }).then( + function(isConfirm) { + if(isConfirm) { + Meteor.call('updatePage', 'News', data, function (error, result) { + if (error) sAlert.error(error); + else sAlert.success("Content Saved Successfully"); + }); + } + }, + function(dismiss) {} + ); + } +}); + +Template.NewsEditor.helpers({ + // html: function() { + // let doc = Meteor.collections.Pages.findOne({name: 'News'}); + // + // return doc == undefined ? "" : doc.html; + // } +}); + +Template.NewsEditor.events({ + 'click #save': function(event, template) { + let data = template.ckEditor.getData(); + + if(data != originalData) { + Meteor.call('updatePage', 'News', data, function (error, result) { + if (error) sAlert.error(error); + else sAlert.success("Content Saved Successfully"); + }); + } + else { + sAlert.success("Data has not changed!"); + } + } +}); diff --git a/imports/ui/Appreciation.html b/imports/ui/Appreciation.html index 08ce881..b6ae04d 100644 --- a/imports/ui/Appreciation.html +++ b/imports/ui/Appreciation.html @@ -1,4 +1,5 @@ \ No newline at end of file diff --git a/imports/ui/Appreciation.import.styl b/imports/ui/Appreciation.import.styl index b1d34df..c9afe7b 100644 --- a/imports/ui/Appreciation.import.styl +++ b/imports/ui/Appreciation.import.styl @@ -1,2 +1,21 @@ #appreciationView display: block + +#appreciation p, #appreciationEditor p + font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif + font-size: 16px + margin: 16px 0 + +#appreciation h2, #appreciationEditor h2 + font-family: "Arial Black", "Arial Bold", Gadget, sans-serif + font-size: 19px + text-transform: uppercase + background-color: #EEE + font-weight: bold + padding-left: 40px + +#appreciation h4, #appreciationEditor h4 + font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif + font-size: 16px + font-weight: 800 + clear: left \ No newline at end of file diff --git a/imports/ui/Appreciation.js b/imports/ui/Appreciation.js index bb615ad..7fec60a 100644 --- a/imports/ui/Appreciation.js +++ b/imports/ui/Appreciation.js @@ -1,2 +1,14 @@ +import './Appreciation.html'; -import './Appreciation.html'; \ No newline at end of file +Tracker.autorun(function() { + Meteor.subscribe("pages"); +}); + + +Template.Appreciation.helpers({ + appreciationHTML: function() { + let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'}); + + return doc === undefined ? "" : doc.html; + } +}); \ No newline at end of file diff --git a/imports/ui/Contact.html b/imports/ui/Contact.html index 7495501..e23c71a 100644 --- a/imports/ui/Contact.html +++ b/imports/ui/Contact.html @@ -1,42 +1,35 @@ \ No newline at end of file diff --git a/imports/ui/Contact.import.styl b/imports/ui/Contact.import.styl index 47beeee..84f87ea 100644 --- a/imports/ui/Contact.import.styl +++ b/imports/ui/Contact.import.styl @@ -1,14 +1,41 @@ +#contactView p + font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif + font-size: 16px + +#contactView h3 + font-family: "Arial Black", "Arial Bold", Gadget, sans-serif + text-transform: uppercase + margin-bottom: 4px + #contactView - .textView - margin: 6px auto 0 auto - border: 1px solid #DDD - padding: 0 20px - max-width: 960px .fieldHeading width: 100px text-align: left float: left padding-top: 5px line-height: 15px - .fieldHeading - margin: 6px 0 \ No newline at end of file + +#contactView input + height: 20px + width: 200px + +#contactView textarea + min-width: 200px + width: 100% + +#contactForm + font-family: "Andale Mono", AndaleMono, monospace + font-size: 14px + line-height: 20px + +#contactForm input + height: 20px + font-family: "Andale Mono", AndaleMono, monospace + font-size: 14px + line-height: 20px + +#contactForm textarea + height: 100px + font-family: "Andale Mono", AndaleMono, monospace + font-size: 14px + line-height: 20px diff --git a/imports/ui/Contact.js b/imports/ui/Contact.js index b0cac28..4eb2a9b 100644 --- a/imports/ui/Contact.js +++ b/imports/ui/Contact.js @@ -1 +1,20 @@ -import './Contact.html'; \ No newline at end of file +import './Contact.html'; + +Template.Contact.events({ + 'click .send': function(event, template) { + let name = $('input[name="name"]').val(); + let email = $('input[name="email"]').val(); + let message = $('textarea[name="content"]').val(); + + if(template.$('form')[0].checkValidity() && name !== undefined && name.length > 0 && email !== undefined && email.length > 0 && message !== undefined && message.length > 0){ + Meteor.call("submitContactForm", name, email, message, function(error, result) { + if(error) sAlert.error(error); + else sAlert.success("Your message has been received!"); + }); + } + else { + sAlert.error("Form not valid! Try again..."); + } + } + +}); diff --git a/imports/ui/CurrentBoard.html b/imports/ui/CurrentBoard.html new file mode 100644 index 0000000..30f6a37 --- /dev/null +++ b/imports/ui/CurrentBoard.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/imports/ui/CurrentBoard.import.styl b/imports/ui/CurrentBoard.import.styl new file mode 100644 index 0000000..e4530f7 --- /dev/null +++ b/imports/ui/CurrentBoard.import.styl @@ -0,0 +1,16 @@ +#currentBoardView + display: block + + +#currentBoardView li, #boardEditor li + list-style-type: square + font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif + font-size: 16px + +#currentBoardView h2, #boardEditor h2 + font-family: "Arial Black", "Arial Bold", Gadget, sans-serif + font-size: 19px + text-transform: uppercase + background-color: #EEE + font-weight: bold + padding-left: 40px \ No newline at end of file diff --git a/imports/ui/CurrentBoard.js b/imports/ui/CurrentBoard.js new file mode 100644 index 0000000..574f1fa --- /dev/null +++ b/imports/ui/CurrentBoard.js @@ -0,0 +1,15 @@ +import './CurrentBoard.html'; + + +Tracker.autorun(function() { + Meteor.subscribe("pages"); +}); + + +Template.CurrentBoard.helpers({ + currentBoardHTML: function() { + let doc = Meteor.collections.Pages.findOne({name: 'Board'}); + + return doc === undefined ? "" : doc.html; + } +}); \ No newline at end of file diff --git a/imports/ui/ImportantDates.html b/imports/ui/ImportantDates.html index b23bc52..409ca51 100644 --- a/imports/ui/ImportantDates.html +++ b/imports/ui/ImportantDates.html @@ -1,6 +1,5 @@ \ No newline at end of file diff --git a/imports/ui/ImportantDates.import.styl b/imports/ui/ImportantDates.import.styl index e69de29..8e6fa19 100644 --- a/imports/ui/ImportantDates.import.styl +++ b/imports/ui/ImportantDates.import.styl @@ -0,0 +1,21 @@ +#importantDatesView + display: block + +#importantDates p, #datesEditor p + font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif + font-size: 16px + margin: 16px 0 + +#importantDates h2, #datesEditor h2 + font-family: "Arial Black", "Arial Bold", Gadget, sans-serif + font-size: 19px + text-transform: uppercase + background-color: #EEE + font-weight: bold + padding-left: 40px + +#importantDates h4, #datesEditor h4 + font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif + font-size: 16px + font-weight: 800 + clear: left \ No newline at end of file diff --git a/imports/ui/ImportantDates.js b/imports/ui/ImportantDates.js index 0cb222b..f63e66e 100644 --- a/imports/ui/ImportantDates.js +++ b/imports/ui/ImportantDates.js @@ -1,2 +1,15 @@ - import './ImportantDates.html'; + + +Tracker.autorun(function() { + Meteor.subscribe("pages"); +}); + + +Template.ImportantDates.helpers({ + importantDatesHTML: function() { + let doc = Meteor.collections.Pages.findOne({name: 'Dates'}); + + return doc === undefined ? "" : doc.html; + } +}); \ No newline at end of file diff --git a/imports/ui/News&Notices.html b/imports/ui/News&Notices.html index 8f0f259..914c5b7 100644 --- a/imports/ui/News&Notices.html +++ b/imports/ui/News&Notices.html @@ -1,18 +1,5 @@ -