diff --git a/assets/css/app.scss b/assets/css/app.scss index d0386d8..8b6417b 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -1,8 +1,10 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + @import "app/config"; -@import "~wire.css/dist/wire.css"; -@import "~tingle.js/src/tingle.css"; @import 'app/prism'; -@import 'app/alert'; +@import "app/typo"; @font-face { font-family: "MainFont"; @@ -46,7 +48,7 @@ html, body { } body { - font-size: 1.7em; + // font-size: 1.7em; } $dicons: coffee server search project share contact list response twitter diaspora github code rss linkedin mastodon pixelfed gpg matrix murph cube link; @@ -59,6 +61,12 @@ $dicons: coffee server search project share contact list response twitter diaspo text-align: right; } +.list--inline { + li { + display: inline-block; + } +} + .deblan-icon { font-family: 'deblan-icon'; vertical-align: middle; @@ -102,77 +110,77 @@ pre[class*="language-"] { border-radius: 0 !important; } -.page { +.blog { min-height: 100vh; background: $color-white; font-family: "MainFont"; } -.form .field { - input[type=text], - input[type=email], - input[type=url], - textarea { - border-radius: 10px; +// .form .field { +// input[type=text], +// input[type=email], +// input[type=url], +// textarea { +// border-radius: 10px; +// } +// +.captcha_reload { + width: 50px !important; + padding-left: 50px; + height: 50px; + overflow: hidden; + display: inline-block; + margin-bottom: -19px; + + &:active, &:focus { + background: none; } - .captcha_reload { - width: 50px !important; - padding-left: 50px; + &::after { + content: ' '; + display: block; + width: 50px; height: 50px; - overflow: hidden; - display: inline-block; - margin-bottom: -19px; - - &:active, &:focus { - background: none; - } - - &::after { - content: ' '; - display: block; - width: 50px; - height: 50px; - margin-left: -50px; - margin-top: -23px; - background: url(../images/Refresh_icon.svg); - } - } - - &-captcha { - label { - display: block; - } - - img { - vertical-align: middle; - margin-right: 5px; - border-radius: 10px; - width: auto; - } - - input { - display: inline-block; - width: 100px !important; - height: 50px !important; - margin-bottom: -1px; - margin-left: 5px; - } - - .form-error-icon { - display: none; - } - - .form-error-message { - display: block; - color: red; - } + margin-left: -50px; + margin-top: -23px; + background: url(../images/Refresh_icon.svg); } } +// +// &-captcha { +// label { +// display: block; +// } +// +// img { +// vertical-align: middle; +// margin-right: 5px; +// border-radius: 10px; +// width: auto; +// } +// +// input { +// display: inline-block; +// width: 100px !important; +// height: 50px !important; +// margin-bottom: -1px; +// margin-left: 5px; +// } +// +// .form-error-icon { +// display: none; +// } +// +// .form-error-message { +// display: block; +// color: red; +// } +// } +// } -.button, .btn, input[type="submit"], input[type="button"] { - border-radius: 10px; -} +// .button, .btn, input[type="submit"], input[type="button"] { +// border-radius: 10px; +// } .no-margin { margin: 0; @@ -295,13 +303,7 @@ pre[class*="language-"] { padding: 30px 40px; margin: auto; text-align: center; - background: rgba(255, 255, 255, 0.06); - animation: morph 15s linear infinite alternate, spin 20s linear infinite; z-index: 1000; - will-change: border-radius, transform; - transform-origin: 55% 55%; - animation: HeaderMorph 10s linear infinite alternate, spin 26s linear infinite reverse; - transform-origin: 20% 20%; } .header-shadow { @@ -341,13 +343,17 @@ pre[class*="language-"] { .content { background: $color-content-background; width: calc(100% - 230px); + + > .content-wrapper { + min-height: calc(100vh - 105px); + } } .header { color: $color-header-text; p, h1, ul { - position: relative; + position: relative !important; z-index: 1000; } @@ -500,6 +506,10 @@ pre[class*="language-"] { img { width: auto; } + + *:first-child { + margin-top: 0; + } } @for $i from 1 through 6 { @@ -512,10 +522,9 @@ pre[class*="language-"] { .review { width: 100%; - .review-avatar { - display: inline-block; + .review-avatar, .review-avatar img { width: 60px; - margin-right: 10px; + max-width: 60px; } &.review--post { @@ -598,6 +607,10 @@ pre[class*="language-"] { .body-content { line-height: 30px; + + ul { + list-style: initial; + } } .quick { @@ -742,6 +755,7 @@ pre[class*="language-"] { width: 25px; overflow: hidden; color: $color-white; + text-decoration: none; span { display: none; @@ -777,11 +791,6 @@ $links: ( } } -.form .field input[type="checkbox"] + label, .form .field input[type="radio"] + label { - margin-left: 1rem; - margin-top: -2px; -} - .preview-button { cursor: pointer; margin-left: 3px; @@ -804,38 +813,65 @@ $links: ( } } -.button, .btn, input[type="submit"], input[type="button"] { - background: $color-blue; -} - -.button:hover, .btn:hover, input:hover[type="submit"], input:hover[type="button"] { - background: $color-blue2; -} - -.button:focus, .btn:focus, input:focus[type="submit"], input:focus[type="button"] { - background: $color-blue2; -} +// .button, .btn, input[type="submit"], input[type="button"] { +// background: $color-blue; +// } +// +// .button:hover, .btn:hover, input:hover[type="submit"], input:hover[type="button"] { +// background: $color-blue2; +// } +// +// .button:focus, .btn:focus, input:focus[type="submit"], input:focus[type="button"] { +// background: $color-blue2; +// } +// +// .pager { +// padding: 20px 20px 0 20px; +// text-align: center; +// +// .pager-page { +// padding: 0 2px 2px 2px; +// +// &.active { +// .button { +// color: #000; +// font-weight: bold; +// } +// } +// } +// +// .button { +// padding: 8px; +// } +// } .pager { - padding: 20px 20px 0 20px; text-align: center; - .pager-page { - padding: 0 2px 2px 2px; + .btn-md { + padding-left: 0; + padding-right: 0; - &.active { - .button { - color: #000; - font-weight: bold; - } + a { + display: block; + padding-left: 1rem; + padding-right: 1rem; + line-height: 3rem; } } - - .button { - padding: 8px; - } } +.card figure { + a { + display: block; + width: 100%; + } + + img { + height: 200px; + width: 100%; + } +} @keyframes bounceIn { 0%{ @@ -886,87 +922,80 @@ $links: ( } } -.tingle-modal-box--mesh { - .tingle-modal-box__content { +.modal-mesh { + iframe { + margin: 0; padding: 0; - line-height: 0; - - iframe { - margin: 0; - padding: 0; - height: 90vh; - width: 100%; - } + height: 80vh; + width: 100%; } } -.card { - border: 1px solid $color-hr-border; - border-radius: 10px; - margin: 20px; - - &-preview { - img { - border-top-left-radius: 10px; - border-top-right-radius: 10px; - width: 100%; - } - } - - &-title { - font-size: 20px; - padding: 10px; - color: $color-body-text; - } - - &-description { - padding-left: 10px; - padding-right: 10px; - } - - &-file { - ul { - margin-top: 0; - } - - li { - padding-left: 0; - } - } - - .button { - margin-top: 4px; - } -} - - -.cards { - padding: 0 20px 20px 20px; - - &--posts { - padding-left: 0; - padding-right: 0; - - .card-preview { - img { - max-height: 200px; - width: 100%; - } - } - - .row > .col-4:nth-child(1) .card { - margin-left: 0; - } - - .row > .col-4:nth-child(3) .card { - margin-right: 0; - } - } -} +// .card { +// border: 1px solid $color-hr-border; +// border-radius: 10px; +// margin: 20px; +// +// &-preview { +// img { +// border-top-left-radius: 10px; +// border-top-right-radius: 10px; +// width: 100%; +// } +// } +// +// &-title { +// font-size: 20px; +// padding: 10px; +// color: $color-body-text; +// } +// +// &-description { +// padding-left: 10px; +// padding-right: 10px; +// } +// +// &-file { +// ul { +// margin-top: 0; +// } +// +// li { +// padding-left: 0; +// } +// } +// +// .button { +// margin-top: 4px; +// } +// } +// +// +// .cards { +// padding: 0 20px 20px 20px; +// +// &--posts { +// padding-left: 0; +// padding-right: 0; +// +// .card-preview { +// img { +// max-height: 200px; +// width: 100%; +// } +// } +// +// .row > .col-4:nth-child(1) .card { +// margin-left: 0; +// } +// +// .row > .col-4:nth-child(3) .card { +// margin-right: 0; +// } +// } +// } .ejs-link { - border: 2px solid $color-very-light-grey; - border-radius: 5px; margin: 10px auto; &--anchor { @@ -1155,109 +1184,42 @@ $links: ( } } +.bg-box { + background: #fbfcff; +} + @media (prefers-color-scheme: dark) { + .bg-box { + background: #343c53; + } + + .body, .review-body { + a:not(.button), h1, h2, h3, h4, h5, p, ul { + color: #fff; + } + + p a, ul a { + border-bottom: 2px dotted $color-blue2; + } + + blockquote { + border-left: 2px solid $color-blockquote-border; + } + + code { + color: $code-color; + } + } + .content { background: #242b3d; } - .body, .review, #form { - a, h1, h2, h3, h4, h5, p, ul, li, label, th, td, - .h1, .h2, .h3, .h4, .h5, .review-body { - color: #fff !important; - } - } - - .review .review-header .review-anchor-link { - color: #ccc; - } - - .body p a, .body ul a { - border-bottom: 2px dotted $color-white; - } - - .body p strong, .body ul strong { - background: rgba(255, 255, 255, 0.1); - } - - .body .pager a { - border-bottom: 0; - } - - img.border { - border-color: #32333b; - } - - .form .field { - input[type=text], - input[type=email], - input[type=url], - textarea { - border-color: #32333b; - background: #86899f; - } - } - .content hr, .content .hr { background: none; - } - - .quick-body, - .quick-video .video-ratio, - .quick-image img, - .content hr, .content .hr, - .ejs-link, - .alert - { border-color: darken($color-wide-menu-background-to, 10%) !important; } - .quick-body { - background: $color-wide-menu-background-to; - } - - .ejs-link { - background: $color-wide-menu-background-to; - } - - .code-title { - background: #000000; - } - - .code-window { - background: #000000 url('../images/window.svg') no-repeat center right; - } - - .body pre { - background: #141414; - } - - .body pre[class*="language-"], .code-title { - border: 1px solid #000000; - border-radius: 0; - } - - .body pre { - &.with-title { - border: 3px solid #000; - } - } - - .card { - border-color: #86899f; - - &-title { - color: #fff; - } - - &-description { - color: #fff; - } - } - - .review.review--post { - border-color: #86899f; - } - .header-shadow { background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(255,255,255,0) 100%); } diff --git a/assets/css/app/config.scss b/assets/css/app/config.scss index fd8202f..d6f2d07 100644 --- a/assets/css/app/config.scss +++ b/assets/css/app/config.scss @@ -41,3 +41,7 @@ $color-code-mark-background: $color-light-blue; $color-code-title-background: #3c3c3c; $color-code-title-text: #999; /* --- */ + +:root { + --p: 195 77% 41%; +} diff --git a/assets/css/app/typo.scss b/assets/css/app/typo.scss new file mode 100644 index 0000000..f30e27b --- /dev/null +++ b/assets/css/app/typo.scss @@ -0,0 +1,76 @@ +// .h1, +// .h2, +// .h3, +// .h4, +// .h5, +// .h6, +// h1, +// h2, +// h3, +// h4, +// h5, +// h6 { +// font-weight: 600; +// margin-bottom: 1rem; +// margin-top: 0 +// } +// +.h1, h1 { + font-size: 3.2rem; + line-height: 1.32 +} + +.h2, h2 { + font-size: 2.6rem; + line-height: 1.35 +} + +.h3, h3 { + font-size: 2.0rem; + line-height: 1.45 +} + +.h4, h4 { + font-size: 1.4rem; + line-height: 1.6 +} + +.h5, h5 { + font-size: 1.1rem; + line-height: 1.75 +} + +.h6, h6 { + font-size: 1.0rem; + line-height: 1.9 +} +// +// p { +// margin-top: 17px; +// margin-bottom: 17px; +// } +// +// .list--inline { +// li { +// display: inline-block; +// } +// } + + +.h1, +.h2, +.h3, +.h4, +.h5, +.h6, +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 600; + margin-bottom: 1rem; + margin-top: 0 +} + diff --git a/assets/js/app/code.js b/assets/js/app/code.js index ad388c6..a2a0d3b 100644 --- a/assets/js/app/code.js +++ b/assets/js/app/code.js @@ -90,11 +90,10 @@ class Code { pre.classList.add('with-title') const win = this.window.document.createElement('div') win.classList.add('code-window') - win.textContent = 'Console' post.insertBefore(win, pre) } } } -module.exports = Code \ No newline at end of file +module.exports = Code diff --git a/assets/js/app/px-image.js b/assets/js/app/px-image.js index a74fd0e..71cc15d 100644 --- a/assets/js/app/px-image.js +++ b/assets/js/app/px-image.js @@ -6,7 +6,7 @@ class PxImage { init() { const doc = this.window.document - const images = doc.querySelectorAll('.quick-image img, .card-preview img') + const images = doc.querySelectorAll('.quick-image img, .card figure img') for (let i = 0, len = images.length; i < len; i++) { (function(image) { diff --git a/package.json b/package.json index b0398ea..2244b51 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "build": "encore production" }, "dependencies": { + "daisyui": "^2.31.0", "encore": "^0.0.30-beta", "flatpickr": "^4.6.9", "lozad": "^1.16.0", @@ -21,5 +22,12 @@ "vanillajs-datepicker": "^1.1.4", "vue": "^2.6.14", "wire.css": "^1.2.5" + }, + "devDependencies": { + "@tailwindcss/typography": "^0.5.7", + "autoprefixer": "^10.4.12", + "postcss": "^8.4.16", + "postcss-loader": "^7.0.1", + "tailwindcss": "^3.1.8" } } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..42d8cd2 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,21 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./assets/**/*.js", + "./templates/**/*.html.twig", + ], + theme: { + extend: { + }, + }, + plugins: [ + require("daisyui"), + require('@tailwindcss/typography'), + ], + daisyui: { + themes: [ + "light", + "dark", + ], + }, +} diff --git a/templates/base.html.twig b/templates/base.html.twig index a3e7d9f..31dbc47 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -68,11 +68,11 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -
+
{{ include('module/_navigation.html.twig') }}
-
+
@@ -96,28 +96,32 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-
- {% set flashes = app.flashes %} - - {% if flashes|length %} + {% set flashes = app.flashes %} + {% if flashes|length %} +
+ {% set classes = { + info: 'alert-info', + success: 'alert-success', + warning: 'alert-warning', + error: 'alert-error', + } %} {% for level, messages in flashes %} {% for message in messages %} -
+
{{- message|nl2br -}}
{% endfor %} {% endfor %} - {% endif %} -
+
+ {% endif %} {% block body %} {% endblock %}
-
- -
diff --git a/templates/bot/form_without_javascript.html.twig b/templates/bot/form_without_javascript.html.twig index a72110a..beec9ad 100644 --- a/templates/bot/form_without_javascript.html.twig +++ b/templates/bot/form_without_javascript.html.twig @@ -31,7 +31,7 @@ {% endfor %} - +
diff --git a/templates/editorjs/link.html.twig b/templates/editorjs/link.html.twig index aedba76..fde875d 100644 --- a/templates/editorjs/link.html.twig +++ b/templates/editorjs/link.html.twig @@ -1,9 +1,9 @@ {% block render %} -