new deploy: 2022-10-04T12:40:15+00:00

This commit is contained in:
Aravinth Manivannan 2022-10-04 12:40:15 +00:00
parent 647b7fd7c5
commit 0842e6eb23
18 changed files with 123 additions and 2 deletions

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -161,6 +162,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />
@ -778,6 +781,7 @@ you.</p>
</div> </div>
</div> </div>
<script src="https://librepages.org/js/copy.js?h=983f829c3d114fd1d3a08ffab2982a2884dec7fe62b8aedb545c1a4145a3c4f5"></script>
</main> </main>
<footer> <footer>
<div class="footer__container"> <div class="footer__container">

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -163,6 +164,8 @@ general development ecosystem" />
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -1 +1 @@
.blog__content img{max-width:100%;display:block}.blog__content video{max-width:100%;display:block}.blog__content li{margin-left:40px}.blog__content a:hover{color:#0056b3;text-decoration:underline}.blog__content code{word-wrap:break-word;overflow-wrap:break-word}.blog__content table{border-collapse:collapse;caption-side:bottom;border-color:#e9ecef;text-align:center;width:100%}.blog__content table>thead{vertical-align:bottom;border-bottom:1px solid #cdc8ca;text-align:center}.blog__content table th{text-align:center}.blog__content table td{margin:auto;padding:10px;border-bottom:1px solid #edddd1}.blog__content p,.blog__content h2,.blog__content h3,.blog__content h4,.blog__content h5,.blog__content h6{margin:10px 0}.blog__content pre{padding:10px 10px 10px 20px;border-radius:8px;font-size:0.95rem;overflow:auto}.blog__content pre{font-family:monospace, monospace;font-display:auto;font-size:1em}.blog__content p{margin:30px 0}.blog__container{margin:auto;max-width:50%}.blog__list{list-style:none}.blog__post-link,.blog__post-link:visited{text-decoration:none;color:inherit}.blog__title{margin:35px 0}.blog__post-link{display:block}.blog__post-item{border-bottom:1px dashed #333;margin:10px;padding:10px}.blog__post-item:hover{background-color:lightgray}.blog__post-item:last-child{border-bottom:none}.blog__post-description{font-size:0.9rem;margin:5px 0}.blog__post-tag{font-size:0.7rem;font-family:monospace, monospace}.blog__post-tag:hover{color:#0056b3;text-decoration:underline}.blog__post-meta{font-size:0.7rem}.blog__post-title{font-size:1.4rem;font-weight:550}.blog__post-tag-container{margin:0}.blog__post-warning{background:yellow;padding:5px;margin:10px;border-left:10px solid orange}.blog__post-warning *{margin:5px !important} .blog__content img{max-width:100%;display:block}.blog__content video{max-width:100%;display:block}.blog__content li{margin-left:40px}.blog__content a:hover{color:#0056b3;text-decoration:underline}.blog__content code{word-wrap:break-word;overflow-wrap:break-word}.blog__content table{border-collapse:collapse;caption-side:bottom;border-color:#e9ecef;text-align:center;width:100%}.blog__content table>thead{vertical-align:bottom;border-bottom:1px solid #cdc8ca;text-align:center}.blog__content table th{text-align:center}.blog__content table td{margin:auto;padding:10px;border-bottom:1px solid #edddd1}.blog__content p,.blog__content h2,.blog__content h3,.blog__content h4,.blog__content h5,.blog__content h6{margin:10px 0}.blog__content pre{padding:10px 10px 10px 20px;border-radius:8px;font-size:0.95rem;overflow:auto}.blog__content pre{font-family:monospace, monospace;font-display:auto;font-size:1em}.blog__content p{margin:30px 0}.blog__container{margin:auto;max-width:50%}.blog__list{list-style:none}.blog__post-link,.blog__post-link:visited{text-decoration:none;color:inherit}.blog__title{margin:35px 0}.blog__post-link{display:block}.blog__post-item{border-bottom:1px dashed #333;margin:10px;padding:10px}.blog__post-item:hover{background-color:lightgray}.blog__post-item:last-child{border-bottom:none}.blog__post-description{font-size:0.9rem;margin:5px 0}.blog__post-tag{font-size:0.7rem;font-family:monospace, monospace}.blog__post-tag:hover{color:#0056b3;text-decoration:underline}.blog__post-meta{font-size:0.7rem}.blog__post-title{font-size:1.4rem;font-weight:550}.blog__post-tag-container{margin:0}.blog__post-warning{background:yellow;padding:5px;margin:10px;border-left:10px solid orange}.blog__post-warning *{margin:5px !important}.copy-code{margin:auto;margin-top:0;cursor:pointer}.blog__content pre{display:flex}.blog__content code{flex:auto}

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

1
icons/check.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#39d353" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"></polyline></svg>

After

Width:  |  Height:  |  Size: 257 B

1
icons/clipboard.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#768390" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clipboard"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>

After

Width:  |  Height:  |  Size: 366 B

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -162,6 +163,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

79
js/copy.js Normal file
View file

@ -0,0 +1,79 @@
/*
* Copyright (C) 2022 Aravinth Manivannan <realaravinth@batsense.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
const check_dataset = (id, property) => {
let elem = document.getElementById(id);
if (elem === undefined || elem == null) {
console.warn(`${id} not found`);
return false;
}
if (!elem.dataset.hasOwnProperty(property)) {
console.warn(`${id} component doesn't have ${property} dataset attribute`);
return false;
}
return elem;
};
const init_clipboard = () => {
const CHECK_COMPONENT = check_dataset("check-icon", "check");
if (CHECK_COMPONENT == false) {
return;
}
const CHECK_ICON = CHECK_COMPONENT.dataset.check;
const CLIPBOARD_COMPONET = check_dataset("clipboard-icon", "clipboard");
if (CLIPBOARD_COMPONET == false) {
return;
}
const CLIPBOARD_ICON = CLIPBOARD_COMPONET.dataset.clipboard;
const copy_code = async (event) => {
const switch_clipboard_icon = async (event) => {
event.target.src = CHECK_ICON;
setTimeout(() => {
event.target.src = CLIPBOARD_ICON;
}, 1200);
};
let elem = event.target;
let codes = Array.from(elem.parentElement.getElementsByTagName("span"));
let content = "";
codes.forEach((span) => {
content = `${content} ${span.innerText}`;
});
await navigator.clipboard.writeText(content);
await switch_clipboard_icon(event);
};
const new_clipboard = () => {
let clipboard = document.createElement("img");
clipboard.src = CLIPBOARD_ICON;
clipboard.classList = ["copy-code"];
clipboard.addEventListener("click", copy_code);
return clipboard;
};
document.querySelectorAll("code").forEach((code) => {
if (code.parentElement.tagName == "PRE") {
code.parentElement.appendChild(new_clipboard());
}
});
};
init_clipboard();

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

File diff suppressed because one or more lines are too long

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -169,6 +170,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />

View file

@ -15,6 +15,7 @@
href="https://librepages.org/mobile.css" href="https://librepages.org/mobile.css"
/> />
<meta name="referrer" content="no-referrer-when-downgrade" /> <meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
@ -166,6 +167,8 @@
<!-- End Matomo Code --> <!-- End Matomo Code -->
</head> </head>
<body class="base"> <body class="base">
<div id="check-icon" data-check="https://librepages.org/icons/check.svg?h=376636abc0ddb30b4748ab5d4416d64ec96862f6c4acf04ef3bf9a7f8f323238"></div>
<div id="clipboard-icon" data-clipboard="https://librepages.org/icons/clipboard.svg?h=202bedb305272a2e2a87ca77aae6e8c61403fc33fb8d8b3cda98df7226ddba84"></div>
<header><nav class="nav__container"> <header><nav class="nav__container">
<input type="checkbox" class="nav__toggle" id="nav__toggle" /> <input type="checkbox" class="nav__toggle" id="nav__toggle" />