Skip to content

Commit

Permalink
Docsと動画のnavタグ、ヘッダー共通化
Browse files Browse the repository at this point in the history
  • Loading branch information
a-terumoto-gs committed Mar 22, 2024
1 parent 9e3d5a4 commit 340bc80
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
7 changes: 1 addition & 6 deletions app/views/application/_global_nav.slim
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,12 @@ nav.global-nav
= link_to '/pages', class: "global-nav-links__link #{(@page&.slug != 'help' && @page&.slug != 'help-adviser') && current_link(/^pages/)}" do
.global-nav-links__link-icon
i.fa-solid.fa-file
.global-nav-links__link-label Docs
.global-nav-links__link-label Docs・動画
li.global-nav-links__item
= link_to portfolios_path, class: "global-nav-links__link #{current_link(/^works/)}" do
.global-nav-links__link-icon
i.fa-solid.fa-rocket
.global-nav-links__link-label.is-sm ポートフォリオ
i.global-nav-links__item
= link_to movies_path, class: "global-nav-links__link #{current_link(/^movies/)}" do
.global-nav-links__link-icon
i.fa-solid.fa-rocket
.global-nav-links__link-label.is-sm 動画
li.global-nav-links__item
= link_to users_path, class: "global-nav-links__link #{current_link(/^users-(index|show)/)}" do
.global-nav-links__link-icon
Expand Down
16 changes: 2 additions & 14 deletions app/views/movies/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
- title '動画'
- set_meta_tags description: '動画一覧ページです。'

header.page-header
.container
.page-header__inner
.page-main-header__start
h1.page-header__title
= title
.page-main-header__end
.page-header-actions
ul.page-header-actions__items
li.page-header-actions__item
= link_to new_movie_path, class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
|動画を追加
hr.a-border
= render 'pages/doc_movie_header'
= render 'pages/tabs'

.page-body
.container
Expand Down
20 changes: 20 additions & 0 deletions app/views/pages/_doc_movie_header.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
header.page-header
.container
.page-header__inner
.page-main-header__start
h1.page-header__title
| Docs・動画
.page-main-header__end
.page-header-actions
ul.page-header-actions__items
li.page-header-actions__item
= link_to [:new, :page], class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
| Doc作成
.page-header-actions
ul.page-header-actions__items
li.page-header-actions__item
= link_to [:new, :movie], class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
|動画を追加
hr.a-border
9 changes: 9 additions & 0 deletions app/views/pages/_tabs.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.page-tabs
.container
ul.page-tabs__items
li.page-tabs__item
= link_to '/pages', class: "page-tabs__item-link"
| Docs
li.page-tabs__item
= link_to '/movies', class: "page-tabs__item-link"
| 動画
16 changes: 2 additions & 14 deletions app/views/pages/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
- title 'Docs'
- set_meta_tags description: 'ドキュメント一覧ページです。'

header.page-header
.container
.page-header__inner
.page-main-header__start
h1.page-header__title
= title
.page-main-header__end
.page-header-actions
ul.page-header-actions__items
li.page-header-actions__item
= link_to [:new, :page], class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
| Doc作成
hr.a-border
= render 'doc_movie_header'
= render 'tabs'

- if @tag.present?
.page-optional-header
Expand Down

0 comments on commit 340bc80

Please sign in to comment.