Skip to content
Snippets Groups Projects
Commit 0dce935e authored by AA2875's avatar AA2875
Browse files

Hyppy infot spanissa

parent de6ed799
No related branches found
No related tags found
No related merge requests found
......@@ -68,33 +68,49 @@ function createJumpListItem(jump) {
}
function jumpItemFullInfo(jump) {
const specs = [
'Paikka: ' + jump.place,
'Lentokone: ' + jump.plane,
'Päävarjo: ' + jump.canopy,
'Korkeus: ' + jump.height + ' m',
'Vapaapudotusaika: ' + jump.falltime + ' s',
jump.place,
jump.plane,
jump.canopy,
jump.height,
jump.falltime,
jump.comments,
jump.link
]
const specNames = [
'Paikka',
'Lentokone',
'Päävarjo',
'Korkeus',
'Vapaapudotusaika',
'Kommentit',
'Medialinkki'
]
let ul = document.createElement('ul')
let ulClass = document.createAttribute('class')
ulClass.value = 'fullJumpInfo'
ul.setAttributeNode(ulClass)
let ulStyle = document.createAttribute('style')
ulStyle.value = 'display: none;'
ul.setAttributeNode(ulStyle)
ul.setAttributeNode(ulStyle)
specs.forEach((spec, index, specs) => {
let li = document.createElement('li')
let span = document.createElement('span')
let spanClass = document.createAttribute('class')
let jumpSpec = document.createTextNode(spec)
spanClass.value = `fullJumpInfoValue ${specNames[index]}`
console.log(spec)
if (index === specs.length - 1 && spec != '' && spec != undefined) {
li.appendChild(createHyperlink(spec))
span.appendChild(createHyperlink(spec))
span.setAttributeNode(spanClass)
li.appendChild(span)
ul.appendChild(li)
}
else if (spec != '') {
li.appendChild(jumpSpec)
span.appendChild(jumpSpec)
span.setAttributeNode(spanClass)
li.appendChild(span)
ul.appendChild(li)
}
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment