diff --git a/assets/less/base/base.less b/assets/less/base/base.less new file mode 100644 index 00000000..ab7a15e6 --- /dev/null +++ b/assets/less/base/base.less @@ -0,0 +1,18 @@ +h1, h2, h3 { + @apply .mb-2; +} + +.content { + h2, + h3 { + @apply .mt-6; + } +} + +p, +ul, +ol, +table, +pre { + @apply .mb-4; +} diff --git a/assets/less/base/images.less b/assets/less/base/images.less new file mode 100644 index 00000000..dc9b2fb2 --- /dev/null +++ b/assets/less/base/images.less @@ -0,0 +1,7 @@ +img.with-border { + @apply .border .border-solid .border-grey-light; +} + +svg { + fill: currentColor; +} diff --git a/assets/less/components/blockquote.less b/assets/less/components/blockquote.less new file mode 100644 index 00000000..7fb56095 --- /dev/null +++ b/assets/less/components/blockquote.less @@ -0,0 +1,3 @@ +blockquote { + @apply .border-l-4 .border-blue .pl-4; +} diff --git a/assets/less/components/button.less b/assets/less/components/button.less new file mode 100644 index 00000000..91ba5e95 --- /dev/null +++ b/assets/less/components/button.less @@ -0,0 +1,13 @@ +.button { + @apply .bg-blue; + @apply .inline-block; + @apply .rounded; + @apply .text-white; + @apply .px-4; + @apply .py-2; + + &:active, + &:hover { + @apply .bg-blue-dark; + } +} diff --git a/assets/less/components/link.less b/assets/less/components/link.less new file mode 100644 index 00000000..00e5be33 --- /dev/null +++ b/assets/less/components/link.less @@ -0,0 +1,3 @@ +.link { + @apply .text-blue; +} diff --git a/assets/less/components/markdown.less b/assets/less/components/markdown.less new file mode 100644 index 00000000..d938d530 --- /dev/null +++ b/assets/less/components/markdown.less @@ -0,0 +1,31 @@ +.markdown { + p, + li { + a { + @apply .link; + } + } + + p, + li { + code { + @apply .bg-grey-lighter .inline-block .font-mono .text-xs; + padding: 1px 3px; + } + } + + pre code, + pre code.hljs, + .hljs { + @apply .bg-grey-lighter; + @apply .block; + @apply .border-grey-dark; + @apply .border-l-4; + @apply .font-mono; + @apply .leading-loose; + @apply .overflow-x-scroll; + @apply .p-4; + @apply .rounded; + @apply .text-xs; + } +} diff --git a/assets/less/components/note.less b/assets/less/components/note.less new file mode 100644 index 00000000..8840c2cf --- /dev/null +++ b/assets/less/components/note.less @@ -0,0 +1,16 @@ +.note { + @apply .bg-blue-lighter; + @apply .border-blue; + @apply .border-l-4; + @apply .mb-4; + @apply .p-4; + @apply .rounded; + + & > *:last-child { + @apply .mb-0; + } + + p a { + @apply .text-black; + } +} diff --git a/assets/less/components/post.less b/assets/less/components/post.less deleted file mode 100644 index 6f561c5b..00000000 --- a/assets/less/components/post.less +++ /dev/null @@ -1,31 +0,0 @@ -pre code, -pre code.hljs, -.hljs { - @apply .p-4; - @apply .text-sm; - @apply .border-l-4; - @apply .border-grey-dark; - @apply .block; - @apply .bg-grey-lighter; - @apply .overflow-x-scroll; - @apply .font-mono; -} - -p, -li { - code { - @apply .bg-grey-lighter .inline-block .font-mono; - padding: 1px 3px; - } -} - -.note { - @apply .bg-blue-lighter; - @apply .p-4; - @apply .border-l-4; - @apply .border-blue; -} - -.note > *:last-child { - @apply .mb-0; -} diff --git a/assets/less/components/post/about-author.less b/assets/less/components/post/about-author.less deleted file mode 100644 index 9cc47e8b..00000000 --- a/assets/less/components/post/about-author.less +++ /dev/null @@ -1,4 +0,0 @@ -.about-author { - @apply .mr-4 .float-left .rounded-full; - width: 75px; -} diff --git a/assets/less/components/post/code.less b/assets/less/components/post/code.less index 25aa58e6..e69de29b 100644 --- a/assets/less/components/post/code.less +++ b/assets/less/components/post/code.less @@ -1,22 +0,0 @@ -p, -li { - code { - @apply .bg-grey-lighter .inline-block .font-mono .text-xs; - padding: 1px 3px; - } -} - -pre code, -pre code.hljs, -.hljs { - @apply .bg-grey-lighter; - @apply .block; - @apply .border-grey-dark; - @apply .border-l-4; - @apply .font-mono; - @apply .leading-loose; - @apply .overflow-x-scroll; - @apply .p-4; - @apply .rounded; - @apply .text-xs; -} diff --git a/assets/less/components/testimonial.less b/assets/less/components/testimonial.less deleted file mode 100644 index e2913e53..00000000 --- a/assets/less/components/testimonial.less +++ /dev/null @@ -1,5 +0,0 @@ -.testimonial-image { - @apply .rounded-full .mb-3 .ml-3; - height: 65px; - width: 65px; -} diff --git a/assets/less/site.less b/assets/less/site.less index 41c992d1..8fece3fd 100644 --- a/assets/less/site.less +++ b/assets/less/site.less @@ -3,79 +3,14 @@ @tailwind preflight; -p, -li, -td { - a { - @apply .text-blue; - } -} - -.button { - @apply .bg-blue; - @apply .inline-block; - @apply .rounded; - @apply .text-white; - @apply .px-4; - @apply .py-2; - - &:active, - &:hover { - @apply .bg-blue-dark; - } -} - -blockquote { - @apply .border-l-4 .border-blue .pl-4; -} - -img.with-border { - @apply .border .border-solid .border-grey-light; -} - -h1, h2, h3 { - @apply .mb-2; -} - -.content { - h2, - h3 { - @apply .mt-6; - } -} - -p, -ul, -ol, -table, -pre, -.note { - @apply .mb-4; -} - -a { - @apply .text-grey-darkest; - text-decoration: none; -} - -main a:not(.button) { - text-decoration: underline; -} - -.bullets, -main ul { - list-style: disc; - @apply .pl-4; -} - -svg { - fill: currentColor; -} +@import 'base/base'; +@import 'base/images'; +@import 'components/button'; +@import 'components/link'; @import 'components/listing'; -@import 'components/post'; -@import 'components/post/about-author'; -@import 'components/post/code'; +@import 'components/markdown'; +@import 'components/note'; @import 'components/table'; @import 'components/talk/slides'; @import 'components/talk/video'; diff --git a/source/_layouts/default.html.twig b/source/_layouts/default.html.twig index e3387394..641bf68d 100644 --- a/source/_layouts/default.html.twig +++ b/source/_layouts/default.html.twig @@ -30,13 +30,13 @@ {% endfor %} -
+