Template cleanup and bookmark allowed tags

This commit is contained in:
2023-05-07 12:24:23 +10:00
parent d94da6c9ca
commit e96e6dfdf7
4 changed files with 4 additions and 26 deletions

View File

@@ -13,7 +13,7 @@ module Admin
bookmark.url
tempfile = Down.download(bookmark.url)
content = Readability::Document.new(tempfile.read, tags: %w[div section header p h1 h2 h3 h4 h5 h6 ol ul li table td tr thead tbody a]).content
content = Readability::Document.new(tempfile.read, tags: %w[div section header p h1 h2 h3 h4 h5 h6 ol ul li table td tr thead tbody a code pre]).content
bookmark_repo.update(id: bookmark_id, cached_content: content)

View File

@@ -6,25 +6,11 @@ html
meta name="theme-color" content="rgb(37, 99, 235)"
title Daniel Nitsikopoulos
link rel="authorization_endpoint" href=Hanami.app.settings.micropub_authorization_endpoint
link rel="token_endpoint" href=Hanami.app.settings.micropub_token_endpoint
link rel="micropub" href="#{URI.join(Hanami.app.settings.micropub_site_url, "micropub")}"
link rel="webmention" href=Hanami.app.settings.webmention_url
link rel="pingback" href=Hanami.app.settings.pingback_url
link rel="feed" type="text/html" href="/posts"
link rel="feed alternate" type="application/rss+xml" href="/feeds/rss"
link rel="feed alternate" type="application/rss+xml" href="/feeds/statuses_rss"
link rel="me" href=Hanami.app.settings.mastodon_url
link rel="me" href=Hanami.app.settings.github_url
title Admin // Daniel Nitsikopoulos
link rel="stylesheet" href="/assets/index.css"
link rel="icon" type="image/x-icon" href="/assets/favicon.ico"
script data-domain="dnitza.com" src="https://stats.dnitza.com/js/script.js" defer="true"
script src="/assets/index.js"
script src="https://unpkg.com/htmx.org@1.9.2" integrity="sha384-L6OqL9pRWyyFU3+/bjdSri+iIphTN/bvYyM37tICVyOJkWZLpP2vGn6VUEXgzg6h" crossorigin="anonymous"
@@ -49,10 +35,4 @@ html
= "/"
a class="p-1 rounded text-gray-400 hover:bg-red-100 hover:text-red-400 dark:hover:bg-red-200 #{link_active?('about') ? 'text-red-600 dark:text-red-400' : ''}" href="/admin/bookmarks" Bookmarks
== yield
div class="px-4 max-w-screen-md mx-auto pb-10"
p class="float-left text-gray-200 dark:text-gray-600" © 2023 Daniel Nitsikopoulos. All rights reserved.
p class="float-right text-gray-200 dark:text-gray-600"
a href="https://xn--sr8hvo.ws/%F0%9F%8D%93%E2%9E%97%F0%9F%8E%B0/previous" ←
a href="https://xn--sr8hvo.ws" 🕸💍
a href="https://xn--sr8hvo.ws/%F0%9F%8D%93%E2%9E%97%F0%9F%8E%B0/next"   →
== yield