diff --git a/README.md b/README.md index 7db80e4..3d0b7b9 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,51 @@ -# README +# [pinrails](https://nomipinball.bhh.sh) -This README would normally document whatever steps are necessary to get the -application up and running. +just a silly little site to help run the pinball tournaments at +[the coin slot](https://thecoinslottc.com/). -Things you may want to cover: +currently running on ruby 3.0.2 -* Ruby version + bundle install + RAILS_ENV=production bundle exec rails db:migrate + RAILS_ENV=production bundle exec assets:precompile -* System dependencies +## nginx config: -* Configuration + server { + listen 80; + server_name nomipinball.bhh.sh; + return 307 https://$server_name$request_uri; + } + + server { + listen 443 ssl; + include snippets/ssl/bhh.sh; + root /srv/pinrails/pinrails/public; + server_name nomipinball.bhh.sh; + + try_files $uri $uri/index.html $uri.html @rails_app; + + location @rails_app { + include proxy_params; + proxy_pass http://localhost:4000; + } + } -* Database creation +## /etc/systemd/system/pinrails.service -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... + [Unit] + Description=pinrails + Wants=network.target + + [Service] + Type=simple + User=pinrails + Group=nogroup + WorkingDirectory=/srv/pinrails/pinrails + Environment=RAILS_ENV=production + Environment=PORT=4000 + Environment=RAILS_LOG_TO_STDOUT=true + ExecStart=/srv/pinrails/.rbenv/shims/bundle exec rails server -b 127.0.0.1 + + [Install] + WantedBy=multi-user.target diff --git a/app/assets/images/favicon.png b/app/assets/images/favicon.png new file mode 100644 index 0000000..f6862b2 Binary files /dev/null and b/app/assets/images/favicon.png differ diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7795f10..ae0092e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,22 +1,23 @@ -
-<%= notice %>
<% end %> +<% if not notice.nil? %><%= notice %>
+<% end %>+ <%= link_to machine.name, machine %> + <%= machine.edition %> +
<% end %><%= notice %>
<% end %> +<% if not notice.nil? %><%= notice %>
+<% end %> + +To start the tournament, add players and make sure that the pins are up to date. Then hit randomize to automatically pick teams!
+To start the tournament, add players and make sure that the pins are up to date. Then hit randomize to automatically + pick teams!
The source code for this app can be found <%= link_to 'here', "#{GIT_REPO}/src/commit/#{GIT_SHA}" %>.
diff --git a/app/views/players/_player.html.erb b/app/views/players/_player.html.erb index 4d1abeb..4002ea5 100644 --- a/app/views/players/_player.html.erb +++ b/app/views/players/_player.html.erb @@ -1,6 +1,8 @@- <% if player.paid %>✓<% else %> <% end %> + <% if player.paid %>✓ + <% else %> + <% end %> <%= link_to player.name, player %>
<%= notice %>
<% end %> +<% if not notice.nil? %><%= notice %>
+<% end %>Name | -Paid | -Strikes | -Delete | - - - <% @players.each do |player| %> -
---|---|---|---|
<%= link_to player.name, player %> | -- <% if player.paid %>✓ - <% end %> | -<%= player.strikes %> | -<%= link_to "❌", player, data: { - turbo_method: :delete, - turbo_confirm: "Are you sure you want to remove #{player.name}?" - } %> | -
Name | +Paid | +Strikes | +Delete | + + + <% @players.each do |player| %> +
---|---|---|---|
<%= link_to player.name, player %> | ++ <% if player.paid %>✓ + <% end %> | +<%= player.strikes %> | +<%= link_to "❌", player, data: { + turbo_method: :delete, + turbo_confirm: "Are you sure you want to remove #{player.name}?" + } %> | +
<%= pluralize(@players.count, 'total player') %>
diff --git a/app/views/players/show.html.erb b/app/views/players/show.html.erb index 3d0bb78..bd72bd3 100644 --- a/app/views/players/show.html.erb +++ b/app/views/players/show.html.erb @@ -1,9 +1,12 @@ -<% if not notice.nil? %><%= notice %>
<% end %> +<% if not notice.nil? %><%= notice %>
+<% end %> + +