6 Commits

  1. 21
      CHANGELOG.md
  2. 200
      assets/css/_inter.scss
  3. 2
      assets/css/app.scss
  4. 1348
      assets/css/ok.css
  5. 12
      assets/package-lock.json
  6. BIN
      assets/static/fonts/Inter-Black.woff
  7. BIN
      assets/static/fonts/Inter-Black.woff2
  8. BIN
      assets/static/fonts/Inter-BlackItalic.woff
  9. BIN
      assets/static/fonts/Inter-BlackItalic.woff2
  10. BIN
      assets/static/fonts/Inter-Bold.woff
  11. BIN
      assets/static/fonts/Inter-Bold.woff2
  12. BIN
      assets/static/fonts/Inter-BoldItalic.woff
  13. BIN
      assets/static/fonts/Inter-BoldItalic.woff2
  14. BIN
      assets/static/fonts/Inter-ExtraBold.woff
  15. BIN
      assets/static/fonts/Inter-ExtraBold.woff2
  16. BIN
      assets/static/fonts/Inter-ExtraBoldItalic.woff
  17. BIN
      assets/static/fonts/Inter-ExtraBoldItalic.woff2
  18. BIN
      assets/static/fonts/Inter-ExtraLight.woff
  19. BIN
      assets/static/fonts/Inter-ExtraLight.woff2
  20. BIN
      assets/static/fonts/Inter-ExtraLightItalic.woff
  21. BIN
      assets/static/fonts/Inter-ExtraLightItalic.woff2
  22. BIN
      assets/static/fonts/Inter-Italic.woff
  23. BIN
      assets/static/fonts/Inter-Italic.woff2
  24. BIN
      assets/static/fonts/Inter-Light.woff
  25. BIN
      assets/static/fonts/Inter-Light.woff2
  26. BIN
      assets/static/fonts/Inter-LightItalic.woff
  27. BIN
      assets/static/fonts/Inter-LightItalic.woff2
  28. BIN
      assets/static/fonts/Inter-Medium.woff
  29. BIN
      assets/static/fonts/Inter-Medium.woff2
  30. BIN
      assets/static/fonts/Inter-MediumItalic.woff
  31. BIN
      assets/static/fonts/Inter-MediumItalic.woff2
  32. BIN
      assets/static/fonts/Inter-Regular.woff
  33. BIN
      assets/static/fonts/Inter-Regular.woff2
  34. BIN
      assets/static/fonts/Inter-SemiBold.woff
  35. BIN
      assets/static/fonts/Inter-SemiBold.woff2
  36. BIN
      assets/static/fonts/Inter-SemiBoldItalic.woff
  37. BIN
      assets/static/fonts/Inter-SemiBoldItalic.woff2
  38. BIN
      assets/static/fonts/Inter-Thin.woff
  39. BIN
      assets/static/fonts/Inter-Thin.woff2
  40. BIN
      assets/static/fonts/Inter-ThinItalic.woff
  41. BIN
      assets/static/fonts/Inter-ThinItalic.woff2
  42. BIN
      assets/static/fonts/Inter-italic.var.woff2
  43. BIN
      assets/static/fonts/Inter-roman.var.woff2
  44. BIN
      assets/static/fonts/Inter.var.woff2
  45. BIN
      assets/static/fonts/OpenSans-Regular-webfont.woff
  46. 200
      assets/static/fonts/inter.css
  47. 4
      lib/mirage/search.ex
  48. 2
      lib/mirage_web/templates/layout/_sidebar.html.eex
  49. 7
      lib/mirage_web/templates/layout/root.html.leex
  50. 2
      mix.exs

21
CHANGELOG.md

@ -5,6 +5,27 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline
<!-- changelog -->
## [v0.84.0](https://git.inhji.de/inhji/mirage/compare/v0.83.0...v0.84.0) (2021-03-21)
### Chores:
* update npm deps
* clean up search
### Features:
* move to selfhosted Inter font
* add a buttload of font files for Inter
### Bug Fixes:
* logout label
## [v0.83.0](https://git.inhji.de/inhji/mirage/compare/v0.82.1...v0.83.0) (2021-03-21)

200
assets/css/_inter.scss

@ -0,0 +1,200 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("../static/fonts/Inter-Thin.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-Thin.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url("../static/fonts/Inter-ThinItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-ThinItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url("../static/fonts/Inter-ExtraLight.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-ExtraLight.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 200;
font-display: swap;
src: url("../static/fonts/Inter-ExtraLightItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-ExtraLightItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url("../static/fonts/Inter-Light.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-Light.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url("../static/fonts/Inter-LightItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-LightItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("../static/fonts/Inter-Regular.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-Regular.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url("../static/fonts/Inter-Italic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-Italic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("../static/fonts/Inter-Medium.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-Medium.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url("../static/fonts/Inter-MediumItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-MediumItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("../static/fonts/Inter-SemiBold.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-SemiBold.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url("../static/fonts/Inter-SemiBoldItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-SemiBoldItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("../static/fonts/Inter-Bold.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-Bold.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url("../static/fonts/Inter-BoldItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-BoldItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url("../static/fonts/Inter-ExtraBold.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-ExtraBold.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 800;
font-display: swap;
src: url("../static/fonts/Inter-ExtraBoldItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-ExtraBoldItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url("../static/fonts/Inter-Black.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-Black.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url("../static/fonts/Inter-BlackItalic.woff2?v=3.15") format("woff2"),
url("../static/fonts/Inter-BlackItalic.woff?v=3.15") format("woff");
}
/* -------------------------------------------------------
Variable font.
Usage:
html { font-family: 'Inter', sans-serif; }
@supports (font-variation-settings: normal) {
html { font-family: 'Inter var', sans-serif; }
}
*/
@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: normal;
font-named-instance: 'Regular';
src: url("../static/fonts/Inter-roman.var.woff2?v=3.15") format("woff2");
}
@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: italic;
font-named-instance: 'Italic';
src: url("../static/fonts/Inter-italic.var.woff2?v=3.15") format("woff2");
}
/* --------------------------------------------------------------------------
[EXPERIMENTAL] Multi-axis, single variable font.
Slant axis is not yet widely supported (as of February 2019) and thus this
multi-axis single variable font is opt-in rather than the default.
When using this, you will probably need to set font-variation-settings
explicitly, e.g.
* { font-variation-settings: "slnt" 0deg }
.italic { font-variation-settings: "slnt" 10deg }
*/
@font-face {
font-family: 'Inter var experimental';
font-weight: 100 900;
font-display: swap;
font-style: oblique 0deg 10deg;
src: url("../static/fonts/Inter.var.woff2?v=3.15") format("woff2");
}

2
assets/css/app.scss

@ -2,6 +2,8 @@
@import "~bootstrap-icons/font/bootstrap-icons.css";
@import "~easymde/dist/easymde.min.css";
@import "./inter";
@import "./ok.css";
@import "./variables";
@import "./navigation";
@import "./phoenix";

1348
assets/css/ok.css
File diff suppressed because it is too large
View File

12
assets/package-lock.json

@ -9762,9 +9762,9 @@
}
},
"node_modules/webpack": {
"version": "5.27.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.27.0.tgz",
"integrity": "sha512-So7grHu//UyJ+80VrNHjWwW6WSZkfWWD6a7NV/88r8G92PO6TYOGzbtTiZBwbPVkx6LVP8OYvHD+IxuJ2KBz4g==",
"version": "5.27.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.27.1.tgz",
"integrity": "sha512-rxIDsPZ3Apl3JcqiemiLmWH+hAq04YeOXqvCxNZOnTp8ZgM9NEPtbu4CaMfMEf9KShnx/Ym8uLGmM6P4XnwCoA==",
"dev": true,
"dependencies": {
"@types/eslint-scope": "^3.7.0",
@ -17625,9 +17625,9 @@
}
},
"webpack": {
"version": "5.27.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.27.0.tgz",
"integrity": "sha512-So7grHu//UyJ+80VrNHjWwW6WSZkfWWD6a7NV/88r8G92PO6TYOGzbtTiZBwbPVkx6LVP8OYvHD+IxuJ2KBz4g==",
"version": "5.27.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.27.1.tgz",
"integrity": "sha512-rxIDsPZ3Apl3JcqiemiLmWH+hAq04YeOXqvCxNZOnTp8ZgM9NEPtbu4CaMfMEf9KShnx/Ym8uLGmM6P4XnwCoA==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.0",

BIN
assets/static/fonts/Inter-Black.woff

BIN
assets/static/fonts/Inter-Black.woff2

BIN
assets/static/fonts/Inter-BlackItalic.woff

BIN
assets/static/fonts/Inter-BlackItalic.woff2

BIN
assets/static/fonts/Inter-Bold.woff

BIN
assets/static/fonts/Inter-Bold.woff2

BIN
assets/static/fonts/Inter-BoldItalic.woff

BIN
assets/static/fonts/Inter-BoldItalic.woff2

BIN
assets/static/fonts/Inter-ExtraBold.woff

BIN
assets/static/fonts/Inter-ExtraBold.woff2

BIN
assets/static/fonts/Inter-ExtraBoldItalic.woff

BIN
assets/static/fonts/Inter-ExtraBoldItalic.woff2

BIN
assets/static/fonts/Inter-ExtraLight.woff

BIN
assets/static/fonts/Inter-ExtraLight.woff2

BIN
assets/static/fonts/Inter-ExtraLightItalic.woff

BIN
assets/static/fonts/Inter-ExtraLightItalic.woff2

BIN
assets/static/fonts/Inter-Italic.woff

BIN
assets/static/fonts/Inter-Italic.woff2

BIN
assets/static/fonts/Inter-Light.woff

BIN
assets/static/fonts/Inter-Light.woff2

BIN
assets/static/fonts/Inter-LightItalic.woff

BIN
assets/static/fonts/Inter-LightItalic.woff2

BIN
assets/static/fonts/Inter-Medium.woff

BIN
assets/static/fonts/Inter-Medium.woff2

BIN
assets/static/fonts/Inter-MediumItalic.woff

BIN
assets/static/fonts/Inter-MediumItalic.woff2

BIN
assets/static/fonts/Inter-Regular.woff

BIN
assets/static/fonts/Inter-Regular.woff2

BIN
assets/static/fonts/Inter-SemiBold.woff

BIN
assets/static/fonts/Inter-SemiBold.woff2

BIN
assets/static/fonts/Inter-SemiBoldItalic.woff

BIN
assets/static/fonts/Inter-SemiBoldItalic.woff2

BIN
assets/static/fonts/Inter-Thin.woff

BIN
assets/static/fonts/Inter-Thin.woff2

BIN
assets/static/fonts/Inter-ThinItalic.woff

BIN
assets/static/fonts/Inter-ThinItalic.woff2

BIN
assets/static/fonts/Inter-italic.var.woff2

BIN
assets/static/fonts/Inter-roman.var.woff2

BIN
assets/static/fonts/Inter.var.woff2

BIN
assets/static/fonts/OpenSans-Regular-webfont.woff

200
assets/static/fonts/inter.css

@ -0,0 +1,200 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("Inter-Thin.woff2?v=3.15") format("woff2"),
url("Inter-Thin.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 100;
font-display: swap;
src: url("Inter-ThinItalic.woff2?v=3.15") format("woff2"),
url("Inter-ThinItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url("Inter-ExtraLight.woff2?v=3.15") format("woff2"),
url("Inter-ExtraLight.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 200;
font-display: swap;
src: url("Inter-ExtraLightItalic.woff2?v=3.15") format("woff2"),
url("Inter-ExtraLightItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url("Inter-Light.woff2?v=3.15") format("woff2"),
url("Inter-Light.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url("Inter-LightItalic.woff2?v=3.15") format("woff2"),
url("Inter-LightItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("Inter-Regular.woff2?v=3.15") format("woff2"),
url("Inter-Regular.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 400;
font-display: swap;
src: url("Inter-Italic.woff2?v=3.15") format("woff2"),
url("Inter-Italic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url("Inter-Medium.woff2?v=3.15") format("woff2"),
url("Inter-Medium.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 500;
font-display: swap;
src: url("Inter-MediumItalic.woff2?v=3.15") format("woff2"),
url("Inter-MediumItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url("Inter-SemiBold.woff2?v=3.15") format("woff2"),
url("Inter-SemiBold.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 600;
font-display: swap;
src: url("Inter-SemiBoldItalic.woff2?v=3.15") format("woff2"),
url("Inter-SemiBoldItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url("Inter-Bold.woff2?v=3.15") format("woff2"),
url("Inter-Bold.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 700;
font-display: swap;
src: url("Inter-BoldItalic.woff2?v=3.15") format("woff2"),
url("Inter-BoldItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url("Inter-ExtraBold.woff2?v=3.15") format("woff2"),
url("Inter-ExtraBold.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 800;
font-display: swap;
src: url("Inter-ExtraBoldItalic.woff2?v=3.15") format("woff2"),
url("Inter-ExtraBoldItalic.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url("Inter-Black.woff2?v=3.15") format("woff2"),
url("Inter-Black.woff?v=3.15") format("woff");
}
@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 900;
font-display: swap;
src: url("Inter-BlackItalic.woff2?v=3.15") format("woff2"),
url("Inter-BlackItalic.woff?v=3.15") format("woff");
}
/* -------------------------------------------------------
Variable font.
Usage:
html { font-family: 'Inter', sans-serif; }
@supports (font-variation-settings: normal) {
html { font-family: 'Inter var', sans-serif; }
}
*/
@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: normal;
font-named-instance: 'Regular';
src: url("Inter-roman.var.woff2?v=3.15") format("woff2");
}
@font-face {
font-family: 'Inter var';
font-weight: 100 900;
font-display: swap;
font-style: italic;
font-named-instance: 'Italic';
src: url("Inter-italic.var.woff2?v=3.15") format("woff2");
}
/* --------------------------------------------------------------------------
[EXPERIMENTAL] Multi-axis, single variable font.
Slant axis is not yet widely supported (as of February 2019) and thus this
multi-axis single variable font is opt-in rather than the default.
When using this, you will probably need to set font-variation-settings
explicitly, e.g.
* { font-variation-settings: "slnt" 0deg }
.italic { font-variation-settings: "slnt" 10deg }
*/
@font-face {
font-family: 'Inter var experimental';
font-weight: 100 900;
font-display: swap;
font-style: oblique 0deg 10deg;
src: url("Inter.var.woff2?v=3.15") format("woff2");
}

4
lib/mirage/search.ex

@ -66,7 +66,7 @@ defmodule Mirage.Search do
if is_nil(occurrence) do
result
else
{index, length, prop} = occurrence
{_index, _length, prop} = occurrence
fffound = Map.get(result, prop)
replaced = String.replace(fffound, search_term, "<mark>#{search_term}</mark>")
@ -108,11 +108,9 @@ defmodule Mirage.Search do
case find_index(value, search_term) do
-1 ->
IO.inspect("Term #{search_term} not found in '#{value}'")
:error
index ->
IO.inspect("Term #{search_term} found in '#{value}'")
{:ok, index, String.length(search_term), prop}
end
end

2
lib/mirage_web/templates/layout/_sidebar.html.eex

@ -46,7 +46,7 @@
<span class="icon">
<i class="bi bi-box-arrow-right"></i>
</span>
<span class="label">Settings</span>
<span class="label">Logout</span>
<% end %>
</ul>
</nav>

7
lib/mirage_web/templates/layout/root.html.leex

@ -6,12 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<%= csrf_meta_tag() %>
<%= live_title_tag assigns[:page_title] || "Inhji.de", suffix: " · Mirage" %>
<!--
<link rel="icon" href='favicon.ico'>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
<script defer src="https://dohliam.github.io/dropin-minimal-css/switcher.js" type="text/javascript"></script>
-->
<link rel="stylesheet" href="https://okcss.netlify.app/ok.min.css" />
<link rel="icon" href='favicon.ico'>
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
<script defer phx-track-static type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script>
</head>

2
mix.exs

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

Loading…
Cancel
Save