Skip to content

Commit

Permalink
Merge pull request #218 from unikounio/chore/mobile-layout-adjustments
Browse files Browse the repository at this point in the history
モバイル用のレイアウト調整を行った
  • Loading branch information
unikounio authored Jan 7, 2025
2 parents dd983b0 + 5f57a67 commit 4de9b57
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/views/contests/_ranking.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.mx-auto.mt-8.w-3/5
.mx-auto.mt-8.sm:w-3/5
- if @ranked_entries.any?
table.w-full.border-collapse
thead
Expand Down
2 changes: 1 addition & 1 deletion app/views/contests/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

= render 'form'

.my-4.flex.justify-center
.my-4.flex.justify-center.mx-4
.w-full.max-w-lg.flex
.w-1/4.flex.flex-col.justify-start
| 【参加者】
Expand Down
3 changes: 2 additions & 1 deletion app/views/contests/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

= link_to 'コンテスト一覧へ', user_contests_path(current_user),
class: 'bg-stone-300 text-stone-700 hover:bg-stone-400 hover:text-black \
p-2 text-center rounded text-lg font-semibold flex-shrink-0'
p-2 text-center rounded text-sm sm:text-lg font-semibold \
flex-shrink-0'
.mx-6.sm:mx-20
- if @contests.any?
p.text-base.sm:text-xl.text-stone-800.my-6
Expand Down
8 changes: 4 additions & 4 deletions app/views/entries/_show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
class: 'entry-img h-72 sm:h-auto',
data: { action: 'load->image-status#finish' }

button.absolute.-top-7.-right-1.text-4xl.font-bold
.text-stone-600 data-action='click->modal#close'
|✕

.flex.justify-center.mt-6.space-x-8
- [1, 2, 3].each do |score|
= button_to score.to_s,
Expand Down Expand Up @@ -42,6 +38,10 @@
class: 'flex items-center px-6 py-2 bg-white \
rounded-full shadow hover:bg-stone-200 ml-auto'

button.absolute.-top-7.-right-1.text-4xl.font-bold
.text-stone-600 data-action='click->modal#close'
|✕

- if @entry.user_id == current_user.id
.mt-6.text-center
= button_to t('views.entries.show.delete_photo'),
Expand Down
3 changes: 2 additions & 1 deletion app/views/entries/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- set_meta_tags description: '参加しているコンテストに写真をエントリーすることができます。'

.bg-stone-100.px-4.py-3.flex.justify-between.items-center.border-none
h1.text-xl.sm:text-2xl.font-bold.text-black
h1.text-base.sm:text-2xl.font-bold.text-black
= t('views.entries.new.entry_photos')

= link_to t('views.entries.new.to_contest_page'), contest_path(@contest),
Expand Down Expand Up @@ -40,6 +40,7 @@
input#mobile-file-input.hidden(
type='file'
accept="image/*"
multiple
data-file-entry-target='fileInput'
data-action='change->file-entry#addFiles'
)
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/header/_contest_selection.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
div(
data-dropdown-target='menu'
class='hidden absolute top-8 right-0 mt-2 w-40 sm:w-64 flex flex-col \
bg-white border border-stone-200 rounded-md shadow-lg z-50'
bg-white border border-stone-200 rounded-md shadow-lg z-30'
)
- @recent_contests.each do |contest|
= link_to contest.name,
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/header/_main.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
.ml-auto.flex.justify-end.items-center
- if current_user.contests.any? && !@is_editing_contest
= render 'layouts/header/contest_selection'
.z-50 = render 'layouts/header/menu'
.z-40 = render 'layouts/header/menu'
18 changes: 9 additions & 9 deletions app/views/participants/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@

| コンテストにご参加いただけます。

.flex.justify-center.items-center
.container.w-auto
p.font-bold.text-lg.text-stone-900.mb-2
span.text-stone-500 = 'コンテスト名 '
= @contest.name

p.font-bold.text-lg.text-stone-900
span.text-stone-500.mr-3 = '投票期日 '
= "#{@contest.deadline.strftime('%Y/%m/%d')} まで"
.flex.flex-col.justify-center.items-start.w-fit
.flex.items-center.mb-2.overflow-hidden.text-xl
.font-medium.text-stone-500.text-right.pr-2.flex-shrink-0.w-32 = 'コンテスト名 '
.font-bold.text-stone-900.ml-2.truncate = @contest.name

.flex.justify-center.items-center.mb-4.text-xl
.font-medium.text-stone-500.text-right.pr-2.flex-shrink-0.w-32 = '投票期日 '
.font-bold.text-stone-900.ml-2
= "#{@contest.deadline.strftime('%Y/%m/%d')} まで"

.mt-8.flex.justify-center.items-center.flex-col
- if user_signed_in?
Expand Down
4 changes: 1 addition & 3 deletions app/views/pwa/manifest.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@
],
"start_url": "/",
"display": "standalone",
"scope": "/",
"theme_color": "#06B6D4",
"background_color": "#06B6D4"
"scope": "/"
}

0 comments on commit 4de9b57

Please sign in to comment.