Headline
- +
+
```
```js
-let content = document.getElementById('content')
-let dynamicValue = document.createTextNode("Dynamic content value")
-content.appendChild(dynamicValue)
+let items = ["Allgemeines, Umweltschutz, Spielfilme",
+ "Theologie, Philosophie, Ethik, Psychologie",
+ "Pädagogik",
+ "Germanistik, Sprach- und Literaturwissenschaft"]
+let books = document.getElementById('books')
+
+items.forEach(buildLink)
+
+// create new li element and text node
+// append it to list element
+function buildLink(value, index) {
+
+ const zeroPad = (num, places) => String(num).padStart(places, '0')
+ const d = new Date()
+ let year = d.getFullYear()
+ let month = d.getMonth()
+ let link = "https://fhnw.swisscovery.slsp.ch/discovery/search?query=any,contains,(" +
+ "ENE60" + year + zeroPad(month + 1, 2) + zeroPad(index + 1, 2) +
+ "+OR+ENE60" + year + zeroPad(month, 2) + zeroPad(index + 1, 2) +
+ "+OR+ENE60" + year + zeroPad(month - 1, 2) + zeroPad(index + 1, 2) +
+ ")&tab=41SLSP_FHNW_MyInst_and_CI&search_scope=MyInst_and_CI" +
+ "&vid=41SLSP_FNW:VU1&offset=0"
+
+ let item = document.createElement("li")
+ let aElement = document.createElement("a")
+ let content = document.createTextNode(value)
+ aElement.appendChild(content)
+ aElement.setAttribute("href", link)
+ item.appendChild(aElement)
+ books.appendChild(item)
+}
```
\ No newline at end of file
Neuerscheinungen
+-
+
+