Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- <!DOCTYPE html>
- <html lang="ru">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>High-End Gossip Layout – Compact (Dark)</title>
- <style>
- @import url("https://fontsapi.zeoseven.com/309/main/result.css"); /* KingHwaOldSong */
- :root {
- --paper-bg: #0d0d10;
- --paper-bg-soft: #141418;
- --ink-primary: #f2f2f2;
- --ink-secondary: #a0a0a5;
- --accent-gold: #d1b574;
- --border-subtle: rgba(255,255,255,0.08);
- }
- body {
- font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
- display: flex;
- justify-content: center;
- padding: 20px;
- background-color: #050507;
- color: var(--ink-primary);
- }
- .gossip-root {
- width: 100%;
- max-width: 500px;
- background: var(--paper-bg);
- border-radius: 4px;
- overflow: hidden;
- position: relative;
- border: 1px solid var(--border-subtle);
- transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
- }
- .gossip-root::before {
- content: '';
- position: absolute;
- top: 0; left: 0; right: 0; height: 2px;
- background: linear-gradient(90deg, var(--accent-gold), rgba(209,181,116,0.35));
- z-index: 5;
- }
- /* компактный header */
- .gossip-root summary {
- list-style: none;
- padding: 10px 14px;
- cursor: pointer;
- position: relative;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: var(--paper-bg);
- transition: background 0.2s, padding 0.2s;
- z-index: 10;
- }
- .gossip-root summary::-webkit-details-marker { display: none; }
- .gossip-root summary::marker { content: ""; }
- .gossip-root summary:hover { background: #16161b; }
- .gossip-root summary:focus { outline: none; }
- .gossip-root[open] summary {
- padding-top: 14px;
- padding-bottom: 12px;
- background: var(--paper-bg-soft);
- }
- .gossip-root[open] {
- border-color: rgba(209,181,116,0.5);
- transform: translateY(-1px);
- }
- .chat-meta {
- display: flex;
- flex-direction: column;
- gap: 2px;
- min-width: 0;
- }
- .chat-title {
- font-family: 'Georgia', 'Playfair Display', serif;
- font-size: 0.98rem;
- color: var(--ink-primary);
- font-weight: 600;
- letter-spacing: -0.01em;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 240px;
- }
- .chat-status {
- font-family: 'Courier New', monospace;
- font-size: 0.62rem;
- color: var(--ink-secondary);
- text-transform: uppercase;
- letter-spacing: 0.12em;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- max-width: 260px;
- }
- .toggle-icon {
- color: var(--ink-secondary);
- font-size: 0.95rem;
- transition: transform 0.3s ease;
- margin-left: 8px;
- flex-shrink: 0;
- }
- .gossip-root[open] .toggle-icon { transform: rotate(180deg); }
- .chat-messages {
- padding: 10px 16px 24px 16px;
- display: flex;
- flex-direction: column;
- gap: 16px;
- border-top: 1px dashed rgba(255,255,255,0.12);
- background: linear-gradient(to bottom, var(--paper-bg-soft) 0%, #101015 45%, #0b0b0f 100%);
- }
- .gossip-root[open] .chat-messages {
- animation: slideDown 0.5s ease forwards;
- }
- @keyframes slideDown {
- from { opacity: 0; transform: translateY(-8px); }
- to { opacity: 1; transform: translateY(0); }
- }
- .message {
- display: flex;
- align-items: flex-start;
- max-width: 90%;
- opacity: 0;
- transform: translateY(10px);
- }
- .message.animate-in {
- animation: fadeInUp 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
- }
- .avatar {
- width: 32px;
- height: 32px;
- border-radius: 50%;
- background-color: #25252b;
- color: var(--ink-primary);
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: 'Georgia', serif;
- font-weight: bold;
- font-size: 16px;
- margin-right: 10px;
- flex-shrink: 0;
- border: 1px solid rgba(255,255,255,0.12);
- }
- .message-content {
- display: flex;
- flex-direction: column;
- }
- .username {
- font-size: 0.72rem;
- color: var(--ink-secondary);
- margin-bottom: 3px;
- font-weight: 600;
- margin-left: 2px;
- }
- .bubble {
- padding: 8px 12px;
- font-size: 0.9rem;
- line-height: 1.5;
- color: #f3f3f3;
- border-radius: 11px;
- border-top-left-radius: 2px;
- position: relative;
- background: #1c1c22;
- border: 1px solid rgba(255,255,255,0.06);
- }
- .bubble span.gif-text {
- font-family: 'Courier New', monospace;
- font-size: 0.85em;
- color: var(--accent-gold);
- background-color: rgba(0,0,0,0.4);
- padding: 0 4px;
- border-radius: 3px;
- }
- @keyframes fadeInUp {
- to { opacity: 1; transform: translateY(0); }
- }
- @media (max-width: 480px) {
- .gossip-root { max-width: 100%; }
- .chat-title { max-width: 180px; }
- .chat-status { max-width: 200px; }
- .chat-messages { padding: 8px 12px 18px; }
- }
- </style>
- </head>
- <body>
- <details class="gossip-root" id="gossip-details">
- <summary>
- <div class="chat-meta">
- <span class="chat-title" id="group-name">Gossip Protocol</span>
- <span class="chat-status">Encrypted Log // Click to Expand</span>
- </div>
- <div class="toggle-icon">▼</div>
- </summary>
- <div class="chat-messages" id="chat-messages">
- <!-- JS заполнит это -->
- </div>
- </details>
- <div id="raw-data" style="display: none;">
- $1
- </div>
- <script>
- document.addEventListener('DOMContentLoaded', function() {
- const rawDataElement = document.getElementById('raw-data');
- const groupNameElement = document.getElementById('group-name');
- const chatMessagesContainer = document.getElementById('chat-messages');
- const detailsBlock = document.getElementById('gossip-details');
- const morandiColors = [
- '#272730', '#20222b', '#262933', '#1f252e',
- '#292a35', '#232630', '#252934', '#21242f'
- ];
- const shuffleArray = (array) => {
- let currentIndex = array.length, randomIndex;
- while (currentIndex !== 0) {
- randomIndex = Math.floor(Math.random() * currentIndex);
- currentIndex--;
- [array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
- }
- return array;
- };
- const shuffledColors = shuffleArray([...morandiColors]);
- const rawText = rawDataElement.textContent;
- const lines = rawText.split('\n').filter(line => line.trim() !== '');
- const groupNameRegex = /【(.*?)】/;
- const messageRegex = /(.+?)[::](.*)/;
- const cleanupRegex = /^\s*[>—\s]*/;
- let messageCounter = 0;
- const groupNameMatch = rawText.match(groupNameRegex);
- if(groupNameMatch) {
- groupNameElement.textContent = groupNameMatch[1].trim();
- }
- lines.forEach((line) => {
- const cleanedLine = line.replace(cleanupRegex, '').trim();
- if (!cleanedLine) return;
- const messageMatch = cleanedLine.match(messageRegex);
- if (messageMatch) {
- const userBlock = messageMatch[1].trim();
- const messageText = messageMatch[2].trim();
- if (!userBlock || userBlock.startsWith('【')) return;
- const avatarChar = [...userBlock][0];
- const username = userBlock.substring(avatarChar.length).trim();
- const messageDiv = document.createElement('div');
- messageDiv.className = 'message';
- const avatarDiv = document.createElement('div');
- avatarDiv.className = 'avatar';
- avatarDiv.textContent = avatarChar;
- const messageContentDiv = document.createElement('div');
- messageContentDiv.className = 'message-content';
- const usernameDiv = document.createElement('div');
- usernameDiv.className = 'username';
- usernameDiv.textContent = username;
- const bubbleDiv = document.createElement('div');
- bubbleDiv.className = 'bubble';
- bubbleDiv.style.backgroundColor = shuffledColors[messageCounter % shuffledColors.length];
- const processedMessageHTML = messageText.replace(
- /[((](.*?)[))]/g,
- (match) => `<span class="gif-text">${match}</span>`
- );
- bubbleDiv.innerHTML = processedMessageHTML;
- messageContentDiv.appendChild(usernameDiv);
- messageContentDiv.appendChild(bubbleDiv);
- messageDiv.appendChild(avatarDiv);
- messageDiv.appendChild(messageContentDiv);
- chatMessagesContainer.appendChild(messageDiv);
- messageCounter++;
- }
- });
- let hasAnimated = false;
- const runAnimations = () => {
- if(hasAnimated) return;
- const messages = document.querySelectorAll('.message');
- messages.forEach((msg, index) => {
- setTimeout(() => {
- msg.classList.add('animate-in');
- }, index * 120);
- });
- hasAnimated = true;
- };
- if(detailsBlock.hasAttribute('open')) {
- runAnimations();
- }
- detailsBlock.addEventListener('toggle', function() {
- if (this.open) {
- runAnimations();
- }
- });
- });
- </script>
- </body>
- </html>
- ```
Advertisement
Add Comment
Please, Sign In to add comment