This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Leaflet med norske kart</title> | |
| <link href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" rel="stylesheet" /> | |
| </head> | |
| <body> | |
| <div id="map" style="height: 400px; width: 600px;"></div> | |
| <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Collections.renderer.imageplus = function(value, metaData, record, rowIndex, colIndex, store) { | |
| if (value != '' && value != null) { | |
| var data = Ext.decode(value); | |
| var url = MODx.config.connectors_url + 'system/phpthumb.php?imageplus=1'; | |
| var params = {}; | |
| params.src = MODx.config['collections.renderer_image_path'] + data.sourceImg.src; | |
| params.w = 100; | |
| if (data.sourceImg.src.indexOf('.png') !== -1) { | |
| params.f = 'png'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .parent-element { | |
| -webkit-transform-style: preserve-3d; | |
| -moz-transform-style: preserve-3d; | |
| transform-style: preserve-3d; | |
| } | |
| .element { | |
| position: relative; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @-ms-viewport { | |
| width: device-width; | |
| } | |
| @media (max-width: 767px) { | |
| .align-mobile-left { | |
| text-align: left; | |
| } | |
| .align-mobile-center { | |
| text-align: center; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| find . -type f -name '*.jpg' -print0 | while IFS= read -r -d '' file; do | |
| report="$(date "+%Y-%m-%d %H:%M:%S")" | |
| report+=" ($file)" | |
| str="$(identify -format "%w;%h;%x;%y" "$file")" | |
| arr=(${str//;/ }) | |
| w=${arr[0]:-0} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Returns a value if input contains string | |
| * [[*link_attributes:containing=`blank=New Window&self=This window`]] | |
| */ | |
| parse_str($options, $cases); | |
| $output = 'no-match'; | |
| foreach ($cases as $needle => $value) { | |
| if (strpos($input, $needle) !== false) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if ($modx->event->name = 'OnLoadWebDocument') { | |
| $modx->setPlaceholder('get', '<pre>'.print_r($_GET, true).'</pre>'); | |
| $modx->toPlaceholders($_GET, 'get'); | |
| } | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Wraps the value of a placeholder. | |
| * [[*introtext:wrap=`<p class="intro">|</p>`]] | |
| */ | |
| return (empty($input) === false && strpos($options, '|') !== false) ? str_replace('|', $input, $options) : ''; |