Шрифт в постах

Стиль оформления

Дополнительно

вверх
вниз

Shadows of Old

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

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


Вы здесь » Shadows of Old » Организационный раздел » Оформление профиля


Оформление профиля

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

1

В этой теме можно попросить сделать себе аватар, а также примерить одну из форумных плашек, фонов и описание в профиле.

• Это все плашки и фоны?
Они будут постоянно пополняться, не волнуйтесь.
• А можно ли попросить сделать свою плашку или фон?
Можно. Приносите исходник, сделаем. Размеры для фонов 240x330
• А будут ли какие-то уникальные плашки и фоны?
Да, будут. За участие в конкурсах.
• Можно ли приносить гиф-исходники?
Можно для плашек, если они по весу не превышают 500МБ.
• А это обязательно?
Нет, конечно, все исключительно по желанию.
• Поставить только тут?
Вы можете ставить плашки и фоны самостоятельно через "Профиль" -> "Дополнительно".

[html]
<script>
// --------- FILL BACKGROUNDS ------------

function labelBg(className, nameCategory, src) {
    return `<label class="${className}"><input type="radio" name="${nameCategory}" id="${src}" onchange="handleBgRadioChange()"><img src="${src}"> </label>`;
}

function fillBgs(bgs) {
    document.getElementById('bgContainer').innerHTML = bgs
        .map(bg => labelBg("profileBgLabel", "profileBg", bg)).join('');
}

// --------- FILL STRIPES ------------

function labelStripe(className, nameCategory, src) {
    return `<label class="${className}"><input type="radio" name="${nameCategory}" id="${src}" onchange="handleStripeRadioChange()"><img src="${src}"> </label>`;
}

function fillStripes(stripes) {
    document.getElementById('stripeContainer').innerHTML = stripes
        .map(stripe => labelStripe("profileStripeLabel", "profileStripe", stripe)).join('');
}

// --------- CUSTOM FIELD HANDLERS ------------

function handleStripeCustomInput() {
    const customValue = document.getElementById('stripeCustomLabel').value;
    if (customValue.trim()) {
        document.getElementsByName('profileStripe').forEach(radio => radio.checked = false);
    }
    updateProfilePreview();
}

function handleBgCustomInput() {
    const customValue = document.getElementById('bgCustomLabel').value;
    if (customValue.trim()) {
        document.getElementsByName('profileBg').forEach(radio => radio.checked = false);
    }
    updateProfilePreview();
}

function handleStripeRadioChange() {
    document.getElementById('stripeCustomLabel').value = '';
    updateProfilePreview();
}

function handleBgRadioChange() {
    document.getElementById('bgCustomLabel').value = '';
    updateProfilePreview();
}

// --------- USER DATA ------------

let userLatinName = '';
let userProfileUrl = '';
let userApplicationFormUrl = '';

window.addEventListener("message", (event) => {
    if (!event.origin.match(/oldshadows\.rusff\.me$/)) return;
    if (event.data.eventName != 'profileFillingResponce') return;
    userLatinName = event.data.userLatinName;
    userProfileUrl = event.data.userProfileUrl;
    userApplicationFormUrl = event.data.userApplicationFormUrl;
    fillStripes(event.data.stripes);
    fillBgs(event.data.backgrounds);
});

const sendProfileRequest = () => {
    window.parent.postMessage({ eventName: 'profileFillingRequest' }, "*");
};

// Отправляем сразу
sendProfileRequest();

// Повторяем каждую секунду
const intervalId = setInterval(sendProfileRequest, 1000);

// Опционально: останавливаем после получения ответа
window.addEventListener("message", (event) => {
    if (!event.origin.match(/oldshadows\.rusff\.me$/)) return;
    if (event.data.eventName === 'profileFillingResponce') {
        clearInterval(intervalId); // Останавливаем повторение
        // ... остальной код обработки
    }
});

// --------- CUSTOM FIELD HANDLERS ------------

function handleStripeCustomInput() {
    const customValue = document.getElementById('stripeCustomLabel').value;
    if (customValue.trim()) {
        document.getElementsByName('profileStripe').forEach(radio => radio.checked = false);
    }
    updateProfilePreview();
}

function handleBgCustomInput() {
    const customValue = document.getElementById('bgCustomLabel').value;
    if (customValue.trim()) {
        document.getElementsByName('profileBg').forEach(radio => radio.checked = false);
    }
    updateProfilePreview();
}

function handleStripeRadioChange() {
    document.getElementById('stripeCustomLabel').value = '';
    updateProfilePreview();
}

function handleBgRadioChange() {
    document.getElementById('bgCustomLabel').value = '';
    updateProfilePreview();
}

// --------- COPY RESULTS ------------

function copyResults() {
    let copyContent = '';
   
    // -- форма заполнения профиля --
    const cyrillicName = document.getElementById('cyrillicName').value;
    if (cyrillicName) {
        const profileDescrName = document.getElementById('mainDescr').value;
        let profileForm = `<a href='${userApplicationFormUrl}'>${cyrillicName}</a>, ${profileDescrName}`;
       
        if (document.getElementById('hrAdd').checked) {
            profileForm += '<hr>';
        } else {
            profileForm += '<br>';
        }
       
        const profileAdd = document.getElementById('addDescr').value;
        const profileAddNotFilled = profileAdd == '' || profileAdd == `любое описание на ваш вкус <a href='ссылка на анкету персонажа'>имя на кириллице</a>`;
        if (!profileAddNotFilled) {
            profileForm += profileAdd;
        }
       
        copyContent += `Форма профиля:
${String.fromCharCode(91)}code${String.fromCharCode(93)}${profileForm}${String.fromCharCode(91)}/code${String.fromCharCode(93)}\n\n`;
    }

    // -- форма плашки --
    const stripeCustom = document.getElementById('stripeCustomLabel').value.trim();
    let stripeForm = '';
   
    if (stripeCustom) {
        stripeForm = stripeCustom;
    } else {
        stripeForm = Array.from(document.getElementsByName('profileStripe'))
            .filter(element => element.checked)
            .map(element => element.id)
            .join('');
    }

    if (stripeForm) {
        copyContent += `Плашка:
${String.fromCharCode(91)}img${String.fromCharCode(93)}${stripeForm}${String.fromCharCode(91)}/img${String.fromCharCode(93)}\n\n`;
    }

    // -- форма фона --
    const bgCustom = document.getElementById('bgCustomLabel').value.trim();
    let bgForm = '';
   
    if (bgCustom) {
        bgForm = bgCustom;
    } else {
        bgForm = Array.from(document.getElementsByName('profileBg'))
            .filter(element => element.checked)
            .map(element => element.id)
            .join('');
    }

    if (bgForm) {
        copyContent += `Фон:
${String.fromCharCode(91)}img${String.fromCharCode(93)}${bgForm}${String.fromCharCode(91)}/img${String.fromCharCode(93)}\n\n`;
    }

    // --  сохранение -- 
    window.parent.postMessage({
        eventName: 'profileCopyInfoRequest',
        copyData: copyContent.trim()
    }, "*");
}

// --------- POST USER PROFILE UPDATE ------------

function copyResults() {
    let copyContent = '';
   
    // -- форма заполнения профиля --
    const cyrillicName = document.getElementById('cyrillicName').value;
    if (cyrillicName) {
        const profileDescrName = document.getElementById('mainDescr').value;
        let profileForm = `<a href='${userApplicationFormUrl}'>${cyrillicName}</a>, ${profileDescrName}`;
       
        if (document.getElementById('hrAdd').checked) {
            profileForm += '<hr>';
        } else {
            profileForm += '<br>';
        }
       
        const profileAdd = document.getElementById('addDescr').value;
        const profileAddNotFilled = profileAdd == '' || profileAdd == `любое описание на ваш вкус <a href='ссылка на анкету персонажа'>имя на кириллице</a>`;
        if (!profileAddNotFilled) {
            profileForm += profileAdd;
        }
       
        copyContent += `Форма профиля:
${String.fromCharCode(91)}code${String.fromCharCode(93)}${profileForm}${String.fromCharCode(91)}/code${String.fromCharCode(93)}\n\n`;
    }

    // -- форма плашки --
    const stripeCustom = document.getElementById('stripeCustomLabel').value.trim();
    let stripeForm = '';
   
    if (stripeCustom) {
        stripeForm = stripeCustom;
    } else {
        stripeForm = Array.from(document.getElementsByName('profileStripe'))
            .filter(element => element.checked)
            .map(element => element.id)
            .join('');
    }

    if (stripeForm) {
        copyContent += `Плашка:
${String.fromCharCode(91)}img${String.fromCharCode(93)}${stripeForm}${String.fromCharCode(91)}/img${String.fromCharCode(93)}\n\n`;
    }

    // -- форма фона --
    const bgCustom = document.getElementById('bgCustomLabel').value.trim();
    let bgForm = '';
   
    if (bgCustom) {
        bgForm = bgCustom;
    } else {
        bgForm = Array.from(document.getElementsByName('profileBg'))
            .filter(element => element.checked)
            .map(element => element.id)
            .join('');
    }

    if (bgForm) {
        copyContent += `Фон:
${String.fromCharCode(91)}img${String.fromCharCode(93)}${bgForm}${String.fromCharCode(91)}/img${String.fromCharCode(93)}\n\n`;
    }

    // --  сохранение -- 
    window.parent.postMessage({
        eventName: 'profileCopyInfoRequest',
        copyData: copyContent.trim()
    }, "*");
}

// --------- POST USER PROFILE UPDATE ------------

function updateProfilePreview() {
    const cyrillicName = document.getElementById('cyrillicName').value ?? userLatinName;
    const profileDescrName = document.getElementById('mainDescr').value;
    let profileForm = `<a href='${userApplicationFormUrl}'>${cyrillicName}</a>, ${profileDescrName}`;
   
    if (document.getElementById('hrAdd').checked) {
        profileForm += '<hr>';
    } else {
        profileForm += '<br>';
    }   
   
    const profileAdd = document.getElementById('addDescr').value;
    const profileAddNotFilled = profileAdd == '' || profileAdd == `любое описание на ваш вкус <a href='ссылка на анкету персонажа'>имя на кириллице</a>`;
    if (!profileAddNotFilled) {
        profileForm += profileAdd;
    }

    const stripeCustom = document.getElementById('stripeCustomLabel').value.trim();
    let stripeForm = '';
   
    if (stripeCustom) {
        stripeForm = stripeCustom;
    } else {
        stripeForm = Array.from(document.getElementsByName('profileStripe'))
            .filter(element => element.checked)
            .map(element => element.id)
            .join('');
    }

    const bgCustom = document.getElementById('bgCustomLabel').value.trim();
    let bgForm = '';
   
    if (bgCustom) {
        bgForm = bgCustom;
    } else {
        bgForm = Array.from(document.getElementsByName('profileBg'))
            .filter(element => element.checked)
            .map(element => element.id)
            .join('');
    }

    window.parent.postMessage({
        eventName: 'profileDemo',
        profileDescr: profileForm,
        stripe: stripeForm,
        background: bgForm
    }, "*");
}

document.getElementById('instructionResult').onclick = copyResults;
updateProfilePreview();

window.addEventListener("message", (event) => {
    if (!event.origin.match(/oldshadows\.rusff\.me$/)) return;
    if (event.data.eventName != 'fontChange') return;
    $('.post-content p, .post-content div').css('font-size', event.data.fontSize + 'px');
});
</script>

<div class="fillingForm">
<label class="fillingCategoryRadio"><input type="radio" id="profileDescr" name="fillingCategoryRadio" checked /> <span>Описание в профиле</span></label>
<label class="fillingCategoryRadio"><input type="radio" id="profileStripe" name="fillingCategoryRadio" /> <span>Плашки</span></label>
<label class="fillingCategoryRadio"><input type="radio" id="profileBg" name="fillingCategoryRadio" /> <span>Фоны</span></label>

<div class="instructionBlock profileDescr">
<h2 class="instructionHeading">Описание в профиль</h2>
<label for="cyrillicName" class="labelDescr">Имя на кириллице:</label>
<input type="text" id="cyrillicName" name="cyrillicName" oninput="updateProfilePreview()">

<label for="mainDescr" class="labelDescr">Описание в профиль:</label>
<input type="text" id="mainDescr" name="mainDescr" value="возраст, раса, род деятельности" oninput="updateProfilePreview()">

<label for="hrAdd" class="hrAdd">
<input type="checkbox" id="hrAdd" name="hrAdd" onchange="updateProfilePreview()" />
<span>Добавить полосу между секциями</span>
</label>

<label for="addDescr" class="labelDescr">При желании можете добавить в профиль пару, красивую цитату, важного родственника, врага и тому подобное через это поле. Если не нужно, оставьте его пустым или не меняйте:</label>
<textarea id="addDescr" oninput="updateProfilePreview()" name="addDescr" rows="4">любое описание на ваш вкус <a href='ссылка на анкету персонажа'>имя на кириллице</a></textarea>
</div>

<div class="instructionBlock profileStripe">
<h2 class="instructionHeading">Плашки</h2>
<div id="stripeContainer"></div>
<hr>
<div id="stripeCustom">
<label for="stripeCustomLabel" class="labelDescr">Своя плашка:</label>
<input type="text" id="stripeCustomLabel" name="stripeCustomLabel" oninput="handleStripeCustomInput()">
</div>
</div>

<div class="instructionBlock profileBg">
<h2 class="instructionHeading">Фоны</h2>
<div id="bgContainer"></div>
<hr>
<div id="bgCustom">
<label for="bgCustomLabel" class="labelDescr">Свой фон:</label>
<input type="text" id="bgCustomLabel" name="bgCustomLabel" oninput="handleBgCustomInput()">
</div>
</div>

</div>

<div class="formButtons">
<input type="button" id="instructionResult" value="Скопировать код">
</div>

<style>
h2.instructionHeading {
    font-size: 16px;
    font-family: var(--font-accent);
    font-weight: bold;
    letter-spacing: 1px;
}

.labelDescr {
    display: block;
    margin: 9px 0px 1px 0px;
}

.instructionBlock {
    text-align: left;
    margin: 10px 0 !important;
    padding: 14px 14px 12px 14px !important;
    border: 1px solid var(--borders);
    background: var(--beg300);
    border-radius: 4px;
}

.instructionBlock input[type="text"] {
    width: calc(100% - 10px);
}

.instructionBlock textarea {
    width: calc(100% - 10px);
    resize: vertical;
}

label.hrAdd {
    margin: 10px 0 0 0;
    display: block;
}

input#hrAdd  {
    accent-color: var(--text2);
}

.profileStripeLabel, .profileBgLabel {
    margin: 5px 5px;
    display: inline-block;
    width: 180px;
    border-radius: 5px;
    padding: 5px;
    background: rgb(255 255 255 / 17%);
}

.profileStripeLabel img, .profileBgLabel img { border-radius: 3px; }

.profileBgLabel img {
    width: 180px;
    height: 40px;
    object-fit: cover;
    object-position: top;
}

.profileStripeLabel input, .profileBgLabel input { display: none; }

.profileStripeLabel:has(input:checked), .profileBgLabel:has(input:checked) {
    background: rgb(0 0 0 / 12%);
}

div#stripeContainer, div#bgContainer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}

label.fillingCategoryRadio {
    border-radius: 16px;
    border: 1px solid var(--borders);
    background: var(--beg300);
    padding: 2px 6px;
    display: inline-block;
    margin: 0px 4px 5px 0px;
}

label.fillingCategoryRadio:has(input:checked) {
    background: var(--borders);
    color: var(--text1);
}

.fillingCategoryRadio input[type="radio"] {
    display: none;
}

label.fillingCategoryRadio {
    cursor: pointer;
}

.profileDescr, .profileStripe, .profileBg { display: none; }
.fillingCategoryRadio:has(#profileDescr:checked) ~ .profileDescr {
    display: block !important;
}
.fillingCategoryRadio:has(#profileStripe:checked) ~ .profileStripe {
    display: block !important;
}
.fillingCategoryRadio:has(#profileBg:checked) ~ .profileBg {
    display: block !important;
}

.fillingForm { text-align: center; }

.instructionBlock hr {
    border: solid 1px var(--borders);
    margin: 10px;
}

</style>
[/html]

+1

2

буду первой на кастомную плашку

плашка:

Код:
https://upforme.ru/uploads/001c/03/d9/200/575742.png

текст:

Код:
как мотылек на пламя

+4

3

Ragnell, готово с:

Подпись автора

Адерин, Сирша, Ингве, Шин, Ивельн

+1

4

Плашка:
https://upforme.ru/uploads/001c/03/d9/3/960700.jpg

вот эту, будьте добры)

Подпись автора

ГарретЛисАлияРахманЛеорикБранвен

пусть мои иллюзии покоятся с миром

+2

5

Garreth of Riverbend, оп, готово

Подпись автора

Адерин, Сирша, Ингве, Шин, Ивельн

+1

6

Плашка:
https://upforme.ru/uploads/001c/03/d9/2/254438.jpg

можно мне эту, пожалуйста)

Подпись автора

теперь зола лежит одна
как ни вороши, ни ищи - ни души

+2

7

буду красивый :3
Плашка:
https://upforme.ru/uploads/001c/03/d9/2/427469.jpg

+2

8

О, картиночки! А можно мне, пожалуйста, надпись от первой плашки - "знание - сила", но вот с этой картинкой:

Код:
https://upforme.ru/uploads/001c/03/d9/196/812869.jpg

+1

9

Neurin Tamariti, готово)

Подпись автора

Зови меня белой вороной с черным крылом.
Я ощущаю себя дома, хоть мир мне не дом.
Зови меня кем кем угодно, мне все ни по чем.
Мой взгляд - это холод, но холод с огнем.
••••••••••••••••••••••••••••••

https://upforme.ru/uploads/001c/03/d9/3/715233.gif

+1

10

Можно и мне плашку?)

Код:
https://upforme.ru/uploads/001c/03/d9/3/776823.jpg
Подпись автора


https://upforme.ru/uploads/001c/03/d9/148/827087.gif

- I'm a wizard, i practice duck magic.
- You mean dark magic?
- No.

+1

11

Niall, а подскажи подпись, пожалуйста?

Подпись автора

Адерин, Сирша, Ингве, Шин, Ивельн

0

12

Dolor, "Знание - сила"

Подпись автора


https://upforme.ru/uploads/001c/03/d9/148/827087.gif

- I'm a wizard, i practice duck magic.
- You mean dark magic?
- No.

0

13

Niall, поставил 🎉

Подпись автора

Адерин, Сирша, Ингве, Шин, Ивельн

0

14

знания - сила
https://upforme.ru/uploads/001c/03/d9/63/328201.png

Подпись автора

О, как же чудовищно
Медленно движется
Ком государственной смуты!

+1

15

Reynis Redwald, нужно только убрать тень, с ней плашка вылезает за 180 и вероятно смотрится не так как планируется

Подпись автора

Адерин, Сирша, Ингве, Шин, Ивельн

0

16

Dolor написал(а):

Reynis Redwald, нужно только убрать тень, с ней плашка вылезает за 180 и вероятно смотрится не так как планируется

оО откуда тень взялась
прошу прощения

знания - сила
https://upforme.ru/uploads/001c/03/d9/63/401144.png

Подпись автора

О, как же чудовищно
Медленно движется
Ком государственной смуты!

+1

17

Reynis Redwald, оп, стоит

Подпись автора

Адерин, Сирша, Ингве, Шин, Ивельн

+1

18

Плашка:
https://upforme.ru/uploads/001c/03/d9/2/879999.jpg

Можно с той же цитатой про драконов
С телефона только так могу :<

+1

19

Enid ni Tyanat, для готовых плашек и не нужно цитату)
Поставил ♥

Подпись автора

Адерин, Сирша, Ингве, Шин, Ивельн

0

20

Можно и меня приодеть, пожалуйста?)

Код:
https://upforme.ru/uploads/001c/03/d9/2/879999.jpg
Код:
от крови драконов

+1


Вы здесь » Shadows of Old » Организационный раздел » Оформление профиля


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