Список пользователей

1
Админ
Постов: 101
2
Элита
Постов: 34
3
Элита
Постов: 28
4
VIP
Постов: 26
5
Дизайнер
Постов: 25
6
Пользователи
Постов: 25
7
Пользователи
Постов: 24
8
Проверенные
Постов: 21

  • Страница 1 из 1
  • 1
iPad rendering logic - комментариИ всех модулей UCOZ
Дата: Пятница, 31.10.2025, 13:47 | Сообщение # 1 | | Написал: Начинающий
Автор темы
Мурчанн не в сети
        Сообщений:101
         Регистрация:20.10.2016

Добавил несколько новых опций и элементов, отвечающих за визуальную эстетику.

Установка остаётся такой же, как в первой версии.

Первая тема , самой первой версии

Я не стал публиковать CSS, HTML и JS отдельно — всё объединено в один общий блок.
Просто создайте глобальный контейнер, поместите в него iPad rendering logic,
а затем добавьте нужный вам информер.

У меня он встроен в шаблон под номером 5 - просто измените путь на свой информер, и готово.

Код
<!-- iPad контейнер -->
<div class="ipad-mockup">

<div class="real-pencil">
<div class="pencil-tip"></div>
<div class="pencil-body">
<span class="pencil-label">Apple Pencil</span>

</div>
<div class="pencil-top"></div>

<span class="pencil-label">
<span class="apple-icon">🍏</span>
</span>

</div>

<div class="ipad-screen">

<!-- Основной контент внутри экрана -->
<div class="acesories">

<!-- Вывод комментарии через информер -->

$MYINF_5$

<!-- Комментарии -->

</div>
</div>

<div class="ipad-label">iPad</div>
</div>

<style>

/* Ромбовидный стилус */
.real-pencil {
position: absolute;
left: -50px;
top: 50px;
width: 25px;
height: 600px;
display: flex;
flex-direction: column;
align-items: center;
transform: rotate(-8deg);
z-index: 10;
animation: sway 6s infinite ease-in-out;
}

.pencil-label {
writing-mode: vertical-rl;
font-size: 11px;
color: #555;
font-family: "Segoe UI", sans-serif;
font-weight: bold;
text-shadow: 0 0 1px rgba(0,0,0,0.3);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(180deg);
display: flex;
align-items: center;
gap: 2px;
}

.apple-icon {
display: inline-block;
transform: rotate(90deg);
font-size: 12px;
margin-bottom: 80px; /* сдвигаем вниз/назад относительно текста */
}

/* Основной корпус с гранями */
.pencil-body {
flex: 1;
width: 24px;
background: linear-gradient(180deg, #fefefe 0%, #e6e6e6 100%);
clip-path: polygon(
50% 0%, /* верхний центр */
95% 10%, /* верхний правый угол */
95% 90%, /* нижний правый угол */
50% 100%, /* низ центр */
5% 90%, /* нижний левый угол */
5% 10% /* верхний левый угол */
);
box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 0 6px rgba(255,255,255,0.2);
position: relative;
display: flex;
justify-content: center;
align-items: center;
margin-top: -2px;
}

/* Надпись на корпусе с символом Apple */
.pencil-label {
writing-mode: vertical-rl;
transform: rotate(180deg);
font-size: 11px;
color: #555;
font-family: "Segoe UI", sans-serif;
font-weight: bold;
text-shadow: 0 0 1px rgba(0,0,0,0.3);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(180deg);
}

/* Добавляем сам текст с символом Apple через ::before */
.pencil-label::before {
content: " ";
font-size: 12px; /* немного больше, чтобы был заметен */
display: inline-block;
margin-bottom: 2px; /* подгоняем под вертикальный текст */
}

/* Верхняя часть */
.pencil-top {
width: 8px;
height: 8px;
background: #dcdcdc;
border-radius: 50%;
margin-top: -2px;
box-shadow: 0 1px 5px rgba(0,0,0,0.3), inset 0 1px 3px rgba(255,255,255,0.4);
}

/* Анимация лёгкого колебания */
@keyframes sway {
0%,100% { transform: rotate(-1deg); }
50% { transform: rotate(-0deg); }
}

/* iPad блок */

.ipad-mockup {
width: 768px;
max-width: 90vw;
height: 880px;
background: #1c1c1c;
border-radius: 40px;
box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 0 4px rgba(255,255,255,0.1);
position: relative;
margin: 40px auto;
font-family: "Segoe UI", sans-serif;

/* Настраиваем внутренние отступы отдельно */
padding-top: 20px;
padding-left: 20px;
padding-right: 20px;
padding-bottom: 40px; /* <- увеличена нижняя рамка для надписи iPad */

display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}

/* Ограничиваем фон и шрифт только для iPad */
.ipad-mockup {
background: radial-gradient(circle at top left, #0b0614, #11081f 80%);
font-family: "Segoe UI", sans-serif;
color: #fff;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
min-height: 980px; /* или 100% родителя */
padding: 0;
margin: 40px auto;
border-radius: 40px;
box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 0 4px rgba(255,255,255,0.1);
}

.next-btn {
text-decoration: none;
padding: 12px 20px;
border-radius: 25px;
color: #fff;
background: linear-gradient(135deg, #875bc7 0%, #54a4f3 100%);
font-weight: 600;
font-size: 14px;
transition: all 0.25s ease;
}

.next-btn:hover {
transform: scale(1.05);
box-shadow: 0 0 20px rgba(162, 77, 252, 0.5);
}

.comment {
display: -webkit-box;
-webkit-line-clamp: 3; /* показываем максимум 3 строки */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}

/* Вырез под камеру/динамик сверху с отступом */
.ipad-mockup::before {
content: "";
position: absolute;
top: 8px; /* увеличен отступ сверху, был 12px */
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 6px;
background: #333;
border-radius: 3px;
}

/* Экран планшета */
.ipad-screen {
width: 100%;
height: 100%;
background: radial-gradient(circle at top left, #0b0614, #11081f 80%);
border-radius: 30px;
overflow: hidden;
padding: 20px;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}

/* Надпись iPad снизу с настраиваемым отступом */
:root {
--ipad-label-bottom: 8px; /* изменяем это значение, чтобы регулировать позицию */
}

.ipad-label {
position: absolute;
bottom: var(--ipad-label-bottom);
width: 100%;
text-align: center;
font-family: "Segoe UI", sans-serif;
font-weight: 600;
font-size: 20px;
color: #bbb;
letter-spacing: 1px;
text-shadow: 0 0 4px rgba(0,0,0,0.6);
}

/* Контейнер по центру с прокруткой*/
.acesories {
position: relative;
width: 780px;
height: 970px;
display: flex;
flex-direction: column; /* вертикальный поток комментариев */
justify-content: flex-start; /* прижимаем к верху */
align-items: stretch; /* растягиваем комментарии по ширине */

background: radial-gradient(circle at top left, #1a0826, #0c0713 80%);
border-radius: 12px;
box-shadow: 0 0 30px rgba(120, 40, 180, 0.4);

overflow-y: auto; /* включаем вертикальный скролл */
padding: 20px; /* немного меньше, чем было 60px */
margin: 10px auto;
}

/* Отступы между комментариями */
:root {
--comment-gap: 5px;
}

/* Комментарий */
.askolenada {
width: 93%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 28px 16px 160px;
background: linear-gradient(135deg, rgba(40, 20, 60, 0.9), rgba(30, 10, 50, 0.9));
border-radius: 100px 30px 30px 100px;
box-shadow: 0 8px 25px rgba(150, 70, 255, 0.25);
color: #fff;
font-size: 16px;
opacity: 0;
transform: translateY(50px);
position: relative;
margin-top: var(--comment-gap, 22px);
transition: transform 0.8s ease, opacity 0.8s ease;
animation: slideUp 1s ease forwards;
}

/* Анимация появления */
@keyframes slideUp {
from { opacity: 0; transform: translateY(60px); }
to { opacity: 1; transform: translateY(0); }
}

/* Задержки для упорядоченности */
.askolenada:nth-child(1) { animation-delay: 0.2s; }
.askolenada:nth-child(2) { animation-delay: 0.5s; }
.askolenada:nth-child(3) { animation-delay: 0.8s; }
.askolenada:nth-child(4) { animation-delay: 1.1s; }
.askolenada:nth-child(5) { animation-delay: 1.4s; }

/* Контейнер текста */
.text-wrapper {
display: flex;
flex-direction: column;
justify-content: flex-start;
text-align: left;
margin-left: calc(var(--text-left, -50px));
margin-top: calc(var(--text-top, 0px));
}

/* Ник */
.nickname {
font-weight: 700;
font-size: 18px;
color: #d4b9ff;
text-shadow: 0 0 8px rgba(180, 90, 255, 0.5);

/* Отступы */
margin-top: -8px; /* сверху */
margin-bottom: 0px; /* снизу */

}

/* Комментарий */
.comment {
font-size: 15px;
color: #f4f4f4;
line-height: 1.4;
text-shadow: 0 0 6px rgba(180, 120, 255, 0.25);
}

/* Аватар */
.askolenada .img {
height: 85px;
width: 85px;
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
background: linear-gradient(145deg, #9a4dff, #692ac7);
border-radius: 50%;
padding: 5px;
box-shadow: 0 0 15px rgba(150, 70, 255, 0.5);

/* Отступы */
margin-top: 0px; /* сверху */
margin-bottom: 0px; /* снизу */
margin-left: -14px; /* слева */
}

.askolenada .img img {
height: 100%;
width: 100%;
border-radius: 50%;
object-fit: cover;
border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Кнопка */
.askolenada a {
text-decoration: none;
padding: 14px 22px;
border-radius: 25px;
color: #fff;
background: linear-gradient(135deg, #a24dfc 0%, #5c26e0 100%);
font-weight: 600;
font-size: 15px;
transition: all 0.25s ease;
box-shadow: 0 0 12px rgba(162, 77, 252, 0.4);
}

.askolenada a:hover {
transform: scale(1.05);
box-shadow: 0 0 20px rgba(162, 77, 252, 0.7);
}

/* Эффект свечения */
.askolenada::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: radial-gradient(circle at 80% 50%, rgba(200, 100, 255, 0.3), transparent 70%);
opacity: 0;
transition: opacity 0.5s ease;
}

.askolenada.active::after {
opacity: 1;
animation: glowTrail 1.8s ease-out;
}

@keyframes glowTrail {
0% { opacity: 1; filter: blur(6px); }
100% { opacity: 0; filter: blur(20px); }
}
</style>

<script>
const comments = document.querySelectorAll('.askolenada');
const visibleSlots = 4;
let queue = [...comments];
let active = [];

function showNext() {
if (queue.length === 0) return;
const comment = queue.shift();
active.push(comment);

comment.style.opacity = '1';
comment.style.transform = `translateY(${active.indexOf(comment) * 85}px)`;
comment.classList.add('active');

if (active.length === visibleSlots) {
setTimeout(() => hideFirst(), 10000);
} else {
setTimeout(showNext, 800);
}
}

function hideFirst() {
const first = active.shift();
first.style.opacity = '0';
first.style.transform = `translateY(-100%)`;

if (queue.length > 0) {
showNext();
} else {
queue.push(first);
setTimeout(showNext, 500);
}
}

showNext();

const commentGap = 85 + 8;
setInterval(() => {
active.forEach((c, i) => {
c.style.transform = `translateY(${i * commentGap}px)`;
});
}, 300);
</script>


Не удалось полностью воспроизвести оригинальный дизайн от Apple Стилиуса, оказалось сложнее, чем я думал.

Поэтому дорабатывайте сами: модернизируйте iPad rendering logic, экспериментируйте с палитрой, вносите изменения и совершенствуйте, возможно, у вас получится даже лучше.

Визуальные баги пока ещё встречаются; по мере их устранения я буду вносить правки. Пока оставляю как есть.

Мурчанн

Признаюсь, не знаю почему, но глядя на звезды мне всегда хочется мечтать.
  • Страница 1 из 1
  • 1
Поиск: