Browse Source

chore(layout): Update CSS for article.

jackyalcine 1 year ago
parent
commit
b1361061dc
Signed by: Jacky Alciné <yo@jacky.wtf> GPG Key ID: 537A4F904B15268D
65 changed files with 118 additions and 145 deletions
  1. 1
    1
      config/config.exs
  2. 3
    4
      config/dev.exs
  3. 2
    1
      coveralls.json
  4. 3
    2
      docker-compose.yml
  5. 10
    5
      lib/indieweb/post.ex
  6. 1
    1
      lib/web.ex
  7. 0
    20
      lib/web/templates/entry/_sparkline.html.eex
  8. 0
    22
      lib/web/templates/entry/type_article.html.eex
  9. 0
    59
      lib/web/templates/page/index.html.eex
  10. 2
    4
      mix.exs
  11. 12
    0
      priv/static/css/app.css
  12. 0
    0
      web/authentication_helpers.ex
  13. 0
    0
      web/channels/user_socket.ex
  14. 0
    0
      web/controllers/auth_controller.ex
  15. 1
    0
      web/controllers/entry_controller.ex
  16. 0
    0
      web/controllers/indie/auth_controller.ex
  17. 0
    0
      web/controllers/indie/micropub_controller.ex
  18. 0
    0
      web/controllers/indie/token_api_controller.ex
  19. 0
    0
      web/controllers/page_controller.ex
  20. 1
    0
      web/controllers/setup_controller.ex
  21. 0
    0
      web/controllers/tag_controller.ex
  22. 0
    0
      web/endpoint.ex
  23. 0
    0
      web/gettext.ex
  24. 0
    0
      web/plug/auth_handler/api.ex
  25. 0
    0
      web/plug/auth_handler/browser.ex
  26. 0
    0
      web/plug/guardian/indie.ex
  27. 0
    0
      web/plug/guardian/owner.ex
  28. 0
    0
      web/router.ex
  29. 0
    0
      web/templates/auth/new.html.eex
  30. 0
    0
      web/templates/entry/_category.html.eex
  31. 3
    3
      web/templates/entry/_debug.html.eex
  32. 22
    0
      web/templates/entry/_sparkline.html.eex
  33. 0
    0
      web/templates/entry/index.html.eex
  34. 28
    0
      web/templates/entry/type_article.html.eex
  35. 0
    0
      web/templates/entry/type_bookmark.html.eex
  36. 0
    0
      web/templates/entry/type_entry.html.eex
  37. 0
    0
      web/templates/entry/type_event.html.eex
  38. 0
    0
      web/templates/entry/type_like.html.eex
  39. 0
    0
      web/templates/entry/type_note.html.eex
  40. 0
    0
      web/templates/entry/type_photo.html.eex
  41. 0
    0
      web/templates/entry/type_reply.html.eex
  42. 0
    0
      web/templates/entry/type_repost.html.eex
  43. 0
    0
      web/templates/entry/type_video.html.eex
  44. 0
    0
      web/templates/indie/auth.html.eex
  45. 0
    0
      web/templates/indie/auth/authorize.html.eex
  46. 0
    0
      web/templates/indie/auth/error.html.eex
  47. 4
    5
      web/templates/layout/app.html.eex
  48. 0
    0
      web/templates/page/_flash.html.eex
  49. 0
    0
      web/templates/page/_footer.html.eex
  50. 2
    2
      web/templates/page/_header.html.eex
  51. 6
    0
      web/templates/page/index.html.eex
  52. 0
    0
      web/templates/page/mf2.html.eex
  53. 0
    0
      web/templates/page/status_code.html.eex
  54. 1
    2
      web/templates/setup/index.html.eex
  55. 0
    0
      web/templates/setup/setup-invalid.html.eex
  56. 16
    14
      web/templates/setup/setup-otp.html.eex
  57. 0
    0
      web/templates/setup/setup-profile.html.eex
  58. 0
    0
      web/views/auth_view.ex
  59. 0
    0
      web/views/entry_view.ex
  60. 0
    0
      web/views/error_view.ex
  61. 0
    0
      web/views/indie/auth_view.ex
  62. 0
    0
      web/views/indie/token_api_view.ex
  63. 0
    0
      web/views/layout_view.ex
  64. 0
    0
      web/views/page_view.ex
  65. 0
    0
      web/views/setup_view.ex

+ 1
- 1
config/config.exs View File

@@ -11,8 +11,8 @@ config :koype,
11 11
   session_signing_salt: {:system, :string, "SESSION_SIGNING_SALT"}
12 12
 
13 13
 config :koype, Koype.Web.Endpoint,
14
+  url: nil,
14 15
   http: [port: {:system, :integer, "PORT", 5000}],
15
-  url: [host: {:system, :string, "CANONICAL_HOST"}, port: 80, scheme: "http"],
16 16
   secret_key_base: {:system, :string, "SECRET_KEY_BASE"},
17 17
   render_errors: [view: Koype.Web.ErrorView, accepts: ~w(html)],
18 18
   pubsub: [name: Koype.PubSub, adapter: Phoenix.PubSub.PG2]

+ 3
- 4
config/dev.exs View File

@@ -16,8 +16,8 @@ config :koype, Koype.Web.Endpoint,
16 16
     patterns: [
17 17
       ~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
18 18
       ~r{priv/gettext/.*(po)$},
19
-      ~r{lib/web/views/.*(ex)$},
20
-      ~r{lib/web/templates/.*(eex)$}
19
+      ~r{web/views/.*(ex)$},
20
+      ~r{web/templates/.*(eex)$}
21 21
     ]
22 22
   ]
23 23
 
@@ -33,8 +33,7 @@ config :git_hooks,
33 33
   hooks: [
34 34
     pre_commit: [
35 35
       mix_tasks: [
36
-        "format",
37
-        "sobelow"
36
+        "format"
38 37
       ]
39 38
     ]
40 39
   ]

+ 2
- 1
coveralls.json View File

@@ -1,6 +1,7 @@
1 1
 {
2 2
   "skip_files": [
3
-    "test"
3
+    "test",
4
+    "priv"
4 5
   ],
5 6
   "treat_no_relevant_lines_as_covered": true,
6 7
   "minimum_coverage": 100

+ 3
- 2
docker-compose.yml View File

@@ -48,10 +48,11 @@ services:
48 48
       - "4000:4000"
49 49
     volumes:
50 50
       - "./_build:/opt/koype/_build:rw"
51
-      - "./config:/opt/koype/config"
51
+      - "./config:/opt/koype/config:rw"
52 52
       - "./cover:/opt/koype/cover:rw"
53 53
       - "./deps:/opt/koype/deps:rw"
54
-      - "./lib:/opt/koype/lib"
54
+      - "./lib:/opt/koype/lib:rw"
55
+      - "./web:/opt/koype/web:rw"
55 56
       - "./priv:/opt/koype/priv:rw"
56 57
       - "./test:/opt/koype/test:rw"
57 58
     healthcheck:

+ 10
- 5
lib/indieweb/post.ex View File

@@ -48,14 +48,14 @@ defmodule IndieWeb.Post do
48 48
       if is_binary(Map.get(data, :name, "")) do
49 49
         String.trim(Map.get(data, :name, ""))
50 50
       else
51
-        Map.get(data, :name, "")
51
+        Map.get(data, :name)
52 52
       end
53 53
 
54 54
     content =
55 55
       if is_binary(Map.get(data, :content, "")) do
56 56
         String.trim(Map.get(data, :content, ""))
57 57
       else
58
-        Map.get(data, :content, "")
58
+        Map.get(data, :content)
59 59
       end
60 60
 
61 61
     cond do
@@ -122,7 +122,12 @@ defmodule IndieWeb.Post do
122 122
   def do_flatten(pubdate) when is_binary(pubdate), do: pubdate
123 123
   def do_flatten(pubdate) when is_list(pubdate), do: pubdate |> List.first()
124 124
 
125
-  def determine_dominant_type(types, data) do
125
+  def determine_dominant_type(type, properties)
126
+
127
+  def determine_dominant_type(types, %{properties: properties}),
128
+    do: determine_dominant_type(types, properties)
129
+
130
+  def determine_dominant_type(types, properties) do
126 131
     cond do
127 132
       :rsvp in types -> :rsvp
128 133
       :reply in types -> :reply
@@ -132,8 +137,8 @@ defmodule IndieWeb.Post do
132 137
       :video in types -> :video
133 138
       :photo in types -> :photo
134 139
       :event in types -> :event
135
-      detect_article(data) -> :article
136
-      detect_note(data) -> :note
140
+      detect_article(properties) -> :article
141
+      detect_note(properties) -> :note
137 142
       true -> :note
138 143
     end
139 144
   end

+ 1
- 1
lib/web.ex View File

@@ -15,7 +15,7 @@ defmodule Koype.Web do
15 15
     quote do
16 16
       use Phoenix.HTML
17 17
       use Phoenix.HTML.SimplifiedHelpers
18
-      use Phoenix.View, root: "lib/web/templates", namespace: Koype.Web
18
+      use Phoenix.View, root: "web/templates", namespace: Koype.Web
19 19
 
20 20
       import Phoenix.Controller, only: [get_flash: 2, view_module: 1]
21 21
       import Koype.Web.Router.Helpers

+ 0
- 20
lib/web/templates/entry/_sparkline.html.eex View File

@@ -1,20 +0,0 @@
1
-<p class="f5 gray">
2
-  <%= if !is_nil(@entry[:published]) do %>
3
-    <time class="dt-published" title="<%= get_time_ago_of_rfc3339(@entry[:published]) %>" datetime="<%= @entry[:published] %>">
4
-      published about <%= get_time_ago_of_rfc3339(@entry[:published]) %> ago
5
-    </time>
6
-  <%= else %>
7
-    <time class="dt-published" title="<%= time_ago_in_words(@model.inserted_at) %>" datetime="<%= @model.inserted_at %>">
8
-      created about <%= time_ago_in_words(@model.inserted_at) %> ago
9
-    </time>
10
-  <% end %>
11
-  <%= if @model.updated_at && @model.updated_at != @model.inserted_at do %>
12
-    <span class="dark-gray">|</span>
13
-    <time class="dt-updated" title="<%= @model.updated_at %>" datetime="<%= @model.updated_at %>">
14
-      updated about <%= time_ago_in_words(@model.updated_at) %> ago
15
-    </time>
16
-  <% end %>
17
-</p>
18
-<p class="lh-copy measure">
19
-  <a class="link blue" href="<%= entry_path(@conn, :index) %>">Back to Index</a>
20
-</p>

+ 0
- 22
lib/web/templates/entry/type_article.html.eex View File

@@ -1,22 +0,0 @@
1
-<article class="m-100 pv2 center">
2
-  <h1 class="f1">
3
-    <%= if is_list(@entry[:name]) do %>
4
-      <%= List.first(@entry[:name]) %>
5
-    <% else %>
6
-      <%= @entry[:name] %>
7
-    <% end %>
8
-  </h1>
9
-
10
-  <div class="ph2">
11
-    <%= if is_map(List.first(@entry[:content])) do %>
12
-      <%= raw(List.first(@entry[:content])[:html]) %>
13
-    <% else %>
14
-      <p class="lh-copy f4 measure-wide">
15
-        <%= List.first(@entry[:content]) %>
16
-      </p>
17
-    <% end %>
18
-  </div>
19
-  <%= render @view_module, "_category.html", entry: @entry %>
20
-  <%= render @view_module, "_sparkline.html", entry: @entry, conn: @conn %>
21
-  <%= render @view_module, "_debug.html", entry: @entry %>
22
-</article>

+ 0
- 59
lib/web/templates/page/index.html.eex View File

@@ -1,59 +0,0 @@
1
-<article class="w-100 ph3 ph5-ns tc br2 pv5 bg-washed-green dark-green mb5 bb b--dark-green bw1">
2
-  <div class="mw7 center">
3
-    <h1 class="fw6 f3 f2-ns lh-title mt0 mb3">
4
-      An independent Web is coming.
5
-    </h1>
6
-    <h2 class="fw2 f4 lh-copy mt0 mb3">
7
-      The <a class="link green" target="_blank" rel="nofollower" href="https://indieweb.org">IndieWeb</a> by the people,
8
-      for the people.
9
-    </h2>
10
-    <p class="fw1 center measure f5 mt0 mb3">
11
-      Sign up for early access to the hosted version of Koype today or learn how you can
12
-      run your own instance.
13
-    </p>
14
-    <div>
15
-      <a class="f6 br-pill bg-dark-green no-underline washed-green ba b--dark-green grow pv2 ph3 dib mr3"
16
-        href="https://koype.net/accounts/new">
17
-        Sign Up
18
-      </a>
19
-      <a class="f6 br-pill dark-green no-underline ba grow pv2 ph3 dib"
20
-        href="https://koype.net/why">
21
-        Learn More
22
-      </a>
23
-    </div>
24
-  </div>
25
-</article>
26
-<section class="mw7 center ph2 pv4 h-100">
27
-  <h1 class="f-headline-l f1 tc">
28
-    This is <a class="link blue" href="https://indieweb.org/Koype">Koype</a>.
29
-    </h1>
30
-  <p class="near-black f4 f3-l lh-copy measure tj">
31
-    The source code is on <a class="link blue" href="https://jacky.wtf">Jacky</a>'s <a class="link blue" href="https://git.jacky.wtf/me/next-gen-website.git/">Git server</a>.
32
-  </p>
33
-  <section class="flex flex-column flex-row-l items-start justify-between">
34
-    <div>
35
-      <h4 class="f4 lh-subtitle ttu tracked">Projects Used</h4>
36
-      <p class="f5 measure lh-copy">
37
-        I'm using the following projects for the main plumbing of my site.
38
-        A lot of others can be found in the respective package management bits
39
-        of the source code.
40
-      </p>
41
-      <dl>
42
-        <dt><a class="link blue" href="https://tachyons.io">Tachyons</a></dt>
43
-        <dd class="lh-copy">Sane CSS prototyping.</dd>
44
-        <dt><a class="link blue" href="https://feathericons.com/">Feather</a></dt>
45
-        <dd class="lh-copy">Scalable vector icons.</dd>
46
-        <dt><a class="link blue" href="https://phoenixframework.org/">Phoenix</a></dt>
47
-        <dd class="lh-copy">Sensible Web framework.</dd>
48
-        <dt><a class="link blue" href="https://redis.io">Redis</a></dt>
49
-        <dd class="lh-copy">Reliable caching.</dd>
50
-      </dl>
51
-    </div>
52
-    <ul class="f4 list lh-copy">
53
-      <li><a class="link blue" href="<%= entry_path(@conn, :index) %>"><%= Koype.Repo.Entry.count %> entries</a></li>
54
-      <li><a class="link blue" href="https://quill.p3k.io/?me=<%= @conn.host %>">Quill</a></li>
55
-      <li><a class="link blue" href="https://monocle.p3k.io/?me=<%= @conn.host %>">Monocle</a></li>
56
-      <li><a class="link blue" href="https://aperture.p3k.io/?me=<%= @conn.host %>">Aperture</a></li>
57
-    </ul>
58
-  </section>
59
-</section>

+ 2
- 4
mix.exs View File

@@ -39,20 +39,18 @@ defmodule Koype.Mixfile do
39 39
         :arc,
40 40
         :arc_ecto,
41 41
         :logster
42
-        # :ex_debug_toolbar
43 42
       ]
44 43
     ]
45 44
   end
46 45
 
47
-  defp elixirc_paths(:test), do: ["lib", "test/support"]
48
-  defp elixirc_paths(_), do: ["lib"]
46
+  defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
47
+  defp elixirc_paths(_), do: ["lib", "web"]
49 48
 
50 49
   defp deps do
51 50
     [
52 51
       # {:atomex, "0.3.0"},
53 52
       # {:conform, "~> 2.5"},
54 53
       # {:event_bus, ">= 1.6.0"},
55
-      # {:ex_debug_toolbar, "~> 0.5.0", only: :dev},
56 54
       # {:exexif, "~> 0.0.5"},
57 55
       # {:rss, "~> 0.2.1"},
58 56
       # {:sse, "~> 0.1.0"},

+ 12
- 0
priv/static/css/app.css View File

@@ -1,5 +1,9 @@
1 1
 @import url("https://rsms.me/inter/inter-ui.css");
2 2
 
3
+body {
4
+  font-size: 14px;
5
+}
6
+
3 7
 h1,
4 8
 h2,
5 9
 h3,
@@ -8,3 +12,11 @@ h5,
8 12
 h6 {
9 13
   font-family: "Inter UI";
10 14
 }
15
+
16
+.e-content p:first-child {
17
+  font-size: 120%;
18
+}
19
+
20
+.e-content p:first-child::first-line {
21
+  font-size: 140%;
22
+}

lib/web/authentication_helpers.ex → web/authentication_helpers.ex View File


lib/web/channels/user_socket.ex → web/channels/user_socket.ex View File


lib/web/controllers/auth_controller.ex → web/controllers/auth_controller.ex View File


lib/web/controllers/entry_controller.ex → web/controllers/entry_controller.ex View File

@@ -39,6 +39,7 @@ defmodule Koype.Web.EntryController do
39 39
   def view(conn, {:ok, entry}, _params) do
40 40
     with(
41 41
       {:ok, data} <- ObjectData.fetch(entry),
42
+      _ <- Apex.ap(["yooo", data]),
42 43
       {:ok, types} <- Post.determine_type(data),
43 44
       type <- Post.determine_dominant_type(types, data)
44 45
     ) do

lib/web/controllers/indie/auth_controller.ex → web/controllers/indie/auth_controller.ex View File


lib/web/controllers/indie/micropub_controller.ex → web/controllers/indie/micropub_controller.ex View File


lib/web/controllers/indie/token_api_controller.ex → web/controllers/indie/token_api_controller.ex View File


lib/web/controllers/page_controller.ex → web/controllers/page_controller.ex View File


lib/web/controllers/setup_controller.ex → web/controllers/setup_controller.ex View File

@@ -88,6 +88,7 @@ defmodule Koype.Web.SetupController do
88 88
       {:error, :totp_code_failure} ->
89 89
         conn
90 90
         |> put_status(:unprocessable_entity)
91
+        |> assign(:otp_secret, secret)
91 92
         |> put_flash(
92 93
           :error,
93 94
           "The code you provided wasn't correct. Please try again."

lib/web/controllers/tag_controller.ex → web/controllers/tag_controller.ex View File


lib/web/endpoint.ex → web/endpoint.ex View File


lib/web/gettext.ex → web/gettext.ex View File


lib/web/plug/auth_handler/api.ex → web/plug/auth_handler/api.ex View File


lib/web/plug/auth_handler/browser.ex → web/plug/auth_handler/browser.ex View File


lib/web/plug/guardian/indie.ex → web/plug/guardian/indie.ex View File


lib/web/plug/guardian/owner.ex → web/plug/guardian/owner.ex View File


lib/web/router.ex → web/router.ex View File


lib/web/templates/auth/new.html.eex → web/templates/auth/new.html.eex View File


lib/web/templates/entry/_category.html.eex → web/templates/entry/_category.html.eex View File


lib/web/templates/entry/_debug.html.eex → web/templates/entry/_debug.html.eex View File

@@ -1,11 +1,11 @@
1
-<details>
1
+<details class="w-90 center">
2 2
   <summary class="lh-copy ttu mb3">Debugging Data</summary>
3 3
   <strong class="db code">Internal Post Type Data</strong>
4
-  <pre class="w-100 mw8 center bg-navy f6 pa1 lh-copy washed-yellow ba bw1 b--yellow overflow-auto">
4
+  <pre class="mw8 center bg-navy f6 pa1 lh-copy washed-yellow ba bw1 b--yellow overflow-auto">
5 5
     <%= Jason.encode!(@entry, pretty: true) %>
6 6
   </pre>
7 7
   <strong class="db code">JSON form of entry</strong>
8
-  <pre class="w-100 mw8 center bg-navy f6 pa1 lh-copy washed-yellow ba bw1 b--yellow overflow-auto">
8
+  <pre class="mw8 center bg-navy f6 pa1 lh-copy washed-yellow ba bw1 b--yellow overflow-auto">
9 9
     <%= Jason.encode!(@model, pretty: true) %>
10 10
   </pre>
11 11
 </details>

+ 22
- 0
web/templates/entry/_sparkline.html.eex View File

@@ -0,0 +1,22 @@
1
+<div class="w-90 center">
2
+  <p class="f6 gray lh-copy">
3
+    <%= if !is_nil(@entry[:published]) do %>
4
+      <time class="dt-published" title="<%= get_time_ago_of_rfc3339(@entry[:published]) %>" datetime="<%= @entry[:published] %>">
5
+        published about <%= get_time_ago_of_rfc3339(@entry[:published]) %> ago
6
+      </time>
7
+      <%= else %>
8
+      <time class="dt-published" title="<%= time_ago_in_words(@model.inserted_at) %>" datetime="<%= @model.inserted_at %>">
9
+        created about <%= time_ago_in_words(@model.inserted_at) %> ago
10
+      </time>
11
+    <% end %>
12
+    <%= if @model.updated_at && @model.updated_at != @model.inserted_at do %>
13
+      <br />
14
+      <time class="dt-updated" title="<%= @model.updated_at %>" datetime="<%= @model.updated_at %>">
15
+        updated about <%= time_ago_in_words(@model.updated_at) %> ago
16
+      </time>
17
+    <% end %>
18
+  </p>
19
+  <p class="lh-copy measure">
20
+    <a class="link blue" href="<%= entry_path(@conn, :index) %>">Back to Index</a>
21
+  </p>
22
+</div>

lib/web/templates/entry/index.html.eex → web/templates/entry/index.html.eex View File


+ 28
- 0
web/templates/entry/type_article.html.eex View File

@@ -0,0 +1,28 @@
1
+<article role="article" class="m-100 pv2 center h-entry">
2
+  <h1 class="f1 fw3 lh-title w-90 center tc p-name">
3
+    <%= if is_list(@entry[:name]) do %>
4
+      <%= List.first(@entry[:name]) %>
5
+    <% else %>
6
+      <%= @entry[:name] %>
7
+    <% end %>
8
+  </h1>
9
+  <%= render @view_module, "_sparkline.html", entry: @entry, conn: @conn, model: @model %>
10
+
11
+  <%= if @entry[:summary] do %>
12
+    <p class="p-summary lh-copy measure">
13
+      <%= @entry[:summary] %>
14
+    </p>
15
+  <% end %>
16
+
17
+  <div class="lh-copy w-90 center tj e-content f4">
18
+    <%= if is_map(List.first(@entry[:content])) do %>
19
+      <%= raw(List.first(@entry[:content])[:html]) %>
20
+    <% else %>
21
+      <p class="lh-copy f4 measure-wide">
22
+        <%= List.first(@entry[:content]) %>
23
+      </p>
24
+    <% end %>
25
+  </div>
26
+  <%= render @view_module, "_category.html", entry: @entry, model: @model %>
27
+  <%= render @view_module, "_debug.html", entry: @entry, model: @model %>
28
+</article>

lib/web/templates/entry/type_bookmark.html.eex → web/templates/entry/type_bookmark.html.eex View File


lib/web/templates/entry/type_entry.html.eex → web/templates/entry/type_entry.html.eex View File


lib/web/templates/entry/type_event.html.eex → web/templates/entry/type_event.html.eex View File


lib/web/templates/entry/type_like.html.eex → web/templates/entry/type_like.html.eex View File


lib/web/templates/entry/type_note.html.eex → web/templates/entry/type_note.html.eex View File


lib/web/templates/entry/type_photo.html.eex → web/templates/entry/type_photo.html.eex View File


lib/web/templates/entry/type_reply.html.eex → web/templates/entry/type_reply.html.eex View File


lib/web/templates/entry/type_repost.html.eex → web/templates/entry/type_repost.html.eex View File


lib/web/templates/entry/type_video.html.eex → web/templates/entry/type_video.html.eex View File


lib/web/templates/indie/auth.html.eex → web/templates/indie/auth.html.eex View File


lib/web/templates/indie/auth/authorize.html.eex → web/templates/indie/auth/authorize.html.eex View File


lib/web/templates/indie/auth/error.html.eex → web/templates/indie/auth/error.html.eex View File


lib/web/templates/layout/app.html.eex → web/templates/layout/app.html.eex View File

@@ -15,13 +15,12 @@
15 15
     <title><%= @view_module.title(@view_template, assigns) %> - <%= base_title() %></title>
16 16
 
17 17
     <!-- IndieWeb bits -->
18
-    <link rel="authorization_endpoint" href="<%= indie_auth_url(@conn, :authorize) %>">
19
-    <link rel="token_endpoint" href="<%= indie_token_api_url(@conn, :create) %>">
20
-    <link rel="micropub" href="<%= api_indie_micropub_url(@conn, :query) %>">
21
-    <link rel="microsub" href="https://aperture.p3k.io/microsub/139">
22
-    <link rel="me" href="https://instagram.com/jackyalcine">
18
+    <link rel="authorization_endpoint" href="<%= indie_auth_path(@conn, :authorize) %>">
19
+    <link rel="token_endpoint" href="<%= indie_token_api_path(@conn, :create) %>">
20
+    <link rel="micropub" href="<%= api_indie_micropub_path(@conn, :query) %>">
23 21
 
24 22
     <!-- Styling -->
23
+    <link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>" />
25 24
     <link rel="stylesheet" href="//unpkg.com/tachyons@4.10.0/css/tachyons.min.css" />
26 25
     <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/pretty-checkbox@3.0/dist/pretty-checkbox.min.css" />
27 26
   </head>

lib/web/templates/page/_flash.html.eex → web/templates/page/_flash.html.eex View File


lib/web/templates/page/_footer.html.eex → web/templates/page/_footer.html.eex View File


lib/web/templates/page/_header.html.eex → web/templates/page/_header.html.eex View File

@@ -1,6 +1,6 @@
1 1
 <header role="main" class="w-100 bg-near-black near-white justify-center order-1 cb cf">
2 2
   <div class="flex flex-auto flex-column flex-row-l justify-between justify-center items-center center ph1 pv2 mw7">
3
-    <a class="grow pa1 dim link gray" href="<%= page_path(@conn, :index) %>">
3
+    <a class="grow pa1 dim link gray mv1" href="<%= page_path(@conn, :index) %>">
4 4
       <span class="sans-serif fw1 f4 f3-l tracked-tight v-mid">koype</span>
5 5
     </a>
6 6
     <%= if is_signed_in?(@conn, :owner) do %>
@@ -8,7 +8,7 @@
8 8
         Hi, <%= Koype.Profile.nickname %>!
9 9
       </div>
10 10
     <% end %>
11
-    <div class="db pv2 pv0-ns ph3">
11
+    <div class="db mv1 pv1 pv0-ns ph3">
12 12
       <%= if is_signed_in?(@conn, :owner) do %>
13 13
         <span class="dib dark-gray mh2">|</span>
14 14
         <a class="link ma1 dim" href="<%= auth_path(@conn, :logout) %>">

+ 6
- 0
web/templates/page/index.html.eex View File

@@ -0,0 +1,6 @@
1
+<section class="mw7 center pa2">
2
+  <a class="link blue" href="https://quill.p3k.io/?me=<%= @conn.host %>">
3
+    <i class="v-mid" data-feather="edit"></i>
4
+    <span class="v-mid underline">Compose Entry</span>
5
+  </a>
6
+</section>

lib/web/templates/page/mf2.html.eex → web/templates/page/mf2.html.eex View File


lib/web/templates/page/status_code.html.eex → web/templates/page/status_code.html.eex View File


lib/web/templates/setup/index.html.eex → web/templates/setup/index.html.eex View File

@@ -1,10 +1,9 @@
1 1
 <section class="mw7 center ma2">
2 2
   <h1 class="f1 tc lh-title">Setting Up</h1>
3
-  <p class="lh-copy f4 measure">
3
+  <p class="lh-copy f4 measure-wide center">
4 4
     Hey there. We're almost done getting your personal place on the Web up
5 5
     and running. Below are some things you'd want to complete before continuing.
6 6
   </p>
7
-  <strong><%= current_setup_state() %></strong>
8 7
   <dl class="f4">
9 8
     <dt class="lh-copy"><a class="link blue" href="<%= setup_path(@conn, :view, :otp) %>"><strong>Security: Authentication</strong></a></dt>
10 9
     <dd class="lh-copy">Set up authentication for your site. Making sure you're the only person who can modify the content of your site.</dd>

lib/web/templates/setup/setup-invalid.html.eex → web/templates/setup/setup-invalid.html.eex View File


lib/web/templates/setup/setup-otp.html.eex → web/templates/setup/setup-otp.html.eex View File

@@ -10,36 +10,38 @@
10 10
     <input type=hidden name=_csrf_token value="<%= Phoenix.Controller.get_csrf_token %>" />
11 11
     <script>
12 12
       window.addEventListener('load', function () {
13
+        var qrTotpUri = "<%= totp_uri(@conn) %>"
13 14
         var qrCode = qrcode(0, 'H');
14
-        qrCode.addData("<%= totp_uri(@conn) %>");
15
+        qrCode.addData(qrTotpUri);
15 16
         qrCode.make();
16 17
 
17 18
         var qrHtml = qrCode.createSvgTag(3, 2);
18 19
         document.querySelector('#otpSecretWell').innerHTML = qrHtml;
19 20
       });
20 21
     </script>
21
-    <div id="otpSecretWell" class="w-100 fl-l mw4 tc v-mid">
22
+    <div id="otpSecretWell" class="db w-100 h-auto order-1 mw4 tc v-mid bg-near-white">
22 23
     </div>
23
-    <div>
24
-      <div class="mv3">
25
-        <label class="db ttu fw4 lh-copy f5" for="email">Secret</label>
26
-        <input readonly autocomplete="off" class="code pa2 f5 input-reset ba b--black-20 bg-white w-100 measure tracked-mega" type="text" value="<%= @conn.assigns[:otp_secret] %>" />
27
-        <small class="db mv1 f6 gray">The secret to use with your OTP application.</small>
28
-      </div>
24
+    <div class="order-2 flex-grow">
29 25
       <div class="mv3">
30 26
         <label class="db ttu fw4 lh-copy f5" for="email">Generated Code</label>
31
-        <input maxlength=6 autocomplete="off" class="tc code pa2 f5 input-reset ba b--black-20 bg-white w-100 measure tracked-mega" type="text" name="code" id="code" placeholder="000000" />
27
+        <input maxlength=6 autocomplete="off" class="tc code pa2 f4 input-reset ba b--black-20 bg-white w-100 measure tracked-mega" type="text" name="code" id="code" placeholder="000000" />
32 28
         <small class="db mv1 f6 gray">The code generated by your application.</small>
33 29
       </div>
30
+      <details class="mv3">
31
+        <summary>Technical Info</summary>
32
+        <label class="db ttu fw4 lh-copy f5" for="email">Secret</label>
33
+        <input readonly autocomplete="off" class="code pa2 f5 input-reset ba b--black-20 bg-white w-100 measure tracked-mega" type="text" value="<%= @conn.assigns[:otp_secret] %>" />
34
+        <small class="db mv1 f6 gray">The secret to use with your OTP application.</small>
35
+      </details>
34 36
     </div>
35
-    <div class="w-100 mv3 flex flex-row-l flex-column items-center justify-around">
36
-      <a class="link tc v-mid ba w-100 w-third-l b--black pa3 bg-near-black near-white sans-serif" href="<%= totp_uri(@conn) %>">
37
+    <div class="w-100 order-3 mv3 flex flex-row-l flex-column items-center justify-around">
38
+      <a class="link tc v-mid mv2 ba w-100 w-third-l b--dark-green pa3 bg-dark-green near-white sans-serif" href="<%= totp_uri(@conn) %>">
37 39
         <i class="v-mid h1 w1 mr2" data-feather="gift"></i>
38
-        <span class="v-mid">Automatic Setup</span>
40
+        <span class="v-mid fw5">Automatic Setup</span>
39 41
       </a>
40
-      <button class="pointer v-mid ba w-100 w-third-l b--black pa3 bg-near-black near-white sans-serif" type="submit">
42
+      <button class="pointer mv2 v-mid ba w-100 w-third-l b--black pa3 bg-near-black near-white sans-serif" type="submit">
41 43
         <i class="v-mid h1 w1 mr2" data-feather="unlock"></i>
42
-        <span class="v-mid">Confirm Code</span>
44
+        <span class="v-mid fw5">Confirm Code</span>
43 45
       </button>
44 46
     </div>
45 47
   </form>

lib/web/templates/setup/setup-profile.html.eex → web/templates/setup/setup-profile.html.eex View File


lib/web/views/auth_view.ex → web/views/auth_view.ex View File


lib/web/views/entry_view.ex → web/views/entry_view.ex View File


lib/web/views/error_view.ex → web/views/error_view.ex View File


lib/web/views/indie/auth_view.ex → web/views/indie/auth_view.ex View File


lib/web/views/indie/token_api_view.ex → web/views/indie/token_api_view.ex View File


lib/web/views/layout_view.ex → web/views/layout_view.ex View File


lib/web/views/page_view.ex → web/views/page_view.ex View File


lib/web/views/setup_view.ex → web/views/setup_view.ex View File


Loading…
Cancel
Save