XF 2.1 Как реализовать такой баннер?

Статус
В этой теме нельзя размещать новые ответы.

GrafMishka

Проверенные
Сообщения
302
Реакции
82
Баллы
3,330
Всех приветствую. Использую стиль iO XenForo 2 Theme. Как добавить такой баннер как здесь на главной и 2 кнопки с hover эффектом?
Код:
https://sharewood.biz/
 
подробности где какой баннер .. если ты используешь данный стиль тогда все вопросы туда .. в стиль..

а так скрытая реклама
Там баннер один на главной. Других нет. Причем тут стиль вообще? Я спрашиваю как это реализовано, неважно на каком стиле.
__
В iO есть welcome section с возможностью установить свое изображение, но именно так с кнопками не получается сделать.
 

Вложения

  • Screenshot_5.jpg
    Screenshot_5.jpg
    100.7 KB · Просмотры: 106
Последнее редактирование:
Mirovinger, так тоже пробовал, но получаются вокруг изображения пустые куски и крестик закрыть. Я так понимаю, это возможно как-то убрать используя свой класс для объявления. Вопрос какой, если сможете подсказать.
 
HTML:
<a href="/register/" class="sharebut">ОФОРМИТЬ ПОДПИСКУ</a>

<a href="#" class="aboutbut js-video-button" data-video-id="7MXM2wnEYe0" data-channel="video" data-video-url="https://www.youtube.com/embed/7MXM2wnEYe0">О проекте</a>
1564662247300.png
1564662263387.png
CSS:
.welcomeSection {
    position: relative;
    background: #e0e0e0 url(styles/default/xenforo/bann.png);
    height: 0;
    padding-top: 25.423%;
    background-size: cover;
    background-position: center;
}


.swWelcomeSectionTitle{
    font-size: 26px;
    color: #4A7DAC;
    margin: 0;
    text-align: left;
}

.swWelcomeSectionText{
    font-size: 16px;
    color: #4e4e4e;
    padding-top: 4px;
    padding-bottom: 16px;
    text-align: left;
    width: 50%;
}

.sharebut {
    color: #2577b1;
    width: 250px;
    height: 40px;
    font-size: 20px;
    background: #fff;
    border-radius: 5px;
    position: absolute;
    bottom: 5px;
    transition: 0.5s;
    text-align: center;
    line-height: 40px;
    margin-bottom: 40px;
    margin-left: 15px;
    font-weight: bold;
    letter-spacing: -1px;
}
.sharebut:hover {
    box-shadow: 0 0 30px #fff;
    text-decoration: none;
    bottom: 15px;
    color: #2577b1;
}
.aboutbut {
    color: #2577b1;
    width: 150px;
    height: 40px;
    font-size: 20px;
    background: #fff;
    border-radius: 5px;
    position: absolute;
    bottom: 5px;
    transition: 0.5s;
    text-align: center;
    line-height: 40px;
    margin-bottom: 40px;
    margin-left: 290px;
    font-weight: bold;
    letter-spacing: -1px;
}
.aboutbut:hover {
    box-shadow: 0 0 30px #fff;
    text-decoration: none;
    bottom: 15px;
    color: #2577b1;
}
@media only screen and (max-width: 650px){
    .welcomeSectionNY{
        position: relative;
        background: url(styles/default/xenforo/bannermobile.png);
        /*background: url(styles/default/xenforo/newyearban.png);*/
        height: 0;
        padding-top: 25.423%;
        background-size: cover;
        background-position: center;
    }
}
@media screen and (min-width: 300px) and (max-width: 450px){
    .sharebut{
        width: 115px;
        height: 15px;
        font-size: 10px;
        line-height: 15px;
        margin-bottom: 2px;
        margin-left: -4px;
    }
    .aboutbut{
        width: 65px;
        height: 15px;
        font-size: 10px;
        line-height: 15px;
        margin-bottom: 2px;
        margin-left: 125px;
    }
}
@media screen and (min-width: 451px) and (max-width: 649px){
    .sharebut{
        width: 160px;
        height: 20px;
        font-size: 13px;
        line-height: 20px;
        margin-bottom: 10px;
        margin-left: 0px;
    }
    .aboutbut{
        width: 150px;
        height: 20px;
        font-size: 13px;
        line-height: 20px;
        margin-bottom: 10px;
        margin-left: 190px;
    }
}

@media screen and (min-width: 650px) and (max-width: 824px){
    .sharebut{
        margin-bottom: 5px;
    }
    .aboutbut{
        margin-bottom: 5px;
    }
}
@media screen and (min-width: 825px) and (max-width: 1000px){
    .sharebut {
        margin-bottom: 20px;
        margin-left: 0px;
    }
    .aboutbut {
        margin-bottom: 20px;
        /*margin-left: 0px;*/
    }
}
.youTuberBack {
    color: #fff !important;
    display: none;
    z-index: 1100;
    opacity: 1;
    top: 0;
    left: 0;
    width: 100%;
    position: absolute;
    background: #000;
    text-align: center;
}
#youTuberContainer {
    display: none;
    z-index: 1102;
    position: fixed;   
}
#youTuber {
    text-align: center;
    box-shadow: 0 0 40px #333;
}
#youTuberLoading {
    position: fixed;
    z-index: 1101;
    font-size: 1.5em;
    top: 49%;
    width: 5%;
    text-align: center;
    left: 45%;
}
#youTuberClose {
    position: fixed;
    right: 15px;
    top: 15px;
    padding: 3px 13px;
    z-index: 1101;
    font-size: 25px !important;
    text-shadow: 0 0 10px #fff;
    border-radius: 3px;
    cursor: pointer;
    -webkit-transition-duration: 0.1s;
    -o-transition-duration: 0.1s;
    -moz-transition-duration: 0.1s;
    transition-duration: 0.1s;
}
#youTuberClose:hover {
    background: #333;
}
 
Сообщение:
HTML:
<style>
    .welcomeSectionNY {
        position: relative;
        background: #e0e0e0 url(https://i5.imageban.ru/out/2019/08/01/a6eb9a1dc203935e27e005c700f5a4c3.jpg);
        height: 0;
        padding-top: 25.423%;
        background-size: cover;
        background-position: center
    }

    .sharebut {
        color: #6f252a;
        width: 250px;
        height: 40px;
        font-size: 20px;
        background: #eba237;
        border-radius: 5px;
        position: absolute;
        bottom: 5px;
        transition: 0.5s;
        text-align: center;
        line-height: 40px;
        margin-bottom: 40px;
        margin-left: 75px;
        font-weight: bold;
        letter-spacing: -1px
    }

    .sharebut:hover {
        box-shadow: 0 0 30px #819c17;
        text-decoration: none;
        bottom: 15px;
        color: #486a20
    }

    .aboutbut {
        color: #6f252a;
        width: 150px;
        height: 40px;
        font-size: 20px;
        background: #eba237;
        border-radius: 5px;
        position: absolute;
        bottom: 5px;
        transition: 0.5s;
        text-align: center;
        line-height: 40px;
        margin-bottom: 40px;
        margin-left: 350px;
        font-weight: bold;
        letter-spacing: -1px
    }

    .aboutbut:hover {
        box-shadow: 0 0 30px #819c17;
        text-decoration: none;
        bottom: 15px;
        color: #486a20
    }

    .valBut {
        color: #f52d6a
    }

    .valBut:hover {
        color: #f52d6a
    }

    @media only screen and (max-width:650px) {
        .welcomeSectionNY {
            position: relative;
            background: url(https://i1.imageban.ru/out/2019/08/01/bb213c451950e2b43e64faf1e5f2d2f4.jpg);
            height: 0;
            padding-top: 25.423%;
            background-size: cover;
            background-position: center
        }
    }

    @media screen and (min-width:300px) and (max-width:450px) {
        .sharebut {
            width: 115px;
            height: 15px;
            font-size: 10px;
            line-height: 15px;
            margin-bottom: 2px;
            margin-left: -4px
        }

        .aboutbut {
            width: 65px;
            height: 15px;
            font-size: 10px;
            line-height: 15px;
            margin-bottom: 2px;
            margin-left: 125px
        }
    }

    @media screen and (min-width:451px) and (max-width:649px) {
        .sharebut {
            width: 160px;
            height: 20px;
            font-size: 13px;
            line-height: 20px;
            margin-bottom: 10px;
            margin-left: 5px
        }

        .aboutbut {
            width: 95px;
            height: 20px;
            font-size: 13px;
            line-height: 20px;
            margin-bottom: 10px;
            margin-left: 190px
        }
    }

    @media screen and (min-width:650px) and (max-width:824px) {
        .sharebut {
            margin-left: 40px;
            width: 160px;
            height: 20px;
            font-size: 13px;
            line-height: 20px;
            margin-bottom: 15px
        }

        .aboutbut {
            margin-left: 35%;
            width: 95px;
            height: 20px;
            font-size: 13px;
            line-height: 20px;
            margin-bottom: 15px
        }
    }

    @media screen and (min-width:825px) and (max-width:1000px) {
        .sharebut {
            margin-bottom: 20px;
            margin-left: 55px
        }

        .aboutbut {
            margin-bottom: 20px
        }
    }
</style>

<a href="#" class="sharebut">ОФОРМИТЬ ПОДПИСКУ</a>
<a href="#" class="aboutbut js-video-button" data-video-id="hS_b0cX2LEA" data-channel="video" data-video-url="https://www.youtube.com/embed/hS_b0cX2LEA">О ПРОЕКТЕ</a>

Другой, используя свое имя CSS-класса: welcomeSectionNY
 
вообщем банер можно только через код вставить, а через стандартные настройки нельзя ?
этот css код в лес вставлять ?
а если я хочу в каждом разделе разные банера, то код тот же но просто путь к картинкам будет разный?
 
не надо в лес читай все выше

а если я хочу в каждом разделе разные банера, то код тот же но просто путь к картинкам будет разный?
надо хотя бы немного понимать, что делаешь, тогда и вопросов таких не будет
 
Последнее редактирование модератором:
надо хотя бы немного понимать, что делаешь, тогда и вопросов таких не будет
не это я погорячился не спорю, в "Критерии страницы" настраивается где показываться должен баннер, а вот куда css вставлять , я сверху так и не нашел )

и знаю что таких нубов как я каждый день тут набегает )
Но учения надо же с чего-то начинать )
 
Последнее редактирование модератором:
не это я погорячился не спорю, в "Критерии страницы" настраивается где показываться должен баннер, а вот куда css вставлять , я сверху так и не нашел )
в шаблон extra.less
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Современный облачный хостинг провайдер | Aéza
Назад
Сверху Снизу