Skip to content

Commit

Permalink
Release 7 new icons and 4 updated icons
Browse files Browse the repository at this point in the history
# New Icons

- Canonical (#3184)
- Der Spiegel (#3168)
- DHL (#3048)
- Land Rover (#3195)
- Openlayers (#3165)
- Prime (#3010)
- Quasar (#3144)

# Updated Icons

- Apache ECharts (#3166)
- Apache Pulsar (#3181)
- Fur Affinity (#2979)
- Jupyter (#3170)
  • Loading branch information
ericcornelissen committed Jun 14, 2020
2 parents 227318a + bd742e7 commit 833241e
Show file tree
Hide file tree
Showing 19 changed files with 446 additions and 16 deletions.
11 changes: 11 additions & 0 deletions .dockerignore
@@ -0,0 +1,11 @@
node_modules/

# Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Build files
icons/*.js
/index.js
292 changes: 292 additions & 0 deletions .svglint-ignored.json

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion .svglintrc.js
@@ -1,7 +1,11 @@
const data = require("./_data/simple-icons.json");
const { htmlFriendlyToTitle } = require("./scripts/utils.js");
const getBounds = require("svg-path-bounding-box");

const titleRegexp = /(.+) icon$/;
const iconSize = 24;
const iconFloatPrecision = 3;
const iconIgnored = require("./.svglint-ignored.json");

module.exports = {
rules: {
Expand All @@ -14,7 +18,7 @@ module.exports = {
attr: [
{ // ensure that the SVG elm has the appropriate attrs
"role": "img",
"viewBox": "0 0 24 24",
"viewBox": `0 0 ${iconSize} ${iconSize}`,
"xmlns": "http://www.w3.org/2000/svg",

"rule::selector": "svg",
Expand All @@ -32,6 +36,8 @@ module.exports = {
],
custom: [
function(reporter, $, ast) {
reporter.name = "icon-title";

const iconTitleText = $.find("title").text();
if (!titleRegexp.test(iconTitleText)) {
reporter.error("<title> should follow the format \"[ICON_NAME] icon\"");
Expand All @@ -46,6 +52,24 @@ module.exports = {
}
}
},
function(reporter, $, ast) {
reporter.name = "icon-size";

const iconPath = $.find("path").attr("d");
if (iconIgnored.hasOwnProperty(iconPath)) {
return;
}

const bounds = getBounds(iconPath);
const width = +bounds.width.toFixed(iconFloatPrecision);
const height = +bounds.height.toFixed(iconFloatPrecision);

if (width === 0 && height === 0) {
reporter.error("Path bounds were reported as 0 x 0; check if the path is valid");
} else if (width !== iconSize && height !== iconSize) {
reporter.error(`Size of <path> must be exactly ${iconSize} in one dimension; the size is currently ${width} x ${height}`);
}
},
]
}
};
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -13,6 +13,7 @@ Simple Icons welcomes contributions and corrections. Before contributing, please
* [Requesting an Icon](#requesting-an-icon)
* [Adding or Updating an Icon](#adding-or-updating-an-icon)
* [Building the Website](#building-locally)
* [Using Docker](#using-docker)

## Requesting an Icon

Expand Down Expand Up @@ -90,6 +91,12 @@ All icons in Simple Icons have been optimized with the [SVGO tool](https://githu
* Set the precision to about 3, depending on if there is a loss of quality.
* Leave the remaining settings untouched (or reset them with the button at the bottom of the settings).
* Click the download button.
* The [SVGO Command Line Tool](https://github.com/svg/svgo) in Docker
* If none of the options above work for you, it is possible to build a Docker image for compressing the images.
* Build: `docker build . -t simple-icons`
* Run: `docker run --rm -v ${PWD}/icons/file-to-optimize.svg:/image.svg simple-icons`

After optimizing the icon, double-check it against your original version to ensure no visual imperfections have crept in. Also make sure that the dimensions of the path have not been changed so that the icon no longer fits exactly within the canvas. We currently check the dimensions up to a precision of 3 decimal points.

### 4. Annotate the Icon

Expand Down Expand Up @@ -222,6 +229,33 @@ Alternatively, you can build and run the website in a readily configured online

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#https://github.com/simple-icons/simple-icons)

## Using Docker

You can build a Docker image for this project from the Dockerfile by running:

```bash
# Build the Docker image for simple-icons (if you haven't yet)
$ docker build . -t simple-icons

# Start a Docker container for simple-icons and attach to it
$ docker run -it --rm --entrypoint "/bin/ash" simple-icons
```

### Jekyll Server using Docker

To use a Docker container to run the Jekyll server for the website, run:

```bash
# Start a container running `jekyll serve` in the background
$ docker run -d -p 4000:4000 --rm --volume $PWD:/srv/jekyll --name simple-icons-server jekyll/jekyll jekyll serve

# Inspect the server logs
$ docker logs simple-icons-server

# Stop the server (and delete the container)
$ docker stop simple-icons-server
```

---

# Versioning
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile
@@ -0,0 +1,11 @@
FROM alpine:3.12

RUN apk add --update nodejs npm

WORKDIR /simple-icons
COPY package*.json /simple-icons/
RUN npm install

COPY . .

ENTRYPOINT ["npm", "run", "svgo", "--", "/image.svg"]
43 changes: 39 additions & 4 deletions _data/simple-icons.json
Expand Up @@ -407,8 +407,8 @@
},
{
"title": "Apache ECharts",
"hex": "A9334C",
"source": "https://echarts.apache.org/"
"hex": "AA344D",
"source": "https://apache.org/logos/"
},
{
"title": "Apache Flink",
Expand Down Expand Up @@ -438,7 +438,7 @@
{
"title": "Apache Pulsar",
"hex": "188FFF",
"source": "https://pulsar.apache.org/"
"source": "https://apache.org/logos/"
},
{
"title": "Apache RocketMQ",
Expand Down Expand Up @@ -990,6 +990,11 @@
"hex": "111324",
"source": "https://www.campaignmonitor.com/company/brand/"
},
{
"title": "Canonical",
"hex": "77216F",
"source": "https://design.ubuntu.com/downloads/"
},
{
"title": "Canva",
"hex": "00C4CC",
Expand Down Expand Up @@ -1520,6 +1525,11 @@
"hex": "025E8C",
"source": "https://dependabot.com/dependabot-logo-symbol-square-mono.svg"
},
{
"title": "Der Spiegel",
"hex": "E64415",
"source": "https://www.spiegel.de/"
},
{
"title": "Designer News",
"hex": "2D72D9",
Expand All @@ -1540,6 +1550,11 @@
"hex": "F99A66",
"source": "https://devrant.com"
},
{
"title": "DHL",
"hex": "FFCC00",
"source": "https://www.dpdhl-brands.com/dhl/en/guides/design-basics/logo-and-claim.html"
},
{
"title": "Diaspora",
"hex": "000000",
Expand Down Expand Up @@ -2152,7 +2167,7 @@
},
{
"title": "Fur Affinity",
"hex": "FAAF3A",
"hex": "36566F",
"source": "https://www.furaffinity.net/"
},
{
Expand Down Expand Up @@ -3290,6 +3305,11 @@
"hex": "DDB320",
"source": "https://en.wikipedia.org/wiki/File:Lamborghini_Logo.svg"
},
{
"title": "Land Rover",
"hex": "005A2B",
"source": "https://www.landrover.com.au/download-a-brochure/index.html"
},
{
"title": "Laravel",
"hex": "FF2D20",
Expand Down Expand Up @@ -4245,6 +4265,11 @@
"hex": "F78C40",
"source": "https://openid.net/add-openid/logos/"
},
{
"title": "Openlayers",
"hex": "1F6B75",
"source": "https://github.com/openlayers/openlayers.github.io/blob/5b93e18b8d302eb49a812fb96abb529895ceb7a2/assets/logo.svg"
},
{
"title": "OpenSSL",
"hex": "721412",
Expand Down Expand Up @@ -4655,6 +4680,11 @@
"hex": "3181FF",
"source": "https://prezi.com/press/kit/"
},
{
"title": "Prime",
"hex": "00A8E1",
"source": "https://www.amazon.com/b?node=17277626011"
},
{
"title": "Prime Video",
"hex": "1F2E3E",
Expand Down Expand Up @@ -4800,6 +4830,11 @@
"hex": "4695EB",
"source": "https://design.jboss.org/quarkus/"
},
{
"title": "Quasar",
"hex": "1976D2",
"source": "https://github.com/quasarframework/quasar-art/blob/cbbbb4b0b7ec7181dfc2d1b29a1ce025e71575bc/src/quasar-logo.svg"
},
{
"title": "Quest",
"hex": "FB4F14",
Expand Down
2 changes: 1 addition & 1 deletion icons/apacheecharts.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/apachepulsar.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/canonical.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/derspiegel.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/dhl.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 833241e

Please sign in to comment.