mirror of
https://github.com/danbee/my-images
synced 2025-03-04 08:49:05 +00:00
Move page title into header
This commit is contained in:
parent
c31a215b14
commit
1fe4675758
@ -32,4 +32,23 @@ body {
|
||||
header {
|
||||
background-color: black;
|
||||
text-align: right;
|
||||
|
||||
h1 {
|
||||
display: inline-block;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
.container {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
ul.images {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-gap: 0.75rem;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
justify-content: space-between;
|
||||
list-style: none;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
padding-left: 0;
|
||||
|
||||
li {
|
||||
margin-bottom: 1em;
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
display: grid;
|
||||
grid-gap: 1.5rem;
|
||||
height: calc(100% - 12rem);
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
.image-container {
|
||||
align-items: center;
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
<h1>My Images</h1>
|
||||
<% content_for :title do %>
|
||||
<h1>My Images</h1>
|
||||
<% end %>
|
||||
|
||||
<ul class="images">
|
||||
<% @images.each do |image| %>
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
<% content_for :title do %>
|
||||
<h1>My Images</h1>
|
||||
→
|
||||
<%= @image.image.name %>
|
||||
<% end %>
|
||||
|
||||
<div class="show-image">
|
||||
<div class="image-container">
|
||||
<%= image_tag(@image.image.url) %>
|
||||
|
||||
@ -11,11 +11,17 @@
|
||||
|
||||
<header>
|
||||
<div class="container">
|
||||
<% if @current_user %>
|
||||
Signed in as: <%= @current_user.name %> | <%= link_to 'Sign out', session_path, method: :delete %>
|
||||
<% else %>
|
||||
<%= link_to 'Sign in with GitHub', '/auth/github' %>
|
||||
<% end %>
|
||||
<div class="title">
|
||||
<%= content_for :title %>
|
||||
</div>
|
||||
|
||||
<div class="profile">
|
||||
<% if @current_user %>
|
||||
Signed in as: <%= @current_user.name %> | <%= link_to 'Sign out', session_path, method: :delete %>
|
||||
<% else %>
|
||||
<%= link_to 'Sign in with GitHub', '/auth/github' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
<% content_for :title, "My Images" %>
|
||||
|
||||
<div class="centre-stage">
|
||||
<%= link_to '/auth/github', class: "github-button" do %>
|
||||
<%= image_tag "github.svg" %>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user