Skip to content

Commit

Permalink
style:template style
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfa committed Jan 2, 2025
1 parent 4a1b8f1 commit ecd745a
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 98 deletions.
14 changes: 0 additions & 14 deletions assets/scss/components/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,6 @@
}
}

.copyright {
margin-left: auto;
display: flex;
align-items: center;
svg {
fill: var(--hera-text-light);
margin-left: 8px;
cursor: pointer;
&:hover {
fill: var(--hera-hover-color);
}
}
}

nav {
ul {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
margin-top: 10px;
padding-bottom: 5px;

.widget--link {
.menu-item {
padding: 3px 0;
color: var(--hera-text-light);

Expand Down
58 changes: 58 additions & 0 deletions assets/scss/templates/_map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -488,3 +488,61 @@
flex-direction: column;
}
}

.template--about {
padding-top: 20px;
}

.good--list {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
padding: 30px 0 20px;
}

.good--item {
position: relative;
display: flex;
align-items: center;
justify-content: center;
background: var(--hera-background-gray);
border-radius: 10px;
padding: 30px 0 0;
flex-direction: column;
// margin-bottom: 25px;
.img-spacer {
width: 50%;
position: relative;
transition: 0.5s;
}
&:hover {
//background: #eeeef0;
.img-spacer {
transform: translate3d(0, -5px, 0);
}
.good--actions,
.good--review {
display: flex;
}
}
}

.good--name {
font-size: 14px;
padding-bottom: 10px;
color: var(--hera-text-color);
margin-top: 10px;
line-height: 1.4;
width: 92%;
.brand {
color: var(--hera-text-gray-lightest);
}
}

@media (max-width: 600px) {
.good--list {
grid-template-columns: repeat(1, 1fr);
grid-gap: 15px;
padding: 10px 0 30px;
}
}
16 changes: 16 additions & 0 deletions assets/scss/templates/_term.scss
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,19 @@
margin: 0 auto;
width: 92%;
}

.archive--tagList {
display: flex;
flex-wrap: wrap;
}
.archive--tagItem {
margin: 10px;
background-color: var(--hera-background-gray);
padding: 3px 18px;
border-radius: 999rem;
font-size: 14px;
color: var(--hera-text-light);
&:hover {
color: var(--hera-hover-color);
}
}
30 changes: 21 additions & 9 deletions layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
{{ define "main" }}

<header class="tag--header post--list">
<h1 class="post-title">{{.Title}}</h1>
{{ if .Params.description }}
<div class="taxonomy--description">{{ .Params.description }}</div>
{{ end }}
</header>
<div class="post--list">
{{ range .Data.Pages }}
{{ partial "post.html" . }}
{{ end }}
<header class="term--header">
<div class="term--header__content">
<h1 class="post-title">{{.Title}}</h1>
{{ if .Params.description }}
<div class="taxonomy--description">{{ .Params.description }}</div>
{{ end }}
</div>
</header>
<div class="block--list">
{{ range .Data.Pages }}
{{ partial "post.html" . }}
{{ end }}
</div>
{{ $paginator := .Paginate (where .Pages "Type" "post") }}
<nav class="navigation ">
<div class="nav-links">
{{ range $paginator.Pagers }}
<a class="page-numbers{{ if eq . $paginator }} current{{ end }}" href="{{ .URL }}">{{ .PageNumber }}</a>
{{ end }}
</div>
</nav>
</div>
{{ end }}
10 changes: 5 additions & 5 deletions layouts/_default/terms.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ define "main" }}
<header class="tag--header post--list">
<h1 class="page--headline">{{.Title}}</h1>
</header>
<section class="post--list">
<div class="articleContainer">
<header class="article--header">
<h2 class="article--headline">{{ .Title }}</h2>
</header>
<div class="archive--tagList">
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}
Expand All @@ -13,5 +13,5 @@ <h1 class="page--headline">{{.Title}}</h1>
</span>
{{ end }}
</div>
</section>
</div>
{{ end }}
42 changes: 24 additions & 18 deletions layouts/category/list.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
{{ define "main" }}
<header class="tag--header">
<h1 class="page--headline">{{.Title}}</h1>
</header>
<section class="layoutSingleColumn">
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}
<div class="category--item">
{{ if $value.Page.Params.cover }}
<img src="{{ $value.Page.Params.cover }}" class="category--cover">
<div class="template--terms articleContainer">
<header class="article--header">
<h1 class="article--headline">{{.Title}}</h1>
</header>
<section class="collectionCard">
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}
<a href="{{ $value.Page.Permalink }}" class="collectionCard--item" data-count="{{ $value.Count }}">
{{ if $value.Page.Params.cover }}
<img src="{{ $value.Page.Params.cover }}" class="collectionCard--image">
{{ end }}
<div class="collectionCard--meta">
<div class="collectionCard--title">{{ $value.Page.Title }}</div>
<div class="collectionCard--description">{{ $value.Page.Params.description }}</div>
<svg xmlns="http://www.w3.org/2000/svg" width="41" height="40" viewBox="0 0 41 40" fill="none"
class="collectionCard--icon">
<path
d="M20.75 1.25C23.2123 1.25 25.6505 1.73498 27.9253 2.67726C30.2002 3.61953 32.2672 5.00065 34.0083 6.74175C35.7494 8.48285 37.1305 10.5498 38.0727 12.8247C39.015 15.0995 39.5 17.5377 39.5 20C39.5 22.4623 39.015 24.9005 38.0727 27.1753C37.1305 29.4502 35.7494 31.5172 34.0083 33.2583C32.2672 34.9994 30.2002 36.3805 27.9253 37.3227C25.6505 38.265 23.2123 38.75 20.75 38.75C15.7772 38.75 11.0081 36.7746 7.49175 33.2583C3.97544 29.7419 2 24.9728 2 20C2 15.0272 3.97544 10.2581 7.49175 6.74175C11.0081 3.22544 15.7772 1.25 20.75 1.25ZM22.625 10H18.875V18.125H10.75V21.875H18.875V30H22.625V21.875H30.75V18.125H22.625V10Z"
fill="#a47864"></path>
</svg>
</div>
</a>
{{ end }}
<div class="category--content">
<a href="{{ $value.Page.Permalink }}">
{{ $value.Page.Title }}<span>({{ $value.Count }})</span>
</a>
<div class="category--desc">{{ $value.Page.Params.description }}</div>
</div>
</div>
{{ end }}
</section>
</section>
</div>
{{ end }}
9 changes: 8 additions & 1 deletion layouts/category/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ <h1 class="term--title">{{.Title}}</h1>
{{ partial "post.html" . }}
{{ end }}
</div>

{{ $paginator := .Paginate (where .Pages "Type" "post") }}
<nav class="navigation ">
<div class="nav-links">
{{ range $paginator.Pagers }}
<a class="page-numbers{{ if eq . $paginator }} current{{ end }}" href="{{ .URL }}">{{ .PageNumber }}</a>
{{ end }}
</div>
</nav>
</div>
{{ end }}
28 changes: 7 additions & 21 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,11 @@
{{ end }} {{ end }}
</div>
</div>
{{ if or ($paginator.HasPrev) ($paginator.HasNext) }}
<div class="pagination">
{{ if $paginator.HasPrev }}
<span class="prev">
<a href="{{.Paginator.Prev.URL}}">
<span class="arrow"></span> {{ with .Site.Params.newerPosts }}{{ . }}{{ else }}{{ i18n "postsNewer"
}}{{ end }}
</a>
</span>
{{ end }}

{{ if $paginator.HasNext }}
<span class="next">
<a href="{{.Paginator.Next.URL}}">
{{ with .Site.Params.olderPosts }}{{ . }}{{ else }}{{ i18n "postsOlder" }}{{ end }} <span
class="arrow"></span>
</a>
</span>
{{ end }}
</div>
{{ end }}
<nav class="navigation ">
<div class="nav-links">
{{ range $paginator.Pagers }}
<a class="page-numbers{{ if eq . $paginator }} current{{ end }}" href="{{ .URL }}">{{ .PageNumber }}</a>
{{ end }}
</div>
</nav>
{{ end }}
8 changes: 5 additions & 3 deletions layouts/page/about.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ define "main" }}

<div class="layoutSingleColumn u-paddingTop50">
<h2 class="page--headline">{{ .Title }}</h2>
<div class="articleContainer">
<header class="article--header">
<h2 class="article--headline">{{ .Title }}</h2>
</header>
{{ if .IsTranslated }}
<div class="translatedCard">
<h4>{{ i18n "translations" }}</h4>
Expand All @@ -15,7 +17,7 @@ <h4>{{ i18n "translations" }}</h4>
</ul>
</div>
{{ end }}
<div class="graph u-marginBottom30">
<div class="grap article--body">
{{ .Content }}
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions layouts/page/gears.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ define "main" }}

<div class="layoutSingleColumn u-paddingTop50">
<h2 class="page--headline">{{ .Title }}</h2>
<div class="articleContainer">
<header class="article--header">
<h2 class="article--headline">{{ .Title }}</h2>
</header>
<div class="good--list">
{{ range .Params.faves }}
<div class="good--item">
Expand Down
34 changes: 19 additions & 15 deletions layouts/page/links.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{{ define "main" }}

<div class="layoutSingleColumn u-paddingTop50">
<h2 class="page--headline">{{ .Title }}</h2>
<div class="template--linksWrap">
<ul class="link-items">
{{ range .Params.links }}
<li class="link-item">
<a class="link-item-inner effect-apollo" href="{{ .link }}" title="Just a blog" target="_blank">
<span class="sitename"><strong>{{ .title }}</strong>{{ .description }}</span>
</a>
</li>
{{ end }}
</ul>
</div>
<div class="graph u-marginBottom30">
{{ .Content }}
<div class="articleContainer">
<div class="article" data-id="{{ .File.UniqueID}}">
<header class="article--header">
<h2 class="article--headline">{{ .Title }}</h2>
</header>
<div class="template--linksWrap">
<ul class="link-items">
{{ range .Params.links }}
<li class="link-item">
<a class="link-item-inner effect-apollo" href="{{ .link }}" title="Just a blog" target="_blank">
<span class="sitename"><strong>{{ .title }}</strong>{{ .description }}</span>
</a>
</li>
{{ end }}
</ul>
</div>
<div class="grap u-marginBottom30">
{{ .Content }}
</div>
</div>
</div>

Expand Down
6 changes: 4 additions & 2 deletions layouts/page/movies.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{ define "main" }}

<div class="layoutSingleColumn u-paddingTop50">
<h2 class="page--headline">{{ .Title }}</h2>
<div class="articleContainer">
<header class="article--header">
<h2 class="article--headline">{{ .Title }}</h2>
</header>
<div class="db--container">
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions layouts/partials/navigation.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="widget--links ">
<div class="widget--link"><a href="/" title="My Work">My Work</a></div>
<div class="widget--link"><a href="/categories" title="My Work">Categories</a></div>
<div class="widget--link"><a href="/archive" title="My Work">Archive</a></div>
<div class="widget--link"><a href="/" title="My Work">Lens</a></div>
<div class="widget--link"><a href="/map" title="My Work">Travel Footprint</a></div>
</div>
<ul class="widget--links ">
{{ range $.Site.Menus.main }}
{{ if not .HasChildren }}
<li class="menu-item"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
</ul>

0 comments on commit ecd745a

Please sign in to comment.