IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Commit 8a1fedc4 authored by Amy Rose's avatar Amy Rose
Browse files

add embed title

parent d7f673dd
Pipeline #790 passed with stage
in 3 minutes and 15 seconds
......@@ -19,6 +19,12 @@
box-shadow: 0px 5px 10px #666;
border-radius: 0.5em;
h4 {
font-size: 1.1em;
margin: 0.3em;
margin-bottom: 0;
color: lighten(#000, 40%);
}
iframe {
width: 100%;
aspect-ratio: 1 / 1;
......
......@@ -59,6 +59,9 @@ function create_embed(embed_data) {
/* Create the container */
const embed_container = document.createElement("div");
embed_container.classList.add("embed-container");
/* Create the embed label */
const embed_title = document.createElement("h4");
embed_title.innerText = embed_data["title"];
/* Create the embed */
const embed = document.createElement("iframe");
embed.setAttribute("src", new URL(embed_data["url"], MYSTIC_URL));
......@@ -67,7 +70,8 @@ function create_embed(embed_data) {
if (embed_data["tall"]) {
embed.classList.add("tall");
}
/* Put the embed in the container and return it */
/* Put the content in the container and return it */
embed_container.appendChild(embed_title);
embed_container.appendChild(embed);
return embed_container;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment