diff --git a/README.md b/README.md index 8c2f6a2..bc0a838 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# Startodon-Instances +# Startodon-Hub -Eine Startseite, auf der sich Instanzen mit Startodon-Seite gemeinsam vorstellen können. \ No newline at end of file +Ein Hub, auf dem sich Instanzen mit Startodon-Seite gemeinsam vorstellen. \ No newline at end of file diff --git a/code.js b/code.js new file mode 100644 index 0000000..8c88b6d --- /dev/null +++ b/code.js @@ -0,0 +1,192 @@ +const instanceColor = getComputedStyle(document.documentElement).getPropertyValue('--instance-color').trim() || '#ff6347'; +const backgroundColor = getComputedStyle(document.documentElement).getPropertyValue('--background-color').trim() || '#ff6347'; + +document.addEventListener('DOMContentLoaded', function() { + const accountsContainer = document.querySelector('#account-list'); + let accounts = Array.from(document.querySelectorAll('.account')); + + // Separate Favoriten und gemischte Accounts + const favoriteAccounts = accounts.filter(account => account.dataset.favorite === "true"); + const otherAccounts = accounts.filter(account => !account.dataset.favorite); + + // Mische übrige Accounts + const seed = Date.now(); + const shuffledOtherAccounts = seededShuffle(otherAccounts, seed); + + const sortedAccounts = [...favoriteAccounts, ...shuffledOtherAccounts]; + + accountsContainer.innerHTML = ''; + sortedAccounts.forEach(account => accountsContainer.appendChild(account)); + + sortedAccounts.forEach(function(account) { + try { + const url = new URL(account.getAttribute('href')); + const pathParts = url.pathname.split('/'); + + if (pathParts.length > 1 && pathParts[1].startsWith('@')) { + const handle = pathParts[1].substring(1); + const instance = url.hostname; + const lookupUrl = `https://${config.homeInstance}/api/v1/accounts/lookup?acct=${handle}@${instance}`; + + fetch(lookupUrl) + .then(response => response.json()) + .then(data => { + const link = document.createElement('a'); + link.classList.add('account-card-link'); + link.href = account.href; + link.target = '_blank'; + + const card = document.createElement('div'); + card.classList.add('account-card'); + + const avatarImage = document.createElement('img'); + avatarImage.classList.add('account-avatar'); + avatarImage.alt = data.avatar ? `Profilbild von ${data.username}` : 'Profilbild nicht verfügbar'; + avatarImage.src = data.avatar || ''; + + const infoContainer = document.createElement('div'); + infoContainer.classList.add('account-info'); + + const displayNameElement = document.createElement('p'); + displayNameElement.classList.add('display-name'); + displayNameElement.textContent = data.display_name || handle; + + const handleElement = document.createElement('p'); + handleElement.classList.add('handle'); + + const serverHandleElement = document.createElement('span'); + serverHandleElement.classList.add('server-handle'); + serverHandleElement.textContent = `@${instance}`; + + if (instance === config.homeInstance) { + serverHandleElement.style.backgroundColor = instanceColor; + } + + handleElement.innerHTML = `@${data.username}`; + handleElement.appendChild(serverHandleElement); + + // QR-Code Button + const qrButton = document.createElement('button'); + qrButton.classList.add('qr-code-button'); + qrButton.innerHTML = ` + + + + `; + qrButton.addEventListener('click', function(event) { + event.preventDefault(); + showQrPopup(link.href); + }); + + infoContainer.appendChild(displayNameElement); + infoContainer.appendChild(handleElement); + card.appendChild(avatarImage); + card.appendChild(infoContainer); + card.appendChild(qrButton); + link.appendChild(card); + + account.replaceWith(link); + }) + .catch(error => { + console.error('Fehler beim Abrufen des Profils:', error); + }); + } else { + console.error('Ungültiger Benutzer-Handle in URL:', url.href); + } + } catch (error) { + console.error('Fehler bei der Verarbeitung der URL:', error); + } + }); +}); + +// QR-Code anzeigen +function showQrPopup(profileUrl) { + // QR-Overlay für Abdunkelung + const overlay = document.createElement('div'); + overlay.classList.add('qr-overlay'); + + // Popup-Container + const popup = document.createElement('div'); + popup.classList.add('qr-popup'); + + // Schließen-Button + const closeButton = document.createElement('button'); + closeButton.classList.add('close-popup'); + closeButton.textContent = 'x'; + closeButton.innerHTML = ` + + `; + closeButton.addEventListener('click', function () { + overlay.remove(); + }); + + // Event-Listener für das Overlay (schließt Popup bei Klick auf Hintergrund) + overlay.addEventListener('click', function (event) { + if (event.target === overlay) { // Nur schließen, wenn außerhalb des Popups geklickt wurde + overlay.remove(); + } + }); + + // QR-Code-Container + const qrContainer = document.createElement('div'); + qrContainer.classList.add('qr-code-container'); + + // QR-Code mit kjua generieren + const qrCode = kjua({ + render: 'canvas', + text: profileUrl, + size: 200, + quiet: 2, + ecLevel: 'H', + }); + + qrContainer.appendChild(qrCode); + + // Extrahiere User-Handle und Server-Handle + const url = new URL(profileUrl); + const pathParts = url.pathname.split('/'); + const userHandle = pathParts[1] || '@unbekannt'; + const serverHandle = url.hostname || 'unbekannt'; + + // Handle unter dem QR-Code + const handleContainer = document.createElement('p'); + handleContainer.classList.add('qr-handle'); + + const userHandleText = document.createTextNode(userHandle); + + const serverHandleSpan = document.createElement('span'); + serverHandleSpan.classList.add('qr-server-handle'); + serverHandleSpan.textContent = `@${serverHandle}`; + + // Dynamisch die Hintergrundfarbe für Variable "config.homeInstance" setzen + if (serverHandle === config.homeInstance) { + serverHandleSpan.style.backgroundColor = instanceColor; + qrCode.style.borderColor = instanceColor; + } + + handleContainer.appendChild(userHandleText); + handleContainer.appendChild(serverHandleSpan); + + // Popup zusammenfügen + popup.appendChild(closeButton); + popup.appendChild(qrContainer); + popup.appendChild(handleContainer); + + // Overlay zusammenfügen + overlay.appendChild(popup); + document.body.appendChild(overlay); +} + +function seededRandom(seed) { + let x = Math.sin(seed++) * 10000; + return x - Math.floor(x); +} + +function seededShuffle(array, seed) { + for (let i = array.length - 1; i > 0; i--) { + const j = Math.floor(seededRandom(seed) * (i + 1)); + [array[i], array[j]] = [array[j], array[i]]; + seed++; + } + return array; +} diff --git a/fonts/LICENSE.txt b/fonts/LICENSE.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/fonts/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/fonts/Roboto-Bold.ttf b/fonts/Roboto-Bold.ttf new file mode 100644 index 0000000..e64db79 Binary files /dev/null and b/fonts/Roboto-Bold.ttf differ diff --git a/fonts/Roboto-Regular.ttf b/fonts/Roboto-Regular.ttf new file mode 100644 index 0000000..2d116d9 Binary files /dev/null and b/fonts/Roboto-Regular.ttf differ diff --git a/fonts/fonts.css b/fonts/fonts.css new file mode 100644 index 0000000..90f2c87 --- /dev/null +++ b/fonts/fonts.css @@ -0,0 +1,15 @@ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), + url('./Roboto-Regular.ttf') format('truetype'); +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 600; + src: local('Roboto Bold'), + url('./Roboto-Bold.ttf') format('truetype'); +} diff --git a/images/IMAGES_LICENSE.md b/images/IMAGES_LICENSE.md new file mode 100644 index 0000000..2964c61 --- /dev/null +++ b/images/IMAGES_LICENSE.md @@ -0,0 +1,26 @@ +# Bildlizenzen + +In diesem Repository verwendete Bilder unterliegen unterschiedlichen Lizenzen. Details zu den einzelnen Bildern: + +## Unsplash-Bilder +Die folgenden Bilder stammen von Unsplash und unterliegen der [Unsplash-Lizenz](https://unsplash.com/license): +- **battenhall-bQRqXz7mZe4-unsplash.jpg**: Fotograf: [Battenhall](https://unsplash.com/@battenhall). +- **battenhall-xLOH5B_vres-unsplash.jpg**: Fotograf: [Battenhall](https://unsplash.com/@battenhall). + +> **Hinweis zur Unsplash-Lizenz:** +> Die Unsplash-Lizenz erlaubt die kostenlose Nutzung, Modifikation und Verbreitung der Bilder, jedoch keine eigenständige kommerzielle Verwertung (z. B. der Verkauf der Bilder als Poster oder Drucke). Eine Attribution des Fotografen ist nicht verpflichtend, wird aber empfohlen. + +--- + +## Eigene Bilder +Die folgenden Bilder wurden von Alexander Müller erstellt und stehen unter spezifischen Bedingungen zur Verfügung: + +- **liboriSocial_postcard.png**: Eigenes Werk, erstellt von Alexander Müller. + **Verwendungsbeschränkung:** Dieses Bild darf ausschließlich im Zusammenhang mit der Mastodon-Instanz Libori.social genutzt werden. + +- **liboriSocial_StarterKit.png**: Eigenes Werk, erstellt von Alexander Müller. + **Verwendungsbeschränkung:** Dieses Bild darf ausschließlich im Zusammenhang mit der Mastodon-Instanz Libori.social genutzt werden. + +--- + +Wenn du Fragen zur Nutzung der Bilder hast, kontaktiere uns bitte über [Alexander Müller über Libori.social](https://libori.social/@alex). diff --git a/images/battenhall-bQRqXz7mZe4-unsplash.jpg b/images/battenhall-bQRqXz7mZe4-unsplash.jpg new file mode 100644 index 0000000..b6d200b Binary files /dev/null and b/images/battenhall-bQRqXz7mZe4-unsplash.jpg differ diff --git a/images/battenhall-xLOH5B_vres-unsplash.jpg b/images/battenhall-xLOH5B_vres-unsplash.jpg new file mode 100644 index 0000000..ce5e71f Binary files /dev/null and b/images/battenhall-xLOH5B_vres-unsplash.jpg differ diff --git a/images/liboriSocial-StarterKit.png b/images/liboriSocial-StarterKit.png new file mode 100644 index 0000000..6df374d Binary files /dev/null and b/images/liboriSocial-StarterKit.png differ diff --git a/images/liboriSocial_og.png b/images/liboriSocial_og.png new file mode 100644 index 0000000..29f941f Binary files /dev/null and b/images/liboriSocial_og.png differ diff --git a/images/liboriSocial_postcard.png b/images/liboriSocial_postcard.png new file mode 100644 index 0000000..75534c3 Binary files /dev/null and b/images/liboriSocial_postcard.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..8a72d19 --- /dev/null +++ b/index.html @@ -0,0 +1,159 @@ + + + + + + Mastodon Instanzen Übersicht + + + + + + + + + + + + + + + + + +
+
+

#FediKirche

+

Wir sind #FediKirche. Auf unseren Instanzen dreht es sich um Themen im kirchlichen Kontext.

+
+
+ +
+
+

Wir sind #FediKirche

+
+ + +
+ Instanz 1 Logo +

libori.social 🦚

+

Libori.social vernetzt Menschen im Erzbistums Paderborn und darüber hinaus – rund um kirchliche und gesellschaftliche Themen.

+ zu libori.social +
+ + + + + + + + + + +
+
+ + +
+ Instanz 1 Logo +

reliverse.social

+

Die Mastodon-Instanz für religiöse Bildung --- the mastodon instance on religious education Powered by rpi-virtuell

+ zu reliverse.social +
+ + + + + + + + + + +
+
+ + +
+ Instanz 1 Logo +

kirche.social

+

Die gemeinschaftlich verantwortete Instanz von Menschen rund um die Kirche(n). Wir sind christlich, interkonfessionell und ökumenisch. kirche.social wird vom LUKi e.V. betrieben.

+ zur kirche.social +
+ + + + + + + + + + +
+
+ + +
+ Instanz 1 Logo +

katholisch.social

+

Dieser Server wird betrieben von: Katholisches Datenschutzzentrum Bayern

+ zu katholisch.social +
+ + + + + + + + + + +
+
+ +
+
+
+ +
+
+

Empfehlungen für dich

+
+

💡 Tipp

+

Um anderen mit deinem Account zu folgen, klicke auf der Profilseite auf 'Folgen'. Neue Beiträge erscheinen dann automatisch auf deiner Startseite.

+

📱 für Nutzer der (Android) Mastodon-App

+

Mit der App kannst du Profile über einen QR-Code erreichen. Klicke für den QR-Code einfach auf den + + -Button.
In der Mastodon-App klickst du auf die 🔎 (Entdecken). Den QR-Code-Scanner findest du in der Suchleiste.

+ +
+ +
+
+ + + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..4f872d4 --- /dev/null +++ b/style.css @@ -0,0 +1,450 @@ +/* Grundlegende Variablen */ +:root { + --primary-color: #6364ff; + --primary-color-hover: #563acc; + --background-color: #181821; + --secondary-background-color: #2a2a39; + --font-family: 'Roboto', sans-serif; + --link-color: #2b90d9; + + --liboriSocial-color: #ff5656; + --liboriSocial-secondary-color: #ff4444; + --reliverseSocial-color: #FFA500; + --kircheSocial-color: #1c7d7e; + --kircheSocial-secondary-color: #2ca7a7; + --katholischSocial-color: #0e7be2; + +} + +* { + box-sizing: border-box; +} +html { + scroll-behavior: smooth; +} +body { + font-family: var(--font-family); + margin: 0; + padding: 0; + background-color: var(--background-color); + color: #ffffff; + line-height: 1.6; +} +a { + color: var(--link-color); + text-decoration: none; +} +.container { + width: 100%; + max-width: 1200px; + margin: 0 auto; + padding: 20px; +} +header { + position: relative; + text-align: center; + padding: 80px 20px 30px 20px; + background-image: url('images/battenhall-bQRqXz7mZe4-unsplash.jpg'); + background-size: cover; + background-position: center; + color: #ffffff; +} +header::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1; +} +header .container { + position: relative; + z-index: 2; +} +header h1, header p { + text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); +} +header h1 { + font-size: 2.2rem; + margin-bottom: 15px; +} +header p { + font-size: 1rem; + line-height: 1.8; + max-width: 800px; + margin: 0 auto; +} + +section { + padding: 50px 20px; +} + +#instances { + width: 100vw; + margin-left: calc(-50vw + 50%); + background-color: var(--secondary-background-color); + padding: 20px 0; +} + +.grid-container { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 20px; + padding: 20px 0; +} + +.instance-card { + background-color: var(--background-color); + padding-bottom: 20px; + border-radius: 15px; + text-align: center; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +.instance-card:hover { + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); +} + +.instance-header { + height: 120px; + width: 100%; + object-fit: cover; + position: relative; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + overflow: hidden; +} + +.instance-software { + position: absolute; + bottom: 15px; + right: 15px; + width: 25px; + height: 25px; + z-index: 2; +} + +.instance-card h3 { + font-size: 1.75rem; + margin-bottom: 20px; + color: #fff; +} + +.instance-card p { + font-size: 1rem; + color: #bbb; + margin: 0 20px 20px 20px; +} + +.bigger-button { + display: inline-block; + background-color: var(--primary-color); + color: #fff; + padding: 15px 25px; + font-size: 1.1rem; + font-weight: 600; + text-decoration: none; + border-radius: 10px; + transition: background-color 0.3s, transform 0.3s ease, box-shadow 0.3s ease; +} + +.bigger-button:hover { + background-color: var(--primary-color-hover); + transform: translateY(-5px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); +} + +.recommendations { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); + gap: 20px; + padding: 0; + margin-top: 20px; + list-style-type: none; +} +.account-card-link { + text-decoration: none; + color: inherit; + display: block; + transition: transform 0.3s ease, box-shadow 0.3s ease; +} +.account-card-link:hover { + text-decoration: none; +} +.account-card { + display: flex; + align-items: center; + padding: 20px; + background-color: var(--secondary-background-color); + border-radius: 15px; + transition: background-color 0.3s, box-shadow 0.3s; + text-align: left; + position: relative; +} +.account-card-link:hover .account-card { + background-color: #42425a; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + transform: translateY(-5px); +} +.account-card-link p { + text-decoration: none; +} +.account-avatar { + width: 60px; + height: 60px; + border-radius: 50%; + margin-right: 15px; +} +.account-info { + flex: 1; + overflow: hidden; +} +.display-name { + font-weight: bold; + font-size: 1.1rem; + margin: 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; + display: block; +} +.handle { + font-size: 0.75rem; + color: #ccc; + margin: 0; +} +.server-handle { + font-size: 0.75em; + color: white; + background-color: #45596d; + padding: 0.1em 0.5em; + margin-left: 0.2em; + border-radius: 7px; + display: inline; +} +.qr-code-button { + background-color: transparent; + color: var(--background-color); + padding: 5px; + cursor: pointer; + font-size: 1rem; + border-radius: 50%; + border: solid 0px var(--background-color); + display: flex; + justify-content: center; + align-items: center; + width: 30px; + height: 30px; + position: absolute; + top: 10px; + right: 10px; + transition: background-color 0.3s, box-shadow 0.3s ease; +} + +.qr-code-button:hover { + background-color: var(--primary-color-hover); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); +} + +.qr-overlay { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: rgba(0, 0, 0, 0.8); + z-index: 999; + display: flex; + justify-content: center; + align-items: center; +} + +/* QR-Popup */ +.qr-popup { + position: relative; + background: var(--secondary-background-color); + padding: 20px; + border-radius: 15px; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); + text-align: center; + color: #ffffff; + max-width: 90%; + width: 300px; + word-wrap: break-word; + overflow-wrap: break-word; +} + +/* Schließen-Button */ +.close-popup { + background-color: transparent; + padding: 0; + cursor: pointer; + border-radius: 50%; + border: 0; + display: flex; + justify-content: center; + align-items: center; + width: 25px; + height: 25px; + position: absolute; + top: 15px; + right: 15px; + transition: background-color 0.3s, box-shadow 0.3s ease; +} + +.close-popup:hover { + background-color: rgb(255, 99, 71); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); +} + +/* QR-Code-Container */ +.qr-code-container { + margin: 20px auto; +} + +.qr-handle { + margin-bottom:20px; + font-size: 1rem; + color: #cccccc; + text-align: center; + display: inline-block; + word-wrap: break-word; + overflow-wrap: break-word; + max-width: 100%; +} + +.qr-server-handle { + font-size: 0.75em; + color: white; + background-color: #45596d; + padding: 0.1em 0.5em; + margin-left: 0.2em; + border-radius: 7px; + display: inline-block; + word-wrap: break-word; + overflow-wrap: break-word; +} + +.qr-popup canvas { + border: 2px solid #45596d; + border-radius: 10px; + padding: 10px; + background-color: var(--background-color); +} + +.hint-box { + background-color: rgba(75, 86, 104,0.2); + padding: 15px; + border: 1px solid var(--primary-color); + border-radius: 10px; + margin-top: 20px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + animation: fadeInUp 1s ease-in-out; +} +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px); + } + 100% { + opacity: 1; + transform: translateY(0); + } +} +.hint-box p { + margin: 0; + font-size: 0.95rem; + color: #ffffff; +} +.hint-title { + font-weight: bold; + font-size: 1rem; + margin-bottom: 5px; + display: flex; + align-items: center; + gap: 5px; +} + + + +footer { + text-align: center; + background-color: var(--secondary-background-color); + padding: 20px; +} + +footer nav a { + color: #ddd; + margin: 0 10px; + text-decoration: none; +} + +footer nav a:hover { + text-decoration: underline; +} + +footer p { + margin-top: 10px; + font-size: 0.9rem; +} + +@media (max-width: 800px) { + .grid-container { + grid-template-columns: 1fr; + } +} + +/* --- libori.social --- */ + +.instance-card.liboriSocial { + border: solid 1px var(--liboriSocial-color); +} + +.instance-card.liboriSocial a.bigger-button { + background-color: var(--liboriSocial-color); +} + +.instance-card.liboriSocial a.bigger-button:hover { + background-color: var(--liboriSocial-secondary-color); +} + +/* --- reliverse.social --- */ + +.instance-card.reliverseSocial { + border: solid 1px var(--reliverseSocial-color); +} + +.instance-card.reliverseSocial a.bigger-button { + background-color: var(--reliverseSocial-color); +} + +/* --- kirche.social --- */ + +.instance-card.kircheSocial { + border: solid 1px var(--kircheSocial-color); +} + +.instance-card.kircheSocial a.bigger-button { + background-color: var(--kircheSocial-color); +} + +.instance-card.kircheSocial a.bigger-button:hover { + background-color: var(--kircheSocial-secondary-color); +} + +/* --- katholisch.social --- */ + +.instance-card.katholischSocial { + border: solid 1px var(--katholischSocial-color); +} + +.instance-card.katholischSocial a.bigger-button { + background-color: var(--katholischSocial-color); +} + diff --git a/style_backup.css b/style_backup.css new file mode 100644 index 0000000..6551f70 --- /dev/null +++ b/style_backup.css @@ -0,0 +1,35 @@ +.instance-card { + background-color: var(--secondary-background-color); + border-radius: 15px; + padding: 30px; + text-align: center; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); + transition: all 0.3s ease; + position: relative; +} + +.instance-card:hover { + background-color: #3a3a4a; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); +} + +.instance-header { + height: 120px; + width: 100%; + object-fit: cover; + display: block; + position: absolute; + top: 0; + left: 0; + border-top-left-radius: 15px; + border-top-right-radius: 15px; + background-color: rgba(0, 0, 0, 0.5); +} + +.instance-software { + position: absolute; + bottom: 15px; + right: 15px; + width: 25px; + height: 25px; +} \ No newline at end of file diff --git a/utils/LICENSE_kjua b/utils/LICENSE_kjua new file mode 100644 index 0000000..417b885 --- /dev/null +++ b/utils/LICENSE_kjua @@ -0,0 +1,11 @@ +License + +The MIT License (MIT) + +Copyright (c) 2024 Lars Jung (https://larsjung.de) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/utils/kjua-0.10.0.min.js b/utils/kjua-0.10.0.min.js new file mode 100644 index 0000000..b0f2118 --- /dev/null +++ b/utils/kjua-0.10.0.min.js @@ -0,0 +1,2 @@ +/*! kjua v0.10.0 - undefined */ +((t,r)=>{"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("kjua",[],r):"object"==typeof exports?exports.kjua=r():t.kjua=r()})("undefined"!=typeof self?self:this,()=>{return n=[(t,r,e)=>{function n(t){var t=Object.assign({},o,t),r=i(t.text,t.ecLevel,t.minVersion,t.quiet);return"svg"===t.render?u(r,t):a(r,t,"image"===t.render)}var o=e(1),i=e(2),a=e(4),u=e(8);t.exports=n;try{jQuery.fn.kjua=function(e){return this.each(function(t,r){return r.appendChild(n(e))})}}catch(t){}},t=>{t.exports={render:"image",crisp:!0,minVersion:1,ecLevel:"L",size:200,ratio:null,fill:"#333",back:"#fff",text:"no text",rounded:0,quiet:0,mode:"plain",mSize:30,mPosX:50,mPosY:50,label:"no label",fontname:"sans",fontcolor:"#333",image:null}},(t,r,e)=>{function i(t,r){for(var e,n=2{try{var e=u(o,r),n=(e.addData(t),e.make(),e.getModuleCount());return{v:{text:t,level:r,version:o,module_count:n,is_dark:function(t,r){return 0<=t&&t{z.stringToBytes=(z.stringToBytesFuncs={default:function(t){for(var r=[],e=0;e{for(var r=y(f),t=function(){var t=r.read();if(-1==t)throw"eof";return t},e=0,n={};;){var o=r.read();if(-1==o)break;var i=t(),a=t(),u=t();n[String.fromCharCode(o<<8|i)]=a<<8|u,e+=1}if(e!=l)throw e+" != "+l;return n})(),i="?".charCodeAt(0);return function(t){for(var r=[],e=0;e>>8),r.push(255&n)):r.push(i)}return r}},u=8,k={L:a=1,M:0,Q:3,H:i=2},o=0,f=1,l=2,c=3,s=n=4,g=5,d=7,e=[[],[h=6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],(w={}).getBCHTypeInfo=function(t){for(var r=t<<10;0<=T(r)-T(1335);)r^=1335<{for(var r=new Array(256),e=new Array(256),t=0;t<8;t+=1)r[t]=1<{switch(r){case k.L:return p[4*(t-1)+0];case k.M:return p[4*(t-1)+1];case k.Q:return p[4*(t-1)+2];case k.H:return p[4*(t-1)+3];default:return}})(t,r);if(void 0===e)throw"bad rs block @ typeNumber:"+t+"/errorCorrectionLevel:"+r;for(var n,o,i=e.length/3,a=[],u=0;u>>7-t%8&1)},put:function(t,r){for(var e=0;e>>r-e-1&1))},getLengthInBits:function(){return n},putBit:function(t){var r=Math.floor(n/8);e.length<=r&&e.push(0),t&&(e[r]|=128>>>n%8),n+=1}};return o},C=function(t){var r=a,n=t,t={getMode:function(){return r},getLength:function(t){return n.length},write:function(t){for(var r=n,e=0;e+2>>8&255)+(255&n),13),e+=2}if(e>>8)},writeBytes:function(t,r,e){r=r||0,e=e||t.length;for(var n=0;n=e.length){if(0==i)return-1;throw"unexpected end of file./"+i}var t=e.charAt(n);if(n+=1,"="==t)return i=0,-1;t.match(/^\s$/)||(o=o<<6|a(t.charCodeAt(0)),i+=6)}var r=o>>>i-8&255;return i-=8,r}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return t},D=function(t,r,e){for(var n=j(t,r),o=0;o{for(var r=new Array(t),e=0;e>e&1);s[Math.floor(e/3)][e%3+g-8-3]=n}for(e=0;e<18;e+=1){n=!t&&1==(r>>e&1);s[e%3+g-8-3][Math.floor(e/3)]=n}},v=function(t,r){for(var r=c<<3|r,e=x.getBCHTypeInfo(r),n=0;n<15;n+=1){var o=!t&&1==(e>>n&1);n<6?s[n][8]=o:n<8?s[n+1][8]=o:s[g-15+n][8]=o}for(n=0;n<15;n+=1){o=!t&&1==(e>>n&1);n<8?s[8][g-n-1]=o:n<9?s[8][15-n-1+1]=o:s[8][15-n-1]=o}s[g-8][8]=!t},p=function(t,r){for(var e=-1,n=g-1,o=7,i=0,a=x.getMaskFunction(r),u=g-1;0>>o&1)),l=a(n,u-c),s[n][u-c]=f=l?!f:f,-1==--o)&&(i+=1,o=7);if((n+=e)<0||g<=n){n-=e,e=-e;break}}},w=function(t,r){for(var e=0,n=0,o=0,i=new Array(r.length),a=new Array(r.length),u=0;u8*u)throw"code length overflow. ("+o.getLengthInBits()+">"+8*u+")";for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;;){if(o.getLengthInBits()>=8*u)break;if(o.put(f,8),o.getLengthInBits()>=8*u)break;o.put(l,8)}return w(o,n)},y=(A.addData=function(t,r){var e=null;switch(r=r||"Byte"){case"Numeric":e=C(t);break;case"Alphanumeric":e=M(t);break;case"Byte":e=S(t);break;case"Kanji":e=L(t);break;default:throw"mode:"+r}h.push(e),n=null},A.isDark=function(t,r){if(t<0||g<=t||r<0||g<=r)throw t+","+r;return s[t][r]},A.getModuleCount=function(){return g},A.make=function(){if(u<1){for(var t=1;t<40;t++){for(var r=b.getRSBlocks(t,c),e=B(),n=0;n{for(var t=0,r=0,e=0;e<8;e+=1){a(!0,e);var n=x.getLostPoint(A);(0==e||n'+"",n=0;n";for(var o=0;o';e+=""}return e=e+""+""},A.createSvgTag=function(t,r,e,n){for(var o,i,a={},u=("object"==typeof arguments[0]&&(t=(a=arguments[0]).cellSize,r=a.margin,e=a.alt,n=a.title),t=t||2,r=void 0===r?4*t:r,(e="string"==typeof e?{text:e}:e||{}).text=e.text||null,e.id=e.text?e.id||"qrcode-description":null,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null,A.getModuleCount()*t+2*r),f="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",l=(l=(l=(l=(l=(l=(l="")+'")+(n.text?''+y(n.text)+"":""))+(e.text?''+y(e.text)+"":""))+''+''+""},A.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var r=A.getModuleCount()*e+2*t,n=t,o=r-t;return D(r,r,function(t,r){return n<=t&&t":r+=">";break;case"&":r+="&";break;case'"':r+=""";break;default:r+=n}}return r});return A.createASCII=function(t,r){if((t=t||1)<2){var e=r;e=void 0===e?2:e;for(var n,o,i,a,u=+A.getModuleCount()+2*e,f=e,l=u-e,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},s={"██":"▀","█ ":"▀"," █":" "," ":" "},g="",h=0;h>>=1;return r}function _(n,o){if(void 0===n.length)throw n.length+"/"+o;var r=(()=>{for(var t=0;t{if(!(t<0)){if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t})(63&t))}var n=0,o=0,i=0,a="",t={writeByte:function(t){for(n=n<<8|255&t,o+=8,i+=1;6<=o;)e(n>>>o-6),o-=6},flush:function(){if(0>>r!=0)throw"length over";for(;8<=u+r;)a.writeByte(255&(t<>>=8-u,u=f=0;f|=t<>6,128|63&o):o<55296||57344<=o?e.push(224|o>>12,128|o>>6&63,128|63&o):(n++,o=65536+((1023&o)<<10|1023&r.charCodeAt(n)),e.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return e},void 0!==(r="function"==typeof(w=function(){return A})?w.apply(r,[]):w)&&(t.exports=r)},(t,r,e)=>{var a=e(5),l=e(6),u=e(7),f=function(t,r){r.back&&(t.fillStyle=r.back,t.fillRect(0,0,r.size,r.size))},c=function(t,r,e,n,o,i){t.is_dark(o,i)&&r.rect(i*n,o*n,n,n)},s=function(t,r,e){if(t){var n=0{function e(t,r){return t.getAttribute(r)}function n(r,e){return Object.keys(e||{}).forEach(function(t){r.setAttribute(t,e[t])}),r}function o(t,r){return n(i.createElement(t),r)}var r=window,i=r.document,a="http://www.w3.org/2000/svg";t.exports={dpr:r.devicePixelRatio||1,SVG_NS:a,get_attr:e,create_el:o,create_svg_el:function(t,r){return n(i.createElementNS(a,t),r)},create_canvas:function(t,r){r=o("canvas",{width:t*r,height:t*r});return r.style.width="".concat(t,"px"),r.style.height="".concat(t,"px"),r},canvas_to_img:function(t){var r=o("img",{crossOrigin:"anonymous",src:t.toDataURL("image/png"),width:e(t,"width"),height:e(t,"height")});return r.style.width=t.style.width,r.style.height=t.style.height,r}}},t=>{t.exports=function(t,r,e,n,o,i){var a,u,f,l,c,s,g,h,d=i*n,v=o*n,p=d+n,w=v+n,e=.005*e.rounded*n,n=t.is_dark,t=o-1,m=o+1,y=i-1,k=i+1,x=n(o,i),b=n(t,y),B=n(t,i),t=n(t,k),C=n(o,k),k=n(m,k),i=n(m,i),m=n(m,y),n=n(o,y),o=(a=r,{m:function(t,r){return a.moveTo(t,r),this},l:function(t,r){return a.lineTo(t,r),this},a:function(){return a.arcTo.apply(a,arguments),this}});x?(y=o,r=d,x=v,u=p,f=w,l=e,s=!B&&!C,g=!i&&!C,h=!i&&!n,(c=!B&&!n)?y.m(r+l,x):y.m(r,x),s?y.l(u-l,x).a(u,x,u,f,l):y.l(u,x),g?y.l(u,f-l).a(u,f,r,f,l):y.l(u,f),h?y.l(r+l,f).a(r,f,r,x,l):y.l(r,f),c?y.l(r,x+l).a(r,x,u,x,l):y.l(r,x)):(s=o,g=d,h=v,f=p,c=w,u=e,l=B&&C&&t,y=i&&C&&k,r=i&&n&&m,B&&n&&b&&s.m(g+u,h).l(g,h).l(g,h+u).a(g,h,g+u,h,u),l&&s.m(f-u,h).l(f,h).l(f,h+u).a(f,h,f-u,h,u),y&&s.m(f-u,c).l(f,c).l(f,c-u).a(f,c,f-u,c,u),r&&s.m(g+u,c).l(g,c).l(g,c-u).a(g,c,g+u,c,u))}},t=>{t.exports=function(t,r){var e,n,o,i,a,u=r.mode;"label"===u?(e=t,o=(n=r).size,i="bold "+.01*n.mSize*o+"px "+n.fontname,e.strokeStyle=n.back,e.lineWidth=.01*n.mSize*o*.1,e.fillStyle=n.fontcolor,e.font=i,i=e.measureText(n.label).width,a=.01*n.mSize,i=(1-i/o)*n.mPosX*.01*o,a=(1-a)*n.mPosY*.01*o+.75*n.mSize*.01*o,e.strokeText(n.label,i,a),e.fillText(n.label,i,a)):"image"===u&&(o=r.size,e=r.image.naturalWidth||1,n=r.image.naturalHeight||1,e=(i=.01*r.mSize)*e/n,t.drawImage(r.image,(1-e)*r.mPosX*.01*o,(1-i)*r.mPosY*.01*o,e*o,i*o))}},(t,r,c)=>{var e=c(5),s=e.SVG_NS,g=e.get_attr,h=e.create_svg_el,d=function(n){function o(t){return Math.round(10*t)/10}function i(t){return Math.round(10*t)/10+n.o}return{m:function(t,r){return n.p+="M ".concat(i(t)," ").concat(i(r)," "),this},l:function(t,r){return n.p+="L ".concat(i(t)," ").concat(i(r)," "),this},a:function(t,r,e){return n.p+="A ".concat(o(e)," ").concat(o(e)," 0 0 1 ").concat(i(t)," ").concat(i(r)," "),this}}},w=function(t,r,e,n,o,i,a,u,f,l){a?t.m(r+i,e):t.m(r,e),u?t.l(n-i,e).a(n,e+i,i):t.l(n,e),f?t.l(n,o-i).a(n-i,o,i):t.l(n,o),l?t.l(r+i,o).a(r,o-i,i):t.l(r,o),a?t.l(r,e+i).a(r+i,e,i):t.l(r,e)},m=function(t,r,e,n,o,i,a,u,f,l){a&&t.m(r+i,e).l(r,e).l(r,e+i).a(r+i,e,i),u&&t.m(n,e+i).l(n,e).l(n-i,e).a(n,e+i,i),f&&t.m(n-i,o).l(n,o).l(n,o-i).a(n-i,o,i),l&&t.m(r,o-i).l(r,o).l(r+i,o).a(r,o-i,i)},v=function(t,r,e,n,o,i){var a=i*n,u=o*n,f=a+n,l=u+n,e=.005*e.rounded*n,n=t.is_dark,t=o-1,c=o+1,s=i-1,g=i+1,h=n(o,i),d=n(t,s),v=n(t,i),t=n(t,g),p=n(o,g),g=n(c,g),i=n(c,i),c=n(c,s),n=n(o,s);h?w(r,a,u,f,l,e,!v&&!n,!v&&!p,!i&&!p,!i&&!n):m(r,a,u,f,l,e,v&&n&&d,v&&p&&t,i&&p&&g,i&&n&&c)};t.exports=function(t,r){var e,n,o,i,a,u=r.size,f=r.mode,l=h("svg",{xmlns:s,width:u,height:u,viewBox:"0 0 ".concat(u," ").concat(u)});return l.style.width="".concat(u,"px"),l.style.height="".concat(u,"px"),r.back&&l.appendChild(h("rect",{x:0,y:0,width:u,height:u,fill:r.back})),l.appendChild(h("path",{d:((t,r)=>{if(!t)return"";for(var e={p:"",o:0},n=t.module_count,o=r.size/n,i=(r.crisp&&(o=Math.floor(o),e.o=Math.floor((r.size-o*n)/2)),d(e)),a=0;a