implement just for you pages with phoenix-react

This commit is contained in:
2021-11-26 20:04:45 -05:00
parent bb09b926d9
commit 7b82a95e01
20 changed files with 1246 additions and 10998 deletions

View File

@@ -1,4 +1,4 @@
<main role="main" class="container">
<main role="main">
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<%= @inner_content %>

View File

@@ -9,24 +9,7 @@
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
</head>
<body>
<div id="root">
<header>
<section class="container">
<nav role="navigation">
<ul>
<li><a href="https://hexdocs.pm/phoenix/overview.html">Get Started</a></li>
<%= if function_exported?(Routes, :live_dashboard_path, 2) do %>
<li><%= link "LiveDashboard", to: Routes.live_dashboard_path(@conn, :home) %></li>
<% end %>
</ul>
</nav>
<a href="https://phoenixframework.org/" class="phx-logo">
<img src="<%= Routes.static_path(@conn, "/images/phoenix.png") %>" alt="Phoenix Framework Logo"/>
</a>
</section>
</header>
<body style="background: #060b2e;">
<%= @inner_content %>
</div>
</body>
</html>

View File

@@ -1,6 +1 @@
<section class="phx-hero">
<h2>Create a secret!</h2>
<p>There will be a form here</p>
<p>And a file input here</p>
<p>Then a next button</p>
</section>
<%= react_component("Components.ForPage") %>

View File

@@ -1,10 +1 @@
<section class="phx-hero">
<h2>Create a secret!</h2>
<p>There will be a form here</p>
<p>And a file input here</p>
<p>Then a next button</p>
<form phx-submit="just">
<textarea></textarea>
<button>Submit</button>
</form>
</section>
<%= react_component("Components.JustPage") %>

View File

@@ -1,6 +1 @@
<section class="phx-hero">
<h2>Create a secret!</h2>
<p>There will be a form here</p>
<p>And a file input here</p>
<p>Then a next button</p>
</section>
<%= react_component("Components.YouPage") %>

View File

@@ -1,10 +1,7 @@
<section class="phx-hero">
<h1>Überauth + Phoenix Example</h1>
<p>
This is an application to show an example of how to wire up
<a href="https://github.com/ueberauth/ueberauth">Überauth</a> with
<a href="https://github.com/phoenixframework/phoenix">Phoenix</a>.
</p>
<section>
<%= react_component("Components.SplashPage") %>
<%= if @current_user do %>
<h2>Welcome, <%= @current_user.name %>!</h2>
<div>
@@ -13,7 +10,7 @@
<%= link "Logout", to: Routes.auth_path(@conn, :delete), method: "delete", class: "button" %>
<br>
<% else %>
<ul style="list-style: none">
<ul style="display: none;">
<li>
<a class="button" href="<%= Routes.auth_path(@conn, :request, "github") %>">
<i class="fa fa-github"></i>