Commit aad89bbf authored by julientaq's avatar julientaq

add font-family module

parent f2d8ceb2
......@@ -19,15 +19,15 @@ createUI();
document.querySelector('select').addEventListener('click',console.log("fun"))
let controls = "";
console.log(config.features);
config.features.forEach((feat) => {
if (modulesList.name.includes(feat)) {
controls += modulesList.updateControl;
} else {
console.log(`${feat} is not existing in the list of modules`)
}
});
// let controls = "";
// console.log(config.features);
// config.features.forEach((feat) => {
// if (modulesList.name.includes(feat)) {
// controls += modulesList.updateControl;
// } else {
// console.log(`${feat} is not existing in the list of modules`)
// }
// });
......
import Control from '../controlClass.js'
let fontFamily = new Control;
fontFamily.name = 'fontFamily';
fontFamily.render = `
<label for="fontFamily">font-family</label>
<select id="fontFamily" name="fontfamily" data-css-prop="--fontBody">
<option value="Spectral" selected>Spectral</option>
<option value="'Courier Prime'">Courier Prime</option>
<option value="sans-serif">sans serif</option>
</select>`
export default fontFamily;
......@@ -6,5 +6,8 @@
import pagedMediaConfig from "./config.js";
import pagedjsLogo from "./ui/pagedjsLogo.js";
let uiElements = document.createElement("div");
import pageSize from './../controls/pageSize.js'
import fontFamily from './../controls/fontFamily.js'
let modulesList = pageSize;
let modulesList = [pageSize, fontFamily];
export default modulesList;
......@@ -3,18 +3,18 @@ import logo from "./pagedjsLogo.js";
import pageSize from "./../controls/pageSize.js";
import modulesList from "./modulesList.js";
console.log(modulesList);
// build UI from the feature List and the moduleList
let controls = "";
console.log(config.features);
config.features.forEach((feat) => {
if (modulesList.name.includes(feat)) {
controls += modulesList.render;
modulesList.forEach((module) => {
console.log(module);
if (module.name.includes(feat)) {
controls += module.render;
} else {
console.log(`${feat} is not existing in the list of modules`)
console.log(`${feat} is not existing in the list of modules`);
}
});
});
export default `
......
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