4 Commits

  1. 15
      CHANGELOG.md
  2. 21
      assets/css/_forms.scss
  3. 6
      assets/css/app.scss
  4. 53
      assets/package-lock.json
  5. 2
      assets/package.json
  6. 4
      lib/mirage_web/live/blog_live.html.leex
  7. 9
      lib/mirage_web/live/link_live/form_component.html.leex
  8. 16
      lib/mirage_web/live/list_live/form_component.html.leex
  9. 2
      lib/mirage_web/live/note_live/form_component.html.leex
  10. 2
      lib/mirage_web/live/note_live/show.ex
  11. 2
      mix.exs

15
CHANGELOG.md

@ -5,6 +5,21 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
<!-- changelog -->
## [v0.72.1](https://git.inhji.de/inhji/mirage/compare/v0.72.0...v0.72.1) (2021-03-14)
### Chores:
* update copy-webpack-plugin to 8.x
### Bug Fixes:
* crash at empty blog list
* improve forms
## [v0.72.0](https://git.inhji.de/inhji/mirage/compare/v0.71.0...v0.72.0) (2021-03-14)

21
assets/css/_forms.scss

@ -11,10 +11,6 @@
float: right;
font-size: 2rem;
}
form {
clear: both;
}
}
form {
@ -28,23 +24,30 @@ form {
margin-bottom: 0;
}
.tagify {
@include color-assign(border-color, surface-var);
}
#editor {
border: none;
}
select,
input[type=text],
input[type=url],
input[type=email],
input[type=password] {
@include color-assign(background-color, surface);
@include color-assign(color, on-surface);
border: none;
border-bottom: 1px solid white;
@include color-assign(border-color, on-surface);
border: 1px solid white;
@include color-assign(border-color, surface-var);
margin-bottom: 1rem;
padding: 0.5rem;
padding: 0.5rem 0.75rem;
width: 100%;
border-radius: 0;
font-size: 1rem;
&:last-child {
margin-bottom: 0;

6
assets/css/app.scss

@ -201,12 +201,6 @@ header.hero {
}
}
#editor {
border: 1px solid white;
@include color-assign(border-color, on-surface);
margin-bottom: 2rem;
}
.buttons {
margin-top: 2rem;
}

53
assets/package-lock.json

@ -23,7 +23,7 @@
"@babel/preset-env": "^7.x",
"babel-loader": "^8.x",
"babel-plugin-prismjs": "^2.0.1",
"copy-webpack-plugin": "^7.x",
"copy-webpack-plugin": "^8.x",
"css-loader": "^5.0.2",
"css-minimizer-webpack-plugin": "^1.x",
"file-loader": "^6.x",
@ -2412,17 +2412,16 @@
}
},
"node_modules/copy-webpack-plugin": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-7.0.0.tgz",
"integrity": "sha512-SLjQNa5iE3BoCP76ESU9qYo9ZkEWtXoZxDurHoqPchAFRblJ9g96xTeC560UXBMre1Nx6ixIIUfiY3VcjpJw3g==",
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-8.0.0.tgz",
"integrity": "sha512-sqGe2FsB67wV/De+sz5azQklADe4thN016od6m7iK9KbjrSc1SEgg5QZ0LN+jGx5aZR52CbuXbqOhoIbqzzXlA==",
"dev": true,
"dependencies": {
"fast-glob": "^3.2.4",
"fast-glob": "^3.2.5",
"glob-parent": "^5.1.1",
"globby": "^11.0.1",
"loader-utils": "^2.0.0",
"globby": "^11.0.2",
"normalize-path": "^3.0.0",
"p-limit": "^3.0.2",
"p-limit": "^3.1.0",
"schema-utils": "^3.0.0",
"serialize-javascript": "^5.0.1"
},
@ -2437,20 +2436,6 @@
"webpack": "^5.1.0"
}
},
"node_modules/copy-webpack-plugin/node_modules/loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
},
"engines": {
"node": ">=8.9.0"
}
},
"node_modules/copy-webpack-plugin/node_modules/schema-utils": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",
@ -10006,32 +9991,20 @@
}
},
"copy-webpack-plugin": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-7.0.0.tgz",
"integrity": "sha512-SLjQNa5iE3BoCP76ESU9qYo9ZkEWtXoZxDurHoqPchAFRblJ9g96xTeC560UXBMre1Nx6ixIIUfiY3VcjpJw3g==",
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-8.0.0.tgz",
"integrity": "sha512-sqGe2FsB67wV/De+sz5azQklADe4thN016od6m7iK9KbjrSc1SEgg5QZ0LN+jGx5aZR52CbuXbqOhoIbqzzXlA==",
"dev": true,
"requires": {
"fast-glob": "^3.2.4",
"fast-glob": "^3.2.5",
"glob-parent": "^5.1.1",
"globby": "^11.0.1",
"loader-utils": "^2.0.0",
"globby": "^11.0.2",
"normalize-path": "^3.0.0",
"p-limit": "^3.0.2",
"p-limit": "^3.1.0",
"schema-utils": "^3.0.0",
"serialize-javascript": "^5.0.1"
},
"dependencies": {
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"schema-utils": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",

2
assets/package.json

@ -23,7 +23,7 @@
"@babel/preset-env": "^7.x",
"babel-loader": "^8.x",
"babel-plugin-prismjs": "^2.0.1",
"copy-webpack-plugin": "^7.x",
"copy-webpack-plugin": "^8.x",
"css-loader": "^5.0.2",
"css-minimizer-webpack-plugin": "^1.x",
"file-loader": "^6.x",

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

@ -11,9 +11,9 @@
return_to: Routes.list_show_path(@socket, :show, @list) %>
<% end %>
<%= if is_nil(@list) or Enum.count(@list) == 0 do %>
<%= if is_nil(@list) or Enum.count(@list.notes) == 0 do %>
<section class="width-full bg-content">
Looks like you did not create a blog list yet. Just name it <code>@blog</code> and it will show up here.
Looks like you did not create a blog list yet. Just name it <code>@blog</code> and its notes will show up here.
</section>
<% else %>
<section class="bg-content width-full">

9
lib/mirage_web/live/link_live/form_component.html.leex

@ -1,5 +1,3 @@
<h2><%= @title %></h2>
<%= f = form_for @changeset, "#",
id: "link-form",
phx_target: @myself,
@ -8,19 +6,16 @@
phx_hook: "LinkForm" %>
<fieldset>
<%= label f, :title %>
<%= text_input f, :title %>
<%= text_input f, :title, placeholder: "Title" %>
<%= error_tag f, :title %>
</fieldset>
<fieldset>
<%= label f, :url %>
<%= text_input f, :url %>
<%= text_input f, :url, placeholder: "URL" %>
<%= error_tag f, :url %>
</fieldset>
<fieldset>
<%= label f, :domain %>
<%= text_input f, :domain, readonly: true %>
<%= error_tag f, :domain %>
</fieldset>

16
lib/mirage_web/live/list_live/form_component.html.leex

@ -1,18 +1,18 @@
<h2><%= @title %></h2>
<%= f = form_for @changeset, "#",
id: "list-form",
phx_target: @myself,
phx_change: "validate",
phx_submit: "save" %>
<%= label f, :name %>
<%= text_input f, :name %>
<%= error_tag f, :name %>
<fieldset>
<%= text_input f, :name %>
<%= error_tag f, :name %>
</fieldset>
<%= label f, :is_public %>
<%= checkbox f, :is_public %>
<%= error_tag f, :is_public %>
<fieldset>
<%= checkbox f, :is_public %>
<%= error_tag f, :is_public %>
</fieldset>
<%= submit "Save", phx_disable_with: "Saving..." %>
</form>

2
lib/mirage_web/live/note_live/form_component.html.leex

@ -1,5 +1,3 @@
<h2><%= @title %></h2>
<%= f = form_for @changeset, "#",
id: "note-form",
phx_target: @myself,

2
lib/mirage_web/live/note_live/show.ex

@ -10,7 +10,7 @@ defmodule MirageWeb.NoteLive.Show do
alias Mirage.Links.Link
defp page_title(:show, note), do: note.title
defp page_title(:edit, note), do: "[Edit] #{note.title}"
defp page_title(:edit, note), do: "Edit Note"
@impl true
def mount(_params, session, socket) do

2
mix.exs

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

Loading…
Cancel
Save