Commit 9c72d924 authored by Simonas's avatar Simonas

in progress

parent 16892e07
# Biuro websites
## Information
- Task in [Jira](https://biurobaltic.atlassian.net/browse/LIV-1802)
- Project repository [dev.biuro](http://git.biuro.lt/biuro/dev.biuro)
- Created from [wordpress-nginx-docker](https://github.com/mjstealey/wordpress-nginx-docker)
- SSL Certificates are created with [SSL For Free](https://www.sslforfree.com/?domains=biuro.lt%20www.biuro.lt%20dev.biuro.lt%20staging.biuro.lt%20biuro.lv%20www.biuro.lv%20dev.biuro.lv%20staging.biuro.lv%20biuro.ee%20www.biuro.ee%20dev.biuro.ee%20staging.biuro.ee)
......@@ -22,7 +23,7 @@
- `C:\web\dev.biuro> docker exec -i mysql mysql -uroot -pIiIjnsLi2wR9i1kWVbVpUAzP --default-character-set=utf8 wordpress < docker/mariadb/db_004.sql`
## Development
- `C:\web\dev.biuro\wordpress>yarn (or npm install)`
- `C:\web\dev.biuro\wordpress>npm install`
## Wordpress
- Regions created using [Wordpress Network](https://codex.wordpress.org/Create_A_Network)
......
This diff is collapsed.
{
"extends": "stylelint-config-standard",
"rules": {
"block-no-empty": 2,
"color-no-invalid-hex": 2,
"declaration-colon-space-after": [2, "always"],
"declaration-colon-space-before": [2, "never"],
"indentation": 4,
"function-comma-space-after": [2, "always"],
"function-url-quotes": [2, "double"],
"media-feature-colon-space-after": [2, "always"],
"media-feature-colon-space-before": [2, "never"],
"media-feature-name-no-vendor-prefix": 2,
"no-multiple-empty-lines": 2,
"number-leading-zero": [2, "never"],
"number-no-trailing-zeros": 2,
"property-no-vendor-prefix": 2,
"rule-no-duplicate-properties": 2,
"rule-no-single-line": 2,
"rule-trailing-semicolon": [2, "always"],
"selector-list-comma-newline-after": [2, "always-multi-line"],
"selector-no-id": 2,
"string-quotes": [2, "double"],
"value-no-vendor-prefix": 2
}
}
......@@ -6,5 +6,10 @@ rich design UI styling. Class names here are more specific. This layer usually h
c-: Signify that something is a Component. This is a concrete, implementation-specific piece of UI. All of the changes you make to its styles should be detectable in the context you’re currently looking at. Modifying these styles should be safe and have no side effects.
========================================================================== */
/*@import '_component--logo.css';*/
/*@import '_component--nav.css';*/
@import '_component--cookies-warning.css';
@import '_component--data-controller.css';
/*
@import '_component--nav.css';
*/
/* ------------- Component: cookies warning ------------- */
/* critical:start */
.c-cookies-warning { display: none; }
/* critical:end */
.c-cookies-warning { position: fixed; left: 0px; right: 0; bottom: 0px; padding: 15px 20px; background: #f6f6f6; overflow: hidden; z-index: 100;
.bu-action { margin-top: 10px; }
.bu-action--alt { float: right; }
}
.c-cookies-warning--inner { margin: 0 auto; max-width: 976px }
/* ------------- Component: data controller ------------- */
/* critical:start */
.c-data-controller { padding: 0 20px; text-align: center; font-size: 88%; }
/* critical:end */
......@@ -39,7 +39,7 @@ qa-: Signify that a QA or Test Engineering team is running an automated UI test
@import '06-objects/_nav.css';
@import '06-objects/_section.css';
@import '07-components/_logo.css';
@import '07-components/_nav.css';
@import '07-components/_pages.css';
@import '07-components/_section.css';
......@@ -61,6 +61,56 @@ qa-: Signify that a QA or Test Engineering team is running an automated UI test
/* critical:end */
@import '07-components/__components.css';
/* critical:start */
#main{
margin:0 auto;
padding:0 20px;
}
@media (min-width:768px){
#sidebar,#topsearch{
float:left
}
#sidebar{
width:195px
}
#main{
max-width:956px
}
}
@media (min-width:980px){
#main{
padding:0
}
#sidebar{
width:215px
}
#content{
width:714px;
float:right
}
}
@media (min-width:1024px){
#main{
max-width:976px
}
#sidebar{
width:235px
}
}
.l-footer{
clear:both;
/*border-top:1px solid #ababab;*/
/*padding:10px 0 20px 17px*/
}
/* critical:end */
#main::after,
#top::after,
.about-biuro-img::before,
......@@ -126,11 +176,25 @@ button,input,select,textarea{
color:#4b4d4f;
font:16px/1.3 'PT Sans Narrow',sans-serif
}
.l-footer{
clear:both;
border-top:1px solid #ababab;
padding:10px 0 20px 17px
.bu-action { height: 28px; cursor: pointer; border: 1px solid #E1E1E1; padding: 0 15px; margin: 0; display: inline-block; }
.bu-action--main { color: #FFF; background: #006957; }
@media (max-width: 600px) {
.bu-action { height: 44px; }
}
/*.bu-action--alt { color: #FFF; background: #006957; }*/
.c-nav-footer{
margin:0;
padding:0;
......@@ -159,11 +223,7 @@ button,input,select,textarea{
.c-nav-footer .act,.c-nav-footer .act:hover{
border-color:#4b4d4f
}
#main{
margin:0 auto;
padding:0 20px;
visibility:visible
}
#top{
padding:20px 0 0
}
......@@ -1428,9 +1488,7 @@ button::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=button]:
}
}
@media (min-width:768px){
#sidebar,#sidebar #menu,#topsearch{
float:left
}
#content .advert_table td:nth-child(2),#topsearch #top-search-form label{
text-align:left
}
......@@ -1438,15 +1496,9 @@ button::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=button]:
font-size:16px;
line-height:1.3
}
.l-footer{
display:none
}
#sidebar .banner,#sidebar .copy,#top #lang,#top .country{
display:block
}
#main{
max-width:956px
}
#top #logo{
margin:21px 0 21px 15px
}
......@@ -1457,9 +1509,7 @@ button::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=button]:
clear:right;
float:right
}
#sidebar{
width:195px
}
#sidebar .share{
display:block;
margin:0 0 15px
......@@ -1525,12 +1575,7 @@ button::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=button]:
#content h2,#content h3,#content ul{
text-align:justify
}
#main{
padding:0
}
#sidebar{
width:215px
}
#sidebar #menu>li,#sidebar #menu>li>a{
font-family:'Bebas Neue',sans-serif;
font-size:24px
......@@ -1538,10 +1583,7 @@ button::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=button]:
#content .info_box,#content .info_box p,#content a.home_url,#content h1,.c-home-url{
font-family:'Bebas Neue'
}
#content{
width:714px;
float:right
}
#content h1{
padding:0 0 15px;
font-size:24px
......@@ -1610,14 +1652,7 @@ button::-moz-focus-inner,input[type=reset]::-moz-focus-inner,input[type=button]:
padding:50px 69px
}
}
@media (min-width:1024px){
#main{
max-width:976px
}
#sidebar{
width:235px
}
}
@media only screen and (min-width:1281px){
[href^=tel]{
pointer-events:none;
......
var cb = function() {
'use strict';
var l = document.createElement('link'),
h = document.getElementsByTagName('head')[0];
// oldIE =document.all && !document.addEventListener;
l.rel = 'stylesheet';
l.href = '/wp-content/themes/biuro/css/main.min.css';
// l.href = (oldIE) ? 'mysite/css/main-fixed.css' : 'mysite/css/main-responsive.css';
h.parentNode.insertBefore(l, h);
},
raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (raf) {
raf(cb);
} else {
if (window.addEventListener) {
window.addEventListener('load', cb);
} else {
window.attachEvent('onload', cb);
}
}
(global => {
const container = document.getElementById('cookie-warning');
const btnAgree = document.getElementById('cookie-agree');
const btnClose = document.getElementById('cookie-close');
const agreed = (useLS()) ? localStorage.getItem('biuro-agree') : false;
function useLS () {
var mod = 'a';
try {
localStorage.setItem(mod, mod);
localStorage.removeItem(mod);
return true;
} catch (e) {
return false;
}
}
if (!container || !btnAgree || !btnClose || agreed) {
return;
}
container.style.display = 'block';
btnAgree.addEventListener('click', () => {
if (useLS()) {
localStorage.setItem('biuro-agree', 'true');
}
container.style.display = 'none';
});
btnClose.addEventListener('click', () => {
container.style.display = 'none';
});
})(window);
console.log('here goes main I');
// console.log('here goes main II');
......
......@@ -39,42 +39,43 @@
<div id="fb-root"></div>
<?php /*
<div id="biuro-cookies-container" style="display: none; position: fixed; width: 100%; left: 0px; bottom: 0px; padding: 15px; background: rgb(228, 228, 228); color: rgb(0, 0, 0); overflow: hidden; z-index: 100;">
<div style="margin: 0; overflow: hidden; line-height: 1.2">
<button onclick="biuroCookiesClose()" type="button" style="width: 44px; height: 44px; float: right; margin-left: 15px; margin-right: 25px; border: 1px solid #000; font-size: 32px; background: #e3e3e3; cursor: pointer;">×</button>
<p style="margin-top: 0">Sklandžiam svetainės veikimui, Jūsų naršymo patirties gerinimui bei rinkodarai, naudojame slapukus. Plačiau apie naudojamus slapukus ir jų valdymą (įskaitant atsisakymą) skaitykite mūsų
<a href="http://biuro.eu/cookies-lt">Slapukų politikoje.</a>
Jeigu sutinkate, kad įrašytume slapukus į Jūsų įrenginį, paspauskite „Sutinku“ arba naršykite toliau.
</p>
<button onclick="biuroCookiesInitiate()" type="button" style="height: 44px; line-height: 44px; 44px; padding: 0 20px; border: 1px solid #000; font-size: 16px; font-family: inherit; background: #e3e3e3; cursor: pointer;">Sutinku</button>
</div>
</div>
<div style="width: 100%; display: inline-block; text-align: center; font-size: 14px;">
<p style="margin-top: 0">
<p>Jūsų Asmens duomenų Valdytojas yra UAB "Biuro", juridinio asmens kodas 300055900, adresas Gedimino pr. 26, Vilnius, tel. <a class="gtm-phone-click" href="tel:+37052139476">+37052139476</a>.</a></p>
<p>Plačiau apie asmens duomenis, jų tvarkymą bei Jūsų teises skaitykite mūsų <a href="http://biuro.eu/privacy-lt">Asmens duomenų tvarkymo politikoje.</a></p>
Sklandžiam svetainės veikimui, Jūsų naršymo patirties gerinimui bei rinkodarai, naudojame slapukus. Plačiau apie naudojamus slapukus ir jų valdymą (įskaitant atsisakymą) skaitykite mūsų <a href="http://biuro.eu/cookies-lt">Slapukų politikoje.</a> Jeigu sutinkate, kad įrašytume slapukus į Jūsų įrenginį, paspauskite „Sutinku“ arba naršykite toliau.
</p>
<button onclick="biuroCookiesInitiate()" type="button" style="height: 44px; line-height: 44px; padding: 0 20px; border: 1px solid #000; font-size: 16px; font-family: inherit; background: #e3e3e3; cursor: pointer;">Sutinku</button>
</div>
</div>
<?php /*
Data_Controller
dynamic_sidebar( 'footer' );
debug( the_widget('footer') ); */
// debug( the_widget('data-controller') );
// debug( the_widget('cookies-policy') );
// debug( the_widget('data_controller') );
?>
<div class="l-footer">
<?php
if ( is_active_sidebar( 'footer_main' ) ) :
dynamic_sidebar( 'footer_main' );
endif;
?>
<?php
/*
<ul class="c-nav-footer">
<li>Kalba:&nbsp;</li>
......@@ -100,68 +101,10 @@ dynamic_sidebar( 'footer' );
<a href="https://biuro.ee" target="_blank" rel="noopener" class="gtm-referral-click">Estija</a>
</li>
</ul>
*/
?>
</div>
<script>
var cb = function() {
'use strict';
var l = document.createElement('link'),
h = document.getElementsByTagName('head')[0];
// oldIE =document.all && !document.addEventListener;
l.rel = 'stylesheet';
l.href = '/wp-content/themes/biuro/css/main.min.css';
// l.href = (oldIE) ? 'mysite/css/main-fixed.css' : 'mysite/css/main-responsive.css';
h.parentNode.insertBefore(l, h);
},
raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (raf) {
raf(cb);
} else {
if (window.addEventListener) {
window.addEventListener('load', cb);
}
else {
window.attachEvent('onload', cb);
}
}
var container = document.getElementById('biuro-cookies-container'),
agreed = (useLocalStorage()) ? localStorage.getItem('biuro-agree') : false;
function useLocalStorage() {
var mod = 'a';
try {
localStorage.setItem(mod, mod);
localStorage.removeItem(mod);
return true;
} catch(e) {
return false;
}
}
function biuroCookiesInitiate() {
if (useLocalStorage()) {
localStorage.setItem('biuro-agree', 'true');
}
biuroCookiesClose()
}
function biuroCookiesClose() {
if (container) {
container.style.display = 'none';
}
}
if (!agreed && container) {
container.style.display = 'block';
}
</script>
<?php
/*
......@@ -176,13 +119,19 @@ dynamic_sidebar( 'footer' );
})(window,document,'script','dataLayer','GTM-THF42F');</script>
*/
if ( is_active_sidebar( 'append_area' ) ) :
dynamic_sidebar( 'append_area' );
endif;
?>
<script>
var coords = eval('') || null;
</script>
<!-- <script async src="/wp-content/themes/biuro/js/main.min.js"></script> -->
<script async src="/wp-content/themes/biuro/js/main.js"></script>
<script src="/wp-content/themes/biuro/_js/main.min.js" async></script>
</body>
</html>
This diff is collapsed.
webpackHotUpdate("main",{
/***/ "./js/main.js":
/*!********************!*\
!*** ./js/main.js ***!
\********************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var cb = function cb() {\n 'use strict';\n\n var l = document.createElement('link'),\n h = document.getElementsByTagName('head')[0]; // oldIE =document.all && !document.addEventListener;\n\n l.rel = 'stylesheet';\n l.href = '/wp-content/themes/biuro/css/main.min.css'; // l.href = (oldIE) ? 'mysite/css/main-fixed.css' : 'mysite/css/main-responsive.css';\n\n h.parentNode.insertBefore(l, h);\n},\n raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\n\nif (raf) {\n raf(cb);\n} else {\n if (window.addEventListener) {\n window.addEventListener('load', cb);\n } else {\n window.attachEvent('onload', cb);\n }\n}\n\n(function (global) {\n var container = document.getElementById('cookie-warning');\n var btnAgree = document.getElementById('cookie-agree');\n var btnClose = document.getElementById('cookie-close');\n var agreed = useLS() ? localStorage.getItem('biuro-agree') : false;\n\n function useLS() {\n var mod = 'a';\n\n try {\n localStorage.setItem(mod, mod);\n localStorage.removeItem(mod);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n if (!container || !btnAgree || !btnClose || agreed) {\n return;\n }\n\n container.style.display = 'block';\n btnAgree.addEventListener('click', function () {\n if (useLS()) {\n localStorage.setItem('biuro-agree', 'true');\n }\n\n container.style.display = 'none';\n });\n btnClose.addEventListener('click', function () {\n container.style.display = 'none';\n });\n})(window);\n\nconsole.log('here goes main I'); // console.log('here goes main II');\n// console.log('here goes main III');\n\n//# sourceURL=webpack:///./js/main.js?");
/***/ })
})
\ No newline at end of file
webpackHotUpdate("main",{
/***/ "./js/main.js":
/*!********************!*\
!*** ./js/main.js ***!
\********************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var cb = function cb() {\n 'use strict';\n\n var l = document.createElement('link'),\n h = document.getElementsByTagName('head')[0]; // oldIE =document.all && !document.addEventListener;\n\n l.rel = 'stylesheet';\n l.href = '/wp-content/themes/biuro/css/main.min.css'; // l.href = (oldIE) ? 'mysite/css/main-fixed.css' : 'mysite/css/main-responsive.css';\n\n h.parentNode.insertBefore(l, h);\n},\n raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\n\nif (raf) {\n raf(cb);\n} else {\n if (window.addEventListener) {\n window.addEventListener('load', cb);\n } else {\n window.attachEvent('onload', cb);\n }\n}\n\n(function (global) {\n var container = document.getElementById('cookie-warning');\n var btnAgree = document.getElementById('cookie-agree');\n var btnClose = document.getElementById('cookie-close');\n var agreed = useLocalStorage() ? localStorage.getItem('biuro-agree') : false;\n\n function useLocalStorage() {\n var mod = 'a';\n\n try {\n localStorage.setItem(mod, mod);\n localStorage.removeItem(mod);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n if (!container || !btnAgree || !btnClose || agreed) {\n return;\n }\n\n container.style.display = 'block';\n btnAgree.addEventListener('click', function () {\n if (useLocalStorage()) {\n localStorage.setItem('biuro-agree', 'true');\n }\n\n container.style.display = 'none';\n });\n btnClose.addEventListener('click', function () {\n container.style.display = 'none';\n });\n})(window);\n\nconsole.log('here goes main I'); // console.log('here goes main II');\n// console.log('here goes main III');\n\n//# sourceURL=webpack:///./js/main.js?");
/***/ })
})
\ No newline at end of file
webpackHotUpdate("main",{
/***/ "./js/main.js":
/*!********************!*\
!*** ./js/main.js ***!
\********************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var cb = function cb() {\n 'use strict';\n\n var l = document.createElement('link'),\n h = document.getElementsByTagName('head')[0]; // oldIE =document.all && !document.addEventListener;\n\n l.rel = 'stylesheet';\n l.href = '/wp-content/themes/biuro/css/main.min.css'; // l.href = (oldIE) ? 'mysite/css/main-fixed.css' : 'mysite/css/main-responsive.css';\n\n h.parentNode.insertBefore(l, h);\n},\n raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\n\nif (raf) {\n raf(cb);\n} else {\n if (window.addEventListener) {\n window.addEventListener('load', cb);\n } else {\n window.attachEvent('onload', cb);\n }\n}\n\nvar container = document.getElementById('biuro-cookies-container'),\n agreed = useLocalStorage() ? localStorage.getItem('biuro-agree') : false;\n\nfunction useLocalStorage() {\n var mod = 'a';\n\n try {\n localStorage.setItem(mod, mod);\n localStorage.removeItem(mod);\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction biuroCookiesInitiate() {\n if (useLocalStorage()) {\n localStorage.setItem('biuro-agree', 'true');\n }\n\n biuroCookiesClose();\n}\n\nfunction biuroCookiesClose() {\n if (container) {\n container.style.display = 'none';\n }\n}\n\nif (!agreed && container) {\n container.style.display = 'block';\n}\n\nconsole.log('here goes main I'); // console.log('here goes main II');\n// console.log('here goes main III');\n\n//# sourceURL=webpack:///./js/main.js?");
/***/ })
})
\ No newline at end of file
<?php
/*
Plugin Name: Cookies warning
Description: Biuro cookies warning plugin
Author: Biuro
Version: 1.0
Author URI: https://www.biuro.lt/
*/
class Cookies_Warning extends WP_Widget {
// Main constructor
public function __construct() {
parent::__construct(
'cookies-policy',
__( 'Cookies Warning | Biuro', 'biuro' ),
array(
'customize_selective_refresh' => true,
)
);
}
// The widget form (for the backend )
public function form( $instance ) {
// Set widget defaults
$defaults = array(
'agree' => '',
'close' => '',
'content' => '',
);
// Parse current settings with defaults
extract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>
<?php // Content Field ?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>"><?php _e( 'Content:', 'biuro' ); ?></label>
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>" rows="12"><?php echo wp_kses_post( $content ); ?></textarea>
</p>
<?php // Agree Field ?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'agree' ) ); ?>"><?php _e( 'Agree:', 'biuro' ); ?></label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'agree' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'agree' ) ); ?>" type="text" value="<?php echo esc_attr( $agree ); ?>" />
</p>
<?php // Close Field ?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'close' ) ); ?>"><?php _e( 'Close:', 'biuro' ); ?></label>
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'close' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'close' ) ); ?>" type="text" value="<?php echo esc_attr( $close ); ?>" />
</p>
<?php }
// Update widget settings
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['agree'] = isset( $new_instance['agree'] ) ? wp_strip_all_tags( $new_instance['agree'] ) : '';
$instance['close'] = isset( $new_instance['close'] ) ? wp_strip_all_tags( $new_instance['close'] ) : '';
$instance['content'] = isset( $new_instance['content'] ) ? wp_kses_post( $new_instance['content'] ) : '';
return $instance;
}
// Display the widget
public function widget( $args, $instance ) {
extract( $args );
// Check the widget options
$agree = isset( $instance['agree'] ) ? $instance['agree'] : '';
$close = isset( $instance['close'] ) ? $instance['close'] : '';
$content = isset( $instance['content'] ) ?$instance['content'] : '';
// WordPress core before_widget hook (always include )
echo $before_widget;
// Display the widget
echo '<div id="cookie-warning" class="c-cookies-warning">';
echo '<div class="c-cookies-warning--inner">';
// Display content field
if ( $content ) {
echo $content;
}
echo '<br >';
// Display agree button
if ( $agree ) {
echo '<button id="cookie-agree" class="bu-action bu-action--main" type="button" title="' . $agree . '">' . $agree . '</button>';
}
// Display close button
if ( $close ) {
echo '<button id="cookie-close" class="bu-action bu-action--alt" type="button" title="' . $close . '">' . $close . '</button>';
}
echo '</div>';
echo '</div>';
// WordPress core after_widget hook (always include )
echo $after_widget;
}
}
// register Cookies_Warning
add_action( 'widgets_init', function(){
register_widget( 'Cookies_Warning' );
});
<?php
/*
Plugin Name: Data controller
Description: Biuro data controller plugin
Author: Biuro
Version: 1.0
Author URI: https://www.biuro.lt/
*/
class Data_Controller extends WP_Widget {
// Main constructor
public function __construct() {
parent::__construct(
'data-controller',
__( 'Data Controller | Biuro', 'biuro' ),
array(
'customize_selective_refresh' => true,
)
);
}
// The widget form (for the backend )
public function form( $instance ) {
// Set widget defaults
$defaults = array(
'content' => '',
);
// Parse current settings with defaults
extract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>
<?php // Content Field ?>
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>"><?php _e( 'Content:', 'biuro' ); ?></label>
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>" rows="12"><?php echo wp_kses_post( $content ); ?></textarea>
</p>
<?php }
// Update widget settings
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['content'] = isset( $new_instance['content'] ) ? wp_kses_post( $new_instance['content'] ) : '';
return $instance;
}
// Display the widget
public function widget( $args, $instance ) {
extract( $args );
// Check the widget options
$content = isset( $instance['content'] ) ?$instance['content'] : '';
// WordPress core before_widget hook (always include )
echo $before_widget;
// Display the widget
echo '<div class="c-data-controller">';
// Display content field
if ( $content ) {
echo $content;
}
echo '</div>';
// WordPress core after_widget hook (always include )
echo $after_widget;
}
}
// register Data_Controller
add_action( 'widgets_init', function(){
register_widget( 'Data_Controller' );
});
.c-cookies-warning{display:none}.c-data-controller{padding:0 20px;text-align:center;font-size:88%}#main{margin:0 auto;padding:0 20px}.l-footer{clear:both}@media (min-width:768px){#sidebar,#topsearch{float:left}#sidebar{width:195px}#main{max-width:956px}}@media (min-width:980px){#main{padding:0}#sidebar{width:215px}#content{width:714px;float:right}}@media (min-width:1024px){#main{max-width:976px}#sidebar{width:235px}}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -39,42 +39,43 @@
<div id="fb-root"></div>
<?php /*
<div id="biuro-cookies-container" style="display: none; position: fixed; width: 100%; left: 0px; bottom: 0px; padding: 15px; background: rgb(228, 228, 228); color: rgb(0, 0, 0); overflow: hidden; z-index: 100;">
<div style="margin: 0; overflow: hidden; line-height: 1.2">
<button onclick="biuroCookiesClose()" type="button" style="width: 44px; height: 44px; float: right; margin-left: 15px; margin-right: 25px; border: 1px solid #000; font-size: 32px; background: #e3e3e3; cursor: pointer;">×</button>
<p style="margin-top: 0">Sklandžiam svetainės veikimui, Jūsų naršymo patirties gerinimui bei rinkodarai, naudojame slapukus. Plačiau apie naudojamus slapukus ir jų valdymą (įskaitant atsisakymą) skaitykite mūsų
<a href="http://biuro.eu/cookies-lt">Slapukų politikoje.</a>
Jeigu sutinkate, kad įrašytume slapukus į Jūsų įrenginį, paspauskite „Sutinku“ arba naršykite toliau.
</p>
<button onclick="biuroCookiesInitiate()" type="button" style="height: 44px; line-height: 44px; 44px; padding: 0 20px; border: 1px solid #000; font-size: 16px; font-family: inherit; background: #e3e3e3; cursor: pointer;">Sutinku</button>
</div>
</div>
<div style="width: 100%; display: inline-block; text-align: center; font-size: 14px;">
<p style="margin-top: 0">
<p>Jūsų Asmens duomenų Valdytojas yra UAB "Biuro", juridinio asmens kodas 300055900, adresas Gedimino pr. 26, Vilnius, tel. <a class="gtm-phone-click" href="tel:+37052139476">+37052139476</a>.</a></p>
<p>Plačiau apie asmens duomenis, jų tvarkymą bei Jūsų teises skaitykite mūsų <a href="http://biuro.eu/privacy-lt">Asmens duomenų tvarkymo politikoje.</a></p>
Sklandžiam svetainės veikimui, Jūsų naršymo patirties gerinimui bei rinkodarai, naudojame slapukus. Plačiau apie naudojamus slapukus ir jų valdymą (įskaitant atsisakymą) skaitykite mūsų <a href="http://biuro.eu/cookies-lt">Slapukų politikoje.</a> Jeigu sutinkate, kad įrašytume slapukus į Jūsų įrenginį, paspauskite „Sutinku“ arba naršykite toliau.
</p>
<button onclick="biuroCookiesInitiate()" type="button" style="height: 44px; line-height: 44px; padding: 0 20px; border: 1px solid #000; font-size: 16px; font-family: inherit; background: #e3e3e3; cursor: pointer;">Sutinku</button>
</div>
</div>
<?php /*
Data_Controller
dynamic_sidebar( 'footer' );
debug( the_widget('footer') ); */
// debug( the_widget('data-controller') );
// debug( the_widget('cookies-policy') );
// debug( the_widget('data_controller') );
?>
<div class="l-footer">
<?php
if ( is_active_sidebar( 'footer_main' ) ) :
dynamic_sidebar( 'footer_main' );
endif;
?>
<?php
/*
<ul class="c-nav-footer">
<li>Kalba:&nbsp;</li>
......@@ -100,68 +101,10 @@ dynamic_sidebar( 'footer' );
<a href="https://biuro.ee" target="_blank" rel="noopener" class="gtm-referral-click">Estija</a>
</li>
</ul>
*/
?>
</div>
<script>
var cb = function() {
'use strict';
var l = document.createElement('link'),
h = document.getElementsByTagName('head')[0];
// oldIE =document.all && !document.addEventListener;
l.rel = 'stylesheet';
l.href = '/wp-content/themes/biuro/css/main.min.css';
// l.href = (oldIE) ? 'mysite/css/main-fixed.css' : 'mysite/css/main-responsive.css';
h.parentNode.insertBefore(l, h);
},
raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (raf) {
raf(cb);
} else {
if (window.addEventListener) {
window.addEventListener('load', cb);
}
else {
window.attachEvent('onload', cb);
}
}
var container = document.getElementById('biuro-cookies-container'),
agreed = (useLocalStorage()) ? localStorage.getItem('biuro-agree') : false;
function useLocalStorage() {
var mod = 'a';
try {
localStorage.setItem(mod, mod);
localStorage.removeItem(mod);
return true;
} catch(e) {
return false;
}
}
function biuroCookiesInitiate() {
if (useLocalStorage()) {
localStorage.setItem('biuro-agree', 'true');
}
biuroCookiesClose()
}
function biuroCookiesClose() {
if (container) {
container.style.display = 'none';
}
}
if (!agreed && container) {
container.style.display = 'block';
}
</script>
<?php
/*
......@@ -176,13 +119,19 @@ dynamic_sidebar( 'footer' );
})(window,document,'script','dataLayer','GTM-THF42F');</script>
*/
if ( is_active_sidebar( 'append_area' ) ) :
dynamic_sidebar( 'append_area' );
endif;
?>
<script>
var coords = eval('') || null;
</script>
<!-- <script async src="/wp-content/themes/biuro/js/main.min.js"></script> -->
<script async src="/wp-content/themes/biuro/js/main.js"></script>
<script src="/wp-content/themes/biuro/_js/main.min.js" async></script>
</body>
</html>
......@@ -64,7 +64,7 @@
/******/
/******/ var hotApplyOnUpdate = true;
/******/ // eslint-disable-next-line no-unused-vars
/******/ var hotCurrentHash = "62e18ee57d06ef238073";
/******/ var hotCurrentHash = "f72754f1f921a830eac1";
/******/ var hotRequestTimeout = 10000;
/******/ var hotCurrentModuleData = {};
/******/ var hotCurrentChildModule;
......@@ -801,7 +801,7 @@
/*! no static exports found */
/***/ (function(module, exports) {
eval("console.log('here goes main I'); // console.log('here goes main II');\n// console.log('here goes main III');\n\n//# sourceURL=webpack:///./js/main.js?");
eval("var cb = function cb() {\n 'use strict';\n\n var l = document.createElement('link'),\n h = document.getElementsByTagName('head')[0]; // oldIE =document.all && !document.addEventListener;\n\n l.rel = 'stylesheet';\n l.href = '/wp-content/themes/biuro/css/main.min.css'; // l.href = (oldIE) ? 'mysite/css/main-fixed.css' : 'mysite/css/main-responsive.css';\n\n h.parentNode.insertBefore(l, h);\n},\n raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;\n\nif (raf) {\n raf(cb);\n} else {\n if (window.addEventListener) {\n window.addEventListener('load', cb);\n } else {\n window.attachEvent('onload', cb);\n }\n}\n\n(function (global) {\n var container = document.getElementById('cookie-warning');\n var btnAgree = document.getElementById('cookie-agree');\n var btnClose = document.getElementById('cookie-close');\n var agreed = useLS() ? localStorage.getItem('biuro-agree') : false;\n\n function useLS() {\n var mod = 'a';\n\n try {\n localStorage.setItem(mod, mod);\n localStorage.removeItem(mod);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n if (!container || !btnAgree || !btnClose || agreed) {\n return;\n }\n\n container.style.display = 'block';\n btnAgree.addEventListener('click', function () {\n if (useLS()) {\n localStorage.setItem('biuro-agree', 'true');\n }\n\n container.style.display = 'none';\n });\n btnClose.addEventListener('click', function () {\n container.style.display = 'none';\n });\n})(window);\n\nconsole.log('here goes main I'); // console.log('here goes main II');\n// console.log('here goes main III');\n\n//# sourceURL=webpack:///./js/main.js?");
/***/ }),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment