Merge remote-tracking branch 'origin/RebeccaBranch' into RebeccaBranch

pull/2/head
David Tookey 5 years ago
commit 938137ae7f

@ -3,6 +3,8 @@ const del = require('del');
const ts = require('gulp-typescript');
const exec = require('child_process').exec;
const sass = require('gulp-sass');
const fs = require('fs');
const path = require('path');
sass.compiler = require('node-sass');
let tsSource = ts.createProject('tsconfig.json')
@ -11,19 +13,54 @@ function clean(cb) {
cb();
}
function validateConfigSources(cb) {
console.log("Validating source json files...");
let confBase = "src/assets/conf/";
let configsToCheck = ["resources-landing-page.json"];
for (let i = 0, l = configsToCheck.length; i < l; i++) {
let currConfig = configsToCheck[i];
let configContent = fs.readFileSync(path.join(confBase, currConfig));
let conf = JSON.parse(configContent.toString());
let keys = Object.keys(conf);
let fileSpecificRules = validationRules[currConfig];
for (let j = 0, m = keys.length; j < m; j++) {
let key = keys[i];
let content = conf[key];
let rules = fileSpecificRules[key];
let ruleKeys = Object.keys(rules);
for (let k = 0, n = ruleKeys.length; k < n; k++) {
let rule = ruleKeys[k];
let ruleValidator = rules[rule];
for (let x = 0, y = content.length; x < y; x++) {
let renderObj = content[x];
let ruleSubject = renderObj[rule];
let validResults = ruleValidator(ruleSubject, currConfig, rule);
if (null !== validResults) {
cb(validResults);
}
}
}
}
}
cb();
}
function conf() {
return src(['src/assets/**/*', '!src/assets/**/*.scss'], {base: 'src/assets'})
.pipe(dest('build/assets/'));
}
function style(){
function style() {
return src('node_modules/bootstrap/dist/css/bootstrap.css')
.pipe(dest('build/assets/pages/styles/'));
}
function scss(){
return src('src/assets/pages/styles/*.scss', )
function scss() {
return src('src/assets/pages/styles/*.scss',)
.pipe(sass.sync().on('error', sass.logError))
.on('error', () => {
process.exit(1)
})
.pipe(dest('build/assets/pages/styles/'));
}
@ -39,7 +76,10 @@ function pkg() {
function typescript() {
return tsSource.src()
.pipe(tsSource()).js
.pipe(tsSource()).on('error', () => {
process.exit(1)
})
.js
.pipe(dest('build/util/'));
}
@ -53,8 +93,26 @@ function dependencies(cb) {
});
}
let stringLengthRule = function (str, fileName, rulename) {
let maxLen = 124;
if (str.length > maxLen) {
return Error(`Content too long in ${fileName}:${rulename}! Expected maximum of ${maxLen} characters, got ${str.length} "${str}"`)
}
}
let validationRules = {
"resources-landing-page.json": {
"grid-container": {
"description": stringLengthRule
}
}
}
exports.clean = clean;
exports.default = series(conf, style, scss, root, pkg, typescript, dependencies);
exports.default = series(validateConfigSources, conf, style, scss, root, pkg, typescript, dependencies);
exports.runFast = series(conf, style, scss, root, pkg)
exports.runFast = series(validateConfigSources, conf, style, scss, root, pkg)

12
package-lock.json generated

@ -4582,9 +4582,9 @@
}
},
"mocha": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.0.tgz",
"integrity": "sha512-lEWEMq2LMfNJMKeuEwb5UELi+OgFDollXaytR5ggQcHpzG3NP/R7rvixAvF+9/lLsTWhWG+4yD2M70GsM06nxw==",
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz",
"integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==",
"dev": true,
"requires": {
"@ungap/promise-all-settled": "1.1.2",
@ -7844,9 +7844,9 @@
},
"dependencies": {
"camelcase": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz",
"integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==",
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
"integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==",
"dev": true
},
"decamelize": {

@ -56,8 +56,8 @@
"gulp-typescript": "^6.0.0-alpha.1",
"gulp-exec": "^5.0.0",
"del": "^6.0.0",
"chai": "^4.2.0",
"electron-mocha": "^9.3.1",
"chai": "^4.2.0",
"nyc": "^15.1.0",
"ts-node": "^9.0.0",
"check-for-leaks": "^1.2.1"

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Help Menu: About the Resource Center</title>
<link rel="stylesheet" href="styles/resources-landing-page.css">
<script>let $ = require('jquery');</script>
<script>require('popper.js')</script>
<script>require('bootstrap')</script>
</head>
<body hidden ONLOAD="$('body').removeAttr('hidden');" class="bg-secondary">
<div class="helpcontent text-paragraphtextcolor">
<h4>About the Resource Center</h4>
<p></p>
<p class="lead">You rely on a vast amount of resources to do your job. How can you keep track of them all?
<p></p>
<p class="lead">Explore the Resource Center.
<p></p>
<p class="lead">From accounting to workflows, this desktop application can help you find the resources you need.</p>
<p></p>
<p> <a href="resources-landing-page.html">Back to main</a> </p>
</div>
</body>
<script src="scripts/tsUtil.js"></script>
<script>loadTSTarget("themes.js");</script>
<script src="scripts/index_app.js"></script>
</html>

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Help Menu: Categories</title>
<link rel="stylesheet" href="styles/resources-landing-page.css">
<script>let $ = require('jquery');</script>
<script>require('popper.js')</script>
<script>require('bootstrap')</script>
</head>
<body hidden ONLOAD="$('body').removeAttr('hidden');" class="bg-secondary">
<div class="helpcontent text-paragraphtextcolor">
<h4>Categories</h4>
<p></p>
<p class="lead">What are <i>categories</i>?
<p></p>
<p class="lead">JDSfaulkner has so many helpful resources available to employees that it might be overwhelming to see them all at once. That's why this application categorizes them into topics.</p>
<p></p>
<p class="lead">Click a category in the main workspace to expand a section and view all the related resources. With a section expanded, you can navigate more easily using the scrollbar on the right or by clicking a category heading in the left sidebar.</p>
<p></p>
<p> <a href="resources-landing-page.html">Back to main</a> </p>
</div>
</body>
<script src="scripts/tsUtil.js"></script>
<script>loadTSTarget("themes.js");</script>
<script src="scripts/index_app.js"></script>
</html>

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Help Menu: Resources</title>
<link rel="stylesheet" href="styles/resources-landing-page.css">
<script>let $ = require('jquery');</script>
<script>require('popper.js')</script>
<script>require('bootstrap')</script>
</head>
<body hidden ONLOAD="$('body').removeAttr('hidden');" class="bg-secondary">
<div class="helpcontent text-paragraphtextcolor">
<h4>Resources</h4>
<p></p>
<p class="lead">We get it. <i>Resources</i> can mean many things to many people.</p>
<p></p>
<p class="lead">When it comes to the Resource Center, resources are digital files, storage systems, software and websites that help you do your job.</p>
<p></p>
<p class="lead">The company's top managers decided to create the Resource Center to help new and existing employees become oriented and familiar with the many tools available to them.</p>
<p></p>
<p><a href="resources-landing-page.html">Back to main</a> </p>
</div>
</body>
<script src="scripts/tsUtil.js"></script>
<script>loadTSTarget("themes.js");</script>
<script src="scripts/index_app.js"></script>
</html>

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Help Menu: Searches</title>
<link rel="stylesheet" href="styles/resources-landing-page.css">
<script>let $ = require('jquery');</script>
<script>require('popper.js')</script>
<script>require('bootstrap')</script>
</head>
<body hidden ONLOAD="$('body').removeAttr('hidden');" class="bg-secondary">
<div class="helpcontent text-paragraphtextcolor">
<h4>Searches</h4>
<p></p>
<p class="lead">Save time. Simplify your searches.
<p></p>
<p class="lead">Finding resources that meet your criteria is easy when you use the search tool. At the top of your workspace, type a search term in the rounded search bar. Click "enter" on your keyboard, or click the search icon, and matching results populate your workspace.</p>
<p></p>
<p class="lead">Voil&aacute; &mdash; helpful resources at your fingertips.</p>
<p> <a href="resources-landing-page.html">Back to main</a> </p>
</div>
</body>
<script src="scripts/tsUtil.js"></script>
<script>loadTSTarget("themes.js");</script>
<script src="scripts/index_app.js"></script>
</html>

@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Help Menu: Updates</title>
<link rel="stylesheet" href="styles/resources-landing-page.css">
<script>let $ = require('jquery');</script>
<script>require('popper.js')</script>
<script>require('bootstrap')</script>
</head>
<body hidden ONLOAD="$('body').removeAttr('hidden');" class="bg-secondary">
<div class="helpcontent text-paragraphtextcolor">
<h4>Updates</h4>
<p></p>
<p class="lead">Occasionally, you might see computer code moving across your screen for a few seconds after opening the Resource Center.</p>
<p></p>
<p class="lead">What is going on? An <i>update</i>.</p>
<p></p>
<p class="lead">Developers send updates periodically to improve functionality. If you have a reliable internet connection, updates should occur quickly and automatically.</p>
<p><a href="resources-landing-page.html">Back to main</a> </p>
</div>
</body>
<script src="scripts/tsUtil.js"></script>
<script>loadTSTarget("themes.js");</script>
<script src="scripts/index_app.js"></script>
</html>

@ -23,9 +23,43 @@
&nbsp;Resource Center
</a>
<nav class="my-2 my-md-0 mr-md-3">
<a class="p-2 text-navbartext" href="#">Help</a>
<a class="p-2 text-navbartext" href="#">Feedback</a>
<div class="helpdropdown">
<a class="p-2 text-navbartext" href="#" role="button" id="helpdropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-offset="-75,4">Help</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuOffset">
<a class="dropdown-item" href="help-about.html">About the Resource Center</a>
<a class="dropdown-item" href="help-searches.html">Searches</a>
<a class="dropdown-item" href="help-categories.html">Categories</a>
<a class="dropdown-item" href="help-resources.html">Resources</a>
<a class="dropdown-item" href="help-updates.html">Updates</a>
</div>
</div>
</nav>
<nav class="my-2 my-md-0 mr-md-3">
<div class="feedbackdropdown">
<a class="p-2 text-navbartext" href="#" role="button" id="feedbackdropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Feedback</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<p class="feedback-instructions px-4 py-3">Would you like to send feedback or report an issue? Type your message and click "Submit."</p>
<div class="dropdown divider">
<form class="px-4 py-3">
<div class="form-group">
<label for="DropdownFeedbackMessage">Message</label>
<input type="email" class="form-control" id="DropdownFeedbackEmail" placeholder="Type message here">
</div>
<button type="submit" class="btn btn-feedbacksubmitbutton text-feedbacksubmitbuttontext">Submit</button>
</form>
</div>
</div>
</div>
</nav>
<a class="btn btn-outline-themebuttonoutline" id="theme-toggle">Theme</a>
</div>

@ -14,7 +14,6 @@ html {
.main {
background-color: secondary;
color: navbartext;
}
body {
@ -147,13 +146,16 @@ body {
padding-top: 3rem;
padding-bottom: 3rem;
background: primary;
color: footertext;
}
.footer p {
margin-bottom: .25rem;
margin-left: 25rem;
padding-left: 25rem;
color: footertext;
}
.helpcontent {
margin: 3rem;
padding: 3rem;
font-size: 11px;
}

@ -50,7 +50,7 @@ $enable-rounded: true !default;
}
html {
height: 100%
height: 100%;
}
body {
@ -124,5 +124,35 @@ body {
outline: none;
}
.fixed-top {
outline: none;
}
.helpdropdown .dropdown-menu {
background-color: map-get($theme-colors, menudropdownfill);
font-size: 15px;
margin-bottom: 9px;
color: map-get($theme-colors, activetextaccordion) !important;
box-shadow: -1 1 3 1 #cccccc;
}
.feedbackdropdown .dropdown-menu {
background-color: map-get($theme-colors, menudropdownfill);
font-size: 15px;
margin-bottom: 9 px;
color: map-get($theme-colors, activetextaccordion);
box-shadow: -1 1 3 1 #cccccc;
}
#DropdownFeedbackEmail {
background-color: map-get($theme-colors, feedbackmessagefill);
border: 1px solid;
border-color: map-get($theme-colors, feedbackmessageborder);
color: map-get($theme-colors, searchfont);
}
.form-control::-webkit-input-placeholder {
color: map-get($theme-colors, feedbackmessagehint) !important;
}

@ -31,7 +31,15 @@ $theme-colors: (
"activetextaccordion": #9d9d9d,
"inactiveborderaccordion": #180606,
"activeborderaccordion": rgba(26, 26, 26, 0),
"footertext": #7b7b7b,
"footertext": #787572,
"chevronup": #787572,
"chevrondown": #9d9d9d,
"menudropdownfill": #4e4e56,
"feedbacksubmitbutton": #0c218c,
"feedbacksubmitbuttontext": #d9d2d2,
"feedbackmessagefill": #3c3c42,
"feedbackmessageborder": #363434,
"feedbackmessagehint": #787572,
);
.theme-button{

@ -1,10 +1,10 @@
$theme-colors: (
"primary": #ffffff,
"secondary": #e5e5e5,
"primary": #fdfdfd,
"secondary": #dcdcdc,
"success": #0B031C,
"info": #ffffff,
"info": #f9f9f9,
"warning": #700000,
"navbartext": #434344,
"navbartext": #121213,
"navbartextfeather": #323233,
"navbartextactive": #212122,
"inactivecard": #ffffff,
@ -14,7 +14,7 @@ $theme-colors: (
"activecardfont": #e1e4e8,
"searchhint": #c0c2c6,
"searchfont": #2c2c2c,
"sidebarfill": #f6f6f6,
"sidebarfill": #efefef,
"sidebartext": #545455,
"searchbuttonfill": #f6f6f6,
"searchicon": #545455,
@ -25,7 +25,7 @@ $theme-colors: (
"paragraphtextcolor": #434344,
"paragraphtextcolorhover": #ffffff,
"themebuttonoutline": #434344,
"inactiveaccordion": #f6f6f6,
"inactiveaccordion": #efefef,
"activeaccordion": #ffffff,
"inactivetextaccordion": #434344,
"activetextaccordion": #434344,
@ -33,6 +33,14 @@ $theme-colors: (
"inactiveborderaccordion": #c0c2c6,
"activeborderaccordion": rgba(26, 26, 26, 0),
"footertext": #434344,
"chevronup": #434344,
"chevrondown": #434344,
"menudropdownfill": #ffffff,
"feedbacksubmitbutton": #099f4a,
"feedbacksubmitbuttontext": #ffffff,
"feedbackmessagefill": #efefef,
"feedbackmessageborder": #dbdbdb,
"feedbackmessagehint": #c0c2c6,
);
.theme-button{

@ -1,8 +1,9 @@
const assert = require('assert');
describe('default', ()=>{
it('default-test', ()=>{
let res = 5+2;
assert.strictEqual(res, 7);
})
it('snippit', snippit)
})
function snippit(){
console.log("okay")
}
Loading…
Cancel
Save