From 55e6f847efbf9acc21b35f9c0b5bc59dffed0b09 Mon Sep 17 00:00:00 2001 From: gigamaster <1905497+gigamaster@users.noreply.github.com> Date: Sun, 20 Oct 2024 10:05:49 +0200 Subject: [PATCH] preview url + prevent + popup --- app/asset/css/style.css | 3 +-- app/asset/lib/link-previewer.min.js | 22 +++++++++++++--------- src/main.py | 2 +- src/template/head.html | 8 ++++---- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/app/asset/css/style.css b/app/asset/css/style.css index 5950380..73239f0 100644 --- a/app/asset/css/style.css +++ b/app/asset/css/style.css @@ -83,8 +83,6 @@ button,input,optgroup,select,textarea{color:inherit;font:inherit;padding:0;line- button,select{text-transform:none} [type=button],[type=reset],[type=submit], button{-webkit-appearance:button;background-color:initial;background-image:none;cursor:pointer} -::-moz-focus-inner{border-style:none;padding:0} -:-moz-focusring{outline:1px dotted ButtonText} input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af} input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af} input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af} @@ -287,6 +285,7 @@ vertical-align:-.175em;} .items-center{align-items:center} .justify-center{justify-content:center} .justify-between{justify-content:space-between} +.place-items-center{place-items: center;} /* margin - padding */ .m-1{margin:0.25rem;} .m-2{margin:0.5rem;} diff --git a/app/asset/lib/link-previewer.min.js b/app/asset/lib/link-previewer.min.js index 7f8abab..e7932e6 100644 --- a/app/asset/lib/link-previewer.min.js +++ b/app/asset/lib/link-previewer.min.js @@ -69,20 +69,24 @@ width:100%; } .${componentClass}-unknown-format { - text-align:center; + align-items: center; + display:flex; color:white; + flex-direction: column; + height: 100%; + justify-content: center; padding:10px; } - .${componentClass}-unknown-format h2 { - font-size:28px; - line-height:28px; - margin-top:32px; - } .${componentClass}-unknown-format h4 { font-size:24px; line-height:24px; margin-top:20px; } + .${componentClass}-unknown-format h5 { + font-size:14px; + line-height:20px; + margin-top:14px; + } .${componentClass}-show { transition: opacity 400ms; opacity: 1; @@ -107,8 +111,8 @@ `; @@ -138,7 +142,7 @@ iframeHTML.setAttribute("height", "205"); iframeHTML.setAttribute("scrolling", "no"); iframeHTML.setAttribute('frameborder', "0"); - iframeHTML.style.cssText = 'width:366px;height:205px;border: none;";overflow:hidden;'; + iframeHTML.style.cssText = 'width:366px;height:205px;border: none;overflow:hidden;'; iframeHTML.src = url; contentHtml.appendChild(iframeHTML); showContent(contentHtml); diff --git a/src/main.py b/src/main.py index e7eb4d5..6fc9062 100755 --- a/src/main.py +++ b/src/main.py @@ -100,7 +100,7 @@ def main(): if not droot: # File Preview - filename relative path f.write("" + - "" + + "" + "" + "" + "" + diff --git a/src/template/head.html b/src/template/head.html index 79e45e1..d679a0b 100644 --- a/src/template/head.html +++ b/src/template/head.html @@ -451,7 +451,7 @@

Digital Nomad

- +