(function () { var headElement = document.getElementsByTagName('head')[0]; // Adding jQuery and JS script setTimeout(function(){ var jq_url = 'https://sortere.no/wp-includes/js/jquery/jquery.min.js'; var jq = document.createElement('script'); jq.setAttribute('src', jq_url); jq.setAttribute('type','text/javascript'); jq.onload = function() { var js = document.createElement('script'); js.setAttribute('src', 'https://sortere.no/wp-content/plugins/sortere-boats-map/script.js'); js.setAttribute('type','text/javascript'); headElement.appendChild(js); } headElement.appendChild(jq); }, 500) // Adding CSS var css = '#sortere-boats-wrapper { border: none; font-family: "Barlow Semi Condensed", sans-serif; color: #36678d; height: 100%; } /* Resetting styles so that styles from the page that includes plugin doesnt apply */ #sortere-boats-wrapper *, #sortere-boats-wrapper *:before, #sortere-boats-wrapper *:after { border: none; padding: 0; margin: 0; line-height: 1em; animation: none; background: none; box-shadow: none; clear: none; direction: ltr; font-weight: normal; height: auto; width: auto; left: auto; right: auto; top: auto; bottom: auto; float: none; opacity: 1; outline: 0; text-decoration: none; text-transform: none; visibility: visible; white-space: normal; z-index: auto } #sortere-boats-wrapper .gm-control-active > img { left: 50%; } #sortere-boats-form { position: relative; } #sortere-boats-map-box { display: flex; justify-content: center; align-items: center; position: relative; height: calc(100% - 66px); } #sortere-boats-map-container { width: 100%; height: 100%; } #sortere-boats-sortere-logo { position: absolute; z-index: 2; bottom: 20px; right: 50px; } /** Start Header with search filed and boat type select menu */ #sortere-boats-header { background-color: #36678d; padding: 15px 20px; display: flex; position: relative; } #sortere-boats-header .sortere-boats-icon { width: 36px;; height: 36px;; } #sortere-boats-header form { background-color: #fff; flex: 1 0 auto; display: flex;; margin: 0 0 0 20px; } #sortere-boats-header form input { outline: none; height: 36px; line-height: 36px; -webkit-box-flex: 1; flex-grow: 1; padding: 0 10px; border: none; background: none; } #sortere-boats-menu { background-color: #fff; position: absolute; top: 76px; left: 10px; padding: 15px; width: 300px; z-index: 1; -webkit-box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.25); box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.25); } #sortere-boats-menu-close { display: inline-block; vertical-align: middle; margin-right: 12px; margin-top: -2px; } #sortere-boats-menu ul { list-style-type: none; padding-left: 40px; margin: 20px 0; } #sortere-boats-menu ul li { margin-bottom: 20px; } #sortere-boats-menu ul label { align-items: center; } #sortere-boats-menu ul .sortere-boats-checkbox { position: relative; padding-right: 8px; } #sortere-boats-menu ul .sortere-boats-checkbox .sortere-boats-checked { position: absolute; top: 0; left: 0; } #sortere-boats-menu ul .sortere-boats-label-text { width: 175px; } /** End Header */ /** Start Marker popup - Popup that show after clicking on marker */ #sortere-boats-point-info { position: absolute; width: 90%; left: 5%; top: 10%; background: #fff; display: none; z-index: 3; -webkit-box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.25); box-shadow: 0 0 7px 2px rgba(0, 0, 0, 0.25); } #sortere-boats-point-info #sortere-boats-point-info-content { padding: 0 40px 48px; display: flex; flex-direction: column; } #sortere-boats-point-info #sortere-boats-point-info-content > div { padding: 30px 0; } #sortere-boats-point-info #sortere-boats-point-info-content > div:not(:last-child) { border-color: #214e6b;; border-style: solid; border-width: 0 0 2px 0; } #sortere-boats-point-info-top { padding: 10px; text-align: right; } #sortere-boats-point-description { word-wrap: break-word; } #sortere-boats-point-description a { color: #36678d; } #sortete-boats-point-trash-types p { margin: 0 0 25px; font-size: 18px; } #sortete-boats-point-trash-types ul { padding: 0; list-style-type: none; } #sortete-boats-point-trash-types ul li { margin-bottom: 10px; } #sortete-boats-point-trash-types ul li a { background-color: #214e6b; color: #fff; display: inline-block; padding: 2px 5px; } #sortete-boats-point-trash-types ul li a:hover { background-color: #ccc; color: #214e6b; } #sortere-boats-point-info #sortere-boats-point-name { font-size: 22px; } /* End Marker popup */ /* Start Loading indicator */ #sortere-boats-spinner-layer { background: rgba(0, 0, 0, .2); position: absolute; z-index: 10; width: 100%; height: 100%; } #sortere-boats-spinner-wrapper { width: 35px; height: 35px; padding: 0; margin: auto; position: relative; top: 50%; background: white; border-radius: 50%; padding: 2px; box-shadow: 1px 1px 10px rgba(0, 0, 0, .2); } #sortere-boats-spinner { height: 20px; width: 20px; animation: sortere-boats-rotate 0.5s infinite linear; border: 2px solid #007a62; border-right-color: transparent; border-radius: 50%; margin: 8px; position: absolute; top: 0; left: 0; } @keyframes sortere-boats-rotate { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } } /* End Loading indicator */ /* Common */ #sortere-boats-wrapper .sortere-boats-d-flex { display: flex; } #sortere-boats-wrapper .sortere-boats-text-center { text-align: center; } #sortere-boats-wrapper .sortere-boats-font-size { font-size: 16px; } #sortere-boats-wrapper .sortere-boats-font-thick { font-weight: 600; } #sortere-boats-wrapper .sortere-boats-high-line { line-height: 24px; } #sortere-boats-wrapper .sortere-boats-high-line * { line-height: 24px; } #sortere-boats-wrapper .sortere-boats-font-dark { color: #214e6b; } /* Styles for desktop width (>900px) */ .sortere-boats-desktop-width #sortere-boats-header { justify-content: space-between; } .sortere-boats-desktop-width #sortere-boats-header form { flex: 0.4 0 auto; } .sortere-boats-desktop-width #sortere-boats-point-info #sortere-boats-point-info-content > div:not(:last-child) { border-width: 0 2px 0 0; } .sortere-boats-desktop-width #sortere-boats-point-info #sortere-boats-point-info-content { flex-direction: row; padding: 0 20px 48px; } .sortere-boats-desktop-width #sortere-boats-point-info #sortere-boats-point-info-content > div { width: 33.3%; padding: 30px 20px; } #sortere-boats-wrapper .pac-container { width: 100%; background: white; top: 100% !important; left: 0 !important; position: absolute !important; z-index: 1000; border-radius: 2px; border-top: 1px solid #d9d9d9; font-family: Arial, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; overflow: hidden } #sortere-boats-wrapper .pac-logo:after { content: ""; padding: 1px 1px 1px 0; height: 18px; box-sizing: border-box; text-align: right; display: block; background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3.png); background-position: right; background-repeat: no-repeat; background-size: 120px 14px } #sortere-boats-wrapper .hdpi.pac-logo:after { background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png) } #sortere-boats-wrapper .pac-item { cursor: default; padding: 0 4px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; line-height: 30px; text-align: left; border-top: 1px solid #e6e6e6; font-size: 11px; color: #999 } #sortere-boats-wrapper .pac-item:hover { background-color: #fafafa } #sortere-boats-wrapper .pac-item-selected, .pac-item-selected:hover { background-color: #ebf2fe } #sortere-boats-wrapper .pac-matched { font-weight: 700 } #sortere-boats-wrapper .pac-item-query { font-size: 13px; padding-right: 3px; color: #000 } #sortere-boats-wrapper .pac-icon { width: 15px; height: 20px; margin-right: 7px; margin-top: 6px; display: inline-block; vertical-align: top; background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/autocomplete-icons.png); background-size: 34px } #sortere-boats-wrapper .hdpi .pac-icon { background-image: url(https://maps.gstatic.com/mapfiles/api-3/images/autocomplete-icons_hdpi.png) } #sortere-boats-wrapper .pac-icon-search { background-position: -1px -1px } #sortere-boats-wrapper .pac-item-selected .pac-icon-search { background-position: -18px -1px } #sortere-boats-wrapper .pac-icon-marker { background-position: -1px -161px } #sortere-boats-wrapper .pac-item-selected .pac-icon-marker { background-position: -18px -161px } #sortere-boats-wrapper .pac-placeholder { color: gray }'; var style = document.createElement('style'); style.setAttribute('type', 'text/css'); if (style.styleSheet) style.styleSheet.cssText = css; //IE else style.appendChild(document.createTextNode(css)); //Other headElement.appendChild(style); var htmlOutput = '
Vis i kartet

Her kan du levere:

    '; var container = document.getElementById('sortere-boats-map'); container.innerHTML = htmlOutput; // Adding Google font var fontLink = document.createElement('link'); fontLink.setAttribute('href', 'https://fonts.googleapis.com/css?family=Barlow+Semi+Condensed:500,600'); fontLink.setAttribute('rel','stylesheet'); headElement.appendChild(fontLink); })(); window.sortereBoatsUrl = 'https://sortere.no';