mirror of https://github.com/jpanther/congo.git
Compare commits
9 Commits
d91dfe6db6
...
568bcf3a6b
Author | SHA1 | Date |
---|---|---|
stereobooster | 568bcf3a6b | |
James Panther | 12fcf5f692 | |
James Panther | 92eb1f638e | |
James Panther | 479bc217d8 | |
James Panther | 1c8e681dee | |
stereobooster | 0e697b27ca | |
stereobooster | fc4120662a | |
stereobooster | 95f04231af | |
stereobooster | 74e53cc7d2 |
|
@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Minor refactor to improve memory efficiency in search results ([#650](https://github.com/jpanther/congo/pull/650))
|
||||||
|
- Links in Markdown content are now portable ([#655](https://github.com/jpanther/congo/pull/655))
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- JavaScript error setting theme colour when site is loaded in dark mode ([#676](https://github.com/jpanther/congo/issues/676))
|
||||||
|
|
||||||
## [2.7.0] - 2023-10-23
|
## [2.7.0] - 2023-10-23
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -133,10 +133,8 @@ function executeQuery(term) {
|
||||||
let resultsHTML = "";
|
let resultsHTML = "";
|
||||||
|
|
||||||
if (results.length > 0) {
|
if (results.length > 0) {
|
||||||
results.forEach(function (value, key) {
|
resultsHTML = results.map(function (value, key) {
|
||||||
resultsHTML =
|
return `<li class="mb-2">
|
||||||
resultsHTML +
|
|
||||||
`<li class="mb-2">
|
|
||||||
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">
|
<a class="flex items-center px-3 py-2 rounded-md appearance-none bg-neutral-100 dark:bg-neutral-700 focus:bg-primary-100 hover:bg-primary-100 dark:hover:bg-primary-900 dark:focus:bg-primary-900 focus:outline-dotted focus:outline-transparent focus:outline-2" href="${value.item.permalink}" tabindex="0">
|
||||||
<div class="grow">
|
<div class="grow">
|
||||||
<div class="-mb-1 text-lg font-bold">${value.item.title}</div>
|
<div class="-mb-1 text-lg font-bold">${value.item.title}</div>
|
||||||
|
@ -147,7 +145,7 @@ function executeQuery(term) {
|
||||||
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">←</div>
|
<div class="mr-2 ltr:hidden rtl:block text-neutral-500">←</div>
|
||||||
</a>
|
</a>
|
||||||
</li>`;
|
</li>`;
|
||||||
});
|
}).join("");
|
||||||
hasResults = true;
|
hasResults = true;
|
||||||
} else {
|
} else {
|
||||||
resultsHTML = "";
|
resultsHTML = "";
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<a
|
{{ $link := .Destination }}
|
||||||
href="{{ .Destination | safeURL }}"
|
{{ $isRemote := strings.HasPrefix $link "http" }}
|
||||||
{{ with .Title }}title="{{ . }}"{{ end }}
|
{{- if not $isRemote -}}
|
||||||
{{ if strings.HasPrefix .Destination "http" }}target="_blank" rel="noreferrer noopener"{{ end }}
|
{{ $url := urls.Parse .Destination }}
|
||||||
>
|
{{- if $url.Path -}}
|
||||||
{{- .Text | safeHTML -}}
|
{{ $fragment := "" }}
|
||||||
</a>
|
{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
|
||||||
|
{{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}}
|
||||||
|
{{- end -}}
|
||||||
|
<a href="{{ $link | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank" rel="noreferrer"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="theme-color" content="rgb(255,255,255)" />
|
||||||
{{/* Title */}}
|
{{/* Title */}}
|
||||||
{{ if .IsHome -}}
|
{{ if .IsHome -}}
|
||||||
<title>{{ .Site.Title | emojify }}</title>
|
<title>{{ .Site.Title | emojify }}</title>
|
||||||
|
@ -102,7 +103,6 @@
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
|
||||||
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
|
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta name="theme-color" content="rgb(255,255,255)" />
|
|
||||||
{{/* Site Verification */}}
|
{{/* Site Verification */}}
|
||||||
{{ with .Site.Params.verification.google }}
|
{{ with .Site.Params.verification.google }}
|
||||||
<meta name="google-site-verification" content="{{ . }}" />
|
<meta name="google-site-verification" content="{{ . }}" />
|
||||||
|
|
Loading…
Reference in New Issue