Skip to content

Commit

Permalink
Merge pull request #118 from motohiro-mm/feature/create_header
Browse files Browse the repository at this point in the history
ヘッダーを作成
  • Loading branch information
motohiro-mm authored Oct 11, 2024
2 parents 9c3507c + b5d9c67 commit f8c18e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
Binary file added app/assets/images/logo_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 3 additions & 21 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,9 @@
</head>

<body class="max-w-screen-sm mx-auto h-screen flex flex-col">
<header class="h-14 px-4 flex justify-between bg-orange-200 w-full z-10 max-w-screen-sm">
<div class="">
header
<%# if current_user %>
<%#= image_tag current_user.icon, class: '' %>
<%#= link_to "#{current_user.name}さん", edit_user_path, class: '' %>
<%#= link_to '共有ページへ', family_path, class: '' %>
<%#= link_to 'ログアウト', log_out_path, class: '' %>
<%# else %>
<!-- <span class="">ゲストさん</span>-->
<%# end %>
<!-- </div>-->
<!-- <div>-->
<%#= link_to '< home', root_path, class: '' %>
<%# if current_user %>
<%#= link_to '使い方', about_path, class: '' %>
<%# end %>
<%#= link_to '利用規約', terms_path, class: '' %>
<%#= link_to 'プライバシーポリシー', privacy_path, class: '' %>
</div>
</header>
<% unless current_page?(root_path) %>
<%= render 'shared/header' %>
<% end %>
<main class="flex-1 bg-white text-orange-950">
<%= yield %>
</main>
Expand Down
9 changes: 9 additions & 0 deletions app/views/shared/_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<header class="h-14 px-4 flex justify-between items-center bg-white border-b-4 border-orange-100 w-full z-10 max-w-screen-sm">
<div class="">
<%= link_to image_tag('logo_small.png', class: 'h-11'), root_path %>
</div>
<div class="">
<%= link_to image_tag(current_user.icon, class: 'icon'), user_path %>
ここにメニューおく
</div>
</header>

0 comments on commit f8c18e6

Please sign in to comment.