Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
purpleSloth
Homepage
Commits
62b4f1ed
Commit
62b4f1ed
authored
Jun 25, 2022
by
Tobias Bengfort
Browse files
refactor home page
parent
775a87d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
assets/style.css
View file @
62b4f1ed
...
...
@@ -60,10 +60,6 @@ ol ol {
list-style-type
:
lower-alpha
;
}
ul
.no-dots
{
list-style-type
:
none
;
}
blockquote
{
border-left
:
0.5em
solid
var
(
--tint
);
margin-left
:
0
;
...
...
@@ -182,6 +178,9 @@ nav a:hover {
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
min
(
15rem
,
100%
),
1
fr
));
}
}
.tiles-mid
{
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
min
(
23rem
,
100%
),
1
fr
));
}
.tiles-big
{
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
min
(
25em
,
100%
),
1
fr
));
}
...
...
@@ -227,14 +226,6 @@ a.card:hover {
box-shadow
:
0
0
0.5em
rgba
(
0
,
0
,
0
,
0.2
);
}
.slice
{
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
min
(
23rem
,
100%
),
1
fr
));
grid-gap
:
1.5rem
;
margin
:
0
;
padding
:
0
;
}
.row
{
display
:
grid
;
grid-gap
:
2em
;
...
...
@@ -275,6 +266,7 @@ a.card:hover {
font-size
:
150%
;
padding
:
1em
2em
;
margin
:
0
auto
;
text
:
center
;
}
#filters
label
{
...
...
layouts/index.html
View file @
62b4f1ed
{{ define "main" }}
<div
class=
"mt-2 mb-3 text-center"
>
<div
class=
"container bg-body mb-3"
>
<div
class=
"home-banner"
>
{{ .Content }}
</div>
<div
class=
"bg-body mt-2 mb-3"
>
<div
class=
"home-banner"
>
{{ .Content }}
</div>
</div>
<ul
class=
"slice no-dots mt-2 mb-3"
>
<li
>
{{ range first 1 (where (where .Site.RegularPages "Params.category" "full game") "Params.featured" true) }}
{{ partial "front_card.html" . }}
{{ end }}
</li>
<li
>
{{ range first 1 (where .Site.Pages "Params.category" "mission") }}
{{ partial "front_card.html" . }}
{{ end }}
</li>
<li
>
{{ range first 1 (where (where .Site.Pages "Params.category" "blog") "Params.featured" true) }}
{{ partial "front_card.html" . }}
{{ end }}
</li>
</ul>
<div
class=
"tiles tiles-mid mt-2 mb-3"
>
{{ range first 1 (where (where .Site.RegularPages "Params.category" "full game") "Params.featured" true) }}
{{ partial "front_card.html" . }}
{{ end }}
{{ range first 1 (where .Site.Pages "Params.category" "mission") }}
{{ partial "front_card.html" . }}
{{ end }}
{{ range first 1 (where (where .Site.Pages "Params.category" "blog") "Params.featured" true) }}
{{ partial "front_card.html" . }}
{{ end }}
</div>
{{ end }}
layouts/partials/front_card.html
View file @
62b4f1ed
<a
href=
"{{ .RelPermalink }}"
class=
"card bg-inverse
h-100
"
>
<a
href=
"{{ .RelPermalink }}"
class=
"card bg-inverse"
>
<h2
class=
"card-header"
>
{{ .Title }}
</h2>
{{ $banner := .Resources.GetMatch "banner-slice.*" }}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment