Files
fedipage/src/main/resources/templates/profil.vm
T

334 lines
7.8 KiB
Plaintext
Raw Normal View History

2025-09-19 18:48:08 +02:00
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2025-09-21 19:07:33 +02:00
<title>$page.displayName - $page.username</title>
2025-09-19 18:48:08 +02:00
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #1a1a1a;
color: #ffffff;
line-height: 1.6;
}
.container {
2025-09-23 13:58:55 +02:00
max-width: 800px;
2025-09-19 18:48:08 +02:00
margin: 0 auto;
background: #282c37;
min-height: 100vh;
}
.header {
position: relative;
height: 200px;
background: linear-gradient(45deg, #6364ff, #563acc);
overflow: hidden;
}
.banner {
width: 100%;
height: 100%;
object-fit: cover;
}
.profile-section {
position: relative;
padding: 0 20px 20px;
background: #282c37;
}
.profile-avatar {
width: 80px;
height: 80px;
border-radius: 50%;
border: 4px solid #282c37;
margin-top: -40px;
background: #fff;
}
.profile-info {
margin-top: 15px;
}
.display-name {
font-size: 20px;
font-weight: bold;
margin-bottom: 5px;
}
.username {
color: #9baec8;
margin-bottom: 10px;
}
.username a {
color: #9baec8;
text-decoration: none;
}
.bio {
margin-bottom: 15px;
line-height: 1.5;
}
.stats {
display: flex;
gap: 20px;
font-size: 14px;
color: #9baec8;
}
.controls {
padding: 20px;
background: #313543;
border-bottom: 1px solid #393f4f;
}
.checkbox-group {
display: flex;
gap: 20px;
align-items: center;
}
.checkbox-group label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
color: #9baec8;
}
.checkbox-group input[type="checkbox"] {
accent-color: #6364ff;
}
.posts {
background: #282c37;
}
.post {
border-bottom: 1px solid #393f4f;
padding: 15px 20px;
}
.post-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
}
.post-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
}
.post-user {
flex: 1;
}
.post-display-name {
font-weight: bold;
font-size: 14px;
}
.post-username {
color: #9baec8;
font-size: 13px;
}
.post-username a {
color: #9baec8;
font-size: 13px;
text-decoration: none;
}
.post-date {
color: #9baec8;
font-size: 13px;
}
2025-09-20 14:13:00 +02:00
.post-date a {
color: #9baec8;
font-size: 13px;
text-decoration: none;
}
2025-09-19 18:48:08 +02:00
.post-content {
margin-bottom: 10px;
}
.post-content p {
margin-bottom: 10px;
}
.post-content a {
color: #6364ff;
text-decoration: none;
}
.post-content a:hover {
text-decoration: underline;
}
.hashtag {
color: #00d4aa;
}
.mention {
color: #6364ff;
}
.post-media {
margin-top: 10px;
}
.media-grid {
display: grid;
gap: 4px;
border-radius: 8px;
overflow: hidden;
}
.media-grid.single {
grid-template-columns: 1fr;
}
.media-grid.double {
grid-template-columns: 1fr 1fr;
}
.media-grid.multiple {
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
}
.media-item {
position: relative;
background: #000;
}
.media-item img {
width: 100%;
2025-09-23 13:58:55 +02:00
height: 240px;
2025-09-19 18:48:08 +02:00
object-fit: cover;
cursor: pointer;
}
.post-stats {
display: flex;
gap: 15px;
margin-top: 10px;
color: #9baec8;
font-size: 13px;
}
.boost-indicator {
color: #00d4aa;
font-size: 13px;
margin-bottom: 10px;
}
.loading {
text-align: center;
padding: 40px;
color: #9baec8;
}
.error {
text-align: center;
padding: 40px;
color: #ff5050;
}
.refresh-btn {
background: #6364ff;
color: white;
border: none;
padding: 8px 16px;
border-radius: 20px;
cursor: pointer;
font-size: 14px;
}
.refresh-btn:hover {
background: #5a5bef;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
2025-09-21 19:07:33 +02:00
<img id="banner" class="banner" alt="Banner" src="$page.headerUrl">
2025-09-19 18:48:08 +02:00
</div>
<div class="profile-section">
2025-09-21 19:07:33 +02:00
<img id="avatar" class="profile-avatar" alt="Avatar" src="$page.avatarUrl">
2025-09-19 18:48:08 +02:00
<div class="profile-info">
2025-09-21 19:07:33 +02:00
<div id="displayName" class="display-name">$page.displayName</div>
<div id="username" class="username"><a href="$page.url">$page.username</a></div>
<div id="bio" class="bio">$page.description</div>
2025-09-19 18:48:08 +02:00
<div class="stats">
2025-09-21 19:07:33 +02:00
<span id="followingCount">$page.following Folgt</span>
<span id="followersCount">$page.followers Follower</span>
<span id="statusesCount">$page.posts Beiträge</span>
2025-09-19 18:48:08 +02:00
</div>
</div>
</div>
<div id="posts" class="posts">
2025-09-21 19:07:33 +02:00
#foreach( $post in $page.timeline )
2025-09-19 18:48:08 +02:00
<div class="post">
2025-09-20 12:14:19 +02:00
#set ( $image_class = 'single' )
2025-09-23 13:58:55 +02:00
#if ( $post.media.size() > 1)
#set ( $image_class = 'double' )
#end
#if ( $post.media.size() > 2)
#set ( $image_class = 'multiple' )
#end
2025-09-21 19:07:33 +02:00
#set ( $post_date = $dateformatter.format( $post.createdAt ) )
#if ( $post.pinned )
<div class="boost-indicator">📌 Angeheftet</div>
2025-09-20 12:14:19 +02:00
#end
2025-09-21 19:07:33 +02:00
#if ( $post.boosted )
<div class="boost-indicator">🔄 $page.displayName hat geteilt</div>
2025-09-20 12:14:19 +02:00
#end
2025-09-19 18:48:08 +02:00
<div class="post-header">
2025-09-21 19:07:33 +02:00
<img class="post-avatar" src="$post.authorAvatarUrl" alt="Avatar">
2025-09-19 18:48:08 +02:00
<div class="post-user">
2025-09-21 19:07:33 +02:00
<div class="post-display-name">$post.authorDisplayName</div>
<div class="post-username"><a href="$post.authorUrl">$post.authorHandle</a></div>
2025-09-19 18:48:08 +02:00
</div>
2025-09-21 19:07:33 +02:00
<div class="post-date"><a href="$post.postUrl" target="_blank">$post_date</a></div>
2025-09-19 18:48:08 +02:00
</div>
<div class="post-content">$post.content</div>
<div class="post-media">
2025-09-20 12:14:19 +02:00
<div class="media-grid $image_class">
2025-09-21 19:07:33 +02:00
#foreach( $medium in $post.media )
2025-09-19 18:48:08 +02:00
<div class="media-item">
2025-09-21 19:07:33 +02:00
<img src="$medium.mediumImage" alt="$medium.description" onclick="window.open('$medium.mediumUrl', '_blank')">
2025-09-19 18:48:08 +02:00
</div>
2025-09-20 12:14:19 +02:00
#end
2025-09-19 18:48:08 +02:00
</div>
</div>
<div class="post-stats">
2025-09-21 19:07:33 +02:00
<span>🔄 $post.boosts</span>
<span>⭐ $post.likes</span>
<span>💬 $post.comments</span>
2025-09-19 18:48:08 +02:00
</div>
</div>
#end
</div>
</div>
</body>
</html>