Skip to content

Commit

Permalink
Merge pull request #1020 from gethinode/develop
Browse files Browse the repository at this point in the history
Add initial support for masonry layout
  • Loading branch information
markdumay committed Jul 1, 2024
2 parents e95b99a + e1a3109 commit 91090aa
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
1 change: 1 addition & 0 deletions assets/scss/app-dart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
@import "components/toc.scss";
@import "components/video.scss";
@import "common/animation.scss";
@import "common/masonry.scss";
@import "common/scrollbar.scss";
@import "common/styles.scss";
@import "layouts/reboot.scss";
Expand Down
1 change: 1 addition & 0 deletions assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
@import "components/toc.scss";
@import "components/video.scss";
@import "common/animation.scss";
@import "common/masonry.scss";
@import "common/scrollbar.scss";
@import "common/styles.scss";
@import "layouts/reboot.scss";
Expand Down
38 changes: 38 additions & 0 deletions assets/scss/common/_masonry.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.masonry {
--masonry-padding: 4px;
}

.m-row {
display: flex;
flex-wrap: wrap;
padding: 0 var(--masonry-padding);
}

.m-col {
flex: 100%;
max-width: 100%;
padding: 0 var(--masonry-padding);
}

.m-col div {
margin-top: calc(2 * var(--masonry-padding));
border-radius: 5px;
}

$utilities: map-merge(
$utilities,
(
"m-col": (
property: max-width,
responsive: true,
class: m-col,
values: (
1: 100%,
2: 50%,
3: 33.3%,
4: 25%,
5: 20%,
)
)
)
);
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.24.11",
"version": "0.24.12",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
Expand Down

0 comments on commit 91090aa

Please sign in to comment.