--- /dev/null
+function setupAttribution () {
+ // convert attribution images into figures
+ const images = document.getElementsByTagName("img");
+ for (e of images) {
+ if ("attribute" in e.dataset) {
+ const figure = document.createElement("figure");
+ const figcaption = document.createElement("figcaption");
+ const image = e.cloneNode();
+
+ figure.classList.add("attributionFigure")
+ figcaption.innerHTML = e.dataset.attribute;
+
+ figure.append(image);
+ figure.append(figcaption);
+ e.before(figure);
+ e.remove();
+ }
+ }
+}
+
+setupAttribution();
.ref {
margin: 20px 5% 20px 5%;
}
+
+/* attribution figure */
+.attributionFigure { margin-bottom: -1.4em; }
+.attributionFigure figcaption {
+ display: inline-block;
+ height: 1em;
+ width: auto;
+ margin: 0;
+ margin-bottom: -1.4em;
+ padding: 0.2em;
+ transform: translate(20px, calc(-20px - 1em));
+
+ color: rgba(255,255,255,0.5);
+ background-color: rgba(0,0,0,0.5);
+ font-style: italic;
+}