Browse Source

add date to tags, improve tags styles BY A LOT

pull/26/head
Inhji Y. 1 year ago
parent
commit
b74a1db2e3
  1. 8
      apps/tomie_web/assets/css/app.css
  2. 19
      apps/tomie_web/lib/tomie_web/templates/bookmark/index.html.eex
  3. 8
      apps/tomie_web/lib/tomie_web/templates/tag/index.html.eex
  4. 1
      apps/tomie_web/mix.exs
  5. 3
      mix.lock

8
apps/tomie_web/assets/css/app.css

@ -41,6 +41,14 @@ a {
@apply bg-primary-alt-barely;
}
.card:hover .tag, .card:focus .tag, .card:active .tag {
@apply bg-surface-barely;
}
.tag {
@apply text-sm uppercase bg-primary-alt-barely px-2 py-1 shadow;
}
/* Forms */
form label {

19
apps/tomie_web/lib/tomie_web/templates/bookmark/index.html.eex

@ -8,14 +8,21 @@
<%= for bookmark <- @bookmarks do %>
<article class="card">
<%= link to: Routes.bookmark_path(@conn, :show, bookmark), class: "block" do %>
<h2 class="font-bold">
<h2 class="font-bold mb-2">
<%= bookmark.title || bookmark.source %>
</h2>
<div class="text-on-surface-muted">
<span><%= bookmark.views %> Views</span>
<%= for tag <- bookmark.tags do %>
<span><%= tag.name %></span>
<% end %>
<div class="flex text-on-surface-muted">
<span class="flex-1">
<!-- JANKY HACK H8-->
<span class="tag"><%= bookmark.views %> Views</span>&nbsp;
<span class="tag"><%= Timex.from_now(bookmark.inserted_at) %></span>
</span>
<span class="flex-auto"></span>
<span class="flex-1 text-right tags">
<%= for tag <- bookmark.tags do %>
<span class="tag ml-1"><%= tag.name %></span>
<% end %>
</span>
</div>
<% end %>
</article>

8
apps/tomie_web/lib/tomie_web/templates/tag/index.html.eex

@ -8,12 +8,12 @@
<%= for tag <- @tags do %>
<article class="card">
<%= link to: Routes.tag_path(@conn, :show, tag), class: "block" do %>
<h2 class="font-bold">
<h2 class="font-bold mb-2">
<%= tag.name %>
</h2>
<div class="text-on-surface-muted">
<span><%= rule_count(tag) %> Rules</span>
</div>
<span class="text-on-surface-muted tag">
<%= rule_count(tag) %> Rules
</span>
<% end %>
</article>
<% end %>

1
apps/tomie_web/mix.exs

@ -50,6 +50,7 @@ defmodule TomieWeb.MixProject do
{:pow, "~> 1.0.19"},
{:que, "~> 0.10.1"},
{:excoveralls, "~> 0.12.3", only: :test},
{:timex, "~> 3.5"},
{:tomie, in_umbrella: true},
{:bookmarks, in_umbrella: true},
{:tags, in_umbrella: true},

3
mix.lock

@ -1,6 +1,7 @@
%{
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
"certifi": {:hex, :certifi, "2.5.1", "867ce347f7c7d78563450a18a6a28a8090331e77fa02380b4a21962a65d36ee5", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "805abd97539caf89ec6d4732c91e62ba9da0cda51ac462380bbd28ee697a8c42"},
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"},
"connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"},
"cowboy": {:hex, :cowboy, "2.7.0", "91ed100138a764355f43316b1d23d7ff6bdb0de4ea618cb5d8677c93a7a2f115", [:rebar3], [{:cowlib, "~> 2.8.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "04fd8c6a39edc6aaa9c26123009200fc61f92a3a94f3178c527b70b767c6e605"},
"cowlib": {:hex, :cowlib, "2.8.0", "fd0ff1787db84ac415b8211573e9a30a3ebe71b5cbff7f720089972b2319c8a4", [:rebar3], [], "hexpm", "79f954a7021b302186a950a32869dbc185523d99d3e44ce430cd1f3289f41ed4"},
@ -50,5 +51,7 @@
"slugger": {:hex, :slugger, "0.3.0", "efc667ab99eee19a48913ccf3d038b1fb9f165fa4fbf093be898b8099e61b6ed", [:mix], [], "hexpm", "20d0ded0e712605d1eae6c5b4889581c3460d92623a930ddda91e0e609b5afba"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.5", "6eaf7ad16cb568bb01753dbbd7a95ff8b91c7979482b95f38443fe2c8852a79b", [:make, :mix, :rebar3], [], "hexpm", "13104d7897e38ed7f044c4de953a6c28597d1c952075eb2e328bc6d6f2bfc496"},
"telemetry": {:hex, :telemetry, "0.4.1", "ae2718484892448a24470e6aa341bc847c3277bfb8d4e9289f7474d752c09c7f", [:rebar3], [], "hexpm", "4738382e36a0a9a2b6e25d67c960e40e1a2c95560b9f936d8e29de8cd858480f"},
"timex": {:hex, :timex, "3.6.1", "efdf56d0e67a6b956cc57774353b0329c8ab7726766a11547e529357ffdc1d56", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.10", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 0.1.8 or ~> 0.5 or ~> 1.0.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "f354efb2400dd7a80fd9eb6c8419068c4f632da4ac47f3d8822d6e33f08bc852"},
"tzdata": {:hex, :tzdata, "1.0.3", "73470ad29dde46e350c60a66e6b360d3b99d2d18b74c4c349dbebbc27a09a3eb", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a6e1ee7003c4d04ecbd21dd3ec690d4c6662db5d3bbdd7262d53cdf5e7c746c1"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.4.1", "d869e4c68901dd9531385bb0c8c40444ebf624e60b6962d95952775cac5e90cd", [:rebar3], [], "hexpm", "1d1848c40487cdb0b30e8ed975e34e025860c02e419cb615d255849f3427439d"},
}
Loading…
Cancel
Save