From 00415c3404362c5464afc372f8a3ccaef455cba3 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Wed, 5 Oct 2022 16:12:21 +0200 Subject: [PATCH 01/10] empieza la branch --- src/app.css | 797 +++++++++++++++++---------------- src/lib/preview/Preview.svelte | 2 +- src/routes/[slug]/+page.svelte | 2 +- 3 files changed, 401 insertions(+), 400 deletions(-) diff --git a/src/app.css b/src/app.css index 40fd199..2a2a434 100644 --- a/src/app.css +++ b/src/app.css @@ -1,90 +1,91 @@ @import '@fontsource/fira-mono'; * { - box-sizing: border-box; - margin: 0; - padding: 0; + box-sizing: border-box; + margin: 0; + padding: 0; + font-size: 16px; } :root { - font-family: Ubuntu, Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, + font-family: Ubuntu, Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - --font-mono: 'Fira Mono', monospace; - --pure-white: #ffffff; - --primary-color: #b9c6d2; - --secondary-color: #d0dde9; - --tertiary-color: #edf0f8; - --accent-color: #ff3e00; - --heading-color: rgba(0, 0, 0, 0.7); - --text-color: #444444; - --background-without-opacity: rgba(255, 255, 255, 0.7); - --column-width: 42rem; - --column-margin-top: 4rem; + --font-mono: 'Fira Mono', monospace; + --pure-white: #ffffff; + --primary-color: #b9c6d2; + --secondary-color: #d0dde9; + --tertiary-color: #edf0f8; + --accent-color: #ff3e00; + --heading-color: rgba(0, 0, 0, 0.7); + --text-color: #444444; + --background-without-opacity: rgba(255, 255, 255, 0.7); + --column-width: 42rem; + --column-margin-top: 4rem; } body { - min-height: 100vh; - margin: 0; + min-height: 100vh; + margin: 0; } p { - line-height: 1.5; + line-height: 1.5; } ul,ol { -margin-left: 1rem; + margin-left: 1rem; } /* Quill css */ /*! - * * Quill Editor v1.3.6 - * * https://quilljs.com/ - * * Copyright (c) 2014, Jason Chen - * * Copyright (c) 2013, salesforce.com - * */ +* * Quill Editor v1.3.6 +* * https://quilljs.com/ +* * Copyright (c) 2014, Jason Chen +* * Copyright (c) 2013, salesforce.com +* */ .ql-container { - box-sizing: border-box; - font-family: Helvetica, Arial, sans-serif; - font-size: 13px; - height: 100%; - margin: 0px; - position: relative; + box-sizing: border-box; + font-family: Helvetica, Arial, sans-serif; + font-size: 13px; + height: 100%; + margin: 0px; + position: relative; } .ql-container.ql-disabled .ql-tooltip { - visibility: hidden; + visibility: hidden; } .ql-container.ql-disabled .ql-editor ul[data-checked] > li::before { - pointer-events: none; + pointer-events: none; } .ql-clipboard { - left: -100000px; - height: 1px; - overflow-y: hidden; - position: absolute; - top: 50%; + left: -100000px; + height: 1px; + overflow-y: hidden; + position: absolute; + top: 50%; } .ql-clipboard p { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } .ql-editor { - min-height: 8rem; - box-sizing: border-box; - line-height: 1.42; - height: 100%; - outline: none; - overflow-y: auto; - padding: 12px 15px; - tab-size: 4; - -moz-tab-size: 4; - text-align: left; - white-space: pre-wrap; - word-wrap: break-word; + min-height: 8rem; + box-sizing: border-box; + line-height: 1.42; + height: 100%; + outline: none; + overflow-y: auto; + padding: 12px 15px; + tab-size: 4; + -moz-tab-size: 4; + text-align: left; + white-space: pre-wrap; + word-wrap: break-word; } .ql-editor > * { - cursor: text; + cursor: text; } .ql-editor p, .ql-editor ol, @@ -97,374 +98,374 @@ margin-left: 1rem; .ql-editor h4, .ql-editor h5, .ql-editor h6 { - margin: 0; - padding: 0; - counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; + margin: 0; + padding: 0; + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; } .ql-editor ol, .ql-editor ul { - padding-left: 1.5em; + padding-left: 1.5em; } .ql-editor ol > li, .ql-editor ul > li { - list-style-type: none; + list-style-type: none; } .ql-editor ul > li::before { - content: '\2022'; + content: '\2022'; } .ql-editor ul[data-checked=true], .ql-editor ul[data-checked=false] { - pointer-events: none; + pointer-events: none; } .ql-editor ul[data-checked=true] > li *, .ql-editor ul[data-checked=false] > li * { - pointer-events: all; + pointer-events: all; } .ql-editor ul[data-checked=true] > li::before, .ql-editor ul[data-checked=false] > li::before { - color: #777; - cursor: pointer; - pointer-events: all; + color: #777; + cursor: pointer; + pointer-events: all; } .ql-editor ul[data-checked=true] > li::before { - content: '\2611'; + content: '\2611'; } .ql-editor ul[data-checked=false] > li::before { - content: '\2610'; + content: '\2610'; } .ql-editor li::before { - display: inline-block; - white-space: nowrap; - width: 1.2em; + display: inline-block; + white-space: nowrap; + width: 1.2em; } .ql-editor li:not(.ql-direction-rtl)::before { - margin-left: -1.5em; - margin-right: 0.3em; - text-align: right; + margin-left: -1.5em; + margin-right: 0.3em; + text-align: right; } .ql-editor li.ql-direction-rtl::before { - margin-left: 0.3em; - margin-right: -1.5em; + margin-left: 0.3em; + margin-right: -1.5em; } .ql-editor ol li:not(.ql-direction-rtl), .ql-editor ul li:not(.ql-direction-rtl) { - padding-left: 1.5em; + padding-left: 1.5em; } .ql-editor ol li.ql-direction-rtl, .ql-editor ul li.ql-direction-rtl { - padding-right: 1.5em; + padding-right: 1.5em; } .ql-editor ol li { - counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; - counter-increment: list-0; + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; + counter-increment: list-0; } .ql-editor ol li:before { - content: counter(list-0, decimal) '. '; + content: counter(list-0, decimal) '. '; } .ql-editor ol li.ql-indent-1 { - counter-increment: list-1; + counter-increment: list-1; } .ql-editor ol li.ql-indent-1:before { - content: counter(list-1, lower-alpha) '. '; + content: counter(list-1, lower-alpha) '. '; } .ql-editor ol li.ql-indent-1 { - counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; + counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9; } .ql-editor ol li.ql-indent-2 { - counter-increment: list-2; + counter-increment: list-2; } .ql-editor ol li.ql-indent-2:before { - content: counter(list-2, lower-roman) '. '; + content: counter(list-2, lower-roman) '. '; } .ql-editor ol li.ql-indent-2 { - counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9; + counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9; } .ql-editor ol li.ql-indent-3 { - counter-increment: list-3; + counter-increment: list-3; } .ql-editor ol li.ql-indent-3:before { - content: counter(list-3, decimal) '. '; + content: counter(list-3, decimal) '. '; } .ql-editor ol li.ql-indent-3 { - counter-reset: list-4 list-5 list-6 list-7 list-8 list-9; + counter-reset: list-4 list-5 list-6 list-7 list-8 list-9; } .ql-editor ol li.ql-indent-4 { - counter-increment: list-4; + counter-increment: list-4; } .ql-editor ol li.ql-indent-4:before { - content: counter(list-4, lower-alpha) '. '; + content: counter(list-4, lower-alpha) '. '; } .ql-editor ol li.ql-indent-4 { - counter-reset: list-5 list-6 list-7 list-8 list-9; + counter-reset: list-5 list-6 list-7 list-8 list-9; } .ql-editor ol li.ql-indent-5 { - counter-increment: list-5; + counter-increment: list-5; } .ql-editor ol li.ql-indent-5:before { - content: counter(list-5, lower-roman) '. '; + content: counter(list-5, lower-roman) '. '; } .ql-editor ol li.ql-indent-5 { - counter-reset: list-6 list-7 list-8 list-9; + counter-reset: list-6 list-7 list-8 list-9; } .ql-editor ol li.ql-indent-6 { - counter-increment: list-6; + counter-increment: list-6; } .ql-editor ol li.ql-indent-6:before { - content: counter(list-6, decimal) '. '; + content: counter(list-6, decimal) '. '; } .ql-editor ol li.ql-indent-6 { - counter-reset: list-7 list-8 list-9; + counter-reset: list-7 list-8 list-9; } .ql-editor ol li.ql-indent-7 { - counter-increment: list-7; + counter-increment: list-7; } .ql-editor ol li.ql-indent-7:before { - content: counter(list-7, lower-alpha) '. '; + content: counter(list-7, lower-alpha) '. '; } .ql-editor ol li.ql-indent-7 { - counter-reset: list-8 list-9; + counter-reset: list-8 list-9; } .ql-editor ol li.ql-indent-8 { - counter-increment: list-8; + counter-increment: list-8; } .ql-editor ol li.ql-indent-8:before { - content: counter(list-8, lower-roman) '. '; + content: counter(list-8, lower-roman) '. '; } .ql-editor ol li.ql-indent-8 { - counter-reset: list-9; + counter-reset: list-9; } .ql-editor ol li.ql-indent-9 { - counter-increment: list-9; + counter-increment: list-9; } .ql-editor ol li.ql-indent-9:before { - content: counter(list-9, decimal) '. '; + content: counter(list-9, decimal) '. '; } .ql-editor .ql-indent-1:not(.ql-direction-rtl) { - padding-left: 3em; + padding-left: 3em; } .ql-editor li.ql-indent-1:not(.ql-direction-rtl) { - padding-left: 4.5em; + padding-left: 4.5em; } .ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right { - padding-right: 3em; + padding-right: 3em; } .ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right { - padding-right: 4.5em; + padding-right: 4.5em; } .ql-editor .ql-indent-2:not(.ql-direction-rtl) { - padding-left: 6em; + padding-left: 6em; } .ql-editor li.ql-indent-2:not(.ql-direction-rtl) { - padding-left: 7.5em; + padding-left: 7.5em; } .ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right { - padding-right: 6em; + padding-right: 6em; } .ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right { - padding-right: 7.5em; + padding-right: 7.5em; } .ql-editor .ql-indent-3:not(.ql-direction-rtl) { - padding-left: 9em; + padding-left: 9em; } .ql-editor li.ql-indent-3:not(.ql-direction-rtl) { - padding-left: 10.5em; + padding-left: 10.5em; } .ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right { - padding-right: 9em; + padding-right: 9em; } .ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right { - padding-right: 10.5em; + padding-right: 10.5em; } .ql-editor .ql-indent-4:not(.ql-direction-rtl) { - padding-left: 12em; + padding-left: 12em; } .ql-editor li.ql-indent-4:not(.ql-direction-rtl) { - padding-left: 13.5em; + padding-left: 13.5em; } .ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right { - padding-right: 12em; + padding-right: 12em; } .ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right { - padding-right: 13.5em; + padding-right: 13.5em; } .ql-editor .ql-indent-5:not(.ql-direction-rtl) { - padding-left: 15em; + padding-left: 15em; } .ql-editor li.ql-indent-5:not(.ql-direction-rtl) { - padding-left: 16.5em; + padding-left: 16.5em; } .ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right { - padding-right: 15em; + padding-right: 15em; } .ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right { - padding-right: 16.5em; + padding-right: 16.5em; } .ql-editor .ql-indent-6:not(.ql-direction-rtl) { - padding-left: 18em; + padding-left: 18em; } .ql-editor li.ql-indent-6:not(.ql-direction-rtl) { - padding-left: 19.5em; + padding-left: 19.5em; } .ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right { - padding-right: 18em; + padding-right: 18em; } .ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right { - padding-right: 19.5em; + padding-right: 19.5em; } .ql-editor .ql-indent-7:not(.ql-direction-rtl) { - padding-left: 21em; + padding-left: 21em; } .ql-editor li.ql-indent-7:not(.ql-direction-rtl) { - padding-left: 22.5em; + padding-left: 22.5em; } .ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right { - padding-right: 21em; + padding-right: 21em; } .ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right { - padding-right: 22.5em; + padding-right: 22.5em; } .ql-editor .ql-indent-8:not(.ql-direction-rtl) { - padding-left: 24em; + padding-left: 24em; } .ql-editor li.ql-indent-8:not(.ql-direction-rtl) { - padding-left: 25.5em; + padding-left: 25.5em; } .ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right { - padding-right: 24em; + padding-right: 24em; } .ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right { - padding-right: 25.5em; + padding-right: 25.5em; } .ql-editor .ql-indent-9:not(.ql-direction-rtl) { - padding-left: 27em; + padding-left: 27em; } .ql-editor li.ql-indent-9:not(.ql-direction-rtl) { - padding-left: 28.5em; + padding-left: 28.5em; } .ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right { - padding-right: 27em; + padding-right: 27em; } .ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right { - padding-right: 28.5em; + padding-right: 28.5em; } .ql-editor .ql-video { - display: block; - max-width: 100%; + display: block; + max-width: 100%; } .ql-editor .ql-video.ql-align-center { - margin: 0 auto; + margin: 0 auto; } .ql-editor .ql-video.ql-align-right { - margin: 0 0 0 auto; + margin: 0 0 0 auto; } .ql-editor .ql-bg-black { - background-color: #000; + background-color: #000; } .ql-editor .ql-bg-red { - background-color: #e60000; + background-color: #e60000; } .ql-editor .ql-bg-orange { - background-color: #f90; + background-color: #f90; } .ql-editor .ql-bg-yellow { - background-color: #ff0; + background-color: #ff0; } .ql-editor .ql-bg-green { - background-color: #008a00; + background-color: #008a00; } .ql-editor .ql-bg-blue { - background-color: #06c; + background-color: #06c; } .ql-editor .ql-bg-purple { - background-color: #93f; + background-color: #93f; } .ql-editor .ql-color-white { - color: #fff; + color: #fff; } .ql-editor .ql-color-red { - color: #e60000; + color: #e60000; } .ql-editor .ql-color-orange { - color: #f90; + color: #f90; } .ql-editor .ql-color-yellow { - color: #ff0; + color: #ff0; } .ql-editor .ql-color-green { - color: #008a00; + color: #008a00; } .ql-editor .ql-color-blue { - color: #06c; + color: #06c; } .ql-editor .ql-color-purple { - color: #93f; + color: #93f; } .ql-editor .ql-font-serif { - font-family: Georgia, Times New Roman, serif; + font-family: Georgia, Times New Roman, serif; } .ql-editor .ql-font-monospace { - font-family: Monaco, Courier New, monospace; + font-family: Monaco, Courier New, monospace; } .ql-editor .ql-size-small { - font-size: 0.75em; + font-size: 0.75em; } .ql-editor .ql-size-large { - font-size: 1.5em; + font-size: 1.5em; } .ql-editor .ql-size-huge { - font-size: 2.5em; + font-size: 2.5em; } .ql-editor .ql-direction-rtl { - direction: rtl; - text-align: inherit; + direction: rtl; + text-align: inherit; } .ql-editor .ql-align-center { - text-align: center; + text-align: center; } .ql-editor .ql-align-justify { - text-align: justify; + text-align: justify; } .ql-editor .ql-align-right { - text-align: right; + text-align: right; } .ql-editor.ql-blank::before { - color: rgba(0,0,0,0.6); - content: attr(data-placeholder); - font-style: italic; - left: 15px; - pointer-events: none; - position: absolute; - right: 15px; + color: rgba(0,0,0,0.6); + content: attr(data-placeholder); + font-style: italic; + left: 15px; + pointer-events: none; + position: absolute; + right: 15px; } .ql-snow.ql-toolbar:after, .ql-snow .ql-toolbar:after { - clear: both; - content: ''; - display: table; + clear: both; + content: ''; + display: table; } .ql-snow.ql-toolbar button, .ql-snow .ql-toolbar button { - background: none; - border: none; - cursor: pointer; - display: block; - float: left; - height: 24px; - padding: 3px 5px; - width: 28px; + background: none; + border: none; + cursor: pointer; + display: block; + float: left; + height: 24px; + padding: 3px 5px; + width: 28px; } .ql-snow.ql-toolbar button svg, .ql-snow .ql-toolbar button svg { - float: left; - height: 100%; + float: left; + height: 100%; } .ql-snow.ql-toolbar button:active:hover, .ql-snow .ql-toolbar button:active:hover { - outline: none; + outline: none; } .ql-snow.ql-toolbar input.ql-image[type=file], .ql-snow .ql-toolbar input.ql-image[type=file] { - display: none; + display: none; } .ql-snow.ql-toolbar button:hover, .ql-snow .ql-toolbar button:hover, @@ -480,7 +481,7 @@ margin-left: 1rem; .ql-snow .ql-toolbar .ql-picker-item:hover, .ql-snow.ql-toolbar .ql-picker-item.ql-selected, .ql-snow .ql-toolbar .ql-picker-item.ql-selected { - color: #06c; + color: #06c; } .ql-snow.ql-toolbar button:hover .ql-fill, .ql-snow .ql-toolbar button:hover .ql-fill, @@ -510,7 +511,7 @@ margin-left: 1rem; .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill { - fill: #06c; + fill: #06c; } .ql-snow.ql-toolbar button:hover .ql-stroke, .ql-snow .ql-toolbar button:hover .ql-stroke, @@ -540,238 +541,238 @@ margin-left: 1rem; .ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter, .ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter, .ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter { - stroke: #06c; + stroke: #06c; } @media (pointer: coarse) { - .ql-snow.ql-toolbar button:hover:not(.ql-active), - .ql-snow .ql-toolbar button:hover:not(.ql-active) { - color: #444; - } - .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill, - .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill, - .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill, - .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill { - fill: #444; - } - .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke, - .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke, - .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter, - .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter { - stroke: #444; - } + .ql-snow.ql-toolbar button:hover:not(.ql-active), + .ql-snow .ql-toolbar button:hover:not(.ql-active) { + color: #444; + } + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill { + fill: #444; + } + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke, + .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter, + .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter { + stroke: #444; + } } .ql-snow { - box-sizing: border-box; + box-sizing: border-box; } .ql-snow * { - box-sizing: border-box; + box-sizing: border-box; } .ql-snow .ql-hidden { - display: none; + display: none; } .ql-snow .ql-out-bottom, .ql-snow .ql-out-top { - visibility: hidden; + visibility: hidden; } .ql-snow .ql-tooltip { - position: absolute; - transform: translateY(10px); + position: absolute; + transform: translateY(10px); } .ql-snow .ql-tooltip a { - cursor: pointer; - text-decoration: none; + cursor: pointer; + text-decoration: none; } .ql-snow .ql-tooltip.ql-flip { - transform: translateY(-10px); + transform: translateY(-10px); } .ql-snow .ql-formats { - display: inline-block; - vertical-align: middle; + display: inline-block; + vertical-align: middle; } .ql-snow .ql-formats:after { - clear: both; - content: ''; - display: table; + clear: both; + content: ''; + display: table; } .ql-snow .ql-stroke { - fill: none; - stroke: #444; - stroke-linecap: round; - stroke-linejoin: round; - stroke-width: 2; + fill: none; + stroke: #444; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 2; } .ql-snow .ql-stroke-miter { - fill: none; - stroke: #444; - stroke-miterlimit: 10; - stroke-width: 2; + fill: none; + stroke: #444; + stroke-miterlimit: 10; + stroke-width: 2; } .ql-snow .ql-fill, .ql-snow .ql-stroke.ql-fill { - fill: #444; + fill: #444; } .ql-snow .ql-empty { - fill: none; + fill: none; } .ql-snow .ql-even { - fill-rule: evenodd; + fill-rule: evenodd; } .ql-snow .ql-thin, .ql-snow .ql-stroke.ql-thin { - stroke-width: 1; + stroke-width: 1; } .ql-snow .ql-transparent { - opacity: 0.4; + opacity: 0.4; } .ql-snow .ql-direction svg:last-child { - display: none; + display: none; } .ql-snow .ql-direction.ql-active svg:last-child { - display: inline; + display: inline; } .ql-snow .ql-direction.ql-active svg:first-child { - display: none; + display: none; } .ql-snow .ql-editor h1 { - font-size: 2em; + font-size: 2em; } .ql-snow .ql-editor h2 { - font-size: 1.5em; + font-size: 1.5em; } .ql-snow .ql-editor h3 { - font-size: 1.17em; + font-size: 1.17em; } .ql-snow .ql-editor h4 { - font-size: 1em; + font-size: 1em; } .ql-snow .ql-editor h5 { - font-size: 0.83em; + font-size: 0.83em; } .ql-snow .ql-editor h6 { - font-size: 0.67em; + font-size: 0.67em; } .ql-snow .ql-editor a { - text-decoration: underline; + text-decoration: underline; } .ql-snow .ql-editor blockquote { - border-left: 4px solid #ccc; - margin-bottom: 5px; - margin-top: 5px; - padding-left: 16px; + border-left: 4px solid #ccc; + margin-bottom: 5px; + margin-top: 5px; + padding-left: 16px; } .ql-snow .ql-editor code, .ql-snow .ql-editor pre { - background-color: #f0f0f0; - border-radius: 3px; + background-color: #f0f0f0; + border-radius: 3px; } .ql-snow .ql-editor pre { - white-space: pre-wrap; - margin-bottom: 5px; - margin-top: 5px; - padding: 5px 10px; + white-space: pre-wrap; + margin-bottom: 5px; + margin-top: 5px; + padding: 5px 10px; } .ql-snow .ql-editor code { - font-size: 85%; - padding: 2px 4px; + font-size: 85%; + padding: 2px 4px; } .ql-snow .ql-editor pre.ql-syntax { - background-color: #23241f; - color: #f8f8f2; - overflow: visible; + background-color: #23241f; + color: #f8f8f2; + overflow: visible; } .ql-snow .ql-editor img { - max-width: 100%; + max-width: 100%; } .ql-snow .ql-picker { - color: #444; - display: block; - float: left; - font-size: 14px; - font-weight: 500; - height: 24px; - position: relative; + color: #444; + display: block; + float: left; + font-size: 14px; + font-weight: 500; + height: 24px; + position: relative; } .ql-snow .ql-picker-label { - cursor: pointer; - display: inline-block; - height: 100%; - padding-left: 8px; - padding-right: 2px; - position: relative; - width: 100%; + cursor: pointer; + display: inline-block; + height: 100%; + padding-left: 8px; + padding-right: 2px; + position: relative; + width: 100%; } .ql-snow .ql-picker-label::before { - display: inline-block; - line-height: 22px; + display: inline-block; + line-height: 22px; } .ql-snow .ql-picker-options { - background-color: #fff; - display: none; - min-width: 100%; - padding: 4px 8px; - position: absolute; - white-space: nowrap; + background-color: #fff; + display: none; + min-width: 100%; + padding: 4px 8px; + position: absolute; + white-space: nowrap; } .ql-snow .ql-picker-options .ql-picker-item { - cursor: pointer; - display: block; - padding-bottom: 5px; - padding-top: 5px; + cursor: pointer; + display: block; + padding-bottom: 5px; + padding-top: 5px; } .ql-snow .ql-picker.ql-expanded .ql-picker-label { - color: #ccc; - z-index: 2; + color: #ccc; + z-index: 2; } .ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill { - fill: #ccc; + fill: #ccc; } .ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke { - stroke: #ccc; + stroke: #ccc; } .ql-snow .ql-picker.ql-expanded .ql-picker-options { - display: block; - margin-top: -1px; - top: 100%; - z-index: 1; + display: block; + margin-top: -1px; + top: 100%; + z-index: 1; } .ql-snow .ql-color-picker, .ql-snow .ql-icon-picker { - width: 28px; + width: 28px; } .ql-snow .ql-color-picker .ql-picker-label, .ql-snow .ql-icon-picker .ql-picker-label { - padding: 2px 4px; + padding: 2px 4px; } .ql-snow .ql-color-picker .ql-picker-label svg, .ql-snow .ql-icon-picker .ql-picker-label svg { - right: 4px; + right: 4px; } .ql-snow .ql-icon-picker .ql-picker-options { - padding: 4px 0px; + padding: 4px 0px; } .ql-snow .ql-icon-picker .ql-picker-item { - height: 24px; - width: 24px; - padding: 2px 4px; + height: 24px; + width: 24px; + padding: 2px 4px; } .ql-snow .ql-color-picker .ql-picker-options { - padding: 3px 5px; - width: 152px; + padding: 3px 5px; + width: 152px; } .ql-snow .ql-color-picker .ql-picker-item { - border: 1px solid transparent; - float: left; - height: 16px; - margin: 2px; - padding: 0px; - width: 16px; + border: 1px solid transparent; + float: left; + height: 16px; + margin: 2px; + padding: 0px; + width: 16px; } .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg { - position: absolute; - margin-top: -9px; - right: 0; - top: 50%; - width: 18px; + position: absolute; + margin-top: -9px; + right: 0; + top: 50%; + width: 18px; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before, .ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before, @@ -779,208 +780,208 @@ margin-left: 1rem; .ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before { - content: attr(data-label); + content: attr(data-label); } .ql-snow .ql-picker.ql-header { - width: 98px; + width: 98px; } .ql-snow .ql-picker.ql-header .ql-picker-label::before, .ql-snow .ql-picker.ql-header .ql-picker-item::before { - content: 'Normal'; + content: 'Normal'; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { - content: 'Heading 1'; + content: 'Heading 1'; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { - content: 'Heading 2'; + content: 'Heading 2'; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { - content: 'Heading 3'; + content: 'Heading 3'; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { - content: 'Heading 4'; + content: 'Heading 4'; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { - content: 'Heading 5'; + content: 'Heading 5'; } .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { - content: 'Heading 6'; + content: 'Heading 6'; } .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { - font-size: 2em; + font-size: 2em; } .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { - font-size: 1.5em; + font-size: 1.5em; } .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { - font-size: 1.17em; + font-size: 1.17em; } .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { - font-size: 1em; + font-size: 1em; } .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { - font-size: 0.83em; + font-size: 0.83em; } .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { - font-size: 0.67em; + font-size: 0.67em; } .ql-snow .ql-picker.ql-font { - width: 108px; + width: 108px; } .ql-snow .ql-picker.ql-font .ql-picker-label::before, .ql-snow .ql-picker.ql-font .ql-picker-item::before { - content: 'Sans Serif'; + content: 'Sans Serif'; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { - content: 'Serif'; + content: 'Serif'; } .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before, .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { - content: 'Monospace'; + content: 'Monospace'; } .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { - font-family: Georgia, Times New Roman, serif; + font-family: Georgia, Times New Roman, serif; } .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { - font-family: Monaco, Courier New, monospace; + font-family: Monaco, Courier New, monospace; } .ql-snow .ql-picker.ql-size { - width: 98px; + width: 98px; } .ql-snow .ql-picker.ql-size .ql-picker-label::before, .ql-snow .ql-picker.ql-size .ql-picker-item::before { - content: 'Normal'; + content: 'Normal'; } .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { - content: 'Small'; + content: 'Small'; } .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { - content: 'Large'; + content: 'Large'; } .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before, .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { - content: 'Huge'; + content: 'Huge'; } .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { - font-size: 10px; + font-size: 10px; } .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { - font-size: 18px; + font-size: 18px; } .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { - font-size: 32px; + font-size: 32px; } .ql-snow .ql-color-picker.ql-background .ql-picker-item { - background-color: #fff; + background-color: #fff; } .ql-snow .ql-color-picker.ql-color .ql-picker-item { - background-color: #000; + background-color: #000; } .ql-toolbar.ql-snow { - border: 1px solid #ccc; - box-sizing: border-box; - font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; - padding: 8px; + border: 1px solid #ccc; + box-sizing: border-box; + font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; + padding: 8px; } .ql-toolbar.ql-snow .ql-formats { - margin-right: 15px; + margin-right: 15px; } .ql-toolbar.ql-snow .ql-picker-label { - border: 1px solid transparent; + border: 1px solid transparent; } .ql-toolbar.ql-snow .ql-picker-options { - border: 1px solid transparent; - box-shadow: rgba(0,0,0,0.2) 0 2px 8px; + border: 1px solid transparent; + box-shadow: rgba(0,0,0,0.2) 0 2px 8px; } .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { - border-color: #ccc; + border-color: #ccc; } .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options { - border-color: #ccc; + border-color: #ccc; } .ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected, .ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover { - border-color: #000; + border-color: #000; } .ql-toolbar.ql-snow + .ql-container.ql-snow { - border-top: 0px; + border-top: 0px; } .ql-snow .ql-tooltip { - background-color: #fff; - border: 1px solid #ccc; - box-shadow: 0px 0px 5px #ddd; - color: #444; - padding: 5px 12px; - white-space: nowrap; + background-color: #fff; + border: 1px solid #ccc; + box-shadow: 0px 0px 5px #ddd; + color: #444; + padding: 5px 12px; + white-space: nowrap; } .ql-snow .ql-tooltip::before { - content: "Visit URL:"; - line-height: 26px; - margin-right: 8px; + content: "Visit URL:"; + line-height: 26px; + margin-right: 8px; } .ql-snow .ql-tooltip input[type=text] { - display: none; - border: 1px solid #ccc; - font-size: 13px; - height: 26px; - margin: 0px; - padding: 3px 5px; - width: 170px; + display: none; + border: 1px solid #ccc; + font-size: 13px; + height: 26px; + margin: 0px; + padding: 3px 5px; + width: 170px; } .ql-snow .ql-tooltip a.ql-preview { - display: inline-block; - max-width: 200px; - overflow-x: hidden; - text-overflow: ellipsis; - vertical-align: top; + display: inline-block; + max-width: 200px; + overflow-x: hidden; + text-overflow: ellipsis; + vertical-align: top; } .ql-snow .ql-tooltip a.ql-action::after { - border-right: 1px solid #ccc; - content: 'Edit'; - margin-left: 16px; - padding-right: 8px; + border-right: 1px solid #ccc; + content: 'Edit'; + margin-left: 16px; + padding-right: 8px; } .ql-snow .ql-tooltip a.ql-remove::before { - content: 'Remove'; - margin-left: 8px; + content: 'Remove'; + margin-left: 8px; } .ql-snow .ql-tooltip a { - line-height: 26px; + line-height: 26px; } .ql-snow .ql-tooltip.ql-editing a.ql-preview, .ql-snow .ql-tooltip.ql-editing a.ql-remove { - display: none; + display: none; } .ql-snow .ql-tooltip.ql-editing input[type=text] { - display: inline-block; + display: inline-block; } .ql-snow .ql-tooltip.ql-editing a.ql-action::after { - border-right: 0px; - content: 'Save'; - padding-right: 0px; + border-right: 0px; + content: 'Save'; + padding-right: 0px; } .ql-snow .ql-tooltip[data-mode=link]::before { - content: "Enter link:"; + content: "Enter link:"; } .ql-snow .ql-tooltip[data-mode=formula]::before { - content: "Enter formula:"; + content: "Enter formula:"; } .ql-snow .ql-tooltip[data-mode=video]::before { - content: "Enter video:"; + content: "Enter video:"; } .ql-snow a { - color: #06c; + color: #06c; } .ql-container.ql-snow { - border: 1px solid #ccc; + border: 1px solid #ccc; } diff --git a/src/lib/preview/Preview.svelte b/src/lib/preview/Preview.svelte index 381c496..875606e 100644 --- a/src/lib/preview/Preview.svelte +++ b/src/lib/preview/Preview.svelte @@ -94,7 +94,7 @@ .result { display: block; aspect-ratio: 1/1.4142; - min-height: 842px; + /* min-height: 842px; */ align-self: center; width: auto; background-size: contain; diff --git a/src/routes/[slug]/+page.svelte b/src/routes/[slug]/+page.svelte index 11ece49..b36a5e3 100644 --- a/src/routes/[slug]/+page.svelte +++ b/src/routes/[slug]/+page.svelte @@ -35,7 +35,7 @@ diff --git a/src/lib/components/Subtitle.svelte b/src/lib/components/Subtitle.svelte index 6c565e4..60772b3 100644 --- a/src/lib/components/Subtitle.svelte +++ b/src/lib/components/Subtitle.svelte @@ -2,7 +2,8 @@ import { templates } from '$lib/templates/templates'; /** @type number */ export let templateIndex; - import { subtitle } from '$lib/stores/store'; + import { subtitle, multiplier } from '$lib/stores/store'; + console.log($multiplier); {#if templates[templateIndex] && $subtitle} @@ -10,15 +11,15 @@ class="subtitle" style=" top: {templates[templateIndex].subtitle.top}px; - height: {templates[templateIndex].subtitle.height}rem; - left: {templates[templateIndex].subtitle.left}rem; - right: {templates[templateIndex].subtitle.right}rem; + height: {templates[templateIndex].subtitle.height}px; + left: {templates[templateIndex].subtitle.left}px; + right: {templates[templateIndex].subtitle.right}px; color: {templates[templateIndex].subtitle.color}; - font-size: {templates[templateIndex].subtitle.fontSize}rem; + font-size: {templates[templateIndex].subtitle.fontSize * $multiplier}px; font-family: {templates[templateIndex].subtitle.fontFamily}; text-align: {templates[templateIndex].subtitle.textAlign}; font-weight: {templates[templateIndex].subtitle.fontWeight}; - line-height: {templates[templateIndex].subtitle.lineHeight}rem; + line-height: {templates[templateIndex].subtitle.lineHeight}px; " > {$subtitle} diff --git a/src/lib/components/Time.svelte b/src/lib/components/Time.svelte index dfbdd21..0e4f4b1 100644 --- a/src/lib/components/Time.svelte +++ b/src/lib/components/Time.svelte @@ -2,7 +2,7 @@ import { templates } from '$lib/templates/templates'; /** @type number */ export let templateIndex; - import { time } from '$lib/stores/store'; + import { time, multiplier } from '$lib/stores/store'; {#if templates[templateIndex] && $time !== ''} @@ -10,15 +10,15 @@ class="time" style=" top: {templates[templateIndex].time.top}px; - height: {templates[templateIndex].time.height}rem; - left: {templates[templateIndex].time.left}rem; - right: {templates[templateIndex].time.right}rem; + height: {templates[templateIndex].time.height}px; + left: {templates[templateIndex].time.left}px; + right: {templates[templateIndex].time.right}px; color: {templates[templateIndex].time.color}; - font-size: {templates[templateIndex].time.fontSize}rem; + font-size: {templates[templateIndex].time.fontSize * $multiplier}px; font-family: {templates[templateIndex].time.fontFamily}; text-align: {templates[templateIndex].time.textAlign}; font-weight: {templates[templateIndex].time.fontWeight}; - line-height: {templates[templateIndex].time.lineHeight}rem; + line-height: {templates[templateIndex].time.lineHeight}px; " > {$time} diff --git a/src/lib/components/Title.svelte b/src/lib/components/Title.svelte index b47aa14..527885e 100644 --- a/src/lib/components/Title.svelte +++ b/src/lib/components/Title.svelte @@ -2,7 +2,7 @@ import { templates } from '$lib/templates/templates'; /** @type number */ export let templateIndex; - import { title } from '$lib/stores/store'; + import { title, multiplier } from '$lib/stores/store'; {#if templates[templateIndex] && $title} @@ -10,15 +10,15 @@ class="title" style=" top: {templates[templateIndex].title.top}px; - height: {templates[templateIndex].title.height}rem; - left: {templates[templateIndex].title.left}rem; - right: {templates[templateIndex].title.right}rem; + height: {templates[templateIndex].title.height}px; + left: {templates[templateIndex].title.left}px; + right: {templates[templateIndex].title.right}px; color: {templates[templateIndex].title.color}; - font-size: {templates[templateIndex].title.fontSize}rem; + font-size: {templates[templateIndex].title.fontSize * $multiplier}px; font-family: {templates[templateIndex].title.fontFamily}; text-align: {templates[templateIndex].title.textAlign}; font-weight: {templates[templateIndex].title.fontWeight}; - line-height: {templates[templateIndex].title.lineHeight}rem; + line-height: {templates[templateIndex].title.lineHeight}px; " > diff --git a/src/lib/components/Weekday.svelte b/src/lib/components/Weekday.svelte index 169cd6b..92e35cc 100644 --- a/src/lib/components/Weekday.svelte +++ b/src/lib/components/Weekday.svelte @@ -2,7 +2,7 @@ import { templates } from '$lib/templates/templates'; /** @type number */ export let templateIndex; - import { weekday } from '$lib/stores/store'; + import { weekday, multiplier } from '$lib/stores/store'; {#if templates[templateIndex] && $weekday} @@ -10,15 +10,15 @@ class="weekday" style=" top: {templates[templateIndex].weekday.top}px; - height: {templates[templateIndex].weekday.height}rem; - left: {templates[templateIndex].weekday.left}rem; - right: {templates[templateIndex].weekday.right}rem; + height: {templates[templateIndex].weekday.height}px; + left: {templates[templateIndex].weekday.left}px; + right: {templates[templateIndex].weekday.right}px; color: {templates[templateIndex].weekday.color}; - font-size: {templates[templateIndex].weekday.fontSize}rem; + font-size: {templates[templateIndex].weekday.fontSize * $multiplier}px; font-family: {templates[templateIndex].weekday.fontFamily}; text-align: {templates[templateIndex].weekday.textAlign}; font-weight: {templates[templateIndex].weekday.fontWeight}; - line-height: {templates[templateIndex].weekday.lineHeight}rem; + line-height: {templates[templateIndex].weekday.lineHeight}px; " > {$weekday} diff --git a/src/lib/header/Header.svelte b/src/lib/header/Header.svelte index c9aceb6..9d9517c 100644 --- a/src/lib/header/Header.svelte +++ b/src/lib/header/Header.svelte @@ -10,7 +10,6 @@ } h1 { text-align: left; - font-size: 2rem; font-weight: 700; color: firebrick; font-family: 'Ubuntu', sans-serif; @@ -21,5 +20,6 @@ color: inherit; text-decoration: none; cursor: pointer; + font-size: 2rem; } diff --git a/src/lib/preview/Preview.svelte b/src/lib/preview/Preview.svelte index 875606e..76c844c 100644 --- a/src/lib/preview/Preview.svelte +++ b/src/lib/preview/Preview.svelte @@ -2,7 +2,7 @@ /** @type {number} */ export let templateIndex; /** @type {string} */ export let templateImage; - import { organizedBy, colabs, canvas } from '$lib/stores/store'; + import { organizedBy, colabs, canvas, multiplier } from '$lib/stores/store'; import Heading from '$lib/components/Heading.svelte'; import Title from '$lib/components/Title.svelte'; @@ -84,27 +84,30 @@ diff --git a/src/routes/[slug]/+page.svelte b/src/routes/[slug]/+page.svelte index b36a5e3..22acc17 100644 --- a/src/routes/[slug]/+page.svelte +++ b/src/routes/[slug]/+page.svelte @@ -35,7 +35,7 @@ -- 2.38.5 From b916a674224278a274dfc8f9cc3dbc9eafbed1d9 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Fri, 7 Oct 2022 13:00:31 +0200 Subject: [PATCH 03/10] si quito las small caps todo funciona bien, viva --- src/app.css | 2 +- src/lib/components/Heading.svelte | 2 +- src/lib/components/Title.svelte | 2 +- src/lib/templates/verde.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app.css b/src/app.css index 0e0c8d6..a804d2c 100644 --- a/src/app.css +++ b/src/app.css @@ -1,4 +1,4 @@ -@import '@fontsource/fira-mono'; +@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@300;400;700&display=swap'); * { box-sizing: border-box; margin: 0; diff --git a/src/lib/components/Heading.svelte b/src/lib/components/Heading.svelte index b3890d1..9c5c1fb 100644 --- a/src/lib/components/Heading.svelte +++ b/src/lib/components/Heading.svelte @@ -29,7 +29,7 @@ .heading { position: absolute; /* font-variant: small-caps; */ - text-transform: uppercase; + /* text-transform: uppercase; */ overflow: hidden; } diff --git a/src/lib/components/Title.svelte b/src/lib/components/Title.svelte index 527885e..f5f95cf 100644 --- a/src/lib/components/Title.svelte +++ b/src/lib/components/Title.svelte @@ -29,7 +29,7 @@ diff --git a/src/lib/components/Subtitle.svelte b/src/lib/components/Subtitle.svelte index 60772b3..4e657d6 100644 --- a/src/lib/components/Subtitle.svelte +++ b/src/lib/components/Subtitle.svelte @@ -29,7 +29,6 @@