Profile erweitert && css aufgeteilt

This commit is contained in:
Alexander Müller 2024-12-14 15:34:09 +01:00
parent fa69ddd968
commit 2645111df2
13 changed files with 829 additions and 654 deletions

View file

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mastodon Instanzen Übersicht</title>
<link rel="stylesheet" href="./fonts/fonts.css?v=1.0.0">
<link rel="stylesheet" href="style.css?v=1.0.1">
<link rel="stylesheet" href="./style/index.css">
<script type="module" src="src/main.js?v=1.0.1" defer></script>
<script src="utils/kjua-0.10.0.min.js"></script>

19
src/utils/instances.js Normal file
View file

@ -0,0 +1,19 @@
export function getServerClass(instance) {
const serverClasses = {
'libori.social': 'liboriSocial',
'reliverse.social': 'reliverseSocial',
'kirche.social': 'kircheSocial',
'katholisch.social': 'katholischSocial'
};
return serverClasses[instance] || null;
}
export function extractHostname(url) {
try {
const hostname = url.match(/^https?:\/\/([^\/]+)/i)[1]; // Regex: extrahiert den Hostnamen
return hostname;
} catch (error) {
console.error('Fehler beim Extrahieren des Hostnamens:', error, 'URL:', url);
return null;
}
}

View file

@ -1,3 +1,5 @@
import { getServerClass } from './instances.js';
export async function fetchProfile(profileUrl, options = {}) {
const { updateElement = null, createCard = false } = options;
@ -37,6 +39,8 @@ export async function fetchProfile(profileUrl, options = {}) {
console.error(`Fehler beim Abrufen des Profils für ${profileUrl}:`, error);
reject(error);
});
} else {
reject(new Error('Ungültige Profil-URL'));
}
} catch (error) {
console.error('Ungültige URL:', profileUrl, error);
@ -46,57 +50,129 @@ export async function fetchProfile(profileUrl, options = {}) {
}
export function createAccountCard(data, href, instance) {
const serverClass = getServerClass(instance);
const link = document.createElement('a');
link.classList.add('account-card-link');
link.href = href;
link.target = '_blank';
// Haupt-Container der Karte
const card = document.createElement('div');
card.classList.add('account-card');
// Header-Bereich der Karte (Avatar + Info)
const headerContainer = document.createElement('div');
headerContainer.classList.add('account-card-header');
// Avatar
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 || '';
if (serverClass) {
avatarImage.classList.add(serverClass);
}
// Info-Bereich (Name und Handle)
const infoContainer = document.createElement('div');
infoContainer.classList.add('account-info');
const displayNameElement = document.createElement('p');
const displayNameElement = document.createElement('h3');
displayNameElement.classList.add('display-name');
displayNameElement.textContent = data.display_name || data.username;
const handleElement = document.createElement('p');
handleElement.classList.add('handle');
handleElement.textContent = `@${data.username}`;
const serverHandleElement = document.createElement('span');
serverHandleElement.classList.add('server-handle');
serverHandleElement.textContent = `@${instance}`;
const serverClass = getServerClass(instance);
if (serverClass) {
serverHandleElement.classList.add(serverClass);
}
handleElement.textContent = `@${data.username}`;
handleElement.appendChild(serverHandleElement);
infoContainer.appendChild(displayNameElement);
infoContainer.appendChild(handleElement);
card.appendChild(avatarImage);
card.appendChild(infoContainer);
headerContainer.appendChild(avatarImage);
headerContainer.appendChild(infoContainer);
// Content-Bereich (Beschreibung/Note)
const contentContainer = document.createElement('div');
contentContainer.classList.add('account-card-content');
const noteElement = document.createElement('p');
noteElement.classList.add('note');
noteElement.innerHTML = data.note || '<p>Keine Beschreibung verfügbar.</p>';
contentContainer.appendChild(noteElement);
// Footer-Bereich (Follower-Anzahl und letzter Beitrag)
const footerContainer = document.createElement('div');
footerContainer.classList.add('account-card-footer');
const followerCount = document.createElement('div');
followerCount.classList.add('follower-count');
const followerLine1 = document.createElement('span');
followerLine1.classList.add('line1');
followerLine1.textContent = 'Follower';
const followerLine2 = document.createElement('span');
followerLine2.classList.add('line2');
followerLine2.textContent = data.followers_count || '0';
followerCount.appendChild(followerLine1);
followerCount.appendChild(document.createElement('br'));
followerCount.appendChild(followerLine2);
const lastPostContainer = document.createElement('div');
lastPostContainer.classList.add('last-post');
const lastPostLine1 = document.createElement('span');
lastPostLine1.classList.add('line1');
lastPostLine1.textContent = 'letzter Beitrag';
const lastPostLine2 = document.createElement('span');
lastPostLine2.classList.add('line2');
lastPostLine2.textContent = formatLastPostDate(data.last_status_at);
lastPostContainer.appendChild(lastPostLine1);
lastPostContainer.appendChild(document.createElement('br'));
lastPostContainer.appendChild(lastPostLine2);
footerContainer.appendChild(followerCount);
footerContainer.appendChild(lastPostContainer);
card.appendChild(headerContainer);
card.appendChild(contentContainer);
card.appendChild(footerContainer);
link.appendChild(card);
return link;
}
function getServerClass(instance) {
const serverClasses = {
'libori.social': 'liboriSocial',
'reliverse.social': 'reliverseSocial',
'kirche.social': 'kircheSocial',
'katholisch.social': 'katholischSocial'
};
return serverClasses[instance] || null;
function formatLastPostDate(lastStatusAt) {
if (!lastStatusAt) return 'Keine Beiträge';
const postDate = new Date(lastStatusAt);
const currentDate = new Date();
const timeDiff = currentDate - postDate;
const daysDiff = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
if (daysDiff === 0) {
return 'heute';
} else if (daysDiff === 1) {
return 'gestern';
} else if (daysDiff > 1 && daysDiff <= 20) {
return `vor ${daysDiff} Tagen`;
} else {
return 'vor längerer Zeit';
}
}

View file

@ -1,5 +1,6 @@
import { fetchProfile } from './profile-utils.js';
import { createRecommendationPopup } from './popup-utils.js';
import { getServerClass, extractHostname } from './instances.js';
export function createStarterKitElement(kit) {
const template = document.getElementById('starterkit-template').content.cloneNode(true);
@ -22,6 +23,13 @@ export function createStarterKitElement(kit) {
if (avatarImage) {
authorLink.textContent = '';
authorLink.appendChild(avatarImage);
// Hinzufügen der server-class für den Avatar-Rahmen
const hostname = extractHostname(kit.author);
const serverClass = getServerClass(hostname);
if (serverClass) {
avatarImage.classList.add(serverClass);
}
}
});

640
style.css
View file

@ -1,640 +0,0 @@
/* 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: 20px 0;
}
#instances {
width: 100vw;
margin-left: calc(-50vw + 50%);
background-color: var(--secondary-background-color);
}
.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);
}
/* StarterKit Grid Darstellung */
.recommendations {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
padding: 0;
}
.starterkit {
background-color: var(--secondary-background-color);
border: 1px solid var(--secondary-background-color);
border-radius: 15px;
padding: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
transition: transform 0.3s ease, box-shadow 0.3s ease;
cursor: pointer;
position: relative;
min-height: 170px;
padding-bottom: 65px;
}
.starterkit:hover {
border: 1px solid var(--primary-color-hover);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}
/* StarterKit Footer */
.starterkit-footer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
padding-top: 5px;
margin: 0 15px;
font-size: 0.85rem;
color: #aaa;
background-color: var(--secondary-background-color);
border-top: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 0 0 15px 15px; /* Runde Ecken unten */
}
.starterkit h3 {
margin: 5px;
}
.starterkit p {
margin: 5px;
font-size: 0.9rem;
color: #ccc;
}
.profile-count {
font-size: 0.9rem;
color: #ccc;
text-align: center;
}
.profile-line1 {
font-size: 0.75rem;
}
.autor {
display: flex;
align-items: center;
gap: 10px;
text-align: left;
}
.autor-text {
display: flex;
flex-direction: column;
justify-content: center;
}
.created-by {
font-size: 0.75rem;
color: #aaa;
}
.author-name {
font-size: 0.9rem;
color: #fff;
font-weight: bold;
}
.account-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
}
.account {
font-size: 0.9rem;
color: #ccc;
text-decoration: none;
}
.autor .account-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
margin: 0;
}
.autor a {
text-decoration: none;
color: #ccc;
font-size: 0.9rem;
display: flex;
align-items: center;
gap: 5px;
}
/* Pop-up Styling */
.recommendation-popup {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(53, 53, 53, 0.8);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.recommendation-popup-content {
position: relative;
background-color: var(--background-color);
border-radius: 15px;
padding: 20px;
width: 98%;
max-width: 800px;
height: 80%;
overflow: hidden;
display: flex;
flex-direction: column;
}
.recommendation-popup-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.recommendation-popup-header h3 {
color: #ffffff;
margin: 0;
}
.close-popup {
position: absolute;
top: 10px;
right: 10px;
background: transparent;
border: none;
font-size: 20px;
cursor: pointer;
color: #ccc;
}
.recommendation-popup-body {
overflow-y: auto;
padding: 10px 10px 0 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
gap: 20px;
align-items: start;
margin-top: 20px;
list-style-type: none;
}
.loading-spinner {
display: none; /* Standardmäßig versteckt */
width: 50px;
height: 50px;
border: 5px solid rgba(0, 0, 0, 0.1);
border-top: 5px solid #3498db; /* Farbe des Spinners */
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 20px auto; /* Zentriert im Container */
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.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, .server-handle.liboriSocial {
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, .server-handle.reliverseSocial {
background-color: var(--reliverseSocial-color);
}
/* --- kirche.social --- */
.instance-card.kircheSocial {
border: solid 1px var(--kircheSocial-color);
}
.instance-card.kircheSocial a.bigger-button, .server-handle.kircheSocial {
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, .server-handle.katholischSocial {
background-color: var(--katholischSocial-color);
}

17
style/base.css Normal file
View file

@ -0,0 +1,17 @@
/* 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;
}

7
style/index.css Normal file
View file

@ -0,0 +1,7 @@
@import "./base.css";
@import "./site.css";
@import "./starterkit.css";
@import "./popup.css";
@import "./profile.css";
@import "./media-query.css";
@import "./instances.css";

50
style/instances.css Normal file
View file

@ -0,0 +1,50 @@
/* --- libori.social --- */
.instance-card.liboriSocial, .account-avatar.liboriSocial {
border: solid 1px var(--liboriSocial-color);
}
.instance-card.liboriSocial a.bigger-button, .server-handle.liboriSocial {
background-color: var(--liboriSocial-color);
}
.instance-card.liboriSocial a.bigger-button:hover {
background-color: var(--liboriSocial-secondary-color);
}
/* --- reliverse.social --- */
.instance-card.reliverseSocial, .account-avatar.reliverseSocial {
border: solid 1px var(--reliverseSocial-color);
}
.instance-card.reliverseSocial a.bigger-button, .server-handle.reliverseSocial {
background-color: var(--reliverseSocial-color);
}
/* --- kirche.social --- */
.instance-card.kircheSocial, .account-avatar.kircheSocial {
border: solid 1px var(--kircheSocial-color);
}
.instance-card.kircheSocial a.bigger-button, .server-handle.kircheSocial {
background-color: var(--kircheSocial-color);
}
.instance-card.kircheSocial a.bigger-button:hover {
background-color: var(--kircheSocial-secondary-color);
}
/* --- katholisch.social --- */
.instance-card.katholischSocial, .account-avatar.katholischSocial {
border: solid 1px var(--katholischSocial-color);
}
.instance-card.katholischSocial a.bigger-button, .server-handle.katholischSocial {
background-color: var(--katholischSocial-color);
}

10
style/media-query.css Normal file
View file

@ -0,0 +1,10 @@
@media (max-width: 800px) {
.recommendation-popup-content {
max-width: 500px;
}
.grid-container {
grid-template-columns: 1fr;
}
}

75
style/popup.css Normal file
View file

@ -0,0 +1,75 @@
.recommendation-popup {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(53, 53, 53, 0.8);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.recommendation-popup-content {
position: relative;
background-color: var(--background-color);
border-radius: 15px;
padding: 20px;
width: 98%;
width: 500px;
height: 80%;
overflow: hidden;
display: flex;
flex-direction: column;
}
.recommendation-popup-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.recommendation-popup-header h3 {
color: #ffffff;
margin: 0;
}
.close-popup {
position: absolute;
top: 10px;
right: 10px;
background: transparent;
border: none;
font-size: 20px;
cursor: pointer;
color: #ccc;
}
.recommendation-popup-body {
overflow-y: auto;
padding: 10px 10px 0 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
gap: 20px;
align-items: start;
margin-top: 20px;
list-style-type: none;
}
.loading-spinner {
display: none; /* Standardmäßig versteckt */
width: 50px;
height: 50px;
border: 5px solid rgba(0, 0, 0, 0.1);
border-top: 5px solid #3498db; /* Farbe des Spinners */
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 20px auto; /* Zentriert im Container */
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

240
style/profile.css Normal file
View file

@ -0,0 +1,240 @@
.account-card-link {
text-decoration: none;
color: inherit;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.account-card-link:hover {
text-decoration: none;
}
.account-card-link p {
text-decoration: none;
}
.account-card {
display: flex;
flex-direction: column;
align-items: left;
padding: 15px;
margin: 0;
border-radius: 15px;
background-color: var(--secondary-background-color);
border: 1px solid var(--secondary-background-color);
text-align: left;
position: relative;
min-height: 170px;
padding-bottom: 65px;
}
.account-card-link:hover .account-card {
border: 1px solid var(--primary-color-hover);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.account-card-header {
display: flex;
margin-bottom: 10px;
}
.account-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
object-fit: cover;
margin: 7px 15px 0px 10px;
border: solid 1px #777;
}
.account-info {
display: flex;
flex-direction: column;
margin-bottom: 10px;
}
.display-name {
font-weight: bold;
font-size: 1.4rem;
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
display: block;
}
.handle {
font-size: 0.75rem;
color: #ccc;
margin: 5px 0 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;
}
.account-card-content {
margin-bottom: 10px;
}
.note {
font-size: 0.9rem;
color: #ccc;
margin: 0;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.note p {
padding: 0;
margin: 0;
}
.account-card-footer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
font-size: 0.85rem;
text-align: center;
padding: 10px;
padding-top: 5px;
margin: 0 15px;
color: #aaa;
border-top: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 0 0 15px 15px;
}
.follower-count,
.last-post {
text-align: center;
flex-direction: column;
align-items: center;
color:#ccc;
}
.line2 {
color: white;
}
.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);
}

197
style/site.css Normal file
View file

@ -0,0 +1,197 @@
* {
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: 20px 0;
}
#instances {
width: 100vw;
margin-left: calc(-50vw + 50%);
background-color: var(--secondary-background-color);
}
.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);
}
.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;
}

116
style/starterkit.css Normal file
View file

@ -0,0 +1,116 @@
/* StarterKit Grid Darstellung */
.recommendations {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
padding: 0;
}
.starterkit {
background-color: var(--secondary-background-color);
border: 1px solid var(--secondary-background-color);
border-radius: 15px;
padding: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
transition: transform 0.3s ease, box-shadow 0.3s ease;
cursor: pointer;
position: relative;
min-height: 170px;
padding-bottom: 65px;
}
.starterkit:hover {
border: 1px solid var(--primary-color-hover);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}
/* StarterKit Footer */
.starterkit-footer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
padding-top: 5px;
margin: 0 15px;
font-size: 0.85rem;
color: #aaa;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.starterkit h3 {
margin: 5px;
}
.starterkit p {
margin: 5px;
font-size: 0.9rem;
color: #ccc;
}
.profile-count {
font-size: 0.9rem;
color: #ccc;
text-align: center;
}
.profile-line1 {
font-size: 0.75rem;
}
.autor {
display: flex;
align-items: center;
gap: 10px;
text-align: left;
}
.autor-text {
display: flex;
flex-direction: column;
justify-content: center;
}
.created-by {
font-size: 0.75rem;
color: #aaa;
}
.author-name {
font-size: 0.9rem;
color: #fff;
font-weight: bold;
}
.account-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
}
.account {
font-size: 0.9rem;
color: #ccc;
text-decoration: none;
}
.autor .account-avatar {
width: 30px;
height: 30px;
border-radius: 50%;
margin: 0;
}
.autor a {
text-decoration: none;
color: #ccc;
font-size: 0.9rem;
display: flex;
align-items: center;
gap: 5px;
}