+1 829-452-3663
 
Все экскурсии Доминиканы
от местного агенства по сниженным ценам
Консультация и оформление онлайн
Трансфер с рецепшен отеля
Любая форма оплаты: карта, онлайн, наличные
Организаторы передач

Как добавить виджет времени и погоды другой страны в меню из ZeroBlock в Tilda ?

Как создали данный пример:
1. Создали ZeroBlock и добавили в нём 2 элемента HTML
2. В первый элемент HTML вставили код №1 (приведён ниже)
3. Во второй элемент HTML вставили код №2 (приведён ниже)
4. Вставили код №3 для настроек виджетов в блок ДРУГОЕ►Т123


1

<!-- weather widget start --><div id="m-booked-small-t3-89073"> <div class="booked-weather-160x36 w160x36-18" style="color:#333333; border-radius:4px; -moz-border-radius:4px; border:none"> <a target="_blank" style="color:#08488D;" href="http://nochi.com/weather/santo-domingo-18405" class="booked-weather-160x36-city smolest">Санто-Доминго</a> <a target="_blank" class="booked-weather-160x36-right" href="http://www.booked.net/"><img src="//s.bookcdn.com/images/letter/s5.gif" alt="www.booked.net/" /></a> <div class="booked-weather-160x36-degree"><span class="plus">+</span>27&deg;<span>C</span></div> </div> </div><script type="text/javascript"> var css_file=document.createElement("link"); css_file.setAttribute("rel","stylesheet"); css_file.setAttribute("type","text/css"); css_file.setAttribute("href",'https://s.bookcdn.com/css/w/bw-160-36.css?v=0.0.1'); document.getElementsByTagName("head")[0].appendChild(css_file); function setWidgetData(data) { if(typeof(data) != 'undefined' && data.results.length > 0) { for(var i = 0; i < data.results.length; ++i) { var objMainBlock = document.getElementById('m-booked-small-t3-89073'); if(objMainBlock !== null) { var copyBlock = document.getElementById('m-bookew-weather-copy-'+data.results[i].widget_type); objMainBlock.innerHTML = data.results[i].html_code; if(copyBlock !== null) objMainBlock.appendChild(copyBlock); } } } else { alert('data=undefined||data.results is empty'); } } </script> <script type="text/javascript" charset="UTF-8" src="https://widgets.booked.net/weather/info?action=get_weather_info&ver=6&cityID=18405&type=13&scode=2&ltid=3540&domid=589&anc_id=28869&cmetric=1&wlangID=20&color=fff5d9&wwidth=158&header_color=fff5d9&text_color=333333&link_color=08488D&border_form=3&footer_color=fff5d9&footer_text_color=333333&transparent=1"></script><!-- weather widget end -->

2

<a href="https://24timezones.com" style="text-decoration: none" class="clock24" id="tz24-1524474746-c1230-eyJob3VydHlwZSI6IjI0Iiwic2hvd2RhdGUiOiIwIiwic2hvd3NlY29uZHMiOiIxIiwic2hvd3RpbWV6b25lIjoiMCIsInR5cGUiOiJkIiwibGFuZyI6ImVuIn0=" title="what time is now" target="_blank"></a>
<script type="text/javascript" src="//w.24timezones.com/l.js" async></script>

3

<script>
//Блок для параметров погоды и времени в Доминикане по столице
//Меняем название города на страну    
$(".smolest").text("Сейчас в Доминикане");    
//Добавляем стили к названию города и градусам
 $('.smolest').attr('style', 'font-size: 10px !important ; font-weight: 200 !important ; color: #FFFFFF !important');
 $('.booked-weather-160x36-degree').attr('style' , 'color: #FFFFFF !important');
 $('.smolest').attr('href' , '#');
 $('.booked-weather-160x36-right').attr('href' , '#');
  $('.booked-weather-160x36-right img').hide();
</script>
<style>
/*Стили для времени*/
.tn-elem[data-elem-id="1524472695546"] .tn-atom {
    color: #FFFFFF;
    font-family: Roboto;
    font-weight: 400;
    font: normal 18px Tahoma, Geneva, sans-serif !important;
}
</style>
Made on
Tilda