Commit dc900511 authored by Curtis Adam's avatar Curtis Adam

Install the wtc-barfystars package and hook it up to the landing page demo button

parent 7fe65bef
......@@ -32,4 +32,5 @@
@import '../imports/ui/impressum/modal/statistics/statistics.scss';
@import '../imports/ui/main/navigation/top/item/search.scss';
@import '../imports/ui/useCases/useCases.scss';
@import "../imports/ui/main/barfyStars.scss";
@import 'noscript.scss';
import * as config from "../config/barfyStars.js";
export let BarfyStarsConfig = class BarfyStarsConfig {
static getConfig (type) {
switch (type) {
default:
return config.defaultSettings;
}
}
};
let defaultSettings = {
"scaleInitial": 1,
"momentum": 10,
"gravity": 0.7,
"friction": 0.9999999,
"numParticles": 100
};
module.exports = {
defaultSettings
};
......@@ -26,6 +26,7 @@ import {Icons} from "../../api/icons";
import {FilterNavigation} from "../../api/filterNavigation";
import * as FilterConfig from "../../config/filter.js";
import {MainNavigation} from "../../api/mainNavigation";
import {BarfyStarsConfig} from "../../api/barfyStars.js";
Meteor.subscribe("collegesCourses");
......@@ -136,6 +137,10 @@ Template.registerHelper('getAppSlogan', function () {
return ServerStyle.getAppSlogan();
});
Template.registerHelper('getBarfyStarsConfig', function (type = "default") {
return JSON.stringify(BarfyStarsConfig.getConfig(type));
});
Template.registerHelper('getAboutButton', function (isMobile = false) {
return ServerStyle.getAboutButton(isMobile);
......
.BSParticle {
display: block;
height: 1px;
left: 50%;
position: absolute;
pointer-events: none;
top: 50%;
width: 1px;
z-index: 3;
&::after {
background: #178FFF;
background-size: 100% 100%;
content: '';
display: block;
height: 102px;
position: absolute;
transform: translate(-51px, -51px);
width: 102px;
}
}
.BSParticle--2::after {
background: #FF9F30;
}
.BSParticle--3::after {
background: #ef4d3c;
}
.BSParticle--4::after {
background: #4A5C66;
}
.BSParticle--5::after {
background: #2ac55f;
}
body.landing-page {
overflow: hidden;
}
......@@ -44,10 +44,10 @@
<br>
{{#if isActiveRoute
'home'}}
<a href="about" class="visible-xs-inline-block btn btn-raised btn-warning show-more"><span
<a data-controller="BarfyStars" data-config='{{getBarfyStarsConfig}}' href="about" id="showAbout" class="visible-xs-inline-block btn btn-raised btn-warning show-more"><span
class="flex-content">{{{getAboutButton true}}}</span></a>
<a href="demo" id="showDemo" class="hidden-xs btn btn-raised btn-warning show-more"><span
<a data-controller="BarfyStars" data-config='{{getBarfyStarsConfig}}' href="demo" id="showDemo" class="hidden-xs btn btn-raised btn-warning show-more"><span
class="flex-content">{{{getAboutButton false}}}</span></a>
{{/if}}
</div>
......
......@@ -5,7 +5,6 @@ import {Template} from "meteor/templating";
import {Session} from "meteor/session";
import {Route} from "../../api/route.js";
import {getUserLanguage} from "../../startup/client/i18n";
import "./welcome.html";
import ResizeSensor from "../../../client/thirdParty/resizeSensor/ResizeSensor";
import {PomodoroTimer} from "../../api/pomodoroTimer";
import {NavigatorCheck} from "../../api/navigatorCheck";
......@@ -14,6 +13,9 @@ import {WordcloudCanvas} from "../../api/wordcloudCanvas";
import {ServerStyle} from "../../api/styles.js";
import {FirstTimeVisit} from "../../api/firstTimeVisit";
import {MainNavigation} from "../../api/mainNavigation";
import {ExecuteControllers} from 'wtc-controller-element';
import 'wtc-barfystars';
import "./welcome.html";
Meteor.subscribe("pomodoroLandingPage");
Meteor.subscribe("userData");
......@@ -179,6 +181,17 @@ Template.welcome.onRendered(function () {
});
});
/*
* ############################################################################
* welcomeTitle
* ############################################################################
*/
Template.welcomeTitle.onRendered(function () {
ExecuteControllers.instanciateAll();
});
/*
* ############################################################################
* welcomeWordcloudButton
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -17,6 +17,8 @@
"sweetalert2": "^8.2.3",
"web-push": "^3.3.3",
"wordcloud": "^1.1.0",
"wtc-barfystars": "^0.2.2",
"wtc-controller-element": "^1.1.1",
"zingtouch": "^1.0.6"
},
"version": "1.0.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment