You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
678 B
38 lines
678 B
/** |
|
**- |
|
* JavaScript providing functions for |
|
* generating the HTML elements |
|
* required by an article |
|
* |
|
* Author - Philip Osztromok |
|
* |
|
* 27 March 2022 |
|
*+ |
|
*/ |
|
|
|
function addSyntax(syntax) { |
|
const newSyntax = document.createElement("p"); |
|
newSyntax.classList.add("syntax"); |
|
newSyntax.style.color = "darkred"; |
|
newSyntax.innerHTML = `${syntax}`; |
|
return newSyntax; |
|
} |
|
|
|
function addInset(inset) { |
|
const newInset = document.createElement("p"); |
|
newInset.classList.add("inset"); |
|
newInset.style.color = "darkgreen"; |
|
newInset.innerHTML = `${inset}`; |
|
return newInset; |
|
} |
|
|
|
export { addSyntax, addInset } |
|
|
|
|
|
|
|
/* |
|
* |
|
* helper functions |
|
* |
|
*/ |
|
|
|
|