It's a three (actually 4) step process:
- Install Image Cache Actions
- Масштабирование 150x150
- Define canvas 150x150 (center, center) #ffffff under image
- Обрезка 150x150
| /* | |
| * Implementation hook_views_api() | |
| */ | |
| function CUSTOM_views_api() { | |
| return array( | |
| 'api' => 3, | |
| ); | |
| } | |
| /* |
Filter criteria is essential. Must use Filter: Language (Current user's language)
| div { | |
| position: absolute; | |
| left: 50%; | |
| top: 50%; | |
| -o-transform: translate(-50%, -50%); | |
| -ms-transform: translate(-50%, -50%); | |
| -webkit-transform: translate(-50%, -50%); | |
| -moz-transform: translate(-50%, -50%); | |
| transform: translate(-50%, -50%); |
| var point = new google.maps.LatLng(COORDS); | |
| var data = "SOME_TEXT"; | |
| var infowindow = new google.maps.InfoWindow({ | |
| content: data | |
| }); | |
| var marker = new google.maps.Marker({ | |
| position: point, | |
| title:"SOME_TEXT" | |
| }); | |
| google.maps.event.addListener(marker, 'click', function() { |
| var success = Drupal.ajax.prototype.success; | |
| Drupal.ajax.prototype.success = function (xmlhttprequest, options) { | |
| success.apply(this, arguments); | |
| // do stuff here | |
| } |
| preg_match('/>([^<]*)/i', $bread_item, $text); | |
| $bread_item_text = preg_replace("/&#?[a-z0-9]+;/i", "", $text[1]); | |
| $bread_item_text = '>' . truncate_utf8($bread_item_text, 50, TRUE, TRUE, 1) . '<'; | |
| $bread_item_text = preg_replace('/>[^<]*</i', $bread_item_text, $bread_item); | |
| $breadcrumb[$key] = $bread_item_text; |
| @mixin fontFace($family,$src,$style: normal,$weight: normal) { | |
| @font-face { | |
| font-family: $family; | |
| src: url('#{$src}.eot'); // IE9 compat | |
| src: url('#{$src}.eot?#iefix') format('embedded-opentype'), // IE8 and below | |
| url('#{$src}.woff') format('woff'), // standards | |
| url('#{$src}.ttf') format('truetype'), // Safari, Android, iOS | |
| url('#{$src}.svg##{$family}') format('svg'); // legacy iOS | |
| font-style: $style; |
| window.requestAnimFrame = (function(){ | |
| return window.requestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.mozRequestAnimationFrame || | |
| function( callback ){ | |
| window.setTimeout(callback, 1000 / 60); | |
| }; | |
| })(); |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| var hbs = require('hbs'); | |
| app.set('view engine', 'html'); | |
| app.engine('html', hbs.__express); | |
| app.use(express.json()); | |
| app.use(express.urlencoded()); |