вашеимя
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque efficitur sit amet diam eu pharetra. Aliquam sit amet odio at urna tempus vehicula in sed quam. Cras ultricies dolor sit amet ex aliquam mollis. Donec iaculis est eget vestibulum aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque efficitur sit amet diam eu pharetra. Aliquam sit amet odio at urna tempus vehicula in sed quam. Cras ultricies dolor sit amet ex aliquam mollis. Donec iaculis est eget vestibulum aliquet.
love
улица бесконечное лето долгая бесконечная жизнь какие-то еще слова
flood
вася иванов 2 3
write
1 2 3

yanichegoneznayu

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » yanichegoneznayu » виды гостевых » отметки 2.0


отметки 2.0

Сообщений 1 страница 9 из 9

1

[html]<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ежедневные награды | ON:AIR</title>

<style>
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:linear-gradient(145deg,#1a1a2e 0%,#16213e 100%);
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:30px 20px;
    font-family:'Trebuchet MS','Segoe UI',sans-serif;
}

.main-card{
    max-width:650px;
    width:100%;
    margin:auto;
    color:#6a6a7a;
}

.card-inner{
    background:linear-gradient(
        135deg,
        rgba(255,235,245,0.9),
        rgba(255,245,250,0.85)
    );
    border-radius:20px;
    padding:25px;
    box-shadow:0 0 25px rgba(255,180,220,0.25);
}

.onair-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
}

.onair-title{
    font-size:30px;
    letter-spacing:4px;
    color:rgba(120,220,255,0.9);
    text-shadow:
        0 0 10px rgba(120,220,255,0.6),
        0 0 20px rgba(120,220,255,0.4),
        0 0 40px rgba(255,180,220,0.4);
    animation:onairGlow 2.5s infinite ease-in-out;
}

.live-badge{
    font-size:16px;
    font-weight:bold;
    color:#ff6b8a;
    text-shadow:0 0 6px rgba(255,120,150,0.6);
    animation:liveBlink 1.5s infinite;
}

@keyframes onairGlow{
    0%{opacity:0.85;}
    50%{opacity:1;}
    100%{opacity:0.85;}
}

@keyframes liveBlink{
    0%,100%{opacity:1;}
    50%{opacity:0.4;}
}

/* GRID */

.rewards-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:10px;
    margin:25px 0;
}

.reward-cell{
    aspect-ratio:1/1;
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
    border-radius:14px;
    font-size:14px;
    font-weight:bold;
    cursor:pointer;
    transition:0.2s ease;
    user-select:none;
    color:#fff;
    background:transparent;
    backdrop-filter:blur(4px);
    text-shadow:0 0 4px rgba(0,0,0,0.3);
}

.reward-cell::before{
    content:'';
    position:absolute;
    inset:0;
    border-radius:14px;
    padding:2px;

    background:linear-gradient(
        135deg,
        rgba(120,220,255,0.8),
        rgba(255,180,220,0.7)
    );

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite:xor;
    mask-composite:exclude;

    pointer-events:none;
}

.reward-cell.locked{
    color:rgba(255,255,255,0.5);
    font-size:15px;
}

.reward-cell.locked::before{
    background:linear-gradient(
        135deg,
        rgba(150,150,150,0.5),
        rgba(100,100,100,0.3)
    );
}

.reward-cell.opened::before{
    background:linear-gradient(
        135deg,
        rgba(120,220,255,0.95),
        rgba(255,200,230,0.95)
    );

    box-shadow:0 0 12px rgba(120,220,255,0.5);
}

.reward-cell:hover{
    transform:scale(1.03);
}

/* TIMER */

.timer-block{
    text-align:center;
    font-size:13px;
    background:rgba(255,255,255,0.2);
    backdrop-filter:blur(4px);
    border-radius:20px;
    padding:10px 15px;
    margin:15px 0;
    color:#78dcff;
    font-weight:bold;
    letter-spacing:1px;
}

/* TOAST */

.toast-notify{
    position:fixed;
    bottom:30px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0,0,0,0.85);
    backdrop-filter:blur(12px);
    color:#ffb4dc;
    padding:10px 20px;
    border-radius:30px;
    font-size:14px;
    font-weight:bold;
    opacity:0;
    transition:0.3s ease;
    pointer-events:none;
    z-index:1000;
    white-space:nowrap;
    border:1px solid rgba(255,180,220,0.4);
}

.toast-notify.show{
    opacity:1;
}

/* BOTTOM */

.icons-row{
    margin-top:20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;

    background:rgba(255,255,255,0.45);

    border-radius:15px;
    padding:12px 15px;

    backdrop-filter:blur(6px);

    border:1px solid rgba(255,255,255,0.6);
}
</style>
</head>

<body>

<div class="main-card">

    <div class="card-inner">

        <!-- HEADER -->
        <div class="onair-header">

            <div class="onair-title">
                daily check-in
            </div>

            <div class="live-badge">
                ● LIVE
            </div>

        </div>

        <!-- GRID -->
        <div class="rewards-grid" id="rewardsGrid"></div>

        <!-- TIMER -->
        <div class="timer-block" id="timerDisplay">
            загрузка...
        </div>

        <!-- ICONS -->
        <div class="icons-row">

            <div style="flex:1;text-align:center;">
                🎤
            </div>

            <div style="flex:1;text-align:center;">
                🎧
            </div>

        </div>

    </div>

</div>

<div class="toast-notify" id="toast"></div>

<script>
const grid = document.getElementById("rewardsGrid");
const toast = document.getElementById("toast");
const timerDiv = document.getElementById("timerDisplay");

/* НАГРАДЫ */

const rewards = [
    10,15,20,25,30,35,40,
    45,50,55,60,65,70,75,
    80,85,90,95,100,10,15,
    20,25,30,35,40,45,50,
    55,60,100
];

/* PROFILE */

const profileId =
    window.location.pathname || "default_profile";

/* STORAGE */

const STORAGE_KEYS = {

    currentDay:
        `currentDay_${profileId}`,

    opened:
        `opened_${profileId}`,

    lastClaimDate:
        `lastClaimDate_${profileId}`
};

let currentDay = Number(
    localStorage.getItem(
        STORAGE_KEYS.currentDay
    ) || 0
);

let opened = JSON.parse(
    localStorage.getItem(
        STORAGE_KEYS.opened
    ) || "[]"
);

let lastClaimDate =
    localStorage.getItem(
        STORAGE_KEYS.lastClaimDate
    );

/* FIX */

if(currentDay < 0) currentDay = 0;
if(currentDay > 31) currentDay = 31;

/* TODAY */

function today(){
    return new Date()
        .toISOString()
        .split("T")[0];
}

/* TOAST */

function showToast(text){

    toast.textContent = text;

    toast.classList.add("show");

    setTimeout(() => {
        toast.classList.remove("show");
    },2000);
}

/* COPY */

function copyReward(day,value){

    const text = `${day}-${value}`;

    const ta =
        document.createElement("textarea");

    ta.value = text;

    ta.style.position = "fixed";
    ta.style.opacity = "0";

    document.body.appendChild(ta);

    ta.focus();
    ta.select();

    let success = false;

    try{
        success =
            document.execCommand("copy");
    }
    catch(e){
        success = false;
    }

    document.body.removeChild(ta);

    if(success){
        showToast(`Скопировано: ${text}`);
    }
    else{
        showToast("Ошибка копирования ❌");
    }
}

/* GRID */

function renderGrid(){

    grid.innerHTML = "";

    for(let i = 0; i < 31; i++){

        const cell =
            document.createElement("div");

        cell.className =
            "reward-cell locked";

        cell.textContent = "🎵";

        /* OPENED */

        if(opened[i]){

            cell.classList.remove("locked");

            cell.classList.add("opened");

            cell.textContent = rewards[i];
        }

        /* CLICK */

        cell.addEventListener("click",function(){

            /* OPENED */

            if(opened[i]){

                copyReward(
                    i + 1,
                    rewards[i]
                );

                showToast("Уже открыто ✔");

                return;
            }

            /* ORDER */

            if(i !== currentDay){

                showToast(
                    "Открывай по порядку 🔒"
                );

                return;
            }

            /* TODAY */

            if(lastClaimDate === today()){

                showToast(
                    "Уже получено сегодня ⏳"
                );

                return;
            }

            /* COPY FIRST */

            copyReward(
                i + 1,
                rewards[i]
            );

            /* SAVE */

            opened[i] = true;

            currentDay++;

            localStorage.setItem(
                STORAGE_KEYS.opened,
                JSON.stringify(opened)
            );

            localStorage.setItem(
                STORAGE_KEYS.currentDay,
                currentDay
            );

            localStorage.setItem(
                STORAGE_KEYS.lastClaimDate,
                today()
            );

            lastClaimDate = today();

            /* UI */

            cell.classList.remove("locked");

            cell.classList.add("opened");

            cell.textContent =
                rewards[i];
        });

        grid.appendChild(cell);
    }
}

/* TIMER */

function updateTimer(){

    const now = new Date();

    const tomorrow = new Date();

    tomorrow.setHours(
        24,0,0,0
    );

    const diff =
        tomorrow - now;

    const h = Math.floor(
        diff / 1000 / 60 / 60
    );

    const m = Math.floor(
        diff / 1000 / 60
    ) % 60;

    const s = Math.floor(
        diff / 1000
    ) % 60;

    timerDiv.textContent =
        `⏱️ Следующая награда через: ${h}ч ${m}м ${s}с ⏱️`;
}

/* START */

renderGrid();

updateTimer();

setInterval(updateTimer,1000);
</script>

</body>
</html>[/html]

0

Перевести2

1-10

0

Перевести3

3-20

0

Перевести4

2-15

0

Перевести5

2-15

0

6

[html]<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>Ежедневные награды | ON:AIR</title>

<style>
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:linear-gradient(145deg,#1a1a2e 0%,#16213e 100%);
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:30px 20px;
    font-family:'Trebuchet MS','Segoe UI',sans-serif;
}

.main-card{
    max-width:650px;
    width:100%;
    margin:auto;
}

.card-inner{
    background:linear-gradient(135deg,rgba(255,235,245,0.9),rgba(255,245,250,0.85));
    border-radius:20px;
    padding:25px;
    box-shadow:0 0 25px rgba(255,180,220,0.25);
}

.onair-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.onair-title{
    font-size:28px;
    letter-spacing:4px;
    color:rgba(120,220,255,0.9);
}

.live-badge{
    font-weight:bold;
    color:#ff6b8a;
}

.rewards-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:10px;
    margin:25px 0;
}

.reward-cell{
    aspect-ratio:1/1;
    display:flex;
    justify-content:center;
    align-items:center;
    border-radius:14px;
    cursor:pointer;
    user-select:none;
    color:#fff;
    background:rgba(0,0,0,0.15);
    font-weight:bold;
}

.reward-cell.opened{
    background:rgba(120,220,255,0.3);
}

.timer-block{
    text-align:center;
    font-size:13px;
    color:#78dcff;
    font-weight:bold;
}

.toast{
    position:fixed;
    bottom:30px;
    left:50%;
    transform:translateX(-50%);
    background:rgba(0,0,0,0.85);
    color:#fff;
    padding:10px 20px;
    border-radius:20px;
    opacity:0;
    transition:0.3s;
    pointer-events:none;
}

.toast.show{
    opacity:1;
}
</style>
</head>

<body>

<div class="main-card">
    <div class="card-inner">

        <div class="onair-header">
            <div class="onair-title">daily check-in</div>
            <div class="live-badge">● LIVE</div>
        </div>

        <div class="rewards-grid" id="grid"></div>

        <div class="timer-block" id="timer"></div>

    </div>
</div>

<div class="toast" id="toast"></div>

<script>

/* =========================
   USER ID FIX (FORUM SAFE)
========================= */

function getUserId(){
    return (
        window.userId ||
        document.querySelector("[data-user-id]")?.dataset.userId ||
        document.getElementById("user-id")?.textContent ||
        localStorage.getItem("forum_user_id") ||
        "guest"
    );
}

const userId = String(getUserId()).replace(/[^a-zA-Z0-9_-]/g,"");
const profileId = "daily_rewards_" + userId;

/* ========================= */

const grid = document.getElementById("grid");
const toast = document.getElementById("toast");
const timer = document.getElementById("timer");

const rewards = Array.from({length:31},(_,i)=>10+(i%10)*5);

const keys = {
    day:`day_${profileId}`,
    opened:`opened_${profileId}`,
    last:`last_${profileId}`
};

let currentDay = Number(localStorage.getItem(keys.day)||0);
let opened = JSON.parse(localStorage.getItem(keys.opened)||"[]");
let last = localStorage.getItem(keys.last);

/* =========================
   SAFE COPY (FIXED)
========================= */

async function copyText(text){

    /* 1. modern API */
    try{
        if(navigator.clipboard && window.isSecureContext){
            await navigator.clipboard.writeText(text);
            show("Скопировано: " + text);
            return;
        }
    }catch(e){
        console.log("clipboard error:",e);
    }

    /* 2. fallback (WORKS IN FORUMS) */
    try{
        const ta = document.createElement("textarea");
        ta.value = text;
        ta.style.position = "fixed";
        ta.style.opacity = "0";
        document.body.appendChild(ta);
        ta.focus();
        ta.select();

        const ok = document.execCommand("copy");

        document.body.removeChild(ta);

        if(ok){
            show("Скопировано: " + text);
        }else{
            show("Не удалось скопировать");
        }

    }catch(e){
        console.log("fallback error:",e);
        show("Копирование заблокировано");
    }
}

/* ========================= */

function show(t){
    toast.textContent = t;
    toast.classList.add("show");
    setTimeout(()=>toast.classList.remove("show"),2000);
}

function today(){
    const d = new Date();
    return `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}`;
}

function save(){
    localStorage.setItem(keys.day,currentDay);
    localStorage.setItem(keys.opened,JSON.stringify(opened));
    localStorage.setItem(keys.last,last);
}

function render(){

    grid.innerHTML="";

    for(let i=0;i<31;i++){

        const c=document.createElement("div");
        c.className="reward-cell";

        if(opened[i]){
            c.classList.add("opened");
            c.textContent=rewards[i];
        }else{
            c.textContent="🎵";
        }

        c.onclick=async ()=>{

            if(opened[i]){
                await copyText(`${i+1}-${rewards[i]}`);
                return;
            }

            if(i!==currentDay){
                show("Открывай по порядку");
                return;
            }

            if(last===today()){
                show("Сегодня уже забрал");
                return;
            }

            await copyText(`${i+1}-${rewards[i]}`);

            opened[i]=true;
            currentDay++;
            last=today();

            save();
            render();
        };

        grid.appendChild(c);
    }
}

function updateTimer(){
    const d=new Date();
    const t=new Date();
    t.setHours(24,0,0,0);
    const diff=t-d;

    const h=Math.floor(diff/3600000);
    const m=Math.floor(diff/60000)%60;
    const s=Math.floor(diff/1000)%60;

    timer.textContent=`Следующая награда: ${h}ч ${m}м ${s}с`;
}

render();
updateTimer();
setInterval(updateTimer,1000);

</script>

</body>
</html>[/html]

0

Перевести7

1-10

0

Перевести8

3-20

0

Перевести9

2-15

0


Вы здесь » yanichegoneznayu » виды гостевых » отметки 2.0


Рейтинг форумов | Создать форум бесплатно