・ Ruby: 2.5.7 Rails: 5.2.4 ・ Vagrant: 2.2.7 -VirtualBox: 6.1 ・ OS: macOS Catalina
The following has been implemented.
・ Slim introduction ・ Implementation of posting function
slim:application.html.slim
doctype html
html
head
title
| Bookers2
= csrf_meta_tags
= csp_meta_tag
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
/Postscript
link href='https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.7.1/css/lightbox.css' rel='stylesheet'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
/Postscript
script src='https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.7.1/js/lightbox.min.js' type='text/javascript'
slim:books/show.html.slim
= link_to @book.image.url, 'data-lightbox': @book.image do
= image_tag @book.image.to_s
Recommended Posts