Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/api.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

.api-container .api-content {
height: 0px;
overflow: hidden;
overflow: hidden;
}

.api-container .api-content div {
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function element (tag, options, container) {
const cls = options.class
const text = options.text
const html = options.html
const title = options.title

const el = document.createElement(tag)
el.classList.add(cls)
Expand All @@ -19,6 +20,9 @@ function element (tag, options, container) {
if (html != null) {
el.innerHTML = html
}
if (title != null) {
el.title = title
}
return el
}

Expand All @@ -40,7 +44,7 @@ module.exports = {
const header = element('div', { class: 'api-header' }, container)
if (block.kwargs.method) { element('small', { text: block.kwargs.method, class: block.kwargs.method.toLowerCase() }, header) }
element('h2', { text: block.args[0] }, header)
if (block.kwargs.url) { element('span', { text: block.kwargs.url }, header) }
if (block.kwargs.url) { element('span', { text: block.kwargs.url, title: block.kwargs.url }, header) }

// Create content section
const content = element('div', { class: 'api-content' }, container)
Expand Down