Commit 6c6581fa authored by Simonas's avatar Simonas

in progress

parent 990225d1
PROJECT=dev-biuro
IMAGE_NGINX=nginx:1.15.7
# IMAGE_NGINX=fholzer/nginx-brotli
#IMAGE_NGINX=nginx:1.15.7
IMAGE_NGINX=kbenassm/nginx-brotli-tls13
IMAGE_MYSQL=mariadb:10.3
IMAGE_WORDPRESS=wordpress:php7.2-fpm
IMAGE_WORDPRESS_CLI=wordpress:cli-php7.2
IMAGE_WORDPRESS=wordpress:php7.3-fpm
IMAGE_WORDPRESS_CLI=wordpress:cli-php7.3
DB_NAME=dev_biuro
DB_HOST=mysql
......
FROM php:7.2-fpm
FROM php:7.3-fpm
LABEL maintainer="Biuro<info@biuro.lt>"
# install the PHP extensions we need
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libjpeg-dev \
libpng-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-install gd mysqli opcache zip; \
\
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
VOLUME /var/www/html
ENV WORDPRESS_VERSION 5.0.3
ENV WORDPRESS_SHA1 f9a4b482288b5be7a71e9f3dc9b5b0c1f881102b
RUN set -ex; \
curl -o wordpress.tar.gz -fSL "https://wordpress.org/wordpress-${WORDPRESS_VERSION}.tar.gz"; \
echo "$WORDPRESS_SHA1 *wordpress.tar.gz" | sha1sum -c -; \
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
tar -xzf wordpress.tar.gz -C /usr/src/; \
rm wordpress.tar.gz; \
chown -R www-data:www-data /usr/src/wordpress
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
FROM php:7.3-fpm
# install the PHP extensions we need
RUN set -ex; \
......@@ -11,6 +67,7 @@ RUN set -ex; \
apt-get install -y --no-install-recommends \
libjpeg-dev \
libpng-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
......@@ -72,30 +129,3 @@ RUN \
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["php-fpm"]
#####FROM wordpress:php7.2-fpm
#####
#####LABEL maintainer="Biuro<info@biuro.lt>"
#####
#####RUN \
##### apt-get update && \
##### apt-get install unzip wget mysql-client -y && \
##### rm -rf /var/lib/apt/lists/*
#####
###### COPY ./uploads.ini /usr/local/etc/php/conf.d/uploads.ini
#####
#####COPY docker-entrypoint.sh /usr/local/bin/
#####RUN chmod +x /usr/local/bin/docker-entrypoint.sh
#####
#####COPY ./wp-content/themes/biuro /temp/themes/biuro
#####COPY ./wp-content/plugins/ /temp/plugins/
###### COPY ./base/ /temp/base
#####
#####RUN \
##### unzip '/temp/themes/*.zip' -d /temp/themes && rm /temp/themes/*.zip || true; \
##### unzip '/temp/plugins/*.zip' -d /temp/plugins && rm /temp/plugins/*.zip || true; \
##### # unzip '/temp/base/*.zip' -d /temp/base && rm /temp/base/*.zip || true; \
##### exit 0
# COPY ./app /usr/share/nginx/html
......@@ -114,9 +114,9 @@ Restart docker (sometimes PC restart may be required)
- docker load --input ourdemo.tar
- docker build -t simoncereska/biuro-staging:0.0.8 .
- docker build -t simoncereska/biuro-staging:0.0.9 .
- docker login --username=simoncereska --password=rlgjsPeOuF2T6VgW8fGss81h
- docker push simoncereska/biuro-staging:0.0.8
- docker push simoncereska/biuro-staging:0.0.9
- sudo chown -R www-data:www-data wordpress/wp-content/plugins
......
......@@ -26,6 +26,8 @@ services:
- "front"
- "back"
volumes:
- ./nginx/php.ini:/usr/local/etc/php/conf.d/php.ini
- ./wp-content/plugins/cookies-warning:/var/www/html/wp-content/plugins/cookies-warning
- ./wp-content/plugins/data-controller:/var/www/html/wp-content/plugins/data-controller
- ./wp-content/plugins/jobs-importer:/var/www/html/wp-content/plugins/jobs-importer
......@@ -66,7 +68,11 @@ services:
- '80:80'
- '443:443'
volumes:
- ./nginx:/etc/nginx/conf.d
# - ./nginx:/etc/nginx/conf.d
- ./nginx/conf.d:/etc/nginx/conf.d
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./logs/nginx:/var/log/nginx
- ./certs:/etc/letsencrypt
- ./certs-data:/data/letsencrypt
......
server {
listen 80;
listen [::]:80;
server_name dev.biuro.lt dev.biuro.lv dev.biuro.ee;
location ^~ /.well-known {
allow all;
default_type "text/plain";
root /data/letsencrypt/;
}
location / {
rewrite ^ https://$host$request_uri? permanent;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name dev.biuro.lt;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;";
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4;
ssl_certificate /etc/letsencrypt/biuro.lt/certificate.crt;
ssl_certificate_key /etc/letsencrypt/biuro.lt/private.key;
ssl_trusted_certificate /etc/letsencrypt/biuro.lt/ca_bundle.crt;
# ssl_protocols TLSv1.2 TLSv1.3;
# ssl_ciphers EECDH+CHACHA20:EECDH+AES;
# # (1)
# ssl_ecdh_curve X25519;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_prefer_server_ciphers on;
# ssl_ciphers 'TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
root /var/www/html;
index index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# 301 redirects
include /etc/nginx/conf.d/redirects/biuro.lt.conf;
#
gzip on;
gzip_comp_level 5;
gzip_min_length 1024;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-javascript text/xml
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
application/xml+rss text/javascript
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component;
gzip_disable "MSIE [1-6]\.";
# brotli on;
# brotli_comp_level 6;
# brotli_types application/eot application/x-otf application/font application/x-perl application/font-sfnt application/x-ttf application/javascript
# font/eot application/json font/ttf application/opentype font/otf application/otf font/opentype application/pkcs7-mime image/svg+xml
# application/truetype text/css application/ttf text/csv application/vnd.ms-fontobject text/html application/xhtml+xml text/javascript
# application/xml text/js application/xml+rss text/plain application/x-font-opentype text/richtext application/x-font-truetype
# text/tab-separated-values application/x-font-ttf text/xml application/x-httpd-cgi text/x-script application/x-javascript
# text/x-component application/x-mpegurl text/x-java-source application/x-opentype
# ;
#
# Expire rules for static content
# https://serversforhackers.com/c/nginx-caching
# https://github.com/h5bp/server-configs-nginx
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
# access_log logs/static.log; # I don't usually include a static log
}
# Feed
location ~* \.(?:rss|atom)$ {
expires 1h;
add_header Cache-Control "public";
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:webp|jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 6M;
access_log off;
add_header Cache-Control "public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name dev.biuro.lv;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;";
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4;
ssl_certificate /etc/letsencrypt/biuro.lv/certificate.pem;
ssl_certificate_key /etc/letsencrypt/biuro.lv/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/biuro.lv/ca-bundle.pem;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_prefer_server_ciphers on;
# ssl_ciphers 'TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
root /var/www/html;
index index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# 301 redirects
include /etc/nginx/conf.d/redirects/biuro.lv.conf;
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_disable "MSIE [1-6]\.";
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name dev.biuro.ee;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;";
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4;
ssl_certificate /etc/letsencrypt/biuro.ee/certificate.pem;
ssl_certificate_key /etc/letsencrypt/biuro.ee/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/biuro.ee/ca-bundle.pem;
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
# ssl_prefer_server_ciphers on;
# ssl_ciphers 'TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
root /var/www/html;
index index.php;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# 301 redirects
include /etc/nginx/conf.d/redirects/biuro.ee.conf;
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_disable "MSIE [1-6]\.";
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
# RewriteEngine On
# RewriteBase /
# RewriteRule ^index\.php$ - [L]
#
# # add a trailing slash to /wp-admin
# RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
#
# RewriteCond %{REQUEST_FILENAME} -f [OR]
# RewriteCond %{REQUEST_FILENAME} -d
# RewriteRule ^ - [L]
# RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
# RewriteRule ^(.*\.php)$ $1 [L]
# RewriteRule . index.php [L]
# ----------------------------------------------------------------------
# 301 biuro.ee redirects
# ----------------------------------------------------------------------
# rewrite ^/toeoepakkumised$ / permanent;
# rewrite ^/toeoepakkumised/(.*)$ /? permanent;
# Biuro SEO issues
# https://docs.google.com/spreadsheets/d/1dXP0dh_v2sFajrcwR2_9HONMadCdZQW4Y2dVXvhxG3E/edit?ts=5b5eaa6b#gid=0
#
rewrite ^/toeoeandjatele/suvetoo-pank/?$ /toeoeandjatele/ajutine-toeoehoive/ permanent;
# Intertnal ex 302
rewrite ^/rabotnikam/?$ /rabotnikam/vremennaya-rabota/ permanent;
rewrite ^/toeoeandjatele/?$ /toeoeandjatele/ajutine-toeoehoive/ permanent;
rewrite ^/contacts/?$ /contacts/job-seekers/ permanent;
rewrite ^/toeoeotsijatele/?$ /toeoeotsijatele/ajutine-toeoe/ permanent;
rewrite ^/o-biuro/?$ /o-biuro/o-nas/ permanent;
rewrite ^/job-seekers/?$ /job-seekers/temporary-employment-in-estonia/ permanent;
rewrite ^/home/?$ / permanent;
rewrite ^/employers/?$ /employers/temporary-employees-in-estonia/ permanent;
rewrite ^/kontakty/?$ /kontakty/rabotnikam/ permanent;
rewrite ^/about-biuro/?$ /about-biuro/staffing-agency-in-estonia/ permanent;
rewrite ^/rabotodatelyam/?$ /rabotodatelyam/vremennoe-trudoustrojstvo/ permanent;
rewrite ^/kontaktid/?$ /kontaktid/toeoeotsijad/ permanent;
rewrite (?i)^/Meist/?$ /Meist/meist/ permanent;
# ----------------------------------------------------------------------
# 301 biuro.lt redirects
# ----------------------------------------------------------------------
# rewrite ^/darbo-pasiulymai$ / permanent;
# rewrite ^/darbo-pasiulymai/(.*)$ /? permanent;
rewrite ^/employers/staf-search-and-selection-in-lithuania/?$ /employers/staff-search-and-selection-in-lithuania/ permanent;
# Biuro SEO issues
# https://docs.google.com/spreadsheets/d/1dXP0dh_v2sFajrcwR2_9HONMadCdZQW4Y2dVXvhxG3E/edit?ts=5b5eaa6b#gid=0
#
rewrite ^/contacts/course-agentures/?$ /contacts/job-seekers/ permanent;
# Intertnal ex 302
# --- Darbuotojams ---
rewrite ^/darbuotojams/?$ /darbo-pasiulymai/ permanent;
# rewrite ^/darbo-paieska/uzsidirbtilietuvoje/?$ /darbo-paieska/laikinas-darbas/ permanent;
# rewrite ^/darbo-paieska/atvesk-drauga-gauk-dovanu/?$ /darbo-paieska/laikinas-darbas/ permanent;
rewrite ^/darbo-paieska/uzsidirbtilietuvoje/?$ /darbo-pasiulymai/ permanent;
rewrite ^/darbo-paieska/atvesk-drauga-gauk-dovanu/?$ /darbo-pasiulymai/ permanent;
# rewrite ^/darbo-paieska/vasarosdarbubankas/?$ / permanent;
rewrite ^/darbo-paieska/vasarosdarbubankas/?$ /darbo-pasiulymai/ permanent;
rewrite ^/darbo-paieska/?$ /darbo-pasiulymai/ permanent;
rewrite ^/darbo-paieska/laikinas-darbas/?$ /darbo-pasiulymai/ permanent;
rewrite ^/darbo-paieska/siulo-darba/?$ /darbuotojams/siulo-darba/ permanent;
rewrite ^/darbo-paieska/papildomas-darbas/?$ /darbuotojams/duk/ permanent;
rewrite ^/darbo-paieska/klauskite\;/?$ /darbuotojams/kontaktai/ permanent;
rewrite ^/darbo-paieska/klauskite/?$ /darbuotojams/kontaktai/ permanent;
rewrite ^/kontaktai/?$ /darbuotojams/kontaktai/ permanent;
rewrite ^/kontaktai/darbinimo-agenturos/?$ /darbuotojams/kontaktai/ permanent;
# --- Darbdaviams ---
# rewrite ^/personalo-nuoma/vasarosdarbubankas/?$ / permanent;
rewrite ^/darbdaviams/?$ /darbdaviams/pardaviminis-puslapis-lt/ permanent;
rewrite ^/personalo-nuoma/vasarosdarbubankas/?$ /darbdaviams/pardaviminis-puslapis-lt/ permanent;
rewrite ^/personalo-nuoma/?$ /darbdaviams/pardaviminis-puslapis-lt/ permanent;
rewrite ^/personalo-nuoma/laikinas-idarbinimas/?$ /darbdaviams/pardaviminis-puslapis-lt/ permanent;
rewrite ^/personalo-nuoma/specialistu-nuoma/?$ /darbdaviams/specialistu-nuoma/ permanent;
rewrite ^/personalo-nuoma/personalo-paieska-atranka/?$ /darbdaviams/personalo-paieska-ir-atranka/ permanent;
rewrite ^/kontaktai/personalo-nuomai/?$ /darbdaviams/kontaktai/ permanent;
rewrite ^/personalo-nuoma/siuskite-uzklausa/?$ /darbdaviams/kontaktai/ permanent;
# --- Apie Mus
rewrite ^/personalo-nuomos-paslaugos/?$ /apie-mus/ permanent;
rewrite ^/personalo-nuomos-paslaugos/idarbinimo-agentura/?$ /apie-mus/ permanent;
rewrite ^/personalo-nuomos-paslaugos/darbuotoju-paieska-ir-atranka/?$ /tarptautinis-tinklas/ permanent;
rewrite ^/personalo-nuomos-paslaugos/naryste-lietuvoje/?$ /naryste-lietuvoje/ permanent;
rewrite ^/personalo-nuomos-paslaugos/etikos-kodeksas/?$ /etikos-kodeksas/ permanent;
rewrite ^/personalo-nuomos-paslaugos/antikorupcines-priemones/?$ /antikorupcines-priemones/ permanent;
rewrite ^/employers/?$ /employers/temporary-employees-in-lithuania/ permanent;
rewrite ^/job-seekers/?$ /job-seekers/temporary-employment-in-lithuania/ permanent;
rewrite ^/about-biuro/?$ /about-biuro/staffing-agency-in-lithuania/ permanent;
rewrite ^/home/?$ / permanent;
rewrite ^/contacts/?$ /contacts/job-seekers/ permanent;
rewrite ^/rabotnikam/?$ /rabotnikam/vremennoe-trudoustrojstvo-v-litve/ permanent;
rewrite ^/o-biuro/?$ /o-biuro/agenstvo-po-naemu-personala-v-litve/ permanent;
rewrite ^/kontakty/?$ /kontakty/rabotnikam/ permanent;
rewrite ^/rabotodatelyam/?$ /rabotodatelyam/vremennye-rabochie-v-litve/ permanent;
rewrite ^/kontaktanagaben/?$ /kontaktanagaben/personalo-nuomai-de-DE/ permanent;
rewrite ^/fuer-arbeitnehmer/?$ /fuer-arbeitnehmer/befristete-beschaeftigung/ permanent;
rewrite ^/fuer-arbeitgeber/?$ /fuer-arbeitgeber/befristete-beschaeftigung/ permanent;
rewrite ^/ueber-biuro/?$ /ueber-biuro/ueber-die-arbeitsvermittlungsagentur/ permanent;
rewrite ^/assets/(.*)CODE-OF-CONDUCT-LT.pdf$ /wp-content/uploads/2018/10/CODE-OF-CONDUCT-LT.pdf permanent;
rewrite ^/assets/(.*)CODE-OF-CONDUCT-EN.pdf$ /wp-content/uploads/2018/10/CODE-OF-CONDUCT-EN.pdf permanent;
# ----------------------------------------------------------------------
# 301 biuro.lv redirects
# ----------------------------------------------------------------------
# rewrite ^/darba-piedavajumi$ / permanent;
# rewrite ^/darba-piedavajumi/(.*)$ /? permanent;
# Biuro SEO issues
# https://docs.google.com/spreadsheets/d/1dXP0dh_v2sFajrcwR2_9HONMadCdZQW4Y2dVXvhxG3E/edit?ts=5b5eaa6b#gid=0
#
rewrite ^/darba-devejiem/vasaras-darbu-banka/?$ /darba-devejiem/pagaidu-nodarbinatiba/ permanent;
# Intertnal ex 302
rewrite ^/darba-mekletajiem/?$ /darba-mekletajiem/pagaidu-darbs/ permanent;
rewrite ^/about-biuro/?$ /about-biuro/staffing-agency-in-latvia/ permanent;
rewrite ^/contacts/?$ /contacts/job-seekers/ permanent;
rewrite ^/rabotnikam/?$ /rabotnikam/vremennoe-trudoustrojstvo-v-latvii/ permanent;
rewrite ^/kontakty/?$ /kontakty/rabotnikam/ permanent;
rewrite ^/par-biuro/?$ /par-biuro/par-mums/ permanent;
rewrite ^/employers/?$ /employers/temporary-employees-in-latvia/ permanent;
rewrite ^/darba-devejiem/?$ /darba-devejiem/pagaidu-nodarbinatiba/ permanent;
rewrite ^/rabotodatelyam/?$ /rabotodatelyam/vremennye-rabochie-v-latvii/ permanent;
rewrite ^/o-biuro/?$ /o-biuro/agenstvo-po-naemu-personala-v-latvii/ permanent;
rewrite ^/home/?$ / permanent;
rewrite ^/kontakti/?$ /kontakti/darba-mekletajiem/ permanent;
rewrite ^/job-seekers/?$ /job-seekers/temporary-job-in-latvia/ permanent;
This diff is collapsed.
file_uploads = On
memory_limit = 64M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
:root{--color--gray:#4d4d4d;--color--green:#006957;--typo--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Light","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--typo--font-size:1.8rem;--typo--weight-slim:100;--typo--weight-regular:400;--typo--weight-bold:600;--typo--line-height:1.2;--typo--font-face:"PT Sans Narrow",sans-serif;--typo--font-face-additional:"Bebas Neue",sans-serif;--layout-width:63em}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}a,body{color:#4d4d4d;color:var(--color--gray)}body{font-size:1.8rem;font-size:var(--typo--font-size);line-height:1.2;line-height:var(--typo--line-height)}html{min-height:100%;font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}.l-content,.l-footer,.l-header,.l-inner{max-width:63em;max-width:var(--layout-width);margin-right:auto;margin-left:auto;padding-right:1em;padding-left:1em}.l-header{padding-top:15px;padding-bottom:15px}.o-nav{margin:0;padding:0;list-style:none}.c-cookies-warning{display:none}.c-data-controller{padding:0 1em;text-align:center;font-size:88%}.c-data-controller p{margin-bottom:0}.c-jobs-list{width:100%;margin:0 0 20px}.c-jobs-list--head{padding:10px}.c-jobs-list--col{padding:0 10px}.c-logo--svg{display:block}.c-nav--main{display:-webkit-box;display:-ms-flexbox;display:flex}.c-nav--sub,.u-hidden{display:none}@media (min-width:48em){:root{--typo--font-size:1.6rem;--typo--line-height:1.3}body{font-family:PT Sans Narrow,sans-serif;font-family:var(--typo--font-face)}.l-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.l-content,.l-header{display:-webkit-box;display:-ms-flexbox;display:flex}.l-aside{-webkit-box-flex:0;-ms-flex:0 0 16.25em;flex:0 0 16.25em}.l-main,.l-nav{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}.c-nav--main{padding-left:2em}}@media (max-width:47.999em){body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI Light,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-family:var(--typo--font-family);letter-spacing:-.08rem}.c-nav--main{margin:20px 0}}@media (min-width:30em){.c-jobs-list--col{padding:10px}}@media (max-width:29.999em){.c-jobs-list--col-position{padding-top:10px}}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -100,6 +100,6 @@
endif;
?>
<script src="/wp-content/themes/biuro/js/main.min.js" async></script>
<script src="/wp-content/themes/biuro/js/main-2a9639b0.min.js" async></script>
</body>
</html>
......@@ -31,16 +31,16 @@ define('cityID', $cityID);
get_template_part( 'template-parts/meta/canonical');
?>
<style><?php include 'css/core.min.css'; ?></style>
<style><?php include 'css/core-a25434ed1d.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="/wp-content/themes/biuro/css/main-8c9c954583.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preload" href="/wp-content/themes/biuro/fonts/pt_sans_narrow.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/themes/biuro/fonts/pt_sans_narrow_bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/themes/biuro/fonts/bebas-neue.woff2" as="font" type="font/woff2" crossorigin>
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main-8c9c954583.min.css">
</noscript>
<?php wp_head(); ?>
......
This diff is collapsed.
......@@ -123,25 +123,13 @@ function initDivisionsMap (node, data) {
setMarkers(map, divisions.filter((d) => { return d.lat && d.lng; }));
}
// console.error('Awesomplete');
// console.dir(Awesomplete);
const search = document.getElementById('search');
const city = document.getElementById('search-city');
const search = document.getElementById('search-query');
const query = document.getElementById('search-query');
const cityBox = new Awesomplete(city, {
minChars: 0,
sort: false,
sort: false
// data: (item, input) => {
// console.error('----------');
// console.dir(item);
......@@ -169,8 +157,6 @@ const cityBox = new Awesomplete(city, {
// // }
// // hidden.dispatchEvent(event);
// }
// });
});
......@@ -179,115 +165,118 @@ city.addEventListener('focus', () => {
cityBox.evaluate();
});
const searchBox = new Awesomplete(search, {
const queryBox = new Awesomplete(query, {
minChars: 0,
sort: false
});
search.addEventListener('focus', () => {
searchBox.evaluate();
query.addEventListener('focus', () => {
queryBox.evaluate();
});
if (search) {
search.addEventListener('submit', (e) => {
if (!city.value && !query.value) {
city.focus();
e.preventDefault();
}
}, false);
}
// function initDatalist() {
// var nodes = document.querySelectorAll('.js-datalist, .js-datalist-ajax'),
// node,
// getHidden = function(node) {
// return document.querySelector('[name="' + node.dataset.name + '"]');
// },
// event = new Event('input', {
// 'bubbles': true,
// 'cancelable': true
// });
// for (var i = 0; i < nodes.length; i++) {
// node = nodes[i];
// if (node.comboplete) {
// return;
// }
// node.comboplete = new Awesomplete(node, {
// minChars: 0,
// maxItems: 50,
// replace: function(text) {
// var hidden = getHidden(this.input);
// this.input.value = text.label;
// if (!hidden) {
// return;
// }
// hidden.value = text.value;
// if (hidden.classList.contains('js-trigger-datalist')) {
// hidden.dispatchEvent(new Event('change', {
// 'bubbles': true,
// 'cancelable': true
// }));
// }
// hidden.dispatchEvent(event);
// }
// });
// node.addEventListener('click', function() {
// if (this.comboplete.ul.childNodes.length === 0 || !node.value) {
// this.comboplete.minChars = 0;
// this.comboplete.evaluate();
// }
// else if (this.comboplete.ul.hasAttribute('hidden')) {
// this.comboplete.open();
// }
// else {
// this.comboplete.close();
// }
// });
// node.addEventListener('keyup', function(e) {
// var code = e.keyCode || 0;
// if (code === 13) {
// if (this.comboplete.ul.childNodes.length === 1) {
// this.comboplete.select(this.comboplete.ul.childNodes[0]);
// }
// }
// });
// node.addEventListener('input', function() {
// var value = this.value,
// exists = false,
// hidden;
// this.comboplete.ul.childNodes.forEach(function(n) {
// if (n.innerText === value) {
// exists = true;
// }
// });
// if (exists) {
// return;
// }
// hidden = getHidden(this);
// if (!hidden) {
// return;
// }
// hidden.value = '';
// hidden.dispatchEvent(event);
// })
// }
// }
// function initDatalist() {
// var nodes = document.querySelectorAll('.js-datalist, .js-datalist-ajax'),
// node,
// getHidden = function(node) {
// return document.querySelector('[name="' + node.dataset.name + '"]');
// },
// event = new Event('input', {
// 'bubbles': true,
// 'cancelable': true
// });
// for (var i = 0; i < nodes.length; i++) {
// node = nodes[i];
// if (node.comboplete) {
// return;
// }
// node.comboplete = new Awesomplete(node, {
// minChars: 0,
// maxItems: 50,
// replace: function(text) {
// var hidden = getHidden(this.input);
// this.input.value = text.label;
// if (!hidden) {
// return;
// }
// hidden.value = text.value;
// if (hidden.classList.contains('js-trigger-datalist')) {
// hidden.dispatchEvent(new Event('change', {
// 'bubbles': true,
// 'cancelable': true
// }));
// }
// hidden.dispatchEvent(event);
// }
// });
// node.addEventListener('click', function() {
// if (this.comboplete.ul.childNodes.length === 0 || !node.value) {
// this.comboplete.minChars = 0;
// this.comboplete.evaluate();
// }
// else if (this.comboplete.ul.hasAttribute('hidden')) {
// this.comboplete.open();
// }
// else {
// this.comboplete.close();
// }
// });
// node.addEventListener('keyup', function(e) {
// var code = e.keyCode || 0;
// if (code === 13) {
// if (this.comboplete.ul.childNodes.length === 1) {
// this.comboplete.select(this.comboplete.ul.childNodes[0]);
// }
// }
// });
// node.addEventListener('input', function() {
// var value = this.value,
// exists = false,
// hidden;
// this.comboplete.ul.childNodes.forEach(function(n) {
// if (n.innerText === value) {
// exists = true;
// }
// });
// if (exists) {
// return;
// }
// hidden = getHidden(this);
// if (!hidden) {
// return;
// }
// hidden.value = '';
// hidden.dispatchEvent(event);
// })
// }
// }
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,7 +15,7 @@
<form class="c-search" action="<?php echo $searchPageURL; ?>" method="get">
*/ ?>
<form class="c-search" action="<?php echo home_url(); ?>" method="get">
<form id="search" class="c-search" action="<?php echo home_url(); ?>" method="get">
<?php
......
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