Skip to content

Commit

Permalink
[new param] viewportSize
Browse files Browse the repository at this point in the history
#221
widest: 1600px
wider: 1440px
wide: 1280px
normal: 960px
narrow: 800px
  • Loading branch information
zzossig committed Mar 6, 2020
1 parent 1a13138 commit 0dc9e52
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ notAllowedTypesInHomeSidebar = ["about", "archive", "showcase"] # not allowed pa
notAllowedTypesInArchive = ["about", "talks", "showcase"] # not allowed page types in archive page
notAllowedTypesInHomeFeed = ["about", "archive", "contact", "talks", "showcase", "publication", "presentation", "resume", "gallery"]

viewportSize = "normal" # widest, wider, wide, normal, narrow
enableUiAnimation = true
hideSingleContentsWhenJSDisabled = false

# header
homeHeaderType = "text" # text, img, slide

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ notAllowedTypesInHomeSidebar = ["about", "archive", "showcase"] # not allowed pa
notAllowedTypesInArchive = ["about", "talks", "showcase"] # not allowed page types in archive page
notAllowedTypesInHomeFeed = ["about", "archive", "contact", "talks", "showcase", "publication", "presentation", "resume", "gallery"]

viewportSize = "normal" # widest, wider, wide, normal, narrow
enableUiAnimation = true
hideSingleContentsWhenJSDisabled = false

# header
homeHeaderType = "text" # text, img, slide

Expand Down
16 changes: 16 additions & 0 deletions assets/sass/layout/_grid.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
$grid_max_width: 960;

@if global-variable-exists(viewport_size) {
@if $viewport_size == widest {
$grid_max_width: 1600;
} @else if $viewport_size == wider {
$grid_max_width: 1440;
} @else if $viewport_size == wide {
$grid_max_width: 1280;
} @else if $viewport_size == narrow {
$grid_max_width: 800;
} @else {
$grid_max_width: 960;
}
}

$grid_max: $grid_max_width + $grid_max_unit;
$grid_main_main: $grid_main_main_width + $grid_main_main_unit;
$grid_main_side: $grid_main_side_width + $grid_main_side_unit;
Expand Down
2 changes: 2 additions & 0 deletions assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ $title-font: {{ .Site.Data.font.title_font }};
$content-font: {{ .Site.Data.font.content_font }};
$cursive-font: {{ .Site.Data.font.cursive_font }};

$viewport_size: {{ .Site.Params.viewportSize | default "normal" }};

@import 'abstracts/variables';
@import 'abstracts/mixins';
@import 'abstracts/functions';
Expand Down
1 change: 1 addition & 0 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ notAllowedTypesInHomeSidebar = ["about", "archive", "showcase", "publication", "
notAllowedTypesInArchive = ["about", "talks", "showcase", "publication", "presentation", "resume"]
notAllowedTypesInHomeFeed = ["about", "archive", "contact", "talks", "showcase", "publication", "presentation", "resume", "gallery"]

viewportSize = "normal" # widest, wider, wide, normal, narrow
enableUiAnimation = true
hideSingleContentsWhenJSDisabled = false

Expand Down

0 comments on commit 0dc9e52

Please sign in to comment.