Skip to content

Commit

Permalink
Update pos list styles, remove self link from post
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak committed Oct 2, 2024
1 parent 35bf672 commit 2f64607
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 34 deletions.
31 changes: 17 additions & 14 deletions assets/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ ul.pagination {
filter: var(--icon-filter);
}

a .book-icon {
height: 1em;
width: 1em;
margin-inline-end: .5em;
}

.book-brand {
margin-top: 0;
margin-bottom: $padding-16;
Expand Down Expand Up @@ -168,7 +174,17 @@ body[dir="rtl"] .book-menu {
}

.book-post {
margin-bottom: $padding-16 * 3;
margin-bottom: $padding-16 * 2;

.book-post-date img {
height: 1em;
width: 1em;
margin-inline-end: .5em;
}

.book-post-content > :first-child {
margin-top: $padding-16;
}
}

.book-header {
Expand Down Expand Up @@ -250,12 +266,6 @@ body[dir="rtl"] .book-menu {
.book-footer {
padding-top: $padding-16;
font-size: $font-size-14;

img {
height: 1em;
width: 1em;
margin-inline-end: $padding-8;
}
}

.book-comments {
Expand All @@ -265,12 +275,6 @@ body[dir="rtl"] .book-menu {
.book-languages {
margin-block-end: $padding-16 * 2;

.book-icon {
height: 1em;
width: 1em;
margin-inline-end: .5em;
}

ul {
padding-inline-start: 1.5em;
}
Expand All @@ -296,7 +300,6 @@ body[dir="rtl"] .book-menu {
.book-menu {
visibility: hidden;
margin-inline-start: -$menu-width;
font-size: $font-size-base;
z-index: 1;
}

Expand Down
4 changes: 4 additions & 0 deletions assets/_utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
text-align: right;
}

.text-small {
font-size: .875em;
}

.hidden {
display: none;
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"book.min.d2208918717d44dd763368798f932ba074fc5ac4c6432e3b5da36b1883005c59.css","MediaType":"text/css","Data":{"Integrity":"sha256-0iCJGHF9RN12M2h5j5MroHT8WsTGQy47XaNrGIMAXFk="}}
{"Target":"book.min.a61cdb2979f3c2bece54ef69131fba427dd57d55c232d3bb5fdb62ac41aa8354.css","MediaType":"text/css","Data":{"Integrity":"sha256-phzbKXnzwr7OVO9pEx+6Qn3VfVXCMtO7X9tirEGqg1Q="}}
17 changes: 5 additions & 12 deletions layouts/partials/docs/post-meta.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
{{ with .Date }}
<h5>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</h5>
<div class="flex align-center text-small book-post-date">
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon " alt="" />
<span>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</span>
</div>
{{ end }}

{{ range $taxonomy, $_ := .Site.Taxonomies }}
{{ with $terms := $.GetTerms $taxonomy }}
<div>
<div class="text-small">
{{ range $n, $term := $terms }}{{ if $n }}, {{ end }}
<a href="{{ $term.RelPermalink }}">{{ $term.Title }}</a>
{{- end }}
</div>
{{ end }}
{{ end }}

{{ if .Params.image }}
<p>
{{ with .Resources.GetMatch .Params.image }}
<img src={{ .RelPermalink }} />
{{ else }}
<img src={{ .Params.image | relURL }} />
{{ end }}
</p>
{{ end }}
4 changes: 2 additions & 2 deletions layouts/posts/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ <h2>
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
</h2>
{{ partial "docs/post-meta" . }}
<p>
<div class="book-post-content">
{{- .Summary -}}
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">...</a>
{{ end }}
</p>
</div>
</article>
{{ end }}

Expand Down
10 changes: 6 additions & 4 deletions layouts/posts/single.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{{ define "main" }}
<article class="markdown book-post">
<h1>
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
</h1>
<h2>
{{ partial "docs/title.html" . }}
</h2>
{{ partial "docs/post-meta" . }}
{{- .Content -}}
<div class="book-post-content">
{{- .Content -}}
</div>
</article>
{{ end }}

Expand Down

0 comments on commit 2f64607

Please sign in to comment.