Place post styles
This commit is contained in:
18
app/content/pages/colophon.md
Normal file
18
app/content/pages/colophon.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# Colophon
|
||||
|
||||
Hello! Welcome to dnitza.com 👋
|
||||
|
||||
|
||||
|
||||
This site is made from:
|
||||
|
||||
- Adamantium — A custom-built, [Hanami](https://github.com/hanami/hanami)-based, blogging engine [based on the Micropub spec](https://www.w3.org/TR/micropub/) (open sourced soon).
|
||||
- [Vultr](http://vultr.com/) — for hosting.
|
||||
- [Vim](https://www.vim.org) — for moving text around in files.
|
||||
- [Postico](https://eggerapps.at/postico) — for looking at the mistakes I have made in postgres.
|
||||
- [iTerm2](http://iterm2.com/) — as my terminal emulator.
|
||||
- [Tailwind](https://tailwindcss.com) — for stylin'.
|
||||
- [HTMX](http://htmx.org/) — for some JS sprinkles.
|
||||
- [Rubik](https://fonts.google.com/specimen/Rubik) — for headings.
|
||||
- [JetBrains Mono](https://www.jetbrains.com/lp/mono/) — for code snippets.
|
||||
- [Karla](https://fonts.google.com/specimen/Karla?query=KARLA) — for everything else.
|
@@ -63,6 +63,14 @@ module Adamantium
|
||||
geo[1]
|
||||
end
|
||||
|
||||
def small_map
|
||||
"https://api.mapbox.com/styles/v1/dnitza/cleb2o734000k01pbifls5620/static/pin-s+555555(#{lon},#{lat})/#{lon},#{lat},14,0/200x100@2x?access_token=pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIzOHFmazBkODIzdm9kZHgxdDF4ajQifQ.mSneE-1SKeju8AOz5gp4BQ"
|
||||
end
|
||||
|
||||
def large_map
|
||||
"https://api.mapbox.com/styles/v1/dnitza/cleb2o734000k01pbifls5620/static/pin-s+555555(#{lon},#{lat})/#{lon},#{lat},14,0/620x310@2x?access_token=pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIzOHFmazBkODIzdm9kZHgxdDF4ajQifQ.mSneE-1SKeju8AOz5gp4BQ"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# e.g. geo:-37.75188,144.90417;u=35
|
||||
@@ -74,6 +82,8 @@ module Adamantium
|
||||
end
|
||||
|
||||
def truncate_html(content, len = 30, at_end = nil)
|
||||
return content if content.to_s.length <= len
|
||||
|
||||
p = REXML::Parsers::PullParser.new(content)
|
||||
tags = []
|
||||
new_len = len
|
||||
|
@@ -15,7 +15,7 @@ article class="h-entry"
|
||||
== post.content
|
||||
|
||||
- if post.location
|
||||
img class="shadow-solid shadow-pink-100 dark:shadow-pink-200 rounded mb-4" src="https://api.mapbox.com/styles/v1/dnitza/cleb2o734000k01pbifls5620/static/pin-l+555555(#{post.lon},#{post.lat})/#{post.lon},#{post.lat},14,0/400x200@2x?access_token=pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIzOHFmazBkODIzdm9kZHgxdDF4ajQifQ.mSneE-1SKeju8AOz5gp4BQ"
|
||||
img class="shadow-solid shadow-pink-100 dark:shadow-pink-200 rounded mb-4" src=post.large_map
|
||||
|
||||
div class="mb-4 max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
|
||||
|
||||
|
@@ -1,2 +1,3 @@
|
||||
a href="#{post.permalink}"
|
||||
img class="rounded object-cover hover:opacity-80 h-48 w-48 mr-4 mb-4" src="#{post.photos[0]["value"]}" alt="#{post.photos[0]["alt"]}"
|
||||
div class="rounded max-w-xs"
|
||||
a href="#{post.permalink}"
|
||||
img class="rounded object-cover hover:opacity-80 h-48 w-48 mr-4 mb-4" src="#{post.photos[0]["value"]}" alt="#{post.photos[0]["alt"]}"
|
||||
|
@@ -5,7 +5,7 @@ div class="mb-8 h-entry"
|
||||
div class="e-content p-name text-base prose prose-ul:list-none prose-ul:pl-0 prose-li:pl-0 text-gray-800 dark:text-gray-200"
|
||||
== post.excerpt
|
||||
-if post.location
|
||||
img src="https://api.mapbox.com/styles/v1/dnitza/cleb2o734000k01pbifls5620/static/#{post.lat},#{post.lon},14,0/50x50@2x?access_token=pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIzOHFmazBkODIzdm9kZHgxdDF4ajQifQ.mSneE-1SKeju8AOz5gp4BQ"
|
||||
img class="rounded" src=post.small_map
|
||||
== render :tags, tags: post.tags
|
||||
|
||||
p class="text-sm text-blue-400"
|
||||
|
Reference in New Issue
Block a user