Skip to content

Commit

Permalink
Add header logo image
Browse files Browse the repository at this point in the history
  • Loading branch information
carisaelam committed Sep 3, 2024
1 parent 0d65e7f commit 2b21478
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 27 deletions.
File renamed without changes
18 changes: 3 additions & 15 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_tree .
*= require_self
*/
.header__image__container {
display: flex;
}
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
</head>

<body>
<%= render '/shared/header' %>
<%= yield %>
</body>
</html>
3 changes: 3 additions & 0 deletions app/views/shared/_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="header__image__container">
<%= image_tag('logo.png', style: 'width: clamp(10rem, 50vw, 40rem); margin-inline: auto;') %>
</div>
13 changes: 1 addition & 12 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
Rails.application.routes.draw do
resources :posts
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
# Can be used by load balancers and uptime monitors to verify that the app is live.
get "up" => "rails/health#show", as: :rails_health_check

# Render dynamic PWA files from app/views/pwa/*
get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest

# Defines the root path route ("/")
root "posts#index"
resources :posts
end

0 comments on commit 2b21478

Please # to comment.