forked from nebulosus/web
fix: grammar and things
This commit is contained in:
parent
a117d2e09d
commit
818d78413b
2 changed files with 7 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
class Case {
|
||||
constructor (name = "Project", description = "This is a project.", url = undefined) {
|
||||
constructor(name = "Project", description = "This is a project.", url = undefined) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.url = url;
|
||||
|
@ -11,7 +11,7 @@ const CASES = [
|
|||
|
||||
const casesButton = document.querySelector("button#cases-button");
|
||||
const casesDiv = document.querySelector("div#cases");
|
||||
if (casesButton && CASES.length > 0) casesButton.hidden = false;
|
||||
if (casesButton && CASES.length > 0) casesButton.hidden = false;
|
||||
|
||||
function showCases() {
|
||||
if (!casesButton) return console.log("k");
|
||||
|
@ -22,7 +22,7 @@ function showCases() {
|
|||
CASES.forEach(c => {
|
||||
console.log(c);
|
||||
// a dirty hack :p
|
||||
list.innerHTML += `<li><${c.url ? 'a' : 'span'}><strong>${c.name}<strong> - ${c.description}</${c.url ? 'a' : 'span'}></li>`;
|
||||
list.innerHTML += `<li><${c.url ? 'a' : 'span'} ${c.url ? 'href="' + c.url + '"' : ''}><strong>${c.name}<strong> - ${c.description}</${c.url ? 'a' : 'span'}></li>`;
|
||||
});
|
||||
casesDiv.appendChild(list);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue