card-category.mustache cleanup

removed typos from resources-landing-page.json

fixed tag closures and removed second footer in test-resources-landing-page2.html

redid bookmark links for test-resources-landing-page2.html

fixed whitespace character issue in theme-light.scss that was causing compile-time errors in sass

updated viewFactory.ts with clearer wording for card-category.mustache tags
pull/2/head
David Tookey 5 years ago
parent ae72db7221
commit 38702d1d3f

@ -3,8 +3,7 @@
"Human-Resources": {
"Human Resources": {
"description": "Policies, recruitment, onboarding, benefits and compensation",
"cards": [
{
@ -132,7 +131,7 @@
"imagePath": "linkedinlogo_100x100.png",
"urlText": "https://www.linkedin.com/company/jds-consulting-&-design",
"altText": "LinkedIn icon"
},
}
]
},
@ -195,27 +194,26 @@
"imagePath": "learning-center-icon4-100x100.png",
"urlText": "https://learning.carolina.engineering/additional-resources/",
"altText": "Learning Center icon"
}
},
{
"title": "Field Guide",
"description": "This quick-reference guide helps engineering technicians find charts, tables, and third-party information, at-a-glance.",
"imagePath": "learning-center-icon4-100x100.png",
"urlText": "https://learning.carolina.engineering/additional-resources/",
"altText": "Learning Center icon"
}
},
{
"title": "CAD Tech Study Guide",
"description": "This guide presents lessons for drafters, each of which can help a drafter advance to CAD Tech II status.",
"imagePath": "learning-center-icon4-100x100.png",
"urlText": "https://learning.carolina.engineering/additional-resources/",
"altText": "Learning Center icon"
}
}
]
},
"Workflow": {
"Workflow": {
"description": "Project management, assignments, status, client information, invoicing, data and engineering reports",
"cards": [
{
@ -255,6 +253,5 @@
}
]
}
}
}

@ -49,10 +49,10 @@ $enable-rounded: true !default;
}
html{
height:100%
height: 100%
}
body{
height:100%;
height: 100%;
}

@ -10,7 +10,7 @@ $theme-colors: (
"inactivecard": #ffffff,
"activecard": #13a04a,
"boxborder": #c0c2c6,
"activecardfont":#e1e4e8,
"activecardfont": #e1e4e8,
"searchfont": #2c2c2c,
"sidebarfill": #f6f6f6,
"sidebartext": #545455,
@ -19,14 +19,14 @@ $theme-colors: (
"headertextcolor": #434344,
"headertextcolorhover": #ffffff,
"paragraphtextcolor": #434344,
"paragraphtextcolorhover":#ffffff,
"paragraphtextcolorhover": #ffffff,
"themebuttonoutline": #434344,
"categorybox": #ffffff,
"footertext:": #434344,
"footertext": #434344,
);
.theme-button{
width:40px;
width: 40px;
height: 30px;
background-size: contain;
background-color: transparent;

@ -18,113 +18,107 @@
<div class="fixed-top d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-0 bg-primary border-top shadow-sm">
<a class="navbar-brand text-navbartext my-0 mr-md-auto">
<img src="../images/JDS_faulkner_Logo_NoTextAtBottom.png" height="30" class="d-inline-block align-top" alt="JDSfaulkner logo">
&nbsp;Steering Wheel
<img src="../images/JDS_faulkner_Logo_NoTextAtBottom.png" height="30" class="d-inline-block align-top"
alt="JDSfaulkner logo">
&nbsp;Steering Wheel
</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>
<a class="p-2 text-navbartext" href="#">Help</a>
<a class="p-2 text-navbartext" href="#">Feedback</a>
</nav>
<a class="btn btn-outline-themebuttonoutline" id="theme-toggle">Theme</a>
</div>
<div class="container-fluid">
<div class="row">
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-sidebarfill sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active text-sidebartext" href="#">
<span data-feather="home"></span>
Top <span class="sr-only">(current)</span>
</a>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-sidebartext">
<span>Resource Categories</span>
<a class="d-flex align-items-center" href="#">
</a>
</h6>
<ul class="nav flex-column mb-2 ml-4">
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#Human-Resources-collapser">
<span data-feather="list-ul"></span>
Human Resources
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#Marketing-collapser">
<span data-feather="list-ul"></span>
Marketing
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#Productivity-collapser">
<span data-feather="list-ul"></span>
Productivity
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#Training-collapser">
<span data-feather="list-ul"></span>
Training
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#Workflow-collapser">
<span data-feather="list-ul"></span>
Workflow
</a>
</li>
</ul>
</div>
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active text-sidebartext" href="#">
<span data-feather="home"></span>
Top <span class="sr-only">(current)</span>
</a>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-sidebartext">
<span>Resource Categories</span>
<a class="d-flex align-items-center" href="#">
</a>
</h6>
<ul class="nav flex-column mb-2 ml-4">
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#human-resources-collapser">
<span data-feather="list-ul"></span>
Human Resources
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#marketing-collapser">
<span data-feather="list-ul"></span>
Marketing
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#productivity-collapser">
<span data-feather="list-ul"></span>
Productivity
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#training-collapser">
<span data-feather="list-ul"></span>
Training
</a>
</li>
<li class="nav-item">
<a class="nav-link text-sidebartext" href="#workflow-collapser">
<span data-feather="list-ul"></span>
Workflow
</a>
</li>
</ul>
</div>
</nav>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4 text-navbartext">
<div class="justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 text-navbartext">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4 text-navbartext">
<div class="justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 text-navbartext">
<div class="album py-5 bg-secondary text-navbartext">
<div class="container text-navbartext">
<input class="form-control form-control-dark w-100 bg-info border border-boxborder text-searchfont"
placeholder="Search (What kind of resource are you looking for?)"
aria-label="Search">
</div>
<div class="album py-5 bg-secondary text-navbartext">
<div class="container text-navbartext">
<input class="form-control form-control-dark w-100 bg-info border border-boxborder text-searchfont"
placeholder="Search (What kind of resource are you looking for?)"
aria-label="Search">
</div>
<div class="album py-5 bg-secondary text-navbartext">
<div class="container bg-secondary text-navbartext">
<div id="grid-container">
</div>
</div>
</div>
</div>
<div class="album py-5 bg-secondary text-navbartext">
<div class="container bg-secondary text-navbartext">
<div id="grid-container">
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<footer class="page-footer">
<div class="container">
<p class="float-right text-warning">
<a href="#">Back to top</a>
</p>
</div>
</footer>
</div>
<footer class="page-footer">
<div class="container">
<p class="float-left">
<a href="resources-landing-page.html">Back to original layout</a>
<a href="resources-landing-page.html">Back to original layout</a>
</p>
<p class="float-right">
<a href="#">Back to top</a>
<a href="#">Back to top</a>
</p>
</div>
</footer>
</main>
</body>

@ -1,11 +1,11 @@
<html lang="en">
<div>
<div id="{{{category-id}}}-collapser" style="background-color:#a3a3a3;">
<div id="{{{category-key}}}-collapser" style="background-color:#a3a3a3;">
<h4>{{{category-id-clean}}}</h4> <br/>
<p class="text-#ffffff align-self-center">{{{category-description}}}</p>
</div>
<br>
<div id="{{{category-id}}}-container" class="{{{category-id}}}-collapse no-overflow row" style="display:none;"></div>
<div id="{{{category-key}}}-container" class="{{{category-key}}}-collapse no-overflow row" style="display:none;"></div>
</div>
<br>
</html>

@ -16,12 +16,9 @@ export module Themes {
// initToggle.addClass(getButtonClassFromAppTheme(initThemeEnum));
initToggle.on("click", () => {
let conf = Configurator.loadUserConfig(ConfigPaths.UserConfigName);
let toggle = $("#theme-toggle");
let themeValue = conf['theme'];
let currTheme = getThemeFromValue(themeValue);
let opposite = getOppositeTheme(currTheme);
// toggle.removeClass(getButtonClassFromAppTheme(currTheme));
// toggle.addClass(getButtonClassFromAppTheme(opposite));
applyTheme(opposite);
conf['theme'] = opposite;
Configurator.saveUserConfig(ConfigPaths.UserConfigName, conf);

@ -48,24 +48,29 @@ export function buildWebCardsFromConfig(configName: string) {
let containerElem = $(`#${containerName}`);
let containerCategories = Object.keys(containerObject);
for (let j = 0, m = containerCategories.length; j < m; j++) {
let categoryMetaObjectKey = containerCategories[j];
let categoryMetaObject = containerObject[categoryMetaObjectKey];
let contentList = categoryMetaObject["cards"];//should be array of objects to render
let categoryDescription = categoryMetaObject["description"];
let categoryKey = categoryMetaObjectKey.replace(/[\s,]/ig, '-');
let categoryObject = {"category-description": categoryDescription, "category-id": categoryKey, "category-id-clean":categoryMetaObjectKey};
let categoryKey = categoryMetaObjectKey.replace(/[\s,]/ig, '-').toLowerCase();
let categoryObject = {
"category-description": categoryDescription,
"category-key": categoryKey,
"category-id-clean": categoryMetaObjectKey
};
let categoryWrapperRaw = loadTemplate("card-category.mustache", categoryObject, (x) => {
});
let categoryWrapper = $(categoryWrapperRaw);
containerElem.append(categoryWrapper);
let view = $(`#${categoryMetaObjectKey}-container`);
let collapseButton = $(`#${categoryMetaObjectKey}-collapser`);
let view = $(`#${categoryKey}-container`);
let collapseButton = $(`#${categoryKey}-collapser`);
collapseButton.on("click", () => {
let collapsable = $(`#${categoryMetaObjectKey}-container`);
let collapsable = $(`#${categoryKey}-container`);
if ("none" === collapsable.css('display')) {
collapsable.css("display", "");
} else {

Loading…
Cancel
Save