PNG-Icons für iOS/Android, Teilen-Ziel auf Android, SW-Cache v5
This commit is contained in:
1 parent
fe9401c38f
commit
13eabc6247
9 files changed
+54
-8
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ FROM nginx:1.27-alpine
|
|||||||
# Static single-page app — no build step.
|
# Static single-page app — no build step.
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY security-headers.conf /etc/nginx/security-headers.conf
|
COPY security-headers.conf /etc/nginx/security-headers.conf
|
||||||
COPY index.html impressum.html datenschutz.html legal.css icon-mono.svg manifest.webmanifest sw.js icon.svg /usr/share/nginx/html/
|
COPY index.html impressum.html datenschutz.html legal.css icon-mono.svg manifest.webmanifest sw.js icon.svg icon-192.png icon-512.png icon-maskable-512.png apple-touch-icon.png /usr/share/nginx/html/
|
||||||
COPY vendor/ /usr/share/nginx/html/vendor/
|
COPY vendor/ /usr/share/nginx/html/vendor/
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ Obsidian vault, a wiki, or a repo.
|
|||||||
- **Bilingual.** English and German, switchable in the header.
|
- **Bilingual.** English and German, switchable in the header.
|
||||||
- **Light & dark.** Warm paper, one strong blue, clipboard logo; dark mode one click away.
|
- **Light & dark.** Warm paper, one strong blue, clipboard logo; dark mode one click away.
|
||||||
- **Save / copy / clear**, word + character count and reading time.
|
- **Save / copy / clear**, word + character count and reading time.
|
||||||
- **Installable PWA**, fully offline after first load.
|
- **Installable PWA**, fully offline after first load. On Android, clip2md shows up in the
|
||||||
|
system share sheet: share a page or selection straight into the editor.
|
||||||
|
|
||||||
Everything is **client-side**. No servers, no CDNs, no third-party requests — GDPR-friendly by
|
Everything is **client-side**. No servers, no CDNs, no third-party requests — GDPR-friendly by
|
||||||
construction.
|
construction.
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
+13
-1
@@ -9,7 +9,7 @@
|
|||||||
<meta name="apple-mobile-web-app-title" content="clip2md" />
|
<meta name="apple-mobile-web-app-title" content="clip2md" />
|
||||||
<link rel="manifest" href="manifest.webmanifest" />
|
<link rel="manifest" href="manifest.webmanifest" />
|
||||||
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
|
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
|
||||||
<link rel="apple-touch-icon" href="icon.svg" />
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||||
<title>clip2md — Paste to Markdown</title>
|
<title>clip2md — Paste to Markdown</title>
|
||||||
<script>
|
<script>
|
||||||
try { var th = JSON.parse(localStorage.getItem('clip2md:theme')); if (th === 'dark' || (th === null && matchMedia('(prefers-color-scheme: dark)').matches)) document.documentElement.setAttribute('data-theme','dark'); } catch (e) {}
|
try { var th = JSON.parse(localStorage.getItem('clip2md:theme')); if (th === 'dark' || (th === null && matchMedia('(prefers-color-scheme: dark)').matches)) document.documentElement.setAttribute('data-theme','dark'); } catch (e) {}
|
||||||
@@ -730,6 +730,18 @@
|
|||||||
setLang(LS.get('lang', navLang==='de'?'de':'en'));
|
setLang(LS.get('lang', navLang==='de'?'de':'en'));
|
||||||
setPreview(previewOn);
|
setPreview(previewOn);
|
||||||
setFnameTag(); refreshAll(false);
|
setFnameTag(); refreshAll(false);
|
||||||
|
|
||||||
|
// ---------- Share target (Android: Share → clip2md) ----------
|
||||||
|
(function(){
|
||||||
|
var q; try { q=new URLSearchParams(location.search); } catch(e){ return; }
|
||||||
|
var title=(q.get('title')||'').trim(), text=(q.get('text')||'').trim(), url=(q.get('url')||'').trim();
|
||||||
|
if(!title && !text && !url) return;
|
||||||
|
if(!url){ var m=text.match(/https?:\/\/\S+$/); if(m){ url=m[0]; text=text.slice(0,m.index).trim(); } }
|
||||||
|
var md=(title && text.indexOf(title)!==0 ? '# '+title+'\n\n' : '')+text+(url && text.indexOf(url)<0 ? (text?'\n\n':'')+'<'+url+'>' : '');
|
||||||
|
if(url){ settings.source=url; $('fmSource').value=url; }
|
||||||
|
editor.value=md; showSource('src_raw', false); refreshAll(true);
|
||||||
|
try { history.replaceState(null, '', location.pathname); } catch(e){}
|
||||||
|
})();
|
||||||
if(!coarse) editor.focus();
|
if(!coarse) editor.focus();
|
||||||
|
|
||||||
if('serviceWorker' in navigator){ window.addEventListener('load', function(){ navigator.serviceWorker.register('/sw.js').catch(function(){}); }); }
|
if('serviceWorker' in navigator){ window.addEventListener('load', function(){ navigator.serviceWorker.register('/sw.js').catch(function(){}); }); }
|
||||||
|
|||||||
+35
-4
@@ -8,7 +8,38 @@
|
|||||||
"background_color": "#EAEAE3",
|
"background_color": "#EAEAE3",
|
||||||
"theme_color": "#EAEAE3",
|
"theme_color": "#EAEAE3",
|
||||||
"icons": [
|
"icons": [
|
||||||
{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any" },
|
{
|
||||||
{ "src": "/icon.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "maskable" }
|
"src": "/icon.svg",
|
||||||
]
|
"sizes": "any",
|
||||||
}
|
"type": "image/svg+xml",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icon-192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icon-512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icon-maskable-512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "maskable"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"share_target": {
|
||||||
|
"action": "/",
|
||||||
|
"method": "GET",
|
||||||
|
"params": {
|
||||||
|
"title": "title",
|
||||||
|
"text": "text",
|
||||||
|
"url": "url"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
Pages (navigations, .html): network first, cache only as offline fallback —
|
Pages (navigations, .html): network first, cache only as offline fallback —
|
||||||
so new or changed pages are never frozen for existing users.
|
so new or changed pages are never frozen for existing users.
|
||||||
Static assets (vendor, fonts, icons): cache first. Bump CACHE on asset changes. */
|
Static assets (vendor, fonts, icons): cache first. Bump CACHE on asset changes. */
|
||||||
var CACHE = 'clip2md-v4';
|
var CACHE = 'clip2md-v5';
|
||||||
var ASSETS = [
|
var ASSETS = [
|
||||||
'/',
|
'/',
|
||||||
'/index.html',
|
'/index.html',
|
||||||
@@ -10,6 +10,8 @@ var ASSETS = [
|
|||||||
'/datenschutz.html',
|
'/datenschutz.html',
|
||||||
'/legal.css',
|
'/legal.css',
|
||||||
'/icon.svg',
|
'/icon.svg',
|
||||||
|
'/icon-192.png',
|
||||||
|
'/apple-touch-icon.png',
|
||||||
'/manifest.webmanifest',
|
'/manifest.webmanifest',
|
||||||
'/vendor/turndown.js',
|
'/vendor/turndown.js',
|
||||||
'/vendor/turndown-plugin-gfm.js',
|
'/vendor/turndown-plugin-gfm.js',
|
||||||
|
|||||||
Reference in new issue
Block a user