Browse Source

fix(files): Remove more stuff.

jackyalcine 2 months ago
parent
commit
b3751bc9b2
Signed by: Jacky Alciné <yo@jacky.wtf> GPG Key ID: 537A4F904B15268D
3 changed files with 0 additions and 159 deletions
  1. 0
    19
      lib/platform.ex
  2. 0
    103
      web/templates/auth/new.html.eex
  3. 0
    37
      web/templates/auth/rel_me/start.html.eex

+ 0
- 19
lib/platform.ex View File

@@ -1,19 +0,0 @@
1
-defmodule Fortress.Platform do
2
-  def from_rel_me_uri(uri)
3
-  def from_rel_me_uri(uri) when is_binary(uri), do: from_rel_me_uri(URI.parse(uri))
4
-  def from_rel_me_uri(%Fortress.RelMe{uri: uri}), do: from_rel_me_uri(uri)
5
-  def from_rel_me_uri(%URI{host: "github.com"}), do: :github
6
-  def from_rel_me_uri(%URI{host: "gitlab.com"}), do: :github
7
-  def from_rel_me_uri(%URI{host: "twitter.com"}), do: :twitter
8
-  def from_rel_me_uri(%URI{host: "linkedin.com"}), do: :linkedin
9
-  def from_rel_me_uri(%URI{host: "patreon.com"}), do: :patreon
10
-  def from_rel_me_uri(%URI{host: "keybase.io"}), do: :keybase
11
-  def from_rel_me_uri(_), do: :unknown_platform
12
-
13
-  def name(id)
14
-  def name(:github), do: "GitHub"
15
-  def name(:linkedin), do: "LinkedIn"
16
-  def name(:twitter), do: "Twitter"
17
-  def name(:patreon), do: "Patreon"
18
-  def name(:keybase), do: "Keybase"
19
-end

+ 0
- 103
web/templates/auth/new.html.eex View File

@@ -1,103 +0,0 @@
1
-<article class="w-100 mw9 center">
2
-  <section class="mw7 center w-100">
3
-    <img src="<%= static_path(@conn, "/assets/images/marginalia/marginalia-uploading.png") %>" class="v-mid w-100 h-100 dn db-l fr mw5">
4
-    <h1 class="f3 f2-l tracked-tight ttu lh-title near-black measure-wide">
5
-      Your Options
6
-    </h1>
7
-    <p class="f4 f3-l lh-copy black-80 measure-narrow" id="mainMessage">
8
-      Fortress has found the following authentication options
9
-      available for your site.
10
-    </p>
11
-    <p class="f5 f4-l lh-copy black-80 measure-narrow" id="mainMessage">
12
-      <strong>URL:</strong>
13
-      <code><%= @conn.params["me"] %></code>
14
-    </p>
15
-    <span class="no-js f6 lh-copy black-70">
16
-      Results look wrong? <a class="link navy hover-blue underline" href="?me=<%= @conn.params["me"] %>&force=yes">Scan your site again</a>.
17
-    </span>
18
-    <button id="btnRescan" class="pointer f4 bw0 bg-black near-white pa3 input-reset js">
19
-      Rescan Site
20
-    </button>
21
-  </section>
22
-  <table class="bw1 b--near-black ba mt3 mb5 f6 ma2 mw7 w-100 center" cellspacing="0" id="relme">
23
-    <thead>
24
-      <tr>
25
-        <td colspan=4 class="pv3 tc v-mid hide-child bg-gray white-80">
26
-          <h3 class="ttu pb1 mv0 tc fw9 f3">Verified Link Support</h3>
27
-          <a class="link v-mid gray f7 child" href="https://indieweb.org/rel-me">say what?</a>
28
-          <label class="db pv2" for="show">
29
-            <input class="v-mid mh1" type="checkbox" id="show">
30
-            <span class="v-mid">Show unsupported sites?</span>
31
-          </label>
32
-        </td>
33
-      </tr>
34
-    </thead>
35
-    <tbody>
36
-      <tr id="pending" class="dn">
37
-        <td colspan=4 class="pa2">
38
-          <p class="tc lh-copy measure f4 black-80 flash animated infinite">
39
-            Fortress is now scanning for <a href="#" class="color-inherit">verified links</a> on your site.
40
-          </p>
41
-        </td>
42
-      </tr>
43
-      <%= if length(@rel_mes) == 0 do %>
44
-        <tr id="empty">
45
-          <td colspan=4 class="pa2">
46
-            <p class="lh-copy measure f4 black-80">
47
-              No <a href="#" class="color-inherit">verified links</a> were found on the site provided.
48
-            </p>
49
-            <p class="lh-copy measure f5 black-40">
50
-              <%= length(@rel_mes) %> links were not verified.
51
-            </p>
52
-          </td>
53
-        </tr>
54
-      <% else %>
55
-        <%= for rel_me <- @rel_mes do %>
56
-          <%
57
-relme_supported = Fortress.RelMe.supported?(rel_me)
58
-platform = Fortress.Platform.from_rel_me_uri(rel_me) || 'unknown'
59
-            %>
60
-            <tr data-relme="<%= URI.to_string(rel_me.uri) %>" data-relme-supported="<%= relme_supported %>" data-relme-status="<%= rel_me.status %>">
61
-              <td>
62
-                <a href="<%= platform_path(@conn, :view, platform) %>"><%= Fortress.RelMe.name(rel_me.uri) %></a>
63
-                <aside><%= if rel_me.status == :active do %>Active<% else %>Inactive<% end %></aside>
64
-              </td>
65
-              <td colspan=2>
66
-                <p><%= Fortress.RelMe.status_message(rel_me) %></p>
67
-                <a href="<%= URI.to_string(rel_me.uri) %>"><%= URI.to_string(rel_me.uri) %></a>
68
-              </td>
69
-              <td>
70
-                <form action="<%= verify_rel_me_path(@conn, :start) %>" method="get">
71
-                  <input type="hidden" name="relme" value="<%= URI.to_string(rel_me.uri) %>" />
72
-                  <input type="hidden" name="me" value="<%= @conn.params["me"] %>" />
73
-                  <button type="submit">Sign In</button>
74
-                </form>
75
-                <span class="f7 gray ttu">No support</span>
76
-              </td>
77
-            </tr>
78
-          <% end %>
79
-        <% end %>
80
-    </tbody>
81
-  </table>
82
-</section>
83
-<template id="relmeRow">
84
-  <tr data-relme-supported="false" data-relme-status="pending">
85
-    <td>
86
-      <a href="<%= platform_path(@conn, :view, "${platform}") %>">Platform</a>
87
-      <aside>Pending</aside>
88
-    </td>
89
-    <td colspan=2>
90
-      <p></p>
91
-      <a href="${uri}">${host}</a>
92
-    </td>
93
-    <td>
94
-      <form action="<%= verify_rel_me_path(@conn, :start) %>" method="get">
95
-        <input type="hidden" name="relme" />
96
-        <input type="hidden" name="me" value="<%= @conn.params["me"] %>" />
97
-        <button type="submit">Sign In</button>
98
-      </form>
99
-      <span class="f7 gray ttu">No support</span>
100
-    </td>
101
-  </tr>
102
-</template>
103
-<script async defer src="<%= static_path(@conn, "/assets/js/relme.js") %>"></script>

+ 0
- 37
web/templates/auth/rel_me/start.html.eex View File

@@ -1,37 +0,0 @@
1
-<% name = Fortress.Platform.name(Fortress.Platform.from_rel_me_uri(@conn.params["relme"])) %>
2
-<section class="bg-white near-black w-100">
3
-  <article class="ph3 ph5-ns">
4
-    <div class="cf center mw8 w-100 tc-m flex flex-column flex-row-l justify-around items-start">
5
-      <img src="<%= static_path(@conn, "/assets/images/marginalia/marginalia-delivery.png") %>" class="v-mid order-1 w-100 dn db-ns self-center mw6 w-50">
6
-      <div class="pb3 pb4-ns mt4 black-70 order-2 w-50-l self-start">
7
-        <h1 class="f2 f1-l tracked-tight measure lh-title black-40">
8
-          Sending You Away
9
-        </h1>
10
-        <p class="f3 lh-copy black-70 measure tracked-tight" id="mainMessage">
11
-          Fortress will begin the act of <strong>distributed verification</strong> via <%= name %>.
12
-        </p>
13
-        <p class="f5 tj lh-copy measure">
14
-          <mark class="black-80 ttu ph2 bg-gold">What?</mark>
15
-          <strong>Distributed verification</strong> is the act of combining
16
-          <abbr title="A link that points to a site that also points back to the original link.">verified links</abbr>
17
-          with <abbr title="A way to sign in without making a new account directly in the service.">OAuth2</abbr>.
18
-          We'll sign into <%= name %> to confirm you control the account. Then we'll
19
-          check your <%= name %> profile information for a verifiable link that points back to your site.
20
-          When all of this is satisifed, Fortress can consider your site to be
21
-          <abbr title="This means you've successfully confirmed who you are.">authenticated</a>.
22
-        </p>
23
-        <p class="f5 bg-green white-70 pa2 measure">
24
-          You won't see this page again; just here to help!
25
-        </p>
26
-      </div>
27
-    </div>
28
-  </article>
29
-  <article class="pa4 bg-washed-blue black-70 tc">
30
-    <form action="<%= verify_rel_me_path(@conn, :process) %>" method="post">
31
-      <input type="hidden" value="<%= Phoenix.Controller.get_csrf_token() %>" name="_csrf_token" />
32
-      <input type="hidden" value="<%= @conn.params["relme"] %>" name="relme" />
33
-      <input type="hidden" value="<%= @conn.params["me"] %>" name="me" />
34
-      <button class="f3 input-reset shadow-2 grow pa3 bg-dark-green white-80 ttu b--dark-green pointer b--solid bw2 br2" type="submit">Begin Sign In</button>
35
-    </form>
36
-  </article>
37
-</section>

Loading…
Cancel
Save