Browse Source

chore(landing): Make this work.

jackyalcine 2 months ago
parent
commit
a0c728e54c
Signed by: Jacky Alciné <yo@jacky.wtf> GPG Key ID: 537A4F904B15268D

web/static/.eslintrc.js → assets/.eslintrc.js View File


web/static/.postcssrc.js → assets/.postcssrc.js View File


web/static/.sassrc.js → assets/.sassrc.js View File


web/static/.stylelintrc.json → assets/.stylelintrc.json View File


web/static/fortress.ts → assets/app.ts View File

@@ -3,7 +3,7 @@ import WebFont from "webfontloader";
3 3
 window.addEventListener("load", () => {
4 4
   WebFont.load({
5 5
     google: {
6
-      families: ["Megrin", "Open Sans"]
6
+      families: ["Megrim", "Playfair Display", "Open Sans Condensed"]
7 7
     }
8 8
   });
9 9
 });

web/static/package-lock.json → assets/package-lock.json View File


web/static/package.json → assets/package.json View File

@@ -8,8 +8,8 @@
8 8
     "test": "web/static/js/test"
9 9
   },
10 10
   "scripts": {
11
-    "watch": "npx parcel watch images/**/* fortress.ts fortress.scss --out-dir ../../priv/static --cache-dir ../../tmp/parcel --global Fortress",
12
-    "build": "npx parcel images/**/* fortress.ts fortress.scss --out-dir ../../priv/static --cache-dir ../../tmp/parcel --log-level 4 --global Fortress --detailed-report"
11
+    "watch": "npx parcel watch images/**/* app.ts site.scss --out-dir ../priv/static --cache-dir ../tmp/parcel --global Fortress",
12
+    "build": "npx parcel images/**/* app.ts site.scss --out-dir ../priv/static --cache-dir ../tmp/parcel --log-level 4 --global Fortress --detailed-report"
13 13
   },
14 14
   "repository": {
15 15
     "type": "git",
@@ -31,8 +31,8 @@
31 31
     "eyeglass": "2.2.1",
32 32
     "parcel": "1.12.3",
33 33
     "parcel-plugin-bundle-visualiser": "1.2.0",
34
-    "phoenix": "file:../../deps/phoenix",
35
-    "phoenix_html": "file:../../deps/phoenix_html",
34
+    "phoenix": "file:../deps/phoenix",
35
+    "phoenix_html": "file:../deps/phoenix_html",
36 36
     "prettier": "1.16.4",
37 37
     "stylelint": "9.10.1",
38 38
     "stylelint-config-recommended-scss": "3.2.0",

+ 19
- 0
assets/site.scss View File

@@ -0,0 +1,19 @@
1
+@import "tachyons-sass/tachyons.scss";
2
+
3
+.font--flagship {
4
+  font-family: "Megrim";
5
+}
6
+
7
+:root {
8
+  --font-flagship: "Megrim";
9
+  --font-serif: "Playfair Display";
10
+  --font-sans: "Open Sans Condensed";
11
+}
12
+
13
+.serif, h1, h2, h3, ,h4, h5, h6 {
14
+  font-family: var(--font-serif);
15
+}
16
+
17
+.sans, p, blockquote, body {
18
+  font-family: var(--font-sans);
19
+}

+ 1
- 1
config/dev.exs View File

@@ -5,7 +5,7 @@ config :fortress, Fortress.Web.Endpoint,
5 5
   code_reloader: true,
6 6
   check_origin: false,
7 7
   watchers: [
8
-    npm: ["run", "watch", cd: Path.expand("../web/static", __DIR__)]
8
+    npm: ["run", "watch", cd: Path.expand("../assets", __DIR__)]
9 9
   ]
10 10
 
11 11
 config :fortress, Fortress.Web.Endpoint,

+ 0
- 35
lib/http/adapter.ex View File

@@ -1,35 +0,0 @@
1
-defmodule Fortress.Http.Adapter do
2
-  @moduledoc false
3
-  @behaviour IndieWeb.Http.Adapter
4
-  require Logger
5
-
6
-  @impl true
7
-  def request(url, method, opts) do
8
-    request_opts = [
9
-      headers: Keyword.get(opts, :headers, []),
10
-      body: Keyword.get(opts, :body, %{}) |> URI.encode_query(),
11
-      query: Keyword.get(opts, :query, []),
12
-      url: url,
13
-      method: method,
14
-      opts: [
15
-        max_redirects: 10
16
-      ]
17
-    ]
18
-
19
-    Logger.info("Sending a #{method} request to #{url}...")
20
-
21
-    case Fortress.Http.request(request_opts) do
22
-      {:ok, %Tesla.Env{} = raw} ->
23
-        {:ok,
24
-         %IndieWeb.Http.Response{
25
-           code: raw.status,
26
-           body: raw.body,
27
-           headers: raw.headers |> Map.new(),
28
-           raw: raw
29
-         }}
30
-
31
-      _ ->
32
-        nil
33
-    end
34
-  end
35
-end

+ 1
- 2
mix.exs View File

@@ -24,8 +24,7 @@ defmodule Fortress.Mixfile do
24 24
         :phoenix_ecto,
25 25
         :que,
26 26
         :runtime_tools,
27
-        :ueberauth,
28
-        :ueberauth_github
27
+        :ueberauth
29 28
       ]
30 29
     ]
31 30
   end

+ 0
- 1
web/static/fortress.scss View File

@@ -1 +0,0 @@
1
-@import "tachyons-sass/tachyons.scss";

+ 20
- 6
web/templates/layout/app.html.eex View File

@@ -7,15 +7,29 @@
7 7
     <meta name="description" content="Distributed authentication as a service." />
8 8
     <meta name="author" content="https://black.af" />
9 9
     <title>Fortress</title>
10
-    <link rel="stylesheet" href="<%= static_path(@conn, "/assets/fortress.css") %>" />
10
+    <link rel="stylesheet" href="<%= static_path(@conn, "/assets/site.css") %>" />
11 11
     <link rel="me" href="https://black.af" />
12 12
   </head>
13 13
   <body>
14
-    <header class="w-100 pa4 bg-near-black near-white flex flex-row flex-wrap">
15
-      <a href="/" class="h-app h-x-app u-url gray">
16
-        <b class="p-name ttu">Fortress</a>
17
-      </a>
14
+    <header class="w-100 bg-navy gold bb b--gold bw2">
15
+      <div class="mw8 center flex flex-row flex-wrap items-center justify-between pa4">
16
+        <a title="Fortress" href="/" class="h-app h-x-app u-url washed-yellow hover-gold f3 link fw9 font--flagship">
17
+          <b class="p-name ttu">Fortress</b>
18
+        </a>
19
+        <div class="f5">
20
+          <a href="#" class="link washed-yellow hover-gold fw3 pa2">
21
+            Apps
22
+          </a>
23
+          <a href="#" class="link washed-yellow hover-gold fw3 pa2">
24
+            Code
25
+          </a>
26
+          <a href="#" class="link washed-yellow hover-gold fw3 pa2">
27
+            Platforms
28
+          </a>
29
+        </div>
30
+      </div>
18 31
     </header>
19
-    <script async defer type="application/javascript" src="<%= static_path(@conn, "/assets/fortress.js") %>"></script>
32
+    <%= render @view_module, @view_template, assigns %>
33
+    <script async defer type="application/javascript" src="<%= static_path(@conn, "/assets/app.js") %>"></script>
20 34
   </body>
21 35
 </html>

+ 17
- 1
web/templates/page/index.html.eex View File

@@ -1 +1,17 @@
1
-
1
+<main class="w-100 bg-near-white near-black">
2
+  <div class="flex flex-column items-start justify-start mw7 center pv3">
3
+    <h1 class="f-headline measure fw1 sans dark-gray tracked-tight">
4
+      Log In As You, Everywhere.
5
+    </h1>
6
+    <h3 class="f2 fw3 sans gray mt0">
7
+      Log into federated platforms using a single identity.
8
+    </h3>
9
+    <form class="w-100 mw7 self-center">
10
+      <label for="me">
11
+        <span class="f4">URL</span>
12
+        <input type="url" class="w-100 input-reset bg-washed-yellow navy mv2 pa2 bw1 b--navy b--solid f2 code" />
13
+      </label>
14
+      <input class="sans b ph3 pv2 input-reset ba navy b--navy bg-transparent grow pointer f4 dib" type="submit" value="Continue" />
15
+    </form>
16
+  </div>
17
+</main>

Loading…
Cancel
Save