tidy up a bit

This commit is contained in:
Ben Harris 2022-02-01 09:38:44 -05:00
parent c00902c956
commit 9150b57507
9 changed files with 110 additions and 68 deletions

View File

@ -1,24 +1,51 @@
# README # [pinrails](https://nomipinball.bhh.sh)
This README would normally document whatever steps are necessary to get the just a silly little site to help run the pinball tournaments at
application up and running. [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;
}
* Database creation server {
listen 443 ssl;
include snippets/ssl/bhh.sh;
root /srv/pinrails/pinrails/public;
server_name nomipinball.bhh.sh;
* Database initialization try_files $uri $uri/index.html $uri.html @rails_app;
* How to run the test suite location @rails_app {
include proxy_params;
proxy_pass http://localhost:4000;
}
}
* Services (job queues, cache servers, search engines, etc.) ## /etc/systemd/system/pinrails.service
* 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -8,6 +8,7 @@
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %> <%= javascript_importmap_tags %>
<%= favicon_link_tag asset_path('favicon.png') %>
</head> </head>
<body> <body>

View File

@ -1,10 +1,14 @@
<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %> <% if not notice.nil? %><p style="color: green"><%= notice %></p>
<% end %>
<h1>Pins</h1> <h1>Pins</h1>
<div id="machines"> <div id="machines">
<% @machines.each do |machine| %> <% @machines.each do |machine| %>
<%= render machine %> <p id="<%= dom_id machine %>">
<%= link_to machine.name, machine %>
<small><%= machine.edition %></small>
</p>
<% end %> <% end %>
</div> </div>

View File

@ -1,4 +1,7 @@
<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %> <% if not notice.nil? %><p style="color: green"><%= notice %></p>
<% end %>
<h1><%= @machine.name %></h1>
<%= render "form", machine: @machine %> <%= render "form", machine: @machine %>

View File

@ -1,3 +1,4 @@
<h1>Knockout</h1> <h1>Knockout</h1>
<p>To start the tournament, add players and make sure that the pins are up to date. Then hit randomize to automatically pick teams!</p> <p>To start the tournament, add players and make sure that the pins are up to date. Then hit randomize to automatically
pick teams!</p>
<p>The source code for this app can be found <%= link_to 'here', "#{GIT_REPO}/src/commit/#{GIT_SHA}" %>.</p> <p>The source code for this app can be found <%= link_to 'here', "#{GIT_REPO}/src/commit/#{GIT_SHA}" %>.</p>

View File

@ -1,6 +1,8 @@
<div id="<%= dom_id player %>"> <div id="<%= dom_id player %>">
<p> <p>
<% if player.paid %>✓<% else %>&nbsp;<% end %> <% if player.paid %>✓
<% else %>&nbsp;
<% end %>
<%= link_to player.name, player %> <%= link_to player.name, player %>
</p> </p>
</div> </div>

View File

@ -1,4 +1,5 @@
<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %> <% if not notice.nil? %><p style="color: green"><%= notice %></p>
<% end %>
<h1>Players</h1> <h1>Players</h1>
@ -13,7 +14,7 @@
</thead> </thead>
<tbody> <tbody>
<% @players.each do |player| %> <% @players.each do |player| %>
<tr> <tr id="<%= dom_id player %>">
<td><%= link_to player.name, player %></td> <td><%= link_to player.name, player %></td>
<td> <td>
<% if player.paid %>✓ <% if player.paid %>✓

View File

@ -1,4 +1,7 @@
<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %> <% if not notice.nil? %><p style="color: green"><%= notice %></p>
<% end %>
<h1><%= @player.name %></h1>
<%= render "form", player: @player %> <%= render "form", player: @player %>