feat: implement basic info display for anemos
This commit is contained in:
parent
06a12df43f
commit
ce5d327ca2
34 changed files with 582 additions and 88 deletions
9
app/views/instance/_zone_img.html.erb
Normal file
9
app/views/instance/_zone_img.html.erb
Normal file
|
@ -0,0 +1,9 @@
|
|||
<% if zone == "anemos" %>
|
||||
<img src="/wind.png" width="35" alt=<%= alt %> title=<%= title %> />
|
||||
<% elsif zone == "pagos" %>
|
||||
<img src="/ice.png" width="35" alt=<%= alt %> title=<%= title %> />
|
||||
<% elsif zone == "pyros" %>
|
||||
<img src="/fire.png" width="35" alt=<%= alt %> title=<%= title %> />
|
||||
<% elsif zone == "hydatos" %>
|
||||
<img src="/water.png" width="35" alt=<%= alt %> title=<%= title %> />
|
||||
<% end %>
|
40
app/views/instance/show.html.erb
Normal file
40
app/views/instance/show.html.erb
Normal file
|
@ -0,0 +1,40 @@
|
|||
<header>
|
||||
<img src="/icon.png" width="50" alt="eureka.coffee logo" />
|
||||
<h1><span class="muted">instance</span> <%= @instance.name %></h1>
|
||||
<%= render partial: "zone_img", locals: { zone: @instance.zone, alt: @instance.zone, title: @instance.zone.upcase_first } %>
|
||||
</header>
|
||||
|
||||
<main class="nm-list">
|
||||
<% APP_DATA[@instance.zone.to_sym][:nms].each do |nm| %>
|
||||
<section class="<%= nm[:element] %>">
|
||||
<div>
|
||||
<img src="<%= "/#{nm[:element]}.png" %>" alt="<%= nm[:element] %>" width="30" />
|
||||
</div>
|
||||
<div class="meta">
|
||||
<h3 class="nm-info">
|
||||
<span class="badge">LV<%= nm[:level].to_s.rjust(2, "0") %></span>
|
||||
<%= nm[:name] %>
|
||||
<% if nm[:weather] %>
|
||||
<img src="/<%= nm[:weather] %>.png" title="during <%= nm[:weather] %> only" width="15" />
|
||||
<% end %>
|
||||
</h3>
|
||||
<div class="spawn-info">
|
||||
«
|
||||
<strong><%= nm[:spawned_by][:name] %></strong>
|
||||
<% if nm[:spawned_by][:night_only] %>
|
||||
<span title="only at night">🌙</span>
|
||||
<% end %>
|
||||
<% if nm[:spawned_by][:weather] %>
|
||||
<img src="/<%= nm[:spawned_by][:weather] %>.png" title="during <%= nm[:spawned_by][:weather] %> only" width="15" />
|
||||
<% end %>
|
||||
<small class="badge">LV<%= nm[:spawned_by][:level].to_s.rjust(2, "0") %></small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div>
|
||||
<button class="action">Pop</button>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
</main>
|
Loading…
Add table
Add a link
Reference in a new issue