Merge pull request #1 from newhinton/master

Add ability to center the content via Parameter
This commit is contained in:
Radek Kozieł 2019-03-02 01:13:49 +01:00 committed by GitHub
commit 7ad1783021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 6 deletions

View File

@ -63,6 +63,11 @@ paginate = 5
themeColor = "orange" themeColor = "orange"
# if you set this to 0, only submenu trigger will be visible # if you set this to 0, only submenu trigger will be visible
showMenuItems = 2 showMenuItems = 2
# center the content on the screen
# set theme to full screen width
fullWidthTheme = false
# center theme with default width
centerTheme = false
[languages] [languages]
[languages.en] [languages.en]

View File

@ -7,7 +7,10 @@
{{ partial "head.html" . }} {{ partial "head.html" . }}
</head> </head>
<body class=""> <body class="">
<div class="container"> {{ $container := cond $.Site.Params.FullWidthTheme "container full" (cond $.Site.Params.CenterTheme "container center" "container") }}
<div class="{{- $container -}}">
{{ partial "header.html" . }} {{ partial "header.html" . }}
<div class="content"> <div class="content">

View File

@ -229,15 +229,28 @@ ol ol {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 40px; padding: 40px;
border-right: 1px solid rgba(255, 255, 255, .1);
max-width: 864px; max-width: 864px;
min-height: 100vh; min-height: 100vh;
@media (--phone) { @media (--phone) {
padding: 20px; padding: 20px;
} }
&.full,
&.center {
border: none;
margin: 0 auto;
}
&.full {
max-width: 100%;
}
} }
.content { .content {
display: flex; display: flex;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long