diff --git a/observable/docs/index.md b/observable/docs/index.md index 1c9f59d..8d91344 100644 --- a/observable/docs/index.md +++ b/observable/docs/index.md @@ -146,7 +146,6 @@ orb.events.on('node-click', (event) => { function getData(event) { selectedNode = event.node.data; - console.log(selectedNode) updateDetails(selectedNode) } @@ -158,21 +157,21 @@ function updateDetails(selectedNode) { let html = ''; if (selectedNode) { - html += `

${selectedNode.label}

`; + html += `

${selectedNode.label}

`; if (selectedNode.type === 'INSTITUTION') { - html += `

Institution type: ${selectedNode.type}

`; - html += `

Homepage: ${selectedNode.homepage}

`; + html += `

Homepage: ${selectedNode.homepage}

`; html += `

Works: ${selectedNode.works_count}

`; html += `

Cited by: ${selectedNode.cited_by_count}

`; + html += `View on OpenAlex`; } else if (selectedNode.type === 'AUTHOR') { html += `

Works: ${selectedNode.works_count}

`; html += `

Cited by: ${selectedNode.cited_by_count}

`; + html += `View on OpenAlex`; } else if (selectedNode.type === 'TOPIC') { - html += `

Description: ${selectedNode.description}

`; - html += `

Field: ${selectedNode.field}

`; html += `

Subfield: ${selectedNode.subfield}

`; html += `

Domain: ${selectedNode.domain}

`; + html += `View on OpenAlex`; } } diff --git a/observable/docs/styles.css b/observable/docs/styles.css index 96a00fb..d5c283e 100644 --- a/observable/docs/styles.css +++ b/observable/docs/styles.css @@ -29,11 +29,12 @@ a { position: absolute; top: 2vmin; left: 2vmin; - width: 33%; + width: 35%; padding: 2vmin; border-radius: 1vmin; box-shadow: 5px 5px 8px 0px rgba(0,0,0,0.25); background-color: #fff; + line-height: 2; } /* LOADER */