[hideprofile]добро пожаловать!
выбирай подарочное оформление и не забудь заполнить личную страницу
заполнить личную страницу
[html]
<style>
/* =========================================================
RESONANCE — ПОДАРОЧНЫЕ ОФОРМЛЕНИЯ
3 превью мини-профиля по центру
========================================================= */
.res-gift-preview-wrap {
width: 100%;
box-sizing: border-box;
padding: 15px 0 20px;
}
.res-gift-preview-row {
width: 100%;
display: flex;
justify-content: center;
align-items: flex-start;
gap: 18px;
flex-wrap: wrap;
box-sizing: border-box;
}
/* =========================================================
ОДИН МИНИ-ПРОФИЛЬ
========================================================= */
.res-gift-profile {
width: 224px;
flex: 0 0 224px;
box-sizing: border-box;
padding: 6px;
position: relative;
font: 300 11px/100% var(--font);
color: var(--text1);
background: var(--beg300);
border-radius: 10px;
overflow: hidden;
}
/* =========================================================
ПЕРСОНАЛЬНЫЙ ФОН
========================================================= */
.res-gift-profile-bg {
width: 224px;
height: 60px;
margin: -6px -6px -20px;
position: relative;
background-image: var(--gift-bg);
background-position: center;
background-size: cover;
background-repeat: no-repeat;
overflow: hidden;
border-radius: 10px 10px 0 0;
}
/* =========================================================
КРУГЛАЯ ИКОНКА
========================================================= */
.res-gift-profile-icon {
width: 40px;
height: 40px;
position: absolute;
z-index: 10;
top: 20px;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
align-items: center;
background: var(--beg100);
border-radius: 100%;
}
.res-gift-profile-icon img {
width: 35px;
height: 35px;
object-fit: contain;
}
/* =========================================================
ВНУТРЕННЯЯ ЧАСТЬ
========================================================= */
.res-gift-profile-inner {
box-sizing: border-box;
margin: 0;
padding: 15px;
display: flex;
flex-direction: column;
gap: 10px;
position: relative;
color: var(--text1);
background: var(--beg500);
border-radius: 8px;
overflow: hidden;
}
/* =========================================================
ИМЯ + OFF
========================================================= */
.res-gift-author {
display: flex;
justify-content: center;
align-items: center;
gap: 5px;
padding: 0;
position: relative;
font: 600 14px var(--font);
letter-spacing: -.05em;
text-align: center;
text-transform: lowercase;
}
.res-gift-offline {
display: flex;
justify-content: center;
align-items: center;
padding: 0 5px 2px;
background: var(--beg300);
border-radius: 3px;
color: var(--text1);
font-size: 8px;
font-weight: 400;
letter-spacing: 0;
}
/* =========================================================
СТАНДАРТНОЕ ЛЗ
========================================================= */
.res-gift-title {
position: relative;
margin: -8px 0 0;
padding: 0;
text-align: center;
font-size: 10px;
font-weight: 300;
}
/* =========================================================
АВАТАР
========================================================= */
.res-gift-avatar {
width: 180px;
margin: 0 auto;
line-height: 0;
}
.res-gift-avatar img {
display: block;
width: 180px;
max-width: 180px;
border-radius: 8px;
}
/* =========================================================
ЛЗ
========================================================= */
.res-gift-lz {
display: flex;
flex-direction: column;
gap: 5px;
text-align: justify;
font-size: 9px;
line-height: 140%;
}
.res-gift-ank {
font: normal 16px var(--font-accent2);
text-align: center;
}
.res-gift-desc {
padding-bottom: 10px;
border-bottom: 1px solid var(--borders2);
}
.res-gift-race {
padding: 3px 10px;
background: var(--beg300);
box-shadow: 1px 1px 5px rgba(var(--b-bg), .09);
border-radius: 5px;
text-align: center;
text-transform: uppercase;
font-size: 9px;
font-weight: 500;
}
/* =========================================================
СТАТИСТИКА
========================================================= */
.res-gift-stats {
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
position: relative;
margin: 0 -15px -20px;
padding: 8px 20px;
background: var(--beg300);
border-radius: 0 0 10px 10px;
}
.res-gift-stat {
height: 30px;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
font-size: 10px;
line-height: 130%;
font-weight: 400;
color: var(--text1);
text-align: center;
}
.res-gift-stat-icon {
width: 11px;
height: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1px;
}
.res-gift-stat-icon::before {
content: "";
display: block;
width: 11px;
height: 11px;
background: var(--text1);
opacity: .65;
mask-repeat: no-repeat;
mask-position: center;
mask-size: cover;
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-size: cover;
}
/* сообщения */
.res-gift-stat.posts .res-gift-stat-icon::before {
mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/26596.svg");
-webkit-mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/26596.svg");
}
/* реакции */
.res-gift-stat.respect .res-gift-stat-icon::before {
mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/56762.svg");
-webkit-mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/56762.svg");
}
/* игровые посты */
.res-gift-stat.gameposts .res-gift-stat-icon::before {
mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/12328.svg");
-webkit-mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/12328.svg");
}
/* банк */
.res-gift-stat.money .res-gift-stat-icon::before {
mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/44282.svg");
-webkit-mask-image:
url("https://forumstatic.ru/files/001c/cb/a9/44282.svg");
}
/* =========================================================
НИЖНЯЯ ПЛАШКА
можно использовать:
1. только цвет
2. картинку + цвет-подложку
========================================================= */
.res-gift-bottom {
width: 224px;
height: 27px;
margin: 0 -6px -6px;
display: flex;
justify-content: center;
align-items: center;
background-color:
var(--gift-plash-color, var(--accent1));
background-image:
var(--gift-plash-image, none);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border-radius: 0 0 10px 10px;
color: var(--gift-plash-text, var(--text3));
text-transform: lowercase;
font-size: 10px;
overflow: hidden;
}
/* =========================================================
КОПИРОВАНИЕ ПОДАРОЧНОГО ОФОРМЛЕНИЯ
Кнопка появляется при наведении и не меняет размеры превью
========================================================= */
.res-gift-copy {
position: absolute;
z-index: 50;
top: 8px;
right: 8px;
padding: 4px 7px;
border: 0;
border-radius: 5px;
background: rgba(255,255,255,.82);
color: #333;
font: 600 8px/1 var(--font);
text-transform: lowercase;
cursor: pointer;
opacity: 0;
transform: translateY(-3px);
transition:
opacity .2s ease,
transform .2s ease,
background .2s ease;
}
.res-gift-profile:hover .res-gift-copy,
.res-gift-copy:focus {
opacity: 1;
transform: translateY(0);
}
.res-gift-copy:hover {
background: rgba(255,255,255,.96);
}
.res-gift-copy.is-copied {
opacity: 1;
transform: translateY(0);
}
</style>
<div class="res-gift-preview-wrap">
<div class="res-gift-preview-row">
<!-- =========================================================
ОФОРМЛЕНИЕ 1
========================================================= -->
<div class="res-gift-profile"
style="
--gift-bg:url('https://i.pinimg.com/736x/a7/c1/8e/a7c18e4aa6b96b2c0306c14e7c4de104.jpg');
--gift-plash-color:#a95d23;
--gift-plash-image:none;
--gift-plash-text:#E6E6E6;
">
<div class="res-gift-profile-bg"></div>
<div class="res-gift-profile-icon">
<img src="https://upforme.ru/uploads/001c/c6/3d/5/81522.gif">
</div>
<div class="res-gift-profile-inner">
<div class="res-gift-author">
<span class="res-gift-offline">off</span>
<span>name surname</span>
</div>
<div class="res-gift-title">
lorem ipsum
</div>
<div class="res-gift-avatar">
<img src="https://forumstatic.ru/files/001c/cb/a9/40210.png">
</div>
<div class="res-gift-lz">
<div class="res-gift-ank">
name surname
</div>
<div class="res-gift-desc">
lorem ipsum dolor sit amet, consectetur adipiscing elit. sed do eiusmod tempor incididunt ut labore.
</div>
<div class="res-gift-race">
lorem ipsum
</div>
</div>
<div class="res-gift-stats">
<div class="res-gift-stat posts">
<span class="res-gift-stat-icon"></span>
<span>1056</span>
</div>
<div class="res-gift-stat respect">
<span class="res-gift-stat-icon"></span>
<span>2659</span>
</div>
<div class="res-gift-stat gameposts">
<span class="res-gift-stat-icon"></span>
<span>0/0</span>
</div>
<div class="res-gift-stat money">
<span class="res-gift-stat-icon"></span>
<span>675</span>
</div>
</div>
</div>
<div class="res-gift-bottom">
Secrets live here
</div>
</div>
<!-- =========================================================
ОФОРМЛЕНИЕ 2
========================================================= -->
<div class="res-gift-profile"
style="
--gift-bg:url('https://upforme.ru/uploads/001c/c6/3d/5/205137.gif');
--gift-plash-color:#000000;
--gift-plash-image:none;
--gift-plash-text:#E6E6E6;
">
<div class="res-gift-profile-bg"></div>
<div class="res-gift-profile-icon">
<img src="https://upforme.ru/uploads/001c/c6/3d/5/897919.gif">
</div>
<div class="res-gift-profile-inner">
<div class="res-gift-author">
<span class="res-gift-offline">off</span>
<span>name surname</span>
</div>
<div class="res-gift-title">
lorem ipsum
</div>
<div class="res-gift-avatar">
<img src="https://forumstatic.ru/files/001c/cb/a9/40210.png">
</div>
<div class="res-gift-lz">
<div class="res-gift-ank">
name surname
</div>
<div class="res-gift-desc">
lorem ipsum dolor sit amet, consectetur adipiscing elit. sed do eiusmod tempor incididunt ut labore.
</div>
<div class="res-gift-race">
lorem ipsum
</div>
</div>
<div class="res-gift-stats">
<div class="res-gift-stat posts">
<span class="res-gift-stat-icon"></span>
<span>1056</span>
</div>
<div class="res-gift-stat respect">
<span class="res-gift-stat-icon"></span>
<span>2659</span>
</div>
<div class="res-gift-stat gameposts">
<span class="res-gift-stat-icon"></span>
<span>0/0</span>
</div>
<div class="res-gift-stat money">
<span class="res-gift-stat-icon"></span>
<span>675</span>
</div>
</div>
</div>
<div class="res-gift-bottom">
magic is believing in yourself
</div>
</div>
<!-- =========================================================
ОФОРМЛЕНИЕ 3
ПРИМЕР ПЛАШКИ С КАРТИНКОЙ
========================================================= -->
<div class="res-gift-profile"
style="
--gift-bg:url('https://i.pinimg.com/1200x/2f/10/17/2f101732f2f9d583d1e2e9cf25f90d3f.jpg');
--gift-plash-color:#71423A;
--gift-plash-image:url('https://i.pinimg.com/1200x/19/61/0f/19610f8e3579711f1b21725cd5a8d936.jpg');
--gift-plash-text:#FFFFFF;
">
<div class="res-gift-profile-bg"></div>
<div class="res-gift-profile-icon">
<img src="https://upforme.ru/uploads/001c/c6/3d/5/776175.gif">
</div>
<div class="res-gift-profile-inner">
<div class="res-gift-author">
<span class="res-gift-offline">off</span>
<span>name surname</span>
</div>
<div class="res-gift-title">
lorem ipsum
</div>
<div class="res-gift-avatar">
<img src="https://forumstatic.ru/files/001c/cb/a9/40210.png">
</div>
<div class="res-gift-lz">
<div class="res-gift-ank">
name surname
</div>
<div class="res-gift-desc">
lorem ipsum dolor sit amet, consectetur adipiscing elit. sed do eiusmod tempor incididunt ut labore.
</div>
<div class="res-gift-race">
lorem ipsum
</div>
</div>
<div class="res-gift-stats">
<div class="res-gift-stat posts">
<span class="res-gift-stat-icon"></span>
<span>1056</span>
</div>
<div class="res-gift-stat respect">
<span class="res-gift-stat-icon"></span>
<span>2659</span>
</div>
<div class="res-gift-stat gameposts">
<span class="res-gift-stat-icon"></span>
<span>0/0</span>
</div>
<div class="res-gift-stat money">
<span class="res-gift-stat-icon"></span>
<span>675</span>
</div>
</div>
</div>
<div class="res-gift-bottom">
Where there is love there is life
</div>
</div>
</div>
</div>
<script>
(function () {
function cleanCssUrl(value) {
value = (value || '').trim();
if (!value || value === 'none') {
return 'none';
}
var match = value.match(/^url\((['"]?)(.*?)\1\)$/i);
return match ? match[2] : value;
}
function fallbackCopy(text) {
var area = document.createElement('textarea');
area.value = text;
area.setAttribute('readonly', '');
area.style.position = 'fixed';
area.style.left = '-9999px';
document.body.appendChild(area);
area.select();
try {
document.execCommand('copy');
} catch (e) {}
document.body.removeChild(area);
}
function copyText(text) {
if (navigator.clipboard && window.isSecureContext) {
return navigator.clipboard.writeText(text).catch(function () {
fallbackCopy(text);
});
}
fallbackCopy(text);
return Promise.resolve();
}
document.querySelectorAll('.res-gift-profile').forEach(function (profile) {
if (profile.querySelector('.res-gift-copy')) return;
var button = document.createElement('button');
button.type = 'button';
button.className = 'res-gift-copy';
button.textContent = 'скопировать';
button.title = 'Скопировать оформление';
profile.appendChild(button);
button.addEventListener('click', function (event) {
event.preventDefault();
event.stopPropagation();
var styles = getComputedStyle(profile);
var bottom = profile.querySelector('.res-gift-bottom');
var icon = profile.querySelector('.res-gift-profile-icon img');
var mainBg = cleanCssUrl(
styles.getPropertyValue('--gift-bg')
);
var iconUrl = icon
? (icon.getAttribute('src') || '').trim()
: '';
var plashColor =
styles.getPropertyValue('--gift-plash-color').trim()
|| 'default';
var plashImage = cleanCssUrl(
styles.getPropertyValue('--gift-plash-image')
);
var plashTextColor =
styles.getPropertyValue('--gift-plash-text').trim()
|| 'default';
var plashText = bottom
? bottom.textContent.replace(/\s+/g, ' ').trim()
: '';
var result = [
'фон: ' + mainBg,
'иконка: ' + iconUrl,
'фон плашки: ' + plashImage,
'цвет плашки: ' + plashColor,
'цвет текста: ' + plashTextColor,
'текст: ' + plashText
].join('\n');
copyText(result).then(function () {
button.textContent = 'скопировано';
button.classList.add('is-copied');
setTimeout(function () {
button.textContent = 'скопировать';
button.classList.remove('is-copied');
}, 1200);
});
});
});
})();
</script>
[/html]