ADD logo.svg; Запрос миниатюр;

This commit is contained in:
Krivchikov Dmitry 2015-07-22 23:02:17 +03:00
parent 1716200d9d
commit 08b1eae904
6 changed files with 529 additions and 4 deletions

View File

@ -54,6 +54,16 @@ class Image
return TRUE; // o_O
}
public static function createCustomSize($imgFullName, $x, $y)
{
self::imgResize(
$imgFullName,
null,
$x,
$y
);
}
/**
* Функция img_resize(): генерация thumbnails
* Параметры:
@ -111,7 +121,13 @@ class Image
}
//$iofunct = "image".$format;
//$iofunct($idest, $dest, $quality);
imagejpeg($idest, $dest, $quality);
if ($dest) {
imagejpeg($idest, $dest, $quality);
} else {
header('Content-Type: image/jpeg');
imagejpeg($idest);
die;
}
imagedestroy($isrc);
imagedestroy($idest);

View File

@ -0,0 +1,48 @@
<?php
class ImagesController extends Controller
{
static function actionGet()
{
$pointId = (int) App::getParam('id');
$width = (int) App::getParam('width');
$height = (int) App::getParam('height');
if ($width <= 0 || $width > 200) {
$width = 200;
}
if ($height <= 0 || $height > 200) {
$height = 200;
}
if (!$pointId) {
App::error404();
}
$point = Point::model()->getByPK($pointId);
if (!$point) {
App::error404();
}
$photos = $point->photos;
$img = array_shift($photos);
if ($img) {
$photo = $photo = App::getBasedir().'../public/'.'photos/'.$img->name;
} else {
$photo = $photo = App::getBasedir().'../public/'.'img/noPhoto.png';
}
if (!file_exists($photo)) {
$photo = $photo = App::getBasedir().'../public/'.'img/noPhoto.png';
}
Image::createCustomSize($photo, $width, $height);
// print $photo;
}
}

BIN
public/img/noPhoto.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

385
source/icons.svg Normal file
View File

@ -0,0 +1,385 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="744.09448819"
height="1052.3622047"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="icons.svg">
<defs
id="defs4">
<linearGradient
id="linearGradient3953"
inkscape:collect="always">
<stop
id="stop3955"
offset="0"
style="stop-color:#000000;stop-opacity:1" />
<stop
id="stop3957"
offset="1"
style="stop-color:#000000;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3870">
<stop
style="stop-color:#4f4f4f;stop-opacity:1;"
offset="0"
id="stop3872" />
<stop
style="stop-color:#1d1116;stop-opacity:1"
offset="1"
id="stop3874" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3870"
id="linearGradient3876"
x1="1613.6503"
y1="2340.2451"
x2="1838.2911"
y2="2758.8164"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(540.18501,-692.52283)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3953"
id="linearGradient3087"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.47195744,0.21447099,-0.21447099,0.47195744,985.7288,-1227.515)"
x1="1613.6503"
y1="2340.2451"
x2="1838.2911"
y2="2758.8164" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3953"
id="linearGradient3096"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.47859335,0.21748653,-0.21748653,0.47859335,1063.9456,-1537.2653)"
x1="1613.6503"
y1="2340.2451"
x2="1838.2911"
y2="2758.8164" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3953"
id="linearGradient3109"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.47859335,0.21748653,-0.21748653,0.47859335,1063.9456,-1537.2653)"
x1="1613.6503"
y1="2340.2451"
x2="1838.2911"
y2="2758.8164" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3953"
id="linearGradient4277"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.47859335,0.21748653,-0.21748653,0.47859335,1063.9456,-1537.2653)"
x1="1613.6503"
y1="2340.2451"
x2="1838.2911"
y2="2758.8164" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35355338"
inkscape:cx="-2557.8458"
inkscape:cy="-138.79307"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3122" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffffff;stroke:#333333;stroke-width:79.34757996000000446;stroke-miterlimit:4;stroke-dasharray:none"
id="rect4076"
width="468.78583"
height="468.78583"
x="-2489.4053"
y="-418.93439"
ry="31.674721"
transform="matrix(0.96054471,-0.27812563,0.96054471,0.27812563,0,0)" />
<path
inkscape:export-ydpi="12.822552"
inkscape:export-xdpi="12.822552"
inkscape:export-filename="/home/web/poi/public/img/mapThumb.png"
style="fill:#333333"
d="m -2178.464,1564.3275 c 0,155.8739 -202.4229,376.6642 -206.9422,376.6642 -4.5186,0 -206.9415,-221.4315 -206.9415,-376.6642 0,-114.291 92.6508,-206.9421 206.9415,-206.9421 114.2914,0 206.9422,92.6511 206.9422,206.9421 z"
id="path3854"
inkscape:connector-curvature="0"
sodipodi:nodetypes="szsss" />
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1"
id="path3856"
sodipodi:cx="2341.4285"
sodipodi:cy="1862.3622"
sodipodi:rx="292.85715"
sodipodi:ry="292.85715"
d="m 2634.2856,1862.3622 a 292.85715,292.85715 0 1 1 -585.7143,0 292.85715,292.85715 0 1 1 585.7143,0 z"
transform="matrix(0.50760953,0,0,0.50760953,-3574.089,619.21397)" />
<text
xml:space="preserve"
style="font-size:339.47021484px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#333333;fill-opacity:1;stroke:none;font-family:Sans"
x="-2526.5076"
y="1670.3257"
id="text3275"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3277"
x="-2526.5076"
y="1670.3257"
style="font-weight:bold;-inkscape-font-specification:Sans Bold">+</tspan></text>
<g
id="g4101"
transform="matrix(0.96592583,0.25881905,-0.25881905,0.96592583,647.47175,154.58571)" />
<g
id="g4107"
transform="matrix(0.96592583,-0.25881905,0.25881905,0.96592583,-665.41941,18.259688)" />
<g
transform="matrix(0.86602541,-0.50000001,0.50000001,0.86602541,-1303.4392,208.12041)"
id="g4113" />
<g
id="g4119"
transform="matrix(0.70710678,-0.70710679,0.70710679,0.70710678,-1870.5795,556.64347)" />
<g
transform="matrix(0.5,-0.86602541,0.86602541,0.5,-2328.1905,1040.0776)"
id="g4125" />
<g
id="g4131"
transform="matrix(0.25881904,-0.96592583,0.96592583,0.25881904,-2645.0869,1625.4776)" />
<g
transform="matrix(0,-1,1,0,-2799.6726,2272.9493)"
id="g4137" />
<g
id="g4143"
transform="matrix(-0.25881905,-0.96592583,0.96592583,-0.25881905,-2781.4129,2938.3687)" />
<g
transform="matrix(-0.50000001,-0.86602541,0.86602541,-0.50000001,-2591.5522,3576.3885)"
id="g4149" />
<g
id="g4155"
transform="matrix(-0.70710679,-0.70710678,0.70710678,-0.70710679,-2243.0291,4143.5288)" />
<g
transform="matrix(-0.86602541,-0.5,0.5,-0.86602541,-1759.595,4601.1398)"
id="g4161" />
<g
transform="matrix(0.8660254,-0.5,0.27028189,0.46814197,-720.80281,1217.2785)"
style="fill:#000000"
id="g4178" />
<g
id="g4182"
style="fill:#000000"
transform="matrix(0.5,-0.8660254,0.46814197,0.27028189,-1319.034,1622.7173)" />
<g
transform="matrix(0,-1,0.54056378,0,-1634.398,2272.9532)"
style="fill:#000000"
id="g4186" />
<g
id="g4190"
style="fill:#000000"
transform="matrix(-0.5,-0.8660254,0.46814197,-0.27028189,-1582.3933,2993.756)" />
<g
transform="matrix(-0.8660254,-0.5,0.27028189,-0.46814197,-1176.9545,3591.9872)"
style="fill:#000000"
id="g4194" />
<g
id="g4097"
style="fill:#000000"
transform="matrix(1,0,0,0.54056379,0,1165.2738)" />
<g
transform="matrix(1.0223234,-0.27393074,0.14807703,0.55263103,-369.6946,1062.5251)"
style="fill:#000000"
id="g4206" />
<g
transform="matrix(0,-1,1,0,0,0)"
style="font-size:30.61361885px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
id="text3173" />
<g
transform="scale(-1,-1)"
style="font-size:30.61361885px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
id="text3160" />
<g
style="font-size:35.03303528px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
id="text3164" />
<g
transform="matrix(0,1,-1,0,0,0)"
style="font-size:30.61361885px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;font-family:Sans"
id="text3168" />
<g
id="g4196"
transform="matrix(1.9086906,0,0,1.9086906,1548.5738,-1955.3055)">
<g
style="font-size:53.42723083px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="text4200" />
</g>
<g
id="g4208"
transform="matrix(0.91117073,0.41202902,-0.41202902,0.91117073,2705.6963,-324.09369)">
<g
transform="translate(-298.00001,-588.00003)"
id="g4217"
style="fill:#000000" />
<g
id="g4224"
transform="matrix(0.9386457,-0.34488294,0.34488294,0.9386457,-1188.8899,-523.23244)"
style="fill:#000000" />
<g
transform="matrix(0.76282562,-0.64660425,0.64660425,0.76282562,-2000.46,-156.77548)"
id="g4230"
style="fill:#000000" />
<g
id="g4237"
transform="matrix(0.49539334,-0.86866876,0.86866876,0.49539334,-2634.1278,463.02047)"
style="fill:#000000" />
<g
transform="matrix(0.16785324,-0.98581198,0.98581198,0.16785324,-3017.5162,1262.9056)"
id="g4243"
style="fill:#000000" />
<g
id="g4250"
transform="matrix(-0.17924708,-0.98380407,0.98380407,-0.17924708,-3103.8533,2143.787)"
style="fill:#000000" />
<g
transform="matrix(-0.50860861,-0.86099782,0.86099782,-0.50860861,-2879.1363,3011.4969)"
id="g4256"
style="fill:#000000" />
<g
id="g4262"
transform="matrix(-0.77312297,-0.63425613,0.63425613,-0.77312297,-2373.7259,3742.1122)"
style="fill:#000000" />
<g
transform="matrix(-0.94292321,-0.3330102,0.3330102,-0.94292321,-1654.4013,4252.1287)"
id="g4268"
style="fill:#000000" />
</g>
<g
id="g4054"
transform="translate(0,316.78385)">
<path
transform="matrix(1.1102661,0,0,1.1102661,-263.71589,-225.79743)"
d="m -1725.3406,867.80731 c 0,102.70789 -83.2612,185.96909 -185.9691,185.96909 -102.7079,0 -185.9691,-83.2612 -185.9691,-185.96909 0,-102.70789 83.2612,-185.96908 185.9691,-185.96908 102.7079,0 185.9691,83.26119 185.9691,185.96908 z"
sodipodi:ry="185.96909"
sodipodi:rx="185.96909"
sodipodi:cy="867.80731"
sodipodi:cx="-1911.3097"
id="path3284"
style="fill:#333333;stroke:none"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="fill:#ffffff;fill-opacity:1"
id="path3268"
sodipodi:cx="2341.4285"
sodipodi:cy="1862.3622"
sodipodi:rx="292.85715"
sodipodi:ry="292.85715"
d="m 2634.2856,1862.3622 c 0,161.7405 -131.1166,292.8571 -292.8571,292.8571 -161.7406,0 -292.8572,-131.1166 -292.8572,-292.8571 0,-161.7406 131.1166,-292.8572 292.8572,-292.8572 161.7405,0 292.8571,131.1166 292.8571,292.8572 z"
transform="matrix(0.50760953,0,0,0.50760953,-3574.089,-206.68683)" />
<path
transform="matrix(1.2789086,0,0,1.2739898,-6551.8837,266.67586)"
d="m 3326.5,369.86221 c 0,37.55537 -30.4446,68 -68,68 -37.5554,0 -68,-30.44463 -68,-68 0,-37.55536 30.4446,-68 68,-68 37.5554,0 68,30.44464 68,68 z"
sodipodi:ry="68"
sodipodi:rx="68"
sodipodi:cy="369.86221"
sodipodi:cx="3258.5"
id="path3270"
style="fill:#333333"
sodipodi:type="arc" />
</g>
<g
id="g3955"
transform="matrix(6.6616945,0,0,6.6616945,-18689.345,-3043.8551)">
<path
sodipodi:nodetypes="szsss"
inkscape:connector-curvature="0"
id="path3854-4"
d="m 2481.609,806.80046 c 0,23.39854 -30.3861,56.5418 -31.0645,56.5418 -0.6783,0 -31.0644,-33.23952 -31.0644,-56.5418 0,-17.15645 13.908,-31.06448 31.0644,-31.06448 17.1565,0 31.0645,13.90803 31.0645,31.06448 z"
style="fill:#333333"
inkscape:export-filename="/home/web/poi/public/img/mapThumb.png"
inkscape:export-xdpi="12.822552"
inkscape:export-ydpi="12.822552" />
<path
transform="matrix(0.07619826,0,0,0.07619826,2272.109,664.92762)"
d="m 2634.2856,1862.3622 c 0,161.7405 -131.1166,292.8571 -292.8571,292.8571 -161.7406,0 -292.8572,-131.1166 -292.8572,-292.8571 0,-161.7406 131.1166,-292.8572 292.8572,-292.8572 161.7405,0 292.8571,131.1166 292.8571,292.8572 z"
sodipodi:ry="292.85715"
sodipodi:rx="292.85715"
sodipodi:cy="1862.3622"
sodipodi:cx="2341.4285"
id="path3856-2"
style="fill:#ffffff;fill-opacity:1"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="fill:#333333"
id="path3858"
sodipodi:cx="3258.5"
sodipodi:cy="369.86221"
sodipodi:rx="68"
sodipodi:ry="68"
d="m 3326.5,369.86221 c 0,37.55537 -30.4446,68 -68,68 -37.5554,0 -68,-30.44463 -68,-68 0,-37.55536 30.4446,-68 68,-68 37.5554,0 68,30.44464 68,68 z"
transform="matrix(0.19197948,0,0,0.1912411,1825.1064,735.98502)" />
</g>
<rect
transform="matrix(0.96054471,-0.27812563,0.96054471,0.27812563,0,0)"
ry="31.674721"
y="-642.66565"
x="-2265.6741"
height="468.78583"
width="468.78583"
id="rect4074"
style="fill:#ffffff;stroke:#333333;stroke-width:79.34757996000000446;stroke-miterlimit:4;stroke-dasharray:none" />
<rect
style="fill:#ffffff;stroke:#333333;stroke-width:79.34757996000000446;stroke-miterlimit:4;stroke-dasharray:none"
id="rect4072"
width="468.78583"
height="468.78583"
x="-2060.7307"
y="-847.60901"
ry="31.674721"
transform="matrix(0.96054471,-0.27812563,0.96054471,0.27812563,0,0)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

64
source/logo.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -120,9 +120,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.24999999"
inkscape:cx="371.18961"
inkscape:cy="775.85575"
inkscape:zoom="0.40351059"
inkscape:cx="849.60265"
inkscape:cy="-613.68848"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@ -1650,5 +1650,17 @@
inkscape:export-filename="/home/web/poi/ground/watermarks/middle.png"
inkscape:export-xdpi="14.48"
inkscape:export-ydpi="14.48" />
<path
style="fill:#999999;fill-opacity:1;stroke:none"
d="M 1564.125 1120.25 C 1549.239 1120.25 1537.25 1132.239 1537.25 1147.125 L 1537.25 1154.1875 L 1524.5312 1154.1875 C 1509.6454 1154.1875 1497.6563 1166.1765 1497.6562 1181.0625 L 1497.6562 1342.2812 C 1497.6562 1357.1675 1509.6452 1369.1562 1524.5312 1369.1562 L 1818.5938 1369.1562 C 1833.4796 1369.1562 1845.4687 1357.1675 1845.4688 1342.2812 L 1845.4688 1181.0625 C 1845.4688 1166.1765 1833.4798 1154.1875 1818.5938 1154.1875 L 1650.375 1154.1875 L 1650.375 1147.125 C 1650.375 1132.239 1638.4173 1120.25 1623.5312 1120.25 L 1564.125 1120.25 z M 1574.5625 1130.375 L 1613.4062 1130.375 C 1627.0338 1130.375 1638 1141.3725 1638 1155 L 1638 1165.3438 C 1638 1178.9711 1627.0338 1189.9375 1613.4062 1189.9375 L 1574.5625 1189.9375 C 1560.935 1189.9375 1549.9688 1178.9711 1549.9688 1165.3438 L 1549.9688 1155 C 1549.9688 1141.3725 1560.935 1130.375 1574.5625 1130.375 z M 1711.9062 1176.0938 C 1761.5022 1176.0937 1801.7188 1216.3104 1801.7188 1265.9062 C 1801.7187 1315.5022 1761.5022 1355.7188 1711.9062 1355.7188 C 1662.3104 1355.7187 1622.0938 1315.5022 1622.0938 1265.9062 C 1622.0938 1216.3105 1662.3104 1176.0938 1711.9062 1176.0938 z M 1711.9062 1198.3125 C 1674.5817 1198.3125 1644.3125 1228.5817 1644.3125 1265.9062 C 1644.3125 1303.231 1674.5817 1333.5 1711.9062 1333.5 C 1749.2309 1333.5001 1779.5 1303.2309 1779.5 1265.9062 C 1779.5 1228.5817 1749.2309 1198.3125 1711.9062 1198.3125 z "
id="rect3264" />
<path
style="fill:#cccccc;fill-opacity:1;stroke:none"
d="m 1672.3376,973.17002 c -158.1645,0 -286.4348,128.20968 -286.4348,286.37418 0,158.1645 128.2703,286.3741 286.4348,286.3741 158.1645,4e-4 286.3744,-128.2096 286.3744,-286.3741 0,-158.1645 -128.2099,-286.37418 -286.3744,-286.37418 z m 0,60.25418 c 53.846,0 103.3024,18.8306 142.1273,50.2624 l -320.2861,315.1388 c -30.0673,-38.3941 -47.9611,-86.7431 -47.9611,-139.2812 0,-124.8667 101.2533,-226.12 226.1199,-226.12 z m 179.0066,88.05 c 29.4914,38.1991 47.0529,86.0787 47.0529,138.07 0,124.8667 -101.1928,226.12 -226.0595,226.12 -53.3229,0 -102.3125,-18.4708 -140.9768,-49.3539 l 319.9834,-314.8361 z"
id="path3279"
inkscape:connector-curvature="0"
inkscape:export-filename="/home/web/poi/ground/watermarks/noPhoto.png"
inkscape:export-xdpi="47.139999"
inkscape:export-ydpi="47.139999" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 249 KiB