Skip to content

Commit

Permalink
Rearranges and updates images and icons (electricitymaps#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
madsnedergaard authored Jan 5, 2023
1 parent 553377a commit a44702c
Show file tree
Hide file tree
Showing 170 changed files with 40 additions and 23 deletions.
14 changes: 7 additions & 7 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>Electricity Maps | Live 24/7 CO₂ emissions of electricity consumption</title>
<meta name="description" content="Electricity Maps is a live 24/7 visualization of where your electricity comes from and how much CO2 was emitted to produce it." />
<meta property="og:description" content="Electricity Maps is a live 24/7 visualization of where your electricity comes from and how much CO2 was emitted to produce it." />
<meta property="og:image" content="https://app.electricitymaps.com/electricitymap_social_image.png" />
<meta property="og:image" content="https://app.electricitymaps.com/images/electricitymap_social_image.png" />
<meta property="og:title" content="Live 24/7 CO₂ emissions of electricity consumption" />
<meta property="og:type" content="website" />
<!-- It's important to keep the old og:url, else likes will not accumulate properly -->
Expand All @@ -17,19 +17,19 @@
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:creator" content="@electricitymaps" />
<meta name="twitter:description" content="Electricity Maps is a live 24/7 visualization of where your electricity comes from and how much CO2 was emitted to produce it." />
<meta name="twitter:image" content="https://app.electricitymaps.com/electricitymap_social_image.png" />
<meta name="twitter:image" content="https://app.electricitymaps.com/images/electricitymap_social_image.png" />
<meta name="twitter:site" content="@ElectricityMaps" />
<meta name="twitter:title" content="@ElectricityMaps | Live 24/7 CO2 emissions of electricity consumption" />

<base href="/" />

<!-- Visual identity -->
<meta name="theme-color" content="#ffffff" />
<link rel="icon" type="image/svg+xml" href="/images/electricitymap-favicon-dark-light.svg" />
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-icon-180x180.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png" />
<link rel="icon" href="/icons/favicon.svg" />
<link rel="mask-icon" href="/icons/favicon.svg" color="#000000">
<link rel="apple-touch-icon" href="/icons/apple-touch-icon.png" />


<!-- Mobile linking -->
<meta name="apple-itunes-app" content="app-id=1224594248" />
<link rel="alternate" href="android-app://com.tmrow.electricitymap/https/app.electricitymaps.com" />
Expand Down Expand Up @@ -114,7 +114,7 @@
</head>
<body>
<noscript>
<img src="/electricity-maps-logo.svg" alt="Electricity Maps logo" />
<img src="/images/electricity-maps-logo.svg" alt="Electricity Maps logo" />
<div>
<h1>JavaScript required!</h1>
<p>
Expand Down
Binary file removed web/public/android-chrome-192x192.png
Binary file not shown.
Binary file removed web/public/android-chrome-512x512.png
Binary file not shown.
Binary file removed web/public/apple-touch-icon.png
Binary file not shown.
Binary file added web/public/favicon.ico
Binary file not shown.
Binary file removed web/public/favicon.png
Binary file not shown.
Binary file added web/public/icons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/icons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/public/icons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion web/public/icons/arrow-left.svg

This file was deleted.

17 changes: 17 additions & 0 deletions web/public/icons/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion web/src/components/LoadingOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function FadingOverlay({ isVisible }: { isVisible: boolean }) {
(styles, isVisible) =>
isVisible && (
<animated.div
className="fixed z-50 h-full w-full bg-gray-100 bg-[url('/loading-icon.svg')] bg-[length:100px] bg-center bg-no-repeat dark:bg-gray-900 dark:bg-[url('/loading-icon-darkmode.svg')]"
className="fixed z-50 h-full w-full bg-gray-100 bg-[url('/images/loading-icon.svg')] bg-[length:100px] bg-center bg-no-repeat dark:bg-gray-900 dark:bg-[url('/images/loading-icon-darkmode.svg')]"
style={styles}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/TimeSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function TimeSlider({ onChange, numberOfEntries, selectedIndex }: TimeSliderProp
<SliderPrimitive.Range />
</SliderPrimitive.Track>
<SliderPrimitive.Thumb
className={`block h-6 w-6 rounded-full bg-white bg-[url("/icons/slider-thumb.svg")]
className={`block h-6 w-6 rounded-full bg-white bg-[url("/images/slider-thumb.svg")]
bg-center bg-no-repeat shadow-3xl focus:outline-none
focus-visible:ring focus-visible:ring-brand-green/10
focus-visible:ring-opacity-75 dark:bg-gray-400 dark:focus-visible:ring-white/70`}
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/modals/OnboardingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Modal from './OnboardingModalInner';

const views = [
{
headerImage: resolvePath('electricitymaps-icon.svg'),
headerImage: resolvePath('images/electricitymaps-icon.svg'),
isMainTitle: true,
renderContent: (__: (translationKey: string) => string) => (
<>
Expand All @@ -20,7 +20,7 @@ const views = [
),
},
{
headerImage: resolvePath('onboarding/mapExtract.png'),
headerImage: resolvePath('images/onboarding/mapExtract.png'),
renderContent: (__: (translationKey: string) => string) => (
<>
<div>
Expand All @@ -33,7 +33,7 @@ const views = [
),
},
{
headerImage: resolvePath('onboarding/exchangeArrows.png'),
headerImage: resolvePath('images/onboarding/exchangeArrows.png'),
renderContent: (__: (translationKey: string) => string) => (
<>
<div>
Expand All @@ -46,7 +46,7 @@ const views = [
),
},
{
headerImage: resolvePath('onboarding/splitLayers.png'),
headerImage: resolvePath('images/onboarding/splitLayers.png'),
renderContent: (__: (translationKey: string) => string) => (
<>
<div>
Expand Down
3 changes: 2 additions & 1 deletion web/src/features/exchanges/ExchangeArrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function ExchangeArrow({ data, viewportWidth, viewportHeight, map }: ExchangeArr
const prefix = colorBlindModeEnabled ? 'colorblind-' : '';
const intensity = quantizedCo2IntensityScale(co2intensity);
const speed = quantizedExchangeSpeedScale(Math.abs(netFlow));
return resolvePath(`arrows/${prefix}arrow-${intensity}-animated-${speed}`).pathname;
return resolvePath(`images/arrows/${prefix}arrow-${intensity}-animated-${speed}`)
.pathname;
}, [colorBlindModeEnabled, co2intensity, netFlow]);

const projection = map.project(lonlat);
Expand Down
4 changes: 2 additions & 2 deletions web/src/features/panels/zone/ZoneDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import Attribution from './Attribution';
import DisplayByEmissionToggle from './DisplayByEmissionToggle';
import Divider from './Divider';
import NoInformationMessage from './NoInformationMessage';
import { getZoneDataStatus, ZoneDataStatus } from './util';
import { ZoneHeader } from './ZoneHeader';
import { ZoneDataStatus, getZoneDataStatus } from './util';

export default function ZoneDetails(): JSX.Element {
const { zoneId } = useParams();
Expand Down Expand Up @@ -80,7 +80,7 @@ function ZoneDetailsContent({
if (isLoading) {
return (
<div className={`flex h-full w-full items-center justify-center`}>
<div className="z-50 h-[50px] w-[50px] bg-[url('/loading-icon.svg')] bg-[length:60px] bg-center bg-no-repeat dark:bg-[url('/loading-icon-darkmode.svg')]"></div>
<div className="z-50 h-[50px] w-[50px] bg-[url('/images/loading-icon.svg')] bg-[length:60px] bg-center bg-no-repeat dark:bg-[url('/images/loading-icon-darkmode.svg')]"></div>
</div>
);
}
Expand Down
12 changes: 6 additions & 6 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ export default defineConfig(({ mode }) => ({
maximumFileSizeToCacheInBytes: 3_500_000,
},
includeAssets: [
'favicon.png',
'icons/*.{svg,png}',
'robots.txt',
'apple-touch-icon.png',
'icons/*.svg',
// Consider if we should also add subdirectories below
'images/*.{svg,png}',
'fonts/*.woff2',
],
manifest: {
theme_color: '#BD34FE',
theme_color: '#000000',
icons: [
{
src: '/android-chrome-192x192.png',
src: '/icons/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any maskable',
},
{
src: '/android-chrome-512x512.png',
src: '/icons/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
},
Expand Down

0 comments on commit a44702c

Please sign in to comment.