this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

misc

+28 -11
+22 -6
app/assets/stylesheets/application.css
··· 201 201 font-family: var(--font-main); 202 202 } 203 203 204 - .pbody code.inline { 204 + .pbody code.inline, .pbody code { 205 205 font-family: var(--font-monospace); 206 206 display: inline-block; 207 207 padding: 0; ··· 212 212 font-size: 1rem; 213 213 } 214 214 215 - .pbody code { 215 + .pbody a > code { 216 + text-decoration: underline; 217 + text-underline-offset: 4px; 218 + } 219 + 220 + .pbody a:hover > code { 221 + text-decoration: none; 222 + } 223 + 224 + .pbody pre code { 216 225 font-family: var(--font-monospace); 217 226 display: block; 218 227 text-align: left; ··· 222 231 background: var(--main-color-darkest); 223 232 color: var(--text-color-code); 224 233 font-size: 0.9rem; 225 - } 226 - 227 - .pbody pre code { 228 - /* padding-top: 0 !important; */ 229 234 white-space: preserve; 230 235 } 231 236 ··· 370 375 371 376 .access-hidden { 372 377 display: none; 378 + } 379 + 380 + .alt-det { 381 + background: var(--accent-color); 382 + padding-block: .5rem; 383 + padding-inline: .5rem; 384 + color: var(--main-color-darker); 385 + } 386 + 387 + .alt-sum { 388 + cursor: pointer; 373 389 } 374 390 375 391 /* HTML comment box */
+1 -2
app/helpers/application_helper.rb
··· 1 1 module ApplicationHelper 2 2 3 3 def markdown(text) 4 - options = [:hard_wrap, :autolink, :no_intra_emphasis, :fenced_code_blocks, :underline, 5 - :highlight, :safe_links_only, :prettify, :no_styles] 4 + options = [:hard_wrap, :autolink, :no_intra_emphasis, :fenced_code_blocks, :underline, :highlight, :safe_links_only, :prettify, :no_styles] 6 5 Markdown.new(text, *options).to_html.html_safe 7 6 end 8 7
+4 -2
app/javascript/custom/alt.js
··· 1 - const allImgs = document.querySelectorAll("img[alt]"); 1 + const allImgs = document.querySelectorAll("article img[alt]"); 2 2 3 3 function altButton() { 4 4 allImgs.forEach((im) => { 5 5 const det = document.createElement("details"); 6 6 const sum = document.createElement("summary"); 7 + det.classList.add("alt-det"); 8 + sum.classList.add("alt-sum"); 7 9 sum.textContent = "alt text"; 10 + det.textContent = im.getAttribute("alt"); 8 11 det.appendChild(sum); 9 - det.textContent = im.getAttribute("alt"); 10 12 im.insertAdjacentElement("afterend", det); 11 13 }) 12 14 }
+1 -1
app/views/layouts/application.html.erb
··· 19 19 <meta name="author" content="girl on the moon"> 20 20 21 21 <meta property="og:title" content="<% if defined?(@article.title) %> <%= @article.title %> <% end %>"> 22 - <meta property="og:description" content="<% if defined?(@article.body) %> <%= truncate(strip_tags(markdown(@article.body)), length: 27, separator: /\s/) %> <% end %>"> 22 + <meta property="og:description" content="<% if defined?(@article.body) && !(@article.body).nil? %> <%= truncate(strip_tags(markdown(@article.body)), length: 27, separator: /\s/) %> <% end %>"> 23 23 <meta property="og:image" content="<% if defined?(@article.slug) && !(@article.slug).nil? %> <%= article_url(@article.slug, format: :png) %> <% end %>"> 24 24 <meta property="og:type" content="website"> 25 25 <meta property="og:url" content="<% if defined?(@article.slug) && !(@article.slug).nil? %> <%= article_url(@article.slug) %> <% end %>">