Replace .jpg patterns with .png

This drastically reduces file size (for the landing page from 221kb to 57kb) while doubling the resolution to look sharper on retina displays.
This commit is contained in:
Marcus Blättermann 2023-01-23 16:57:55 +01:00
parent fdde2d58af
commit 28b140ce8b
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D
21 changed files with 17 additions and 14 deletions

View File

@ -1,12 +1,12 @@
import React from 'react'
import classNames from 'classnames'
import patternDefault from '../images/pattern_blue.jpg'
import patternNightly from '../images/pattern_nightly.jpg'
import patternLegacy from '../images/pattern_legacy.jpg'
import overlayDefault from '../images/pattern_landing.jpg'
import overlayNightly from '../images/pattern_landing_nightly.jpg'
import overlayLegacy from '../images/pattern_landing_legacy.jpg'
import patternDefault from '../images/pattern_blue.png'
import patternNightly from '../images/pattern_nightly.png'
import patternLegacy from '../images/pattern_legacy.png'
import overlayDefault from '../images/pattern_landing.png'
import overlayNightly from '../images/pattern_landing_nightly.png'
import overlayLegacy from '../images/pattern_landing_legacy.png'
import Grid from './grid'
import { Content } from './main'

View File

@ -2,11 +2,11 @@ import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import patternBlue from '../images/pattern_blue.jpg'
import patternGreen from '../images/pattern_green.jpg'
import patternPurple from '../images/pattern_purple.jpg'
import patternNightly from '../images/pattern_nightly.jpg'
import patternLegacy from '../images/pattern_legacy.jpg'
import patternBlue from '../images/pattern_blue.png'
import patternGreen from '../images/pattern_green.png'
import patternPurple from '../images/pattern_purple.png'
import patternNightly from '../images/pattern_nightly.png'
import patternLegacy from '../images/pattern_legacy.png'
import classes from '../styles/main.module.sass'
const patterns = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -12,12 +12,14 @@
background-position: center var(--header-top-margin)
background-repeat: repeat
width: 100%
background-size: 799px 643px
.header-content
background-position: center calc(-138px + var(--header-top-margin))
background-repeat: no-repeat
width: 100%
min-height: calc(573px + var(--header-top-margin))
background-size: 1444px 573px
padding-top: var(--header-top-margin)
.title

View File

@ -26,6 +26,7 @@
background-color: var(--color-theme)
background-repeat: repeat
background-position: center top
background-size: 799px 643px
z-index: -1
min-height: 100vh

View File

@ -6,9 +6,9 @@ import Link from '../components/link'
import SVG from 'react-inlinesvg'
import logoSpacy from '../images/logo.svg'
import patternBlue from '../images/pattern_blue.jpg'
import patternGreen from '../images/pattern_green.jpg'
import patternPurple from '../images/pattern_purple.jpg'
import patternBlue from '../images/pattern_blue.png'
import patternGreen from '../images/pattern_green.png'
import patternPurple from '../images/pattern_purple.png'
const colors = {
dark: 'var(--color-front)',