Make home page sections dynamic and configurable (#14)
* Make home page sections dynamic and configurable * Fix navbar issue when no section is configured + fix next-prev navigator * Update exampleSite * Fix next-prev navigator * Make navbar brand URL context aware
This commit is contained in:
parent
8f99f05a98
commit
e2d376215a
32 changed files with 455 additions and 363 deletions
|
@ -145,15 +145,18 @@ var projectCards;
|
|||
|
||||
function adjustRecentPostsHeight() {
|
||||
if (!isMobile) { // no need to adjust height for mobile devices
|
||||
let el = document.getElementById("recent-post-cards").children;
|
||||
let maxHeight = 0;
|
||||
for (let i = 0; i < el.length; i++) {
|
||||
if (el[i].children[1].clientHeight > maxHeight) {
|
||||
maxHeight = el[i].children[1].clientHeight;
|
||||
let recentPostCards = document.getElementById("recent-post-cards")
|
||||
if (recentPostCards != null) {
|
||||
let el = recentPostCards.children;
|
||||
let maxHeight = 0;
|
||||
for (let i = 0; i < el.length; i++) {
|
||||
if (el[i].children[1].clientHeight > maxHeight) {
|
||||
maxHeight = el[i].children[1].clientHeight;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < el.length; i++) {
|
||||
el[i].children[1].setAttribute("style", "min-height: " + maxHeight + "px;")
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < el.length; i++) {
|
||||
el[i].children[1].setAttribute("style", "min-height: " + maxHeight + "px;")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue