diff --git a/Gemfile b/Gemfile
index bbd483bf..c30c9ea9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -7,11 +7,11 @@ gem "rails", github: "rails/rails", branch: "main"
gem "bcrypt", "~> 3.1.20"
gem "bootsnap", require: false
-gem "bootstrap", github: 'twbs/bootstrap-rubygem' # v 5.3.3 should fix the problem, but not released yet
-gem "dartsass-rails", "~> 0.5.0"
+gem "dartsass-rails"
gem "importmap-rails"
gem "jbuilder"
gem "pg", "~> 1.5"
+gem "primer_view_components", "~> 0.27"
gem "propshaft"
gem "puma", "~> 6.4"
gem "rails-i18n"
diff --git a/Gemfile.lock b/Gemfile.lock
index 2af7b565..fcb98ceb 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,31 +1,31 @@
GIT
remote: https://github.com/rails/rails.git
- revision: e98f4d8496fbc6dd9ffb93202981b4f804e388c1
+ revision: 4bb73233413f30fd7217bd7f08af44963f5832b1
branch: main
specs:
- actioncable (8.0.0.alpha)
- actionpack (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ actioncable (7.2.0.alpha)
+ actionpack (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
- actionmailbox (8.0.0.alpha)
- actionpack (= 8.0.0.alpha)
- activejob (= 8.0.0.alpha)
- activerecord (= 8.0.0.alpha)
- activestorage (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ actionmailbox (7.2.0.alpha)
+ actionpack (= 7.2.0.alpha)
+ activejob (= 7.2.0.alpha)
+ activerecord (= 7.2.0.alpha)
+ activestorage (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
mail (>= 2.8.0)
- actionmailer (8.0.0.alpha)
- actionpack (= 8.0.0.alpha)
- actionview (= 8.0.0.alpha)
- activejob (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ actionmailer (7.2.0.alpha)
+ actionpack (= 7.2.0.alpha)
+ actionview (= 7.2.0.alpha)
+ activejob (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (8.0.0.alpha)
- actionview (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ actionpack (7.2.0.alpha)
+ actionview (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
@@ -34,89 +34,78 @@ GIT
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actiontext (8.0.0.alpha)
- actionpack (= 8.0.0.alpha)
- activerecord (= 8.0.0.alpha)
- activestorage (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ actiontext (7.2.0.alpha)
+ actionpack (= 7.2.0.alpha)
+ activerecord (= 7.2.0.alpha)
+ activestorage (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
- actionview (8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ actionview (7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ activejob (7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
globalid (>= 0.3.6)
- activemodel (8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
- activerecord (8.0.0.alpha)
- activemodel (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ activemodel (7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
+ activerecord (7.2.0.alpha)
+ activemodel (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
timeout (>= 0.4.0)
- activestorage (8.0.0.alpha)
- actionpack (= 8.0.0.alpha)
- activejob (= 8.0.0.alpha)
- activerecord (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ activestorage (7.2.0.alpha)
+ actionpack (= 7.2.0.alpha)
+ activejob (= 7.2.0.alpha)
+ activerecord (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
marcel (~> 1.0)
- activesupport (8.0.0.alpha)
+ activesupport (7.2.0.alpha)
base64
bigdecimal
- concurrent-ruby (~> 1.0, >= 1.3.1)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
- logger (>= 1.4.2)
- minitest (>= 5.1)
+ minitest (>= 5.1, < 5.22.0)
tzinfo (~> 2.0, >= 2.0.5)
- rails (8.0.0.alpha)
- actioncable (= 8.0.0.alpha)
- actionmailbox (= 8.0.0.alpha)
- actionmailer (= 8.0.0.alpha)
- actionpack (= 8.0.0.alpha)
- actiontext (= 8.0.0.alpha)
- actionview (= 8.0.0.alpha)
- activejob (= 8.0.0.alpha)
- activemodel (= 8.0.0.alpha)
- activerecord (= 8.0.0.alpha)
- activestorage (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
+ rails (7.2.0.alpha)
+ actioncable (= 7.2.0.alpha)
+ actionmailbox (= 7.2.0.alpha)
+ actionmailer (= 7.2.0.alpha)
+ actionpack (= 7.2.0.alpha)
+ actiontext (= 7.2.0.alpha)
+ actionview (= 7.2.0.alpha)
+ activejob (= 7.2.0.alpha)
+ activemodel (= 7.2.0.alpha)
+ activerecord (= 7.2.0.alpha)
+ activestorage (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
bundler (>= 1.15.0)
- railties (= 8.0.0.alpha)
- railties (8.0.0.alpha)
- actionpack (= 8.0.0.alpha)
- activesupport (= 8.0.0.alpha)
- irb (~> 1.13)
+ railties (= 7.2.0.alpha)
+ railties (7.2.0.alpha)
+ actionpack (= 7.2.0.alpha)
+ activesupport (= 7.2.0.alpha)
+ irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
-GIT
- remote: https://github.com/twbs/bootstrap-rubygem.git
- revision: f240cae79fb1dcb55abcb4fc9710544134ef8ec2
- specs:
- bootstrap (5.3.3)
- autoprefixer-rails (>= 9.1.0)
- popper_js (>= 2.11.8, < 3)
-
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
- autoprefixer-rails (10.4.16.0)
- execjs (~> 2)
base64 (0.2.0)
bcrypt (3.1.20)
- bigdecimal (3.1.8)
+ bigdecimal (3.1.7)
bindex (0.8.1)
bootsnap (1.18.3)
msgpack (~> 1.2)
- builder (3.3.0)
+ builder (3.2.4)
capybara (3.40.0)
addressable
matrix
@@ -126,20 +115,20 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
- concurrent-ruby (1.3.3)
+ concurrent-ruby (1.2.3)
connection_pool (2.4.1)
crass (1.0.6)
dartsass-rails (0.5.0)
railties (>= 6.0.0)
sass-embedded (~> 1.63)
date (3.3.4)
- debug (1.9.2)
+ debug (1.9.1)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.1)
- drb (2.2.1)
- erubi (1.13.0)
- execjs (2.9.1)
+ drb (2.2.0)
+ ruby2_keywords
+ erubi (1.12.0)
factory_bot (6.4.5)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
@@ -147,21 +136,22 @@ GEM
railties (>= 5.0.0)
globalid (1.2.1)
activesupport (>= 6.1)
- google-protobuf (3.23.4)
- i18n (1.14.5)
+ google-protobuf (4.27.2)
+ bigdecimal
+ rake (>= 13)
+ i18n (1.14.1)
concurrent-ruby (~> 1.0)
importmap-rails (2.0.1)
actionpack (>= 6.0.0)
activesupport (>= 6.0.0)
railties (>= 6.0.0)
io-console (0.7.2)
- irb (1.14.0)
- rdoc (>= 4.0.0)
+ irb (1.11.2)
+ rdoc
reline (>= 0.4.2)
- jbuilder (2.12.0)
+ jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
- logger (1.6.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
@@ -174,23 +164,30 @@ GEM
matrix (0.4.2)
method_source (1.1.0)
mini_mime (1.1.5)
- minitest (5.24.1)
+ mini_portile2 (2.8.5)
+ minitest (5.21.2)
msgpack (1.7.2)
- net-imap (0.4.14)
+ net-imap (0.4.10)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
- net-smtp (0.5.0)
+ net-smtp (0.4.0.1)
net-protocol
- nio4r (2.7.3)
- nokogiri (1.16.6-x86_64-linux)
+ nio4r (2.7.0)
+ nokogiri (1.16.2)
+ mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- pg (1.5.6)
- popper_js (2.11.8)
- propshaft (0.9.0)
+ octicons (19.10.0)
+ pg (1.5.4)
+ primer_view_components (0.27.0)
+ actionview (>= 5.0.0)
+ activesupport (>= 5.0.0)
+ octicons (>= 18.0.0)
+ view_component (>= 3.1, < 4.0)
+ propshaft (0.8.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
rack
@@ -200,8 +197,8 @@ GEM
public_suffix (5.0.4)
puma (6.4.2)
nio4r (~> 2.0)
- racc (1.8.0)
- rack (3.1.7)
+ racc (1.7.3)
+ rack (3.0.9)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
@@ -219,51 +216,50 @@ GEM
rails-i18n (7.0.9)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
- rake (13.2.1)
- rdoc (6.7.0)
+ rake (13.1.0)
+ rdoc (6.6.2)
psych (>= 4.0.0)
redis (5.2.0)
redis-client (>= 0.22.0)
- redis-client (0.22.1)
+ redis-client (0.22.2)
connection_pool
regexp_parser (2.9.0)
- reline (0.5.9)
+ reline (0.4.2)
io-console (~> 0.5)
- rexml (3.3.0)
- strscan
+ rexml (3.2.6)
rspec-core (3.13.0)
rspec-support (~> 3.13.0)
- rspec-expectations (3.13.1)
+ rspec-expectations (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-mocks (3.13.1)
+ rspec-mocks (3.13.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-rails (6.1.3)
+ rspec-rails (6.1.1)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
- rspec-core (~> 3.13)
- rspec-expectations (~> 3.13)
- rspec-mocks (~> 3.13)
- rspec-support (~> 3.13)
- rspec-support (3.13.1)
+ rspec-core (~> 3.12)
+ rspec-expectations (~> 3.12)
+ rspec-mocks (~> 3.12)
+ rspec-support (~> 3.12)
+ rspec-support (3.13.0)
+ ruby2_keywords (0.0.5)
rubyzip (2.3.2)
- sass-embedded (1.63.6-x86_64-linux-gnu)
- google-protobuf (~> 3.23)
- selenium-webdriver (4.22.0)
+ sass-embedded (1.77.5)
+ google-protobuf (>= 3.25, < 5.0)
+ rake (>= 13)
+ selenium-webdriver (4.17.0)
base64 (~> 0.2)
- logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
stimulus-rails (1.3.3)
railties (>= 6.0.0)
- stringio (3.1.1)
- strscan (3.1.0)
- thor (1.3.1)
+ stringio (3.1.0)
+ thor (1.3.0)
timeout (0.4.1)
- turbo-rails (2.0.5)
+ turbo-rails (2.0.0)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
@@ -286,22 +282,22 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
- zeitwerk (2.6.16)
+ zeitwerk (2.6.13)
PLATFORMS
- x86_64-linux
+ ruby
DEPENDENCIES
bcrypt (~> 3.1.20)
bootsnap
- bootstrap!
capybara
- dartsass-rails (~> 0.5.0)
+ dartsass-rails
debug
factory_bot_rails
importmap-rails
jbuilder
pg (~> 1.5)
+ primer_view_components (~> 0.27)
propshaft
puma (~> 6.4)
rails!
diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js
index 4028c22a..7d4505c5 100644
--- a/app/assets/config/manifest.js
+++ b/app/assets/config/manifest.js
@@ -2,3 +2,6 @@
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js
//= link_tree ../builds
+
+//= link application.css
+//= link primer_view_components.css
diff --git a/app/assets/stylesheets/application.bootstrap.scss b/app/assets/stylesheets/application.bootstrap.scss
deleted file mode 100644
index 070ef4c0..00000000
--- a/app/assets/stylesheets/application.bootstrap.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-// @import url("https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css");
-
-@import "bootstrap";
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index d193a343..e56bec95 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -1,3 +1,4 @@
// Entry point for your Sass build
-@import "./application.bootstrap.scss"
+//= link primer_view_components.css
+@import url("https://unpkg.com/@primer/css@^21.1.1/dist/primer.css")
diff --git a/app/components/alert_component.html.erb b/app/components/alert_component.html.erb
index 6486d3a7..b3ce7a9d 100644
--- a/app/components/alert_component.html.erb
+++ b/app/components/alert_component.html.erb
@@ -1,4 +1 @@
-<% alert_name = @message_type.to_sym == :alert ? 'danger' : 'success' %>
-
- <%= @message %>
-
+<%= render(Primer::Alpha::Banner.new(scheme: @message_type)) { @message } %>
diff --git a/app/components/alert_component.rb b/app/components/alert_component.rb
index f93e3887..b28ef1d1 100644
--- a/app/components/alert_component.rb
+++ b/app/components/alert_component.rb
@@ -2,7 +2,7 @@
class AlertComponent < ViewComponent::Base
def initialize(message_type:, message:)
- @message_type = message_type
+ @message_type = message_type.to_sym
@message = message
end
end
diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb
index b0378f8a..c1e1b298 100644
--- a/app/controllers/events_controller.rb
+++ b/app/controllers/events_controller.rb
@@ -26,8 +26,10 @@ def create
@event.organizer_id = current_user.id
if @event.save
- redirect_to @event, notice: 'Event was successfully created.'
+ flash[:success] = 'Event was successfully created.'
+ redirect_to @event
else
+ flash.now[:warning] = @event.errors.full_messages.join(', ')
render :new
end
end
@@ -35,8 +37,10 @@ def create
# PATCH/PUT /events/1
def update
if @event.update(event_params)
- redirect_to @event, notice: 'Event was successfully updated.'
+ flash[:success] = 'Event was successfully updated.'
+ redirect_to @event
else
+ flash.now[:warning] = @event.errors.full_messages.join(', ')
render :edit
end
end
@@ -44,7 +48,8 @@ def update
# DELETE /events/1
def destroy
@event.destroy
- redirect_to events_url, notice: 'Event was successfully destroyed.'
+ flash[:success] = 'Event was successfully destroyed.'
+ redirect_to events_url
end
private
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 4a43f9f3..4f9b62c7 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -9,10 +9,10 @@ def create
@user = User.new(user_params)
if @user.save
- flash[:notice] = 'ユーザー登録しました'
+ flash[:success] = 'ユーザー登録しました'
redirect_to login_path
else
- flash.now[:alert] = @user.errors.full_messages.join(", ")
+ flash.now[:warning] = @user.errors.full_messages.join(", ")
render :new, status: :unprocessable_entity
end
end
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index 503d2a51..7e7dd23c 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -8,16 +8,17 @@ def create
if user
session[:user_id] = user.id
- flash[:notice] = 'ログインに成功しました'
+ flash[:success] = 'ログインに成功しました'
redirect_to events_path
else
- flash.now[:alert] = 'ログインに失敗しました'
+ flash.now[:warning] = 'ログインに失敗しました'
render :new, status: :unauthorized
end
end
def destroy
session[:user_id] = nil
+ flash[:success] = 'ログアウトしました'
redirect_to login_path
end
end
diff --git a/app/forms/application_form.rb b/app/forms/application_form.rb
new file mode 100644
index 00000000..43ba29c1
--- /dev/null
+++ b/app/forms/application_form.rb
@@ -0,0 +1,2 @@
+class ApplicationForm < Primer::Forms::Base
+end
diff --git a/app/forms/event_form.rb b/app/forms/event_form.rb
new file mode 100644
index 00000000..9d1469fd
--- /dev/null
+++ b/app/forms/event_form.rb
@@ -0,0 +1,56 @@
+class EventForm < ApplicationForm
+ form do |event_form|
+ event_form.text_field(
+ name: :name,
+ type: "text",
+ label: 'タイトル',
+ required: true,
+ )
+
+ event_form.text_field(
+ name: :description,
+ type: "text",
+ label: '説明',
+ required: true,
+ )
+
+ event_form.text_field(
+ name: :location,
+ type: "text",
+ label: '場所',
+ )
+
+ event_form.text_field(
+ name: :max_size,
+ type: "number",
+ label: '最大人数',
+ )
+
+ event_form.text_field(
+ name: :budget,
+ type: "text",
+ label: '予算',
+ )
+
+ event_form.text_field(
+ name: :start_at,
+ type: "datetime-local",
+ label: '開始日時',
+ required: true,
+ )
+
+ event_form.text_field(
+ name: :end_at,
+ type: "datetime-local",
+ label: '終了日時',
+ required: true,
+ )
+
+ event_form.submit(
+ name: :submit,
+ label: "登録",
+ scheme: :primary,
+ mb: 3
+ )
+ end
+end
diff --git a/app/forms/login_form.rb b/app/forms/login_form.rb
new file mode 100644
index 00000000..4540dde3
--- /dev/null
+++ b/app/forms/login_form.rb
@@ -0,0 +1,24 @@
+class LoginForm < ApplicationForm
+ form do |login_form|
+ login_form.text_field(
+ name: :email,
+ type: "email",
+ label: 'メールアドレス',
+ required: true,
+ )
+
+ login_form.text_field(
+ name: :password,
+ type: "password",
+ label: 'パスワード',
+ required: true,
+ )
+
+ login_form.submit(
+ name: :submit,
+ label: 'ログイン',
+ scheme: :primary,
+ mb: 3
+ )
+ end
+end
diff --git a/app/forms/participant_form.rb b/app/forms/participant_form.rb
new file mode 100644
index 00000000..87471822
--- /dev/null
+++ b/app/forms/participant_form.rb
@@ -0,0 +1,9 @@
+class ParticipantForm < ApplicationForm
+ form do |participant_form|
+ participant_form.submit(
+ name: :submit,
+ label: "参加する",
+ scheme: :primary,
+ )
+ end
+end
diff --git a/app/forms/signup_form.rb b/app/forms/signup_form.rb
new file mode 100644
index 00000000..7e2ff0fe
--- /dev/null
+++ b/app/forms/signup_form.rb
@@ -0,0 +1,41 @@
+class SignupForm < ApplicationForm
+ form do |signup_form|
+ signup_form.text_field(
+ name: :name,
+ type: "text",
+ label: '名前',
+ required: true,
+ )
+
+ signup_form.text_field(
+ name: :email,
+ type: "email",
+ label: 'メールアドレス',
+ required: true,
+ )
+
+ signup_form.text_field(
+ name: :password,
+ type: "password",
+ label: 'パスワード',
+ required: true,
+ )
+
+ signup_form.text_field(
+ name: :password_confirmation,
+ type: "password",
+ label: 'パスワード(確認用)',
+ required: true,
+ )
+
+ signup_form.submit(
+ name: :submit,
+ label: '登録',
+ scheme: :primary,
+ mb: 3
+ )
+ end
+
+ def initialize()
+ end
+end
diff --git a/app/javascript/application.js b/app/javascript/application.js
index e4c65a4d..9c3b25a6 100644
--- a/app/javascript/application.js
+++ b/app/javascript/application.js
@@ -1,4 +1,2 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
-import * as Popper from "@popperjs/core";
-import * as Bootstrap from "bootstrap";
import "@hotwired/turbo-rails";
diff --git a/app/views/events/_form.erb b/app/views/events/_form.erb
index 4912df2e..23f34bac 100644
--- a/app/views/events/_form.erb
+++ b/app/views/events/_form.erb
@@ -1,32 +1,3 @@
-<%= form_with model: @event do |form| %>
-
- <%= form.label :start_at %>
- <%= form.datetime_select :start_at, {}, class: "form-control" %>
-
-
-
- <%= form.label :end_at %>
- <%= form.datetime_select :end_at, {}, class: "form-control" %>
-
-
- <%= form.label :location %>
- <%= form.text_field :location, class: "form-control" %>
-
-
- <%= form.label :name %>
- <%= form.text_field :name, class: "form-control" %>
-
-
- <%= form.label :max_size %>
- <%= form.number_field :max_size, class: "form-control" %>
-
-
- <%= form.label :budget %>
- <%= form.text_field :budget, class: "form-control" %>
-
-
- <%= form.label :description %>
- <%= form.text_area :description, class: "form-control" %>
-
- <%= form.submit nil, class: "btn btn-primary" %>
+<%= render(Primer::Box.new(m: 3)) do %>
+ <%= render(EventForm.new(f)) %>
<% end %>
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb
index c97f6612..bcceddb1 100644
--- a/app/views/events/edit.html.erb
+++ b/app/views/events/edit.html.erb
@@ -1,6 +1,11 @@
-編集
+<%= render(Primer::Box.new(m: 3)) do %>
+ 編集
-<%= render 'form' %>
-
-<%= link_to 'トップへ戻る', root_path %>
+ <%= primer_form_with local: true, model: @event do |f| %>
+ <%= render 'form', { f: f } %>
+ <% end %>
+ <%= render(Primer::Beta::Link.new(href: root_path)) do %>
+ トップへ戻る
+ <% end %>
+<% end %>
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
index 1a7d1985..d60d3d39 100644
--- a/app/views/events/index.html.erb
+++ b/app/views/events/index.html.erb
@@ -1,23 +1,34 @@
-イベント一覧
+<%= render(Primer::Box.new(m: 3)) do %>
+ イベント一覧
+
+
+
+
+ #
+
+
+ イベント名
+
+
+ 説明
+
+
-
-
-
- # |
- イベント名 |
- 説明 |
-
-
-
<% @events.each do |event| %>
-
- <%= event.id %> |
- <%= link_to event.name, event %> |
- <%= event.description %> |
-
+
+
+ <%= event.id %>
+
+
+ <%= link_to event.name, event %>
+
+
+ <%= event.description %>
+
+
<% end %>
-
-
+
+<% end %>
<% if current_user %>
<%= link_to '新規作成', new_event_path, class: "btn btn-primary" %>
diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb
index 9f45aee8..a6fec379 100644
--- a/app/views/events/new.html.erb
+++ b/app/views/events/new.html.erb
@@ -1,5 +1,11 @@
-新規作成
+<%= render(Primer::Box.new(m: 3)) do %>
+ 新規作成
-<%= render 'form' %>
+ <%= primer_form_with local: true, model: @event, url: events_path do |f| %>
+ <%= render 'form', { f: f } %>
+ <% end %>
-<%= link_to 'トップへ戻る', root_path %>
+ <%= render(Primer::Beta::Link.new(href: root_path)) do %>
+ トップへ戻る
+ <% end %>
+<% end %>
diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb
index 24b75eea..14249cdb 100644
--- a/app/views/events/show.html.erb
+++ b/app/views/events/show.html.erb
@@ -1,38 +1,98 @@
-<%= @event.name %>
-
-
- -
- 開始日時: <%= l(@event.start_at) %>
-
- -
- 終了日時: <%= l(@event.end_at) %>
-
- -
- 開催場所: <%= @event.location %>
-
- -
- 主催者: <%= @event.organizer.name %>
-
- -
- 参加人数: <%= @event.max_size %>人
-
- -
- 参加費: <%= @event.budget %>円
-
- -
- 詳細:
- <%= simple_format @event.description %>
-
-
- <% if current_user && current_user.participatable?(@event) %>
- -
- <%= button_to '参加する', event_participations_path(@event) %>
-
+<%= render(Primer::Box.new(m: 3)) do %>
+ <%= render(Primer::Box.new(m: 3)) do %>
+ <%= @event.name %>
<% end %>
-
-
- <% if @event.organizer?(current_user) %>
- <%= link_to '編集', edit_event_path(@event) %>
- <%= link_to "このイベントを削除", event_path(@event), data: { turbo_method: :delete, turbo_confirm: "削除しますか?" } %>
+
+ <%= render(Primer::Box.new(m: 3)) do %>
+
+
+
+ 開催日時
+
+
+ <%= @event.start_at %>
+
+
+
+
+
+ 終了日時
+
+
+ <%= @event.end_at %>
+
+
+
+
+
+ 開催場所
+
+
+ <%= @event.location %>
+
+
+
+
+
+ 主催者
+
+
+ <%= @event.organizer.name %>
+
+
+
+
+
+ 定員
+
+
+ <%= @event.max_size %>人
+
+
+
+
+
+ 参加費
+
+
+ <%= @event.budget %>円
+
+
+
+
+
+ 詳細
+
+
+ <%= simple_format @event.description %>
+
+
+
+ <% if current_user && current_user.participatable?(@event) %>
+
+
+
+ <%= primer_form_with local: true, url: event_participations_path(@event) do |f| %>
+ <%= render(ParticipantForm.new(f)) %>
+ <% end %>
+
+
+ <% end %>
+
+ <% end %>
+
+ <%= render(Primer::Box.new(m: 3)) do %>
+ <% if @event.organizer?(current_user) %>
+ <%= render(Primer::Beta::Button.new(scheme: :link, tag: :a, href: edit_event_path(@event))) do %>
+ 編集
+ <% end %>
+ <%= render(Primer::Beta::Button.new(scheme: :danger, tag: :a, href: event_path(@event), data: { turbo_method: :delete, turbo_confirm: "削除しますか?" })) do %>
+ イベントを削除する
+ <% end %>
+ <% end %>
+
+ <%= render(Primer::Beta::Button.new(scheme: :link, tag: :a, href: root_path)) do %>
+ トップへ戻る
+ <% end %>
<% end %>
-<%= link_to 'トップへ戻る', root_path %>
+<% end %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index daefd6ab..058e0dbe 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -6,29 +6,35 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag('favicon.ico') %>
+ <%= stylesheet_link_tag("primer_view_components") %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %>
+ <%= javascript_include_tag("primer_view_components") %>
-