Organise with layouts
This commit is contained in:
16
app/views/layouts/_header.html.slim
Normal file
16
app/views/layouts/_header.html.slim
Normal file
@@ -0,0 +1,16 @@
|
||||
head
|
||||
title Puzzle Scoreboard
|
||||
meta name="viewport" content="width=device-width,initial-scale=1"
|
||||
meta name="apple-mobile-web-app-capable" content="yes"
|
||||
meta name="mobile-web-app-capable" content="yes"
|
||||
= csrf_meta_tags
|
||||
= csp_meta_tag
|
||||
|
||||
= yield :head
|
||||
|
||||
link rel="icon" href="/icon.png" type="image/png"
|
||||
link rel="icon" href="/icon.svg" type="image/svg+xml"
|
||||
link rel="apple-touch-icon" href="/icon.png"
|
||||
|
||||
= stylesheet_link_tag :app, "data-turbo-track": "reload"
|
||||
= javascript_importmap_tags
|
@@ -1,22 +1,7 @@
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
title Puzzle Scoreboard
|
||||
meta name="viewport" content="width=device-width,initial-scale=1"
|
||||
meta name="apple-mobile-web-app-capable" content="yes"
|
||||
meta name="mobile-web-app-capable" content="yes"
|
||||
= csrf_meta_tags
|
||||
= csp_meta_tag
|
||||
|
||||
= yield :head
|
||||
|
||||
link rel="icon" href="/icon.png" type="image/png"
|
||||
link rel="icon" href="/icon.svg" type="image/svg+xml"
|
||||
link rel="apple-touch-icon" href="/icon.png"
|
||||
|
||||
= stylesheet_link_tag :app, "data-turbo-track": "reload"
|
||||
= javascript_importmap_tags
|
||||
= render "layouts/header"
|
||||
|
||||
body
|
||||
.container.mt-5
|
||||
= yield
|
||||
= yield
|
16
app/views/layouts/authenticated.html.slim
Normal file
16
app/views/layouts/authenticated.html.slim
Normal file
@@ -0,0 +1,16 @@
|
||||
doctype html
|
||||
html
|
||||
= render "layouts/header"
|
||||
|
||||
body
|
||||
.container.mt-5
|
||||
.float-end.ms-3
|
||||
= button_to "Log out", session_path, method: :delete
|
||||
.float-end.mt-1.ms-3
|
||||
= link_to "Settings", user_path(@current_user)
|
||||
.float-end.mt-1
|
||||
= link_to "Home", contests_path
|
||||
|
||||
h1 = @title
|
||||
|
||||
= yield
|
Reference in New Issue
Block a user