Сборки серверов

СливПлатные

Сейчас онлайн

  • _Doctor_
  • tonotlol
  • sinaptico
  • Aurum201
  • makstitanxp62
  • MABAIIIU
  • treaplex
  • LoveDast
  • Fr05tByte1
  • Talderis
  • Atbar
  • simgelocongelado

Инструкция Временная шкала в XenForo версий 2.x.x

  • Автор темыBlack_Dragon
  • Дата начала
Black_Dragon
  • Black_Dragon
  • Хранитель порядка
  • 22 868
1

Шаг 1​


Вставьте следующее в extra.less
Less:
/* Start timeline css */


.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
    background:black;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: white;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
}

.xftlcontainer {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.xftlcontainer::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  right: -17px;
  background-color: white;
  border: 4px solid #FF9F55;
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.xftlleft {
  left: 0;
}

.xftlright {
  left: 50%;
}

.xftlleft::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid white;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent white;
}

.xftlright::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 22px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid white;
  border-width: 10px 10px 10px 0;
  border-color: transparent white transparent transparent;
}

.xftlright::after {
  left: -16px;
}

.xftlcontent {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: 6px;
}

/* Media queries - Responsive timeline on screens less than 600px wide */
@media screen and (max-width: 600px) {
  .timeline::after {
    left: 31px;
  }

  .xftlcontainer {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }

  .xftlcontainer::before {
    left: 60px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
  }

  .xftlleft::after, .xftlright::after {
    left: 15px;
  }

  .xftlright {
    left: 0%;
  }
}

/* End timeline CSS */

Шаг 2​

Создаем следующий BB-код:​


Тег BB-кода: timeline
Опция BB-кода: Нет
Замена HTML:
HTML:
<div class="timeline">{text}</div>

Тег BB-кода: tleft
Опция BB-кода: Да
Замена HTML:
Код:
<div class="xftlcontainer xftlleft">
    <div class="xftlcontent">
      <h2>{option}</h2>
      <p>{text}</p>
    </div>
  </div>
Тег BB-кода: tright
Опция BB-кода: Да
Замена HTML:
Код:
<div class="xftlcontainer xftlright">
    <div class="xftlcontent">
      <h2>{option}</h2>
      <p>{text}</p>
    </div>
  </div>

Использование:​

Код:
[timeline]

[tleft=2010]Beta version of Xenforo Launched[/tleft]

[tright="March 2011"]Stable version of Xenforo Launched[/tright]

[tleft="November 2011"]Xenforo version 1.1 released[/tleft]

[tright="August 2015"]Xenforo 1.5 released[/tright]

[tleft="November 2017"]Xenforo 2 Launched[/tleft]

[tright="The Future"]Xenforo 3 released[/tright]

[/timeline]

Скриншоты временной шкалы в Xenforo:​

23
 
ВерхНиз