Browse Source

restyled banner area

pull/23/head
Sebastian Weigand 6 years ago
parent
commit
2ccc47758e
2 changed files with 13 additions and 7 deletions
  1. 12
      web/script.js
  2. 8
      web/style.css

12
web/script.js

@ -13,7 +13,7 @@ function parseMd() {
aDiv.after(nodes); aDiv.after(nodes);
removeOrigToc(); removeOrigToc();
insertLinks(); insertLinks();
addImgParentClass();
unindentBanner();
d3.selectAll("code").each(function() { d3.selectAll("code").each(function() {
hljs.highlightBlock(this); hljs.highlightBlock(this);
}); });
@ -35,10 +35,12 @@ function insertLinks() {
$(this).html('<a href="#' + aId + '" name="' + aId + '">#</a>' + text); $(this).html('<a href="#' + aId + '" name="' + aId + '">#</a>' + text);
}); });
} }
function addImgParentClass() {
let monty_img = $("img").first();
monty_img.parent().addClass("img_parent");
monty_img.before("<br>");
function unindentBanner() {
let montyImg = $("img").first();
montyImg.parent().addClass("banner");
let downloadPraragrapth = $("p").first();
downloadPraragrapth.addClass("banner");
} }
function addToc() { function addToc() {

8
web/style.css

@ -226,15 +226,19 @@ p,
ul { ul {
padding-left: 2rem; padding-left: 2rem;
} }
.img_parent {
.banner {
padding: 0; padding: 0;
} }
#toc {
margin-top: 0;
}
@media only screen and (max-device-width: 1024px) { @media only screen and (max-device-width: 1024px) {
h1 { h1 {
font-size: 3rem; font-size: 3rem;
} }
.img_parent,
.banner,
h1, h1,
img { img {
max-width: calc(100vw - 2em); max-width: calc(100vw - 2em);

Loading…
Cancel
Save