・ Rubis: 2.5.7 Rails: 5.2.4 ・ Vagrant: 2.2.7 -VirtualBox: 6.1 ・ Système d'exploitation: macOS Catalina
Ce qui suit a été mis en œuvre.
・ Présentation mince ・ Mise en œuvre de la fonction de publication
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