Skip to content

Commit a16a73f

Browse files
committed
feat: Make home page.
1 parent 0a9e5f6 commit a16a73f

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/templates/layout/root.html.heex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
77
<%= csrf_meta_tag() %>
8-
<%= live_title_tag assigns[:page_title] || "GSMLG", suffix: " · Phoenix Framework" %>
8+
<%= live_title_tag assigns[:page_title] || "GSMLG", suffix: " · BITW" %>
99
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")}/>
1010
<script defer phx-track-static type="text/javascript" src={Routes.static_path(@conn, "/assets/app.js")}></script>
1111
</head>
@@ -14,14 +14,15 @@
1414
<section class="container">
1515
<nav>
1616
<ul>
17-
<li><a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a></li>
1817
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
1918
<li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li>
2019
<% end %>
2120
</ul>
2221
</nav>
23-
<a href="https://phoenixframework.org/" class="phx-logo">
24-
<img src={Routes.static_path(@conn, "/images/phoenix.png")} alt="Phoenix Framework Logo"/>
22+
<a href="https://gsmlg.github.io/" class="phx-logo">
23+
<h1>
24+
Best In the World!
25+
</h1>
2526
</a>
2627
</section>
2728
</header>

elixir/gsmlg_umbrella/apps/gsmlg_web/lib/gsmlg_web/templates/page/index.html.heex

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,34 @@
33
<p>Peace of mind from prototype to production</p>
44
</section>
55

6+
<section>
7+
<h3>
8+
当前节点:
9+
</h3>
10+
<div>
11+
<%= GSMLG.Node.Self.name() %>
12+
</div>
13+
</section>
14+
15+
<section>
16+
<h3>
17+
已连接节点:
18+
</h3>
19+
<%= if Enum.count(GSMLG.Node.Others.list()) > 0 do %>
20+
<%= for node <- GSMLG.Node.Others.list() do %>
21+
<div>
22+
<%= node.name %>
23+
</div>
24+
<%= end %>
25+
<%= else %>
26+
<div>
27+
无连接的节点
28+
</div>
29+
<%= end %>
30+
31+
<div>
32+
<div>添加节点</div>
33+
<input type="text" name="new_name" />
34+
<button >添加</button>
35+
</div>
36+
</section>

0 commit comments

Comments
 (0)