Merged in feature/MAPG-79-replace-the-non-free-svg (pull request #56)

Feature/MAPG-79 replace the non free svg
This commit is contained in:
Bence Pőcze 2020-05-29 23:55:08 +00:00
commit 1ca023e612
6 changed files with 28 additions and 16 deletions

View File

@ -23,7 +23,7 @@ RUN ./install-composer.sh
# Install Node.js and required packages # Install Node.js and required packages
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt install -y nodejs RUN apt install -y nodejs
RUN npm install -g uglify-js clean-css-cli html-minifier RUN npm install -g uglify-js clean-css-cli svgo
EXPOSE 80 EXPOSE 80
VOLUME /var/www/mapguesser VOLUME /var/www/mapguesser

View File

@ -1,11 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0" width="64px" height="64px" viewBox="0 0 128 128" xml:space="preserve">
<g> <g>
<linearGradient id="linear-gradient"> <linearGradient id="linear-gradient">
<stop offset="0%" stop-color="#ffffff" fill-opacity="0"/> <stop offset="0%" stop-color="#ffffff" />
<stop offset="100%" stop-color="#000000" fill-opacity="1"/> <stop offset="100%" stop-color="#000000" />
</linearGradient> </linearGradient>
<path d="M63.85 0A63.85 63.85 0 1 1 0 63.85 63.85 63.85 0 0 1 63.85 0zm.65 19.5a44 44 0 1 1-44 44 44 44 0 0 1 44-44z" fill="url(#linear-gradient)" fill-rule="evenodd"/> <circle
<animateTransform attributeName="transform" type="rotate" from="0 64 64" to="360 64 64" dur="1080ms" repeatCount="indefinite"></animateTransform> fill="none"
fill-rule="evenodd"
stroke="url(#linear-gradient)"
stroke-width="6"
cx="25"
cy="25"
r="22" />
<animateTransform
attributeName="transform"
type="rotate"
from="0 25 25"
to="360 25 25"
dur="1.25"
repeatCount="indefinite" />
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 732 B

View File

@ -6,4 +6,4 @@ ROOT_DIR=$(dirname $(readlink -f "$0"))/..
uglifyjs ${ROOT_DIR}/public/static/js/mapguesser.js -c -m -o ${ROOT_DIR}/public/static/js/mapguesser.js uglifyjs ${ROOT_DIR}/public/static/js/mapguesser.js -c -m -o ${ROOT_DIR}/public/static/js/mapguesser.js
cleancss ${ROOT_DIR}/public/static/css/mapguesser.css -o ${ROOT_DIR}/public/static/css/mapguesser.css cleancss ${ROOT_DIR}/public/static/css/mapguesser.css -o ${ROOT_DIR}/public/static/css/mapguesser.css
html-minifier ${ROOT_DIR}/public/static/img/loading.svg --collapse-whitespace --remove-comments -o ${ROOT_DIR}/public/static/img/loading.svg svgo ${ROOT_DIR}/public/static/img/loading.svg -o ${ROOT_DIR}/public/static/img/loading.svg

View File

@ -12,17 +12,17 @@ class ResultSet implements IResultSet
$this->result = $result; $this->result = $result;
} }
public function fetch(int $type = IResultSet::FETCH_ASSOC) public function fetch(int $type = IResultSet::FETCH_ASSOC): ?array
{ {
return $this->result->fetch_array($this->convertFetchType($type)); return $this->result->fetch_array($this->convertFetchType($type));
} }
public function fetchAll(int $type = IResultSet::FETCH_ASSOC) public function fetchAll(int $type = IResultSet::FETCH_ASSOC): array
{ {
return $this->result->fetch_all($this->convertFetchType($type)); return $this->result->fetch_all($this->convertFetchType($type));
} }
public function fetchOneColumn(string $valueName, string $keyName = null) public function fetchOneColumn(string $valueName, string $keyName = null): array
{ {
$array = []; $array = [];

View File

@ -115,7 +115,7 @@ class Select
return $this; return $this;
} }
public function orderBy($column, string $type = 'asc'): Select public function orderBy($column, string $type = 'ASC'): Select
{ {
$this->orders[] = [$column, $type]; $this->orders[] = [$column, $type];
@ -394,7 +394,7 @@ class Select
$orders = $this->orders; $orders = $this->orders;
array_walk($orders, function (&$value, $key) { array_walk($orders, function (&$value, $key) {
$value = $this->generateColumn($value[0]) . ' ' . $value[1]; $value = $this->generateColumn($value[0]) . ' ' . strtoupper($value[1]);
}); });
return implode(',', $orders); return implode(',', $orders);

View File

@ -8,9 +8,9 @@ interface IResultSet
const FETCH_BOTH = 2; const FETCH_BOTH = 2;
public function fetch(int $type); public function fetch(int $type): ?array;
public function fetchAll(int $type); public function fetchAll(int $type): array;
public function fetchOneColumn(string $valueName, string $keyName); public function fetchOneColumn(string $valueName, string $keyName): array;
} }