1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 02:38:27 -04:00

get logo from an actual .svg file and inline it

This commit is contained in:
Jake Jarvis 2020-04-23 17:13:41 -04:00
parent 2548b320fc
commit d38ff15c2f
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
9 changed files with 25 additions and 57 deletions

View File

@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1364px" height="2048px" viewBox="0 0 1364 2048" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60 (88103) - https://sketch.com -->
<title>logo</title>
<desc>Created with Sketch.</desc>
<g id="export" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="logo" fill-rule="nonzero">
<polygon id="Path" fill="#6FBC4E" points="546.103321 158.142388 1091.36777 472.216732 1364 314.502099 818.735547 0"></polygon>
<polygon id="Path" fill="#FFB900" points="546.103321 473.986721 819.154982 630.305926 819.154982 1260.50123 1092.20664 1418.64362 1091.36777 472.216732 546.103321 158.142388"></polygon>
<polygon id="Path" fill="#FFB900" points="273.051661 1260.50123 0 1101.99509 0 1732.19084 546.103321 2048 546.103321 1733.56002 273.051661 1574.99754"></polygon>
<polygon id="Path" fill="#009CDF" points="546.103321 1418.64362 546.103321 1101.99509 273.051661 1260.50123 273.051661 1574.99754"></polygon>
<polygon id="Path" fill="#009CDF" points="1092.20664 1418.64362 546.103321 1733.56002 546.103321 2048 1364 1576.25965 1364 314.485229 1091.36777 472.216732"></polygon>
<polygon id="Path" fill="#6FBC4E" points="0 1101.99509 273.051661 1260.50123 546.103321 1101.99509 273.051661 946.004914"></polygon>
<polygon id="Path" fill="#6FBC4E" points="273.051661 1574.99754 546.103321 1733.56002 1092.20664 1418.64362 819.154982 1260.50123"></polygon>
</g>
</g>
</svg>
<svg viewBox="0 0 96 144" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g id="c1" fill="#6fbc4e">
<polygon points="57.6 0 38.4 11.1 38.4 11.1 76.8 33.2 96 22.1 96 22.1 57.6 0 57.6 0"/>
<polygon points="19.2 66.5 0 77.6 0 77.6 19.2 88.7 38.4 77.6 38.4 77.6 19.2 66.5 19.2 66.5"/>
<polygon points="57.6 88.7 19.2 110.9 19.2 110.9 38.4 121.9 76.8 99.8 76.8 99.8 57.6 88.7 57.6 88.7"/>
</g>
<g id="c2" fill="#ffb900">
<polygon points="38.4 11.1 38.4 33.3 57.6 44.3 57.6 88.7 76.8 99.8 76.8 33.2 38.4 11.1 38.4 11.1"/>
<polygon points="19.2 110.9 19.2 110.8 19.2 88.7 0 77.6 0 121.9 38.4 144.1 38.4 121.9 19.2 110.9 19.2 110.9"/>
</g>
<g id="c3" fill="#009cdf">
<polygon points="76.8 33.2 76.8 99.8 76.8 99.8 38.4 121.9 38.4 144.1 96 110.9 96 22.1 76.8 33.2 76.8 33.2"/>
<polygon points="19.2 110.9 38.4 99.8 38.4 77.6 19.2 88.7 19.2 110.9 19.2 110.9"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 945 B

View File

@ -35,15 +35,9 @@ div#content {
figure {
margin: 1em auto;
img {
margin-bottom: 0.4em;
}
// image captions
figcaption {
font-size: 0.95em;
text-align: center;
margin-top: -0.4em;
@include themed() {
color: t(color-medium);

View File

@ -28,7 +28,7 @@ header {
}
h1#name {
margin-left: 0.8em;
margin-left: 0.75em;
font-size: 1.4em;
font-weight: 500;
letter-spacing: -0.01em;

View File

@ -7,8 +7,8 @@ $base-url: "{{ strings.TrimRight "/" .Site.BaseURL }}/"; // consistent trailin
// stylelint-enable
// Variables & Functions
@import 'abstracts/settings';
@import 'abstracts/themes';
@import 'abstracts/variables';
@import 'abstracts/functions';
// Global Styles
@ -30,4 +30,4 @@ $base-url: "{{ strings.TrimRight "/" .Site.BaseURL }}/"; // consistent trailin
// Miscellaneous
@import 'components/syntax';
@import 'components/magic';
@import 'components/animation';

View File

@ -1,15 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 144" width="30" height="45">
<g id="c1" fill="#6fbc4e">
<polygon points="57.6 0 38.4 11.1 38.4 11.1 76.8 33.2 96 22.1 96 22.1 57.6 0 57.6 0"/>
<polygon points="19.2 66.5 0 77.6 0 77.6 19.2 88.7 38.4 77.6 38.4 77.6 19.2 66.5 19.2 66.5"/>
<polygon points="57.6 88.7 19.2 110.9 19.2 110.9 38.4 121.9 76.8 99.8 76.8 99.8 57.6 88.7 57.6 88.7"/>
</g>
<g id="c2" fill="#ffb900">
<polygon points="38.4 11.1 38.4 33.3 57.6 44.3 57.6 88.7 76.8 99.8 76.8 33.2 38.4 11.1 38.4 11.1"/>
<polygon points="19.2 110.9 19.2 110.8 19.2 88.7 0 77.6 0 121.9 38.4 144.1 38.4 121.9 19.2 110.9 19.2 110.9"/>
</g>
<g id="c3" fill="#009cdf">
<polygon points="76.8 33.2 76.8 99.8 76.8 99.8 38.4 121.9 38.4 144.1 96 110.9 96 22.1 76.8 33.2 76.8 33.2"/>
<polygon points="19.2 110.9 38.4 99.8 38.4 77.6 19.2 88.7 19.2 110.9 19.2 110.9"/>
</g>
</svg>
{{ $logo := resources.Get "img/logo.svg" -}}
{{ $svg := $logo.Content -}}
{{ $svg = replaceRE "<\\?xml.+\\?>" "" $svg -}}
{{ $svg = replace $svg "<svg" "<svg width=\"30\" height=\"45\"" -}}
{{ printf "<!-- inlined: %s -->" $logo.Permalink | safeHTML }}
{{ $svg | safeHTML -}}

Before

Width:  |  Height:  |  Size: 915 B

After

Width:  |  Height:  |  Size: 277 B

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="1364px" height="2048px" viewBox="0 0 1364 2048" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 60 (88103) - https://sketch.com -->
<title>logo</title>
<desc>Created with Sketch.</desc>
<g id="export" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="logo" fill-rule="nonzero">
<polygon id="Path" fill="#6FBC4E" points="546.103321 158.142388 1091.36777 472.216732 1364 314.502099 818.735547 0"></polygon>
<polygon id="Path" fill="#FFB900" points="546.103321 473.986721 819.154982 630.305926 819.154982 1260.50123 1092.20664 1418.64362 1091.36777 472.216732 546.103321 158.142388"></polygon>
<polygon id="Path" fill="#FFB900" points="273.051661 1260.50123 0 1101.99509 0 1732.19084 546.103321 2048 546.103321 1733.56002 273.051661 1574.99754"></polygon>
<polygon id="Path" fill="#009CDF" points="546.103321 1418.64362 546.103321 1101.99509 273.051661 1260.50123 273.051661 1574.99754"></polygon>
<polygon id="Path" fill="#009CDF" points="1092.20664 1418.64362 546.103321 1733.56002 546.103321 2048 1364 1576.25965 1364 314.485229 1091.36777 472.216732"></polygon>
<polygon id="Path" fill="#6FBC4E" points="0 1101.99509 273.051661 1260.50123 546.103321 1101.99509 273.051661 946.004914"></polygon>
<polygon id="Path" fill="#6FBC4E" points="273.051661 1574.99754 546.103321 1733.56002 1092.20664 1418.64362 819.154982 1260.50123"></polygon>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB