Compare commits

...

4 Commits

  1. 13
      CHANGELOG.md
  2. 4
      assets/css/app.scss
  3. 8
      lib/mirage/notes.ex
  4. 4
      lib/mirage_web/live/note_link_live/index.html.leex
  5. 4
      lib/mirage_web/live/note_link_live/show.html.leex
  6. 4
      lib/mirage_web/live/page_live.html.leex
  7. 14
      lib/mirage_web/live/show_note_live.html.leex
  8. 4
      lib/mirage_web/templates/note/edit.html.eex
  9. 4
      lib/mirage_web/templates/note/index.html.eex
  10. 4
      lib/mirage_web/templates/note/new.html.eex
  11. 2
      lib/mirage_web/templates/setting/edit.html.eex
  12. 4
      lib/mirage_web/templates/setting/index.html.eex
  13. 2
      lib/mirage_web/templates/setting/show.html.eex
  14. 4
      lib/mirage_web/templates/topic/index.html.eex
  15. 2
      lib/mirage_web/templates/topic/show.html.eex
  16. 4
      lib/mirage_web/templates/user/index.html.eex
  17. 4
      lib/mirage_web/templates/user_registration/new.html.eex
  18. 4
      lib/mirage_web/templates/user_session/new.html.eex
  19. 4
      lib/mirage_web/templates/user_settings/edit.html.eex
  20. 2
      mix.exs

13
CHANGELOG.md

@ -5,6 +5,19 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
<!-- changelog -->
## [v0.28.1](https://git.inhji.de/inhji/mirage/compare/v0.28.0...v0.28.1) (2021-02-13)
### Bug Fixes:
* missing header end tags /o\
* make hero styles more specific
* group list_notes together
## [v0.28.0](https://git.inhji.de/inhji/mirage/compare/v0.27.0...v0.28.0) (2021-02-13)

4
assets/css/app.scss

@ -98,7 +98,7 @@ footer {
padding: 2rem;
}
section:not(.hero) + section,
section + section,
div + section {
margin-top: 2rem;
}
@ -190,7 +190,7 @@ button[type=submit], a.button {
}
}
.hero {
header.hero {
margin: 0 -2rem 0;
background: $bg-base;
padding: 2rem;

8
lib/mirage/notes.ex

@ -81,10 +81,6 @@ defmodule Mirage.Notes do
Repo.all(q)
end
def today_title() do
Timex.now() |> Timex.format!("{YYYY}-{0M}-{D}")
end
def list_notes(:today) do
date_title = today_title()
@ -108,6 +104,10 @@ defmodule Mirage.Notes do
end
end
def today_title() do
Timex.now() |> Timex.format!("{YYYY}-{0M}-{D}")
end
@doc """
Gets a single note.

4
lib/mirage_web/live/note_link_live/index.html.leex

@ -1,6 +1,6 @@
<div class="hero">
<header class="hero">
<h1>Listing Links</h1>
</div>
</header>
<%= if @live_action in [:new, :edit] do %>
<%= live_modal @socket, MirageWeb.NoteLinkLive.FormComponent,

4
lib/mirage_web/live/note_link_live/show.html.leex

@ -1,6 +1,6 @@
<div class="hero">
<header class="hero">
<h1>Show Note link</h1>
</div>
</header>
<%= if @live_action in [:edit] do %>
<%= live_modal @socket, MirageWeb.NoteLinkLive.FormComponent,

4
lib/mirage_web/live/page_live.html.leex

@ -1,7 +1,7 @@
<section class="hero">
<header class="hero">
<h1><%= raw @_s.user_title.value_html %></h1>
<p><%= raw @_s.user_tagline.value_html %></p>
</section>
</header>
<%= if @home_note do %>
<section class="width-full bg-content">

14
lib/mirage_web/live/show_note_live.html.leex

@ -1,4 +1,4 @@
<div class="hero">
<header class="hero">
<h1><span class="id"><%= "##{@note.id}" %></span> <%= @note.title %></h1>
<p><time datetime="<%= @note.inserted_at %>"><%= Timex.from_now(@note.inserted_at) %></time> / <time datetime="<%= @note.updated_at %>"><%= Timex.from_now(@note.updated_at) %></time></p>
<p class="tags">
@ -6,14 +6,12 @@
<span class="tag"><%= topic.text %></span>
<% end %>
</p>
</div>
</header>
<div class="width-full bg-content">
<article phx-update="ignore" id="note-<%= @note.id %>">
<div class="content html">
<%= raw @note.content_html %>
</div>
</article>
<div class="width-full bg-content" phx-update="ignore" id="note-<%= @note.id %>">
<div class="content html">
<%= raw @note.content_html %>
</div>
</div>
<%= if not Enum.empty?(@note.backlinks) do %>

4
lib/mirage_web/templates/note/edit.html.eex

@ -1,6 +1,6 @@
<div class="hero">
<header class="hero">
<h1>Edit Note</h1>
</div>
</header>
<div class="width-full bg-content">
<%= render "form.html", Map.put(assigns, :action, Routes.note_path(@conn, :update, @note)) %>

4
lib/mirage_web/templates/note/index.html.eex

@ -1,6 +1,6 @@
<section class="hero">
<header class="hero">
<h1>Listing Notes</h1>
</section>
</header>
<section class="notes">
<%= for note <- @notes do %>

4
lib/mirage_web/templates/note/new.html.eex

@ -1,5 +1,5 @@
<div class="hero">
<header class="hero">
<h1>New Note</h1>
</div>
</header>
<%= render "form.html", Map.put(assigns, :action, Routes.note_path(@conn, :create)) %>

2
lib/mirage_web/templates/setting/edit.html.eex

@ -1,4 +1,4 @@
<div class="hero">
<header class="hero">
<h1>Edit Setting <%= @setting.name %></h1>
</div>

4
lib/mirage_web/templates/setting/index.html.eex

@ -1,8 +1,8 @@
<%= render MirageWeb.SharedView, "user_menu.html", assigns %>
<div class="hero">
<header class="hero">
<h1>Listing Settings</h1>
</div>
</header>
<div class="width-full bg-content">
<%= for setting <- @settings do %>

2
lib/mirage_web/templates/setting/show.html.eex

@ -1,4 +1,4 @@
<div class="hero">
<header class="hero">
<h1>Setting '<%= @setting.name %>'</h1>
</div>

4
lib/mirage_web/templates/topic/index.html.eex

@ -1,6 +1,6 @@
<div class="hero">
<header class="hero">
<h1>Listing Topics</h1>
</div>
</header>
<div class="tags width-full bg-content">
<%= for topic <- @topics do %>

2
lib/mirage_web/templates/topic/show.html.eex

@ -1,4 +1,4 @@
<section class="hero">
<header class="hero">
<h1>Topic <%= @topic.text %></h1>
</section>

4
lib/mirage_web/templates/user/index.html.eex

@ -1,8 +1,8 @@
<%= render MirageWeb.SharedView, "user_menu.html", assigns %>
<div class="hero">
<header class="hero">
<h1>Hi <%= @current_user.email %></h1>
</div>
</header>
<section class="bg-content width-full">
<h3>📆 Todays Note</h3>

4
lib/mirage_web/templates/user_registration/new.html.eex

@ -1,6 +1,6 @@
<div class="hero">
<header class="hero">
<h1>Register</h1>
</div>
</header>
<%= form_for @changeset, Routes.user_registration_path(@conn, :create), fn f -> %>
<%= if @changeset.action do %>

4
lib/mirage_web/templates/user_session/new.html.eex

@ -1,6 +1,6 @@
<div class="hero">
<header class="hero">
<h1>Log in</h1>
</div>
</header>
<%= form_for @conn, Routes.user_session_path(@conn, :create), [as: :user], fn f -> %>
<%= if @error_message do %>

4
lib/mirage_web/templates/user_settings/edit.html.eex

@ -1,6 +1,6 @@
<div class="hero">
<header class="hero">
<h1>Settings</h1>
</div>
</header>
<h3>Change email</h3>

2
mix.exs

@ -1,7 +1,7 @@
defmodule Mirage.MixProject do
use Mix.Project
@version "0.28.0"
@version "0.28.1"
def project do
[

Loading…
Cancel
Save