From b7f117cf4c59c0360156de16c2ba1c1ebd5602f0 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 26 May 2022 23:58:53 +0000 Subject: [PATCH] Filter Articles with a Javascript Search (#772) * for lugo changes * quick search through recipes * Update content/_index.md Co-authored-by: Steven Hall * Update content/_index.md Co-authored-by: Steven Hall * when searching, list one column, big results * Update content/_index.md Co-authored-by: Steven Hall * Update content/_index.md Co-authored-by: Steven Hall * Update content/_index.md Co-authored-by: Steven Hall * change for my naming * remove for fix * redundant * hide tags in items so search sees tags * last superficial changes Co-authored-by: Steven Hall --- config.toml | 5 +++ content/_index.md | 54 +++++++++++++++++++++++++++++++-- layouts/shortcodes/artlist.html | 2 +- static/style.css | 44 +++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 4 deletions(-) diff --git a/config.toml b/config.toml index f5f4f7a..e277fe1 100644 --- a/config.toml +++ b/config.toml @@ -2,3 +2,8 @@ baseURL = 'https://based.cooking/' languageCode = 'en-us' title = 'Based Cooking' theme = 'lugo' + +[markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true diff --git a/content/_index.md b/content/_index.md index e06deb1..53c9e99 100644 --- a/content/_index.md +++ b/content/_index.md @@ -2,14 +2,62 @@ title: "🍲 Based Cooking 🍳" --- -## Categories +## What do you want to cook? -{{< tagcloud >}} + + + {{< artlist >}} +## Or Browse by Category... + +{{< tagcloud >}} + ## About this site Founded to provide a simple online cookbook without ads and obese web design. diff --git a/layouts/shortcodes/artlist.html b/layouts/shortcodes/artlist.html index ef3eeb8..fa7a62e 100644 --- a/layouts/shortcodes/artlist.html +++ b/layouts/shortcodes/artlist.html @@ -1,5 +1,5 @@ diff --git a/static/style.css b/static/style.css index f4ea240..0c659ba 100644 --- a/static/style.css +++ b/static/style.css @@ -51,6 +51,7 @@ h1 { h2 { color: tomato ; + text-align: center ; } footer { @@ -113,3 +114,46 @@ img[alt="XMR Logo"] { @media (min-width: 100em) { #artlist { column-count: 3 ;} } + + +input#search { + all: unset; + background: #222; + color: #fff; + padding: 0.7rem 1rem; + border-radius: 5px; + width: 100%; +} + +.search { + width: 400px; + max-width: 85vw; + position: relative; + margin: 0.5rem auto 1.2rem; + display: flex; +} + +button.clear-search { + all: unset; + position: absolute; + right: 4px; + top: 5px; + height: 30px; + width: 30px; + color: #888; + cursor: pointer; + transition: color 180ms ease-in-out; +} +button.clear-search:hover { + color: #eee; +} + + +.matched-recipe { + font-size: x-large ; +} + +.list-searched { + column-count: 1 !important ; + list-style: decimal ; +}