From bfa85eb2f70121620f8f3e5de99f58fe66cb419e Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sat, 5 Nov 2022 10:43:04 -0500 Subject: [PATCH] fixing some config stuff and deleting the broken config --- assets/css/compiled/main.css | 22 +++-- config/languages.en.toml | 63 -------------- config/markup.toml | 13 --- config/menus.en.toml | 51 ----------- .../_default/_markup/render-image-new.html | 87 +++++++++++++++++++ 5 files changed, 100 insertions(+), 136 deletions(-) delete mode 100644 config/languages.en.toml delete mode 100644 config/markup.toml delete mode 100644 config/menus.en.toml create mode 100644 layouts/_default/_markup/render-image-new.html diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 87bdbf5..cf87b7e 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1373,6 +1373,10 @@ select { visibility: hidden; } +.static { + position: static; +} + .fixed { position: fixed; } @@ -1449,6 +1453,11 @@ select { margin: 0.25rem; } +.my-0 { + margin-top: 0px; + margin-bottom: 0px; +} + .-my-2 { margin-top: -0.5rem; margin-bottom: -0.5rem; @@ -1474,11 +1483,6 @@ select { margin-right: 0.25rem; } -.my-0 { - margin-top: 0px; - margin-bottom: 0px; -} - .mt-0 { margin-top: 0px; } @@ -1857,6 +1861,10 @@ select { border-radius: 0.5rem; } +.rounded-md { + border-radius: 0.375rem; +} + .rounded-full { border-radius: 9999px; } @@ -1865,10 +1873,6 @@ select { border-radius: 1rem; } -.rounded-md { - border-radius: 0.375rem; -} - .rounded { border-radius: 0.25rem; } diff --git a/config/languages.en.toml b/config/languages.en.toml deleted file mode 100644 index e88d968..0000000 --- a/config/languages.en.toml +++ /dev/null @@ -1,63 +0,0 @@ -languageCode = "en" -languageName = "English" -displayName = "EN" -isoCode = "en" -weight = 1 -rtl = false - -title = "TFC Connection" -logo = "img/logo.png" -description = "Connecting teens with the truth of Jesus Christ… teaching and equipping them to live out the Great Commission." -# copyright = "Copy, _right?_ :thinking_face:" - -dateFormat = "2 January 2006" - -[author] - name = "TFC Connection" - image = "img/logo.png" - headline = "Teens For Christ Connection" - bio = "Connecting teens with the truth of Jesus Christ… teaching and equipping them to live out the Great Commission." - links = [ - # { email = "mailto:hello@your_domain.com" }, - # { link = "https://link-to-some-website.com/" }, - # { amazon = "https://www.amazon.com/hz/wishlist/ls/wishlist-id" }, - # { apple = "https://www.apple.com" }, - # { blogger = "https://username.blogspot.com/" }, - # { codepen = "https://codepen.io/username" }, - # { dev = "https://dev.to/username" }, - # { discord = "https://discord.gg/invitecode" }, - # { dribbble = "https://dribbble.com/username" }, - { facebook = "https://facebook.com/tfcconnection" }, - # { flickr = "https://www.flickr.com/photos/username/" }, - # { foursquare = "https://foursquare.com/username" }, - # { github = "https://github.com/username" }, - # { gitlab = "https://gitlab.com/username" }, - # { google = "https://www.google.com/" }, - # { hashnode = "https://username.hashnode.dev" }, - { instagram = "https://instagram.com/tfcconnection" }, - # { keybase = "https://keybase.io/username" }, - # { kickstarter = "https://www.kickstarter.com/profile/username" }, - # { lastfm = "https://lastfm.com/user/username" }, - # { linkedin = "https://linkedin.com/in/username" }, - # { mastodon = "https://mastodon.instance/@username" }, - # { medium = "https://medium.com/username" }, - # { microsoft = "https://www.microsoft.com/" }, - # { orcid = "https://orcid.org/userid" }, - # { patreon = "https://www.patreon.com/username" }, - # { pinterest = "https://pinterest.com/username" }, - # { reddit = "https://reddit.com/user/username" }, - # { researchgate = "https://www.researchgate.net/profile/username" }, - # { slack = "https://workspace.url/team/userid" }, - # { snapchat = "https://snapchat.com/add/username" }, - # { soundcloud = "https://soundcloud.com/username" }, - # { stack-overflow = "https://stackoverflow.com/users/userid/username" }, - # { steam = "https://steamcommunity.com/profiles/userid" }, - # { telegram = "https://t.me/username" }, - # { tiktok = "https://tiktok.com/@username" }, - # { tumblr = "https://username.tumblr.com" }, - # { twitch = "https://twitch.tv/username" }, - # { twitter = "https://twitter.com/username" }, - # { whatsapp = "https://wa.me/phone-number" }, - # { youtube = "https://youtube.com/username" }, - # { ko-fi = "https://ko-fi.com/username" }, - ] diff --git a/config/markup.toml b/config/markup.toml deleted file mode 100644 index c5449fc..0000000 --- a/config/markup.toml +++ /dev/null @@ -1,13 +0,0 @@ -# -- Markup -- -# These settings are required for the theme to function. - -[goldmark] -[goldmark.renderer] - unsafe = true - -[highlight] - noClasses = false - -[tableOfContents] - startLevel = 2 - endLevel = 4 diff --git a/config/menus.en.toml b/config/menus.en.toml deleted file mode 100644 index ea9bd30..0000000 --- a/config/menus.en.toml +++ /dev/null @@ -1,51 +0,0 @@ -# -- Main Menu -- -# The main menu is displayed in the header at the top of the page. -# Acceptable parameters are name, pageRef, page, url, title, weight. -# -# The simplest menu configuration is to provide: -# name = The name to be displayed for this menu link -# pageRef = The identifier of the page or section to link to -# -# By default the menu is ordered alphabetically. This can be -# overridden by providing a weight value. The menu will then be -# ordered by weight from lowest to highest. - -[[main]] - name = "About" - pageRef = "about" - weight = 10 - -[[main]] - name = "Ministries" - pageRef = "ministries" - weight = 20 - -[[main]] - name = "Staff" - pageRef = "staff" - weight = 30 - -[[main]] - name = "Donate" - pageRef = "donate" - weight = 40 - -[[main]] - name = "Contact" - pageRef = "contact" - weight = 50 - -# -- Footer Menu -- -# The footer menu is displayed at the bottom of the page, just before -# the copyright notice. Configure as per the main menu above. - - -[[footer]] - name = "Tags" - pageRef = "tags" - weight = 10 - -[[footer]] - name = "Categories" - pageRef = "categories" - weight = 20 diff --git a/layouts/_default/_markup/render-image-new.html b/layouts/_default/_markup/render-image-new.html new file mode 100644 index 0000000..08689f2 --- /dev/null +++ b/layouts/_default/_markup/render-image-new.html @@ -0,0 +1,87 @@ + + + {{ $isJPG := eq (path.Ext .Destination) ".jpg" }} + {{ $isPNG := eq (path.Ext .Destination) ".png" }} + + {{ if ($isJPG) -}} + {{ $avifPath:= replace .Destination ".jpg" ".avif" }} + {{ $avifPathStatic:= printf "static/%s" $avifPath }} + + {{ if (fileExists $avifPathStatic) -}} + + {{- end }} + + {{ $webpPath:= replace .Destination ".jpg" ".webp" }} + {{ $webpPathStatic:= printf "static/%s" $webpPath }} + + {{ if (fileExists $webpPathStatic) -}} + + {{- end }} + {{- end }} + + {{ if ($isPNG) -}} + {{ $avifPath:= replace .Destination ".png" ".avif" }} + {{ $avifPathStatic:= printf "static/%s" $avifPath }} + + {{ if (fileExists $avifPathStatic) -}} + + {{- end }} + + {{ $webpPath:= replace .Destination ".png" ".webp" }} + {{ $webpPathStatic:= printf "static/%s" $webpPath }} + + {{ if (fileExists $webpPathStatic) -}} + + {{- end }} + {{- end }} + + {{ $img := imageConfig (add "/static" (.Destination | safeURL)) }} + + {{ .Text }} + + + + +{{ $url := urls.Parse .Destination }} +{{ $altText := .Text }} +{{ $caption := .Title }} +{{ if findRE "^https?" $url.Scheme }} +
+ {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }} +
+{{ else }} + {{ $resource := "" }} + {{ if $.Page.Resources.GetMatch ($url.String) }} + {{ $resource = $.Page.Resources.GetMatch ($url.String) }} + {{ else if resources.GetMatch ($url.String) }} + {{ $resource = resources.Get ($url.String) }} + {{ end }} + {{ with $resource }} +
+ {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }} +
+ {{ else }} +
+ {{ $altText }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }} +
+ {{ end }} +{{ end }}