Skip to content

Commit

Permalink
chore: normalize headings (#42)
Browse files Browse the repository at this point in the history
* chore: minor update to card component

* chore: normalize headings of blog and single page
  • Loading branch information
imfing authored Sep 10, 2023
1 parent 61e41f2 commit 04e131f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{ partial "toc.html" . }}
<article class="w-full break-words flex min-h-[calc(100vh-var(--navbar-height))] min-w-0 justify-center pb-8 pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main class="w-full min-w-0 max-w-6xl px-6 pt-4 md:px-12">
<br class="mt-1.5 text-sm" />
<h1 class="text-center mt-2 text-4xl font-bold tracking-tight text-slate-900 dark:text-slate-100">{{ .Title }}</h1>
<div class="mb-16"></div>
<div class="content">
Expand Down
3 changes: 2 additions & 1 deletion layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }}
<article class="w-full break-words flex min-h-[calc(100vh-var(--navbar-height))] min-w-0 justify-center pb-8 pr-[calc(env(safe-area-inset-right)-1.5rem)]">
<main class="w-full min-w-0 max-w-6xl px-6 pt-4 md:px-12">
<h1 class="text-4xl tracking-tighter text-center font-extrabold md:text-5xl mt-8 pb-6">{{ .Title }}</h1>
<br class="mt-1.5 text-sm" />
<h1 class="text-center mt-2 text-4xl font-bold tracking-tight text-slate-900 dark:text-slate-100">{{ .Title }}</h1>
<div class="content">{{ .Content }}</div>
{{ range .Pages.ByDate }}
<div class="mb-10">
Expand Down
13 changes: 7 additions & 6 deletions layouts/shortcodes/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@

{{- $external := strings.HasPrefix $link "http" -}}


<a
class="hextra-card group flex flex-col justify-start overflow-hidden rounded-lg border border-gray-200 text-current no-underline dark:shadow-none hover:shadow-gray-100 dark:hover:shadow-none shadow-gray-100 active:shadow-sm active:shadow-gray-200 transition-all duration-200 {{ $linkClass }}"
href="{{ $link }}"
{{- if $external -}}
target="_blank"
rel="noreferrer"
{{- if $external }}
target="_blank" rel="noreferrer"
{{- end -}}
>
{{- with $image -}}
<img alt="{{ $title }}" loading="lazy" decoding="async" style="color: transparent;" src="{{ $image }}" />
<img alt="{{ $title }}" loading="lazy" decoding="async" style="color: transparent;" src="{{ $image | safeURL }}" />
{{- end -}}

{{ $padding := "p-4"}}
{{- $padding := "p-4" -}}
{{- with $subtitle -}}
{{ $padding = "pt-4 px-4"}}
{{- $padding = "pt-4 px-4" -}}
{{- end -}}


<span class="flex font-semibold items-start gap-2 {{ $padding }} text-gray-700 hover:text-gray-900 dark:text-neutral-200 dark:hover:text-neutral-50">
{{- with $icon }}{{ partial "utils/icon.html" (dict "name" $icon) -}}{{ end -}}
{{- $title -}}
Expand Down

0 comments on commit 04e131f

Please sign in to comment.