Skip to content

Commit

Permalink
Merge pull request #3 from Stellarthoughts/favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
andskur authored Mar 15, 2024
2 parents 7ec86c1 + 5f4c14a commit 8db8215
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
4 changes: 0 additions & 4 deletions web/.env

This file was deleted.

7 changes: 6 additions & 1 deletion web/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# BRANDING

VITE_FAVICON_PATH=/favicon.png
VITE_LOGO_PATH=/gpt-logo-white-transparent.svg
VITE_BACKGROUND_PATH=/gpt-background.jpg
VITE_BACKGROUND_PATH=/gpt-background.jpg

# OTHER

VITE_SYMBOL=ETH
2 changes: 2 additions & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?

.env
3 changes: 1 addition & 2 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Svelte</title>
</head>
Expand Down
3 changes: 3 additions & 0 deletions web/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
import 'animate.css';
import 'bulma/css/bulma.css';
import Faucet from './Faucet.svelte';
const faviconPath = import.meta.env.VITE_FAVICON_PATH
</script>

<svelte:head>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet"
/>
<link rel="icon" type="image/png" href="{faviconPath}" />
</svelte:head>

<Faucet />
4 changes: 3 additions & 1 deletion web/src/Faucet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
import { CloudflareProvider } from '@ethersproject/providers';
import { setDefaults as setToast, toast } from 'bulma-toast';
const symbol = import.meta.env.VITE_SYMBOL
let input = null;
let faucetInfo = {
account: '0x0000000000000000000000000000000000000000',
network: 'testnet',
payout: 1,
symbol: 'ETH',
symbol: symbol,
hcaptcha_sitekey: '',
};
Expand Down
2 changes: 2 additions & 0 deletions web/src/env/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
interface ImportMetaEnv {
readonly VITE_LOGO_PATH: string;
readonly VITE_BACKGROUND_PATH: string;
readonly VITE_FAVICON_PATH: string;
readonly VITE_SYMBOL: string;
}

interface ImportMeta {
Expand Down

0 comments on commit 8db8215

Please sign in to comment.