@flourish/footer
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -14,2 +14,3 @@ (function (global, factory) { | ||
var FOOTER_DEFAULTS = { | ||
footer_source_label_other: false, | ||
footer_source_label: "Source: ", | ||
@@ -36,5 +37,5 @@ footer_source_name: "", | ||
state = project_state; | ||
appendState(); | ||
footer_el = document.createElement("div"); | ||
@@ -59,3 +60,3 @@ footer_el.className = "flourish-footer"; | ||
css.type = "text/css"; | ||
css.innerHTML = ".flourish-footer {margin: 0; } .flourish-footer p {margin: 0; display: inline-block; } .flourish-footer p:empty {height: 0; } .flourish-footer a {color: inherit; } .flourish-footer .flourish-footer-note {margin-left: 3px; }"; | ||
css.innerHTML = ".flourish-footer { margin: 0; } .flourish-footer p { margin: 0; display: inline; } .flourish-footer p:empty { height: 0; } .flourish-footer a {color: inherit; } .flourish-footer .flourish-footer-note {margin-left: 3px; }"; | ||
document.body.appendChild(css); | ||
@@ -62,0 +63,0 @@ } |
{ | ||
"name": "@flourish/footer", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Add footer", | ||
@@ -5,0 +5,0 @@ "main": "footer.js", |
@@ -12,5 +12,7 @@ # Flourish footer | ||
There are 3 functions | ||
`createFooter(target_el)` appends a div in the target element, and adds footer state properties | ||
`createFooter(target_el, state)` appends a div in the target element, and adds footer state properties | ||
`updateFooter()` updates the footer contents and styles | ||
`getFooterHeight()` returns the total footer height (including margins) | ||
@@ -6,2 +6,3 @@ var footer_el, source_el, note_el; | ||
var FOOTER_DEFAULTS = { | ||
footer_source_label_other: false, | ||
footer_source_label: "Source: ", | ||
@@ -28,5 +29,5 @@ footer_source_name: "", | ||
state = project_state; | ||
appendState(); | ||
footer_el = document.createElement("div"); | ||
@@ -51,3 +52,3 @@ footer_el.className = "flourish-footer"; | ||
css.type = "text/css"; | ||
css.innerHTML = ".flourish-footer {margin: 0; } .flourish-footer p {margin: 0; display: inline-block; } .flourish-footer p:empty {height: 0; } .flourish-footer a {color: inherit; } .flourish-footer .flourish-footer-note {margin-left: 3px; }"; | ||
css.innerHTML = ".flourish-footer { margin: 0; } .flourish-footer p { margin: 0; display: inline; } .flourish-footer p:empty { height: 0; } .flourish-footer a {color: inherit; } .flourish-footer .flourish-footer-note {margin-left: 3px; }"; | ||
document.body.appendChild(css); | ||
@@ -54,0 +55,0 @@ } |
Sorry, the diff of this file is not supported yet
12090
231
18