Initial commit

This commit is contained in:
Brian McGonagill 2025-12-06 15:44:43 -06:00
commit 35745a89ec
44 changed files with 3342 additions and 0 deletions

View file

@ -0,0 +1,3 @@
<template name="home">
<h1>This is Home.</h1>
</template>

View file

@ -0,0 +1,5 @@
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
Template.home.events({
});

View file

@ -0,0 +1,3 @@
<template name="snackbar">
<div class="snackbar shadow" id="snackbar"></div>
</template>

View file

@ -0,0 +1,11 @@
// This is called to display a temporary message to the user at the bottom of the screen
showSnackbar = function(snackbarText, snackbarColor) {
var snackbarNotification = document.getElementById("snackbar");
snackbarNotification.innerHTML = snackbarText;
snackbarNotification.style.backgroundColor = snackbarColor;
snackbarNotification.className = "show";
setTimeout(function() {
snackbarNotification.className = snackbarNotification.className.replace("show", "");
}, 4000)
}

View file

@ -0,0 +1,71 @@
#snackbar {
visibility: hidden;
min-width: 250px;
margin-left: -125px;
background-color: #93b7d6;
color: #fff;
text-align: center;
border-radius: 4px;
padding: 16px;
position: fixed;
z-index: 22;
left: 50%;
bottom: 30px;
font-size: 17px;
}
#snackbar.shadow {
min-width: 250px;
padding: 15px;
box-shadow: -5px 7px 8px #2f2f2f;
}
#snackbar.show {
visibility: visible;
-webkit-animation: fadein 0.5s, fadeout 0.5s 4.0s;
animation: fadein 0.5s, fadeout 0.5s 4.0s;
}
@-webkit-keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@keyframes fadein {
from {
bottom: 0;
opacity: 0;
}
to {
bottom: 30px;
opacity: 1;
}
}
@-webkit-keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}
@keyframes fadeout {
from {
bottom: 30px;
opacity: 1;
}
to {
bottom: 0;
opacity: 0;
}
}

View file

@ -0,0 +1,20 @@
<template name="headerBar">
<nav>
<ul>
<li><h2>[Project Name]</h2></li>
</ul>
<ul>
{{#if currentUser}}
{{#if isInRole "systemadmin"}}
<li><a href="#" id="manage" class="navBtn">Manage</a></li>
{{/if}}
<li class="signOut"><a href="#" class="signOut">Log Out</a></li>
{{#if $eq updateExists true}}
<li><a href="#!"><i class="material-icons" id='dashboard'>notifications</i></a></li>
{{/if}}
{{else}}
<li><a href="#!" id="login" class="navBtn">Login</a></li>
{{/if}}
</ul>
</nav>
</template>

View file

@ -0,0 +1,51 @@
import { Roles } from 'meteor/roles';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { UpdateInfo } from '../../imports/api/updateInfo.js';
Template.headerBar.onCreated(function() {
this.subscribe("UpdateVersion");
this.subscribe("assignment");
});
Template.headerBar.onRendered(function() {
});
Template.headerBar.helpers({
adminReg: function() {
return Session.get("adminreg");
},
myTheme: function() {
return Session.get("myTheme");
},
updateExists: function() {
let update = UpdateInfo.find({ viewed: false }).fetch();
if (update.length > 0) {
return true;
} else {
return false;
}
},
});
Template.headerBar.events({
'click .navBtn' (event) {
event.preventDefault();
var clickedTarget = event.target.id;
// console.log("clicked " + clickedTarget);
if (clickedTarget == 'mainMenu') {
FlowRouter.go('/');
} else {
// console.log("should be going to /" + clickedTarget);
FlowRouter.go('/' + clickedTarget);
}
},
'click .signOut': () => {
FlowRouter.go('/');
Meteor.logout();
},
'click #brandLogo' (event) {
event.preventDefault();
// FlowRouter.go('/dashboard');
}
});