diff --git a/assets/css/app.css b/assets/css/app.css
index a7fb02f..ac05e90 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -9,70 +9,79 @@
The base layer is for things like reset rules or default styles applied to plain HTML elements.
*/
@layer base {
- :root {
- --color-background: 255 255 255;
- --color-foreground: 0 0 0;
- --color-primary: 0 0 0;
- }
-
- :root[mode=dark] {
- --color-background: 0 0 0;
- --color-foreground: 255 255 255;
- --color-primary: 255 255 255;
- }
-
html {
font-family: 'Inter', sans-serif;
font-feature-settings: "case", "cpsp", "frac", "salt", "ccmp", "cv01", "cv02", "cv03", "cv04", "cv05", "cv06", "cv07", "cv09", "cv10", "cv11";
+ @apply text-slate-800;
}
- header h1 { @apply text-xl; }
-
.stack > * + * {
margin-block-start: var(--flow-space, 1em);
}
+
+ /*
+ * ============= SITE LAYOUT =============
+ */
+
+ #site-header {
+ @apply block px-3 py-6 bg-gradient-to-r from-slate-900 to-slate-950 text-white print:hidden;
+
+ nav ul {
+ @apply flex gap-3;
+
+ a { @apply p-3 rounded hover:bg-primary-500 transition; }
+ }
+ }
+
+ #primary-sidebar {
+ @apply col-span-1;
+
+ nav {
+ @apply flex flex-col md:flex-row lg:flex-col mb-6 lg:mb-0;
+ }
+
+ .menu {
+ @apply flex-1;
+
+ h2 {
+ @apply font-bold;
+ }
+ }
+ }
+
+ #site-content {
+ @apply grid grid-cols-1 lg:grid-cols-5 gap-0 lg:gap-12;
+
+ #secondary-sidebar {
+ @apply col-span-1;
+ }
+
+ #content-wrapper {
+ @apply col-span-4;
+ }
+ }
+
+ /*
+ * ============= PAGE LAYOUT =============
+ */
+
+ header.page-header {
+ @apply border-b border-slate-300;
+
+ > h1 {
+ @apply text-3xl leading-loose font-bold text-slate-900;
+ }
+
+ > p {
+ @apply mb-3;
+ }
+ }
}
/*
The components layer is for class-based styles that you want to be able to override with utilities.
*/
@layer components {
-
- #site-header {
- @apply py-8 block px-3 bg-black text-white print:hidden;
- }
-
- #site-header nav ul {
- @apply flex gap-3;
- }
-
- #site-content {
- @apply grid grid-cols-1 lg:grid-cols-5 gap-12;
- }
-
- aside#primary-sidebar {
- @apply col-span-1;
- }
-
- aside#primary-sidebar nav {
- @apply flex flex-col md:flex-row lg:flex-col;
- }
- aside#primary-sidebar .menu {
- @apply flex-1;
- }
-
- aside#primary-sidebar .menu h2 {
- @apply font-bold;
- }
-
- aside#secondary-sidebar {
- @apply col-span-1;
- }
-
- section#content-wrapper {
- @apply col-span-4;
- }
-
.divider {
@apply flex items-center my-8 before:flex-1 after:flex-1 before:content-[''] after:content-[''] before:p-[0.5px] after:p-[0.5px] w-full mx-auto last:hidden;
}
diff --git a/assets/css/gruvbox.css b/assets/css/gruvbox.css
deleted file mode 100644
index d82083e..0000000
--- a/assets/css/gruvbox.css
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- Theme: Gruvbox dark, hard
- Author: Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)
- License: ~ MIT (or more permissive) [via base16-schemes-source]
- Maintainer: @highlightjs/core-team
- Version: 2021.09.0
-*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#d5c4a1;background:#1d2021}.hljs ::selection,.hljs::selection{background-color:#504945;color:#d5c4a1}.hljs-comment{color:#665c54}.hljs-tag{color:#bdae93}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#d5c4a1}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#fb4934}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#fe8019}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#fabd2f}.hljs-strong{font-weight:700;color:#fabd2f}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#b8bb26}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#8ec07c}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#83a598}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#d3869b}.hljs-emphasis{color:#d3869b;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#d65d0e}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
\ No newline at end of file
diff --git a/assets/css/reset.css b/assets/css/reset.css
deleted file mode 100644
index b37fa30..0000000
--- a/assets/css/reset.css
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- 1. Use a more-intuitive box-sizing model.
-*/
-*, *::before, *::after {
- box-sizing: border-box;
-}
-/*
- 2. Remove default margin
-*/
-* {
- margin: 0;
-}
-/*
- 3. Allow percentage-based heights in the application
-*/
-html, body {
- height: 100%;
-}
-/*
- Typographic tweaks!
- 4. Add accessible line-height
- 5. Improve text rendering
-*/
-body {
- line-height: 1.5;
- -webkit-font-smoothing: antialiased;
-}
-/*
- 6. Improve media defaults
-*/
-img, picture, video, canvas, svg {
- display: block;
- max-width: 100%;
-}
-/*
- 7. Remove built-in form typography styles
-*/
-input, button, textarea, select {
- font: inherit;
-}
-/*
- 8. Avoid text overflows
-*/
-p, h1, h2, h3, h4, h5, h6 {
- overflow-wrap: break-word;
-}
-/*
- 9. Create a root stacking context
-*/
-#root, #__next {
- isolation: isolate;
-}
\ No newline at end of file
diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js
index bd0de9d..496bda4 100644
--- a/assets/tailwind.config.js
+++ b/assets/tailwind.config.js
@@ -14,7 +14,12 @@ module.exports = {
],
darkMode: ['class', '[data-mode="dark"]'],
theme: {
- container: { center: true }
+ container: { center: true },
+ extend: {
+ colors: {
+ primary: colors.pink
+ }
+ }
},
plugins: [
require("@tailwindcss/forms"),
diff --git a/lib/chiya/tags.ex b/lib/chiya/tags.ex
index 566b363..2d2d382 100644
--- a/lib/chiya/tags.ex
+++ b/lib/chiya/tags.ex
@@ -8,7 +8,7 @@ defmodule Chiya.Tags do
alias Chiya.Tags.Tag
- @preloads [notes: [:tags]]
+ @preloads [notes: [tags: [:notes]]]
defp with_preloads(query), do: preload(query, ^@preloads)
@doc """
diff --git a/lib/chiya_web/components/layouts/root_public.html.heex b/lib/chiya_web/components/layouts/root_public.html.heex
index f1cc13b..183627f 100644
--- a/lib/chiya_web/components/layouts/root_public.html.heex
+++ b/lib/chiya_web/components/layouts/root_public.html.heex
@@ -74,20 +74,26 @@
@@ -139,13 +131,5 @@
<%= @profile.bio %>
<% end %>
-
-