Browse Source

more stlyes, change fonts

main
Inhji Y. 9 months ago
parent
commit
b4223867e3
  1. 74
      assets/css/app.scss
  2. 4
      lib/mirage_web/templates/note/edit.html.eex
  3. 2
      lib/mirage_web/templates/note/form.html.eex
  4. 2
      lib/mirage_web/templates/note/index.html.eex
  5. 4
      lib/mirage_web/templates/note/new.html.eex
  6. 6
      lib/mirage_web/templates/note/show.html.eex
  7. 6
      lib/mirage_web/templates/setting/edit.html.eex
  8. 13
      lib/mirage_web/templates/setting/index.html.eex
  9. 4
      lib/mirage_web/templates/setting/new.html.eex
  10. 18
      lib/mirage_web/templates/setting/show.html.eex

74
assets/css/app.scss

@ -1,4 +1,5 @@
/* This file is for your main application css. */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans&family=Playfair+Display&display=swap');
@import "~minireset.css/minireset.css";
@import "~trix/dist/trix.css";
@ -6,6 +7,13 @@
@import "./phoenix";
@import "./nprogress";
/* === Variables === */
$rainbow: linear-gradient(90deg,
rgba(131,58,180,1) 0%,
rgba(253,29,65,1) 50%,
rgba(252,176,69,1) 100%);
/* === Base === */
html {
@ -15,8 +23,30 @@ html {
body {
background: #111;
color: #ddd;
font-family: monospace;
font-family: 'Fira Sans', monospace;
font-size: 1rem;
line-height: 1.5rem;
}
h1, h2, h3 {
font-family: 'Playfair Display', sans;
margin-bottom: 1rem;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.6rem;
}
h3 {
font-size: 1.3rem;
}
a {
color: #ddd;
}
/* === Layout === */
@ -46,10 +76,7 @@ nav[role=navigation] {
width: 100%;
left: 0;
height: 3px;
background: linear-gradient(90deg,
rgba(131,58,180,1) 0%,
rgba(253,29,65,1) 50%,
rgba(252,176,69,1) 100%);
background: $rainbow;
}
ul {
@ -76,26 +103,6 @@ nav[role=navigation] {
/* === Styling ===*/
h1, h2, h3 {
margin-bottom: 1rem;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.6rem;
}
h3 {
font-size: 1.3rem;
}
a {
color: #ddd;
}
input[readonly] {
background: #ddd;
color: #777;
@ -113,8 +120,9 @@ button[type=submit], a.button {
margin: 0;
&:hover {
background: white;
color: #333;
background: $rainbow;
color: white;
border: 1px solid white;
}
}
@ -124,7 +132,8 @@ button[type=submit], a.button {
padding: 2rem;
h1 {
margin: 0;
margin: 0 0 1rem 0;
}
p {
@ -144,9 +153,18 @@ trix-toolbar {
trix-editor {
border-radius: 0;
margin-bottom: 1rem;
}
/* === Content === */
article {
margin-bottom: 2rem;
}
.content.html {
margin-bottom: 2rem;
ul, ol {
margin-left: 2rem;
}

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

@ -1,5 +1,3 @@
<h1>Edit Note</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.note_path(@conn, :update, @note)) %>
<span><%= link "Back", to: Routes.note_path(@conn, :index) %></span>
<%= render "form.html", Map.put(assigns, :action, Routes.note_path(@conn, :update, @note)) %>

2
lib/mirage_web/templates/note/form.html.eex

@ -6,7 +6,7 @@
<% end %>
<%= hidden_input f, :content %>
<trix-editor input="note_content"></trix-editor>
<trix-editor input="note_content" class="content html"></trix-editor>
<%= error_tag f, :content %>
<div>

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

@ -13,5 +13,5 @@
<% end %>
<%= if @current_user do %>
<span><%= link "New Note", to: Routes.note_path(@conn, :new) %></span>
<span><%= link "New Note", to: Routes.note_path(@conn, :new), class: "button" %></span>
<% end %>

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

@ -2,6 +2,4 @@
<h1>New Note</h1>
</div>
<%= render "form.html", Map.put(assigns, :action, Routes.note_path(@conn, :create)) %>
<span><%= link "Back", to: Routes.note_path(@conn, :index) %></span>
<%= render "form.html", Map.put(assigns, :action, Routes.note_path(@conn, :create)) %>

6
lib/mirage_web/templates/note/show.html.eex

@ -10,7 +10,7 @@
</article>
<%= if @current_user do %>
<span><%= link "Edit", to: Routes.note_path(@conn, :edit, @note) %></span>
<span><%= link "Back", to: Routes.note_path(@conn, :index) %></span>
<span><%= link "Delete", to: Routes.note_path(@conn, :delete, @note), method: :delete, data: [confirm: "Are you sure?"] %></span>
<span><%= link "Edit", to: Routes.note_path(@conn, :edit, @note), class: "button" %></span>
<span><%= link "Back", to: Routes.note_path(@conn, :index), class: "button" %></span>
<span><%= link "Delete", to: Routes.note_path(@conn, :delete, @note), method: :delete, data: [confirm: "Are you sure?"], class: "button" %></span>
<% end %>

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

@ -1,5 +1,5 @@
<h1>Edit Setting <%= @setting.name %></h1>
<div class="hero">
<h1>Edit Setting <%= @setting.name %></h1>
</div>
<%= render "form.html", Map.put(assigns, :action, Routes.setting_path(@conn, :update, @setting)) %>
<span><%= link "Back", to: Routes.setting_path(@conn, :index) %></span>

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

@ -3,16 +3,5 @@
</div>
<%= for setting <- @settings do %>
<div class="grid">
<div class="col">
<%= setting.name %>
</div>
<div class="col">
<%= setting.value %>
</div>
<div class="col">
<%= link "Show", to: Routes.setting_path(@conn, :show, setting), class: "button" %>
<%= link "Edit", to: Routes.setting_path(@conn, :edit, setting), class: "button" %>
</div>
</div>
<%= link setting.name, to: Routes.setting_path(@conn, :show, setting), class: "button" %>
<% end %>

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

@ -1,5 +1,3 @@
<h1>New Setting</h1>
<%= render "form.html", Map.put(assigns, :action, Routes.setting_path(@conn, :create)) %>
<span><%= link "Back", to: Routes.setting_path(@conn, :index) %></span>
<%= render "form.html", Map.put(assigns, :action, Routes.setting_path(@conn, :create)) %>

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

@ -1,20 +1,10 @@
<div class="hero">
<h1>Show Setting</h1>
<h1>Setting '<%= @setting.name %>'</h1>
</div>
<ul>
<li>
<strong>Name:</strong>
<%= @setting.name %>
</li>
<li>
<strong>Value:</strong>
<%= @setting.value %>
</li>
</ul>
<div class="content html">
<%= raw @setting.value %>
</div>
<%= link "Edit", to: Routes.setting_path(@conn, :edit, @setting), class: "button" %>
<%= link "Back", to: Routes.setting_path(@conn, :index), class: "button" %>

Loading…
Cancel
Save