-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ec8c56
commit 51a24a1
Showing
24 changed files
with
1,306 additions
and
143 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
defmodule GalaxiesWeb.Components.PlanetResources do | ||
use GalaxiesWeb, :live_component | ||
|
||
def render(assigns) do | ||
~H""" | ||
<div> | ||
<%!-- swap md:grid-cols-4 for md:grid-cols-5 when adding dark matter --%> | ||
<dl class="mt-5 grid grid-cols-1 divide-y divide-gray-200 overflow-hidden rounded-lg bg-white shadow md:grid-cols-4 md:divide-y-0 md:divide-x"> | ||
<div class="px-2 py-2 sm:p-6"> | ||
<dt class="text-base font-normal text-gray-900">Metal</dt> | ||
<dd class="mt-1"> | ||
<div class="text-2xl font-semibold text-indigo-600"> | ||
<%= @planet.metal_units %> | ||
</div> | ||
</dd> | ||
</div> | ||
<div class="px-4 py-5 sm:p-6"> | ||
<dt class="text-base font-normal text-gray-900">Crystal</dt> | ||
<dd class="mt-1"> | ||
<div class="text-2xl font-semibold text-indigo-600"> | ||
<%= @planet.crystal_units %> | ||
</div> | ||
</dd> | ||
</div> | ||
<div class="px-4 py-5 sm:p-6"> | ||
<dt class="text-base font-normal text-gray-900">Deuterium</dt> | ||
<dd class="mt-1"> | ||
<div class="text-2xl font-semibold text-indigo-600"> | ||
<%= @planet.deuterium_units %> | ||
</div> | ||
</dd> | ||
</div> | ||
<div class="px-4 py-5 sm:p-6"> | ||
<dt class="text-base font-normal text-gray-900">Energy</dt> | ||
<dd class="mt-1"> | ||
<div class="text-2xl font-semibold text-indigo-600"> | ||
<%= @planet.available_energy %> | ||
</div> | ||
</dd> | ||
</div> | ||
<%!-- <div class="px-4 py-5 sm:p-6"> | ||
<dt class="text-base font-normal text-gray-900">Dark Matter</dt> | ||
<dd class="mt-1"> | ||
<div class="text-2xl font-semibold text-indigo-600"> | ||
71,897 | ||
</div> | ||
</dd> | ||
</div> --%> | ||
</dl> | ||
</div> | ||
""" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.