Skip to content

Commit

Permalink
Fix the iframe width
Browse files Browse the repository at this point in the history
  • Loading branch information
Azzaare committed Jun 9, 2021
1 parent 47f1b03 commit 8b90634
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 3 additions & 1 deletion assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,8 @@ article-title {

/* Discord widget */
.discord-widget{
width:100%;
/* width:200px; */
height:400px;
align-self: center;
text-align: center;
}
13 changes: 4 additions & 9 deletions src/items/block.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ Block(paragraphs, images) = Block(paragraphs, images, "")
Block(paragraphs, iframe::String) = Block(paragraphs, Vector{Image}(), iframe)

function to_html(section::Block)
str =
"""
<div class="cell medium-8 large-9">
"""
full = isempty(section.images) && isempty(section.iframe) ? "" : "medium-8 large-9"
str = """<div class="cell $full">\n"""

for p in section.paragraphs
str *=
Expand All @@ -29,6 +27,7 @@ function to_html(section::Block)
"""
</div>
"""

if !isempty(section.images) || !isempty(section.iframe)
"""
<div class="cell medium-4 large-3 centered">
Expand All @@ -49,10 +48,6 @@ function to_html(section::Block)
</iframe>
"""
end

str *=
"""
</div>
"""
end
str *= """</div>\n"""
end

0 comments on commit 8b90634

Please sign in to comment.