Add places
This commit is contained in:
8
app/templates/places/index.html.slim
Normal file
8
app/templates/places/index.html.slim
Normal file
@@ -0,0 +1,8 @@
|
||||
div class="mb-12 prose dark:prose-invert max-w-prose mx-auto text-gray-800 dark:text-gray-200"
|
||||
h1 Places
|
||||
|
||||
div class="mb-12 max-w-prose mx-auto"
|
||||
- places.each do |post|
|
||||
== render :post, post: post
|
||||
|
||||
div class="max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
|
@@ -14,6 +14,9 @@ article class="h-entry"
|
||||
div class="e-content"
|
||||
== 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/#{post.lat},#{post.lon},14,0/300x400@2x?access_token=pk.eyJ1IjoiZG5pdHphIiwiYSI6ImNsZWIzOHFmazBkODIzdm9kZHgxdDF4ajQifQ.mSneE-1SKeju8AOz5gp4BQ"
|
||||
|
||||
div class="mb-4 max-w-screen-md mx-auto border-t-4 border-solid border-gray-400 dark:border-gray-600"
|
||||
|
||||
div class="max-w-prose mx-auto text-gray-600 dark:text-gray-200 flex"
|
||||
|
2
app/templates/shared/_photo_post.html.slim
Normal file
2
app/templates/shared/_photo_post.html.slim
Normal file
@@ -0,0 +1,2 @@
|
||||
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"]}"
|
@@ -4,6 +4,8 @@ div class="mb-8 h-entry"
|
||||
= post.display_title
|
||||
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"
|
||||
== render :tags, tags: post.tags
|
||||
|
||||
p class="text-sm text-blue-400"
|
||||
|
Reference in New Issue
Block a user