mirror of
https://github.com/techno-tim/littlelink-server.git
synced 2024-11-22 05:25:13 +01:00
feat(srcset): Add env for srcset
This commit is contained in:
parent
1888386c6c
commit
b06bb9443f
10
README.md
10
README.md
@ -19,8 +19,9 @@ services:
|
||||
- META_DESCRIPTION=Techno Tim Link page
|
||||
- META_AUTHOR=Techno Tim
|
||||
- THEME=Dark
|
||||
- FAVICON_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg
|
||||
- AVATAR_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg
|
||||
- FAVICON_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_200x200.jpg
|
||||
- AVATAR_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_200x200.jpg
|
||||
- AVATAR_2X_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg
|
||||
- AVATAR_ALT=Techno Tim Profile Pic
|
||||
- NAME=TechnoTim
|
||||
- BIO=Hey! Just a place where you can connect with me!
|
||||
@ -70,8 +71,9 @@ docker run -d \
|
||||
-e META_DESCRIPTION='Techno Tim Link page' \
|
||||
-e META_AUTHOR='Techno Tim' \
|
||||
-e THEME='Dark' \
|
||||
-e FAVICON_URL='https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg' \
|
||||
-e AVATAR_URL='https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg' \
|
||||
-e FAVICON_URL='https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_200x200.jpg' \
|
||||
-e AVATAR_URL='https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_200x200.jpg' \
|
||||
-e AVATAR_2X_URL='https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg' \
|
||||
-e AVATAR_ALT='Techno Tim Profile Pic' \
|
||||
-e NAME='TechnoTim' \
|
||||
-e BIO='Hey! Just a place where you can connect with me!' \
|
||||
|
@ -11,8 +11,9 @@ services:
|
||||
- META_DESCRIPTION=Techno Tim Link page
|
||||
- META_AUTHOR=Techno Tim
|
||||
- THEME=Dark
|
||||
- FAVICON_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg
|
||||
- AVATAR_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg
|
||||
- FAVICON_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_200x200.jpg
|
||||
- AVATAR_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_200x200.jpg
|
||||
- AVATAR_2X_URL=https://pbs.twimg.com/profile_images/1286144221217316864/qIAsKOpB_400x400.jpg
|
||||
- AVATAR_ALT=Techno Tim Profile Pic
|
||||
- NAME=TechnoTim
|
||||
- BIO=Hey! Just a place where you can connect with me!
|
||||
|
@ -6,6 +6,7 @@ var env = {
|
||||
FAVICON_URL: '$FAVICON_URL',
|
||||
AVATAR_URL: '$AVATAR_URL',
|
||||
AVATAR_ALT: '$AVATAR_ALT',
|
||||
AVATAR_2X_URL : '$AVATAR_2X_URL',
|
||||
NAME:'$NAME',
|
||||
BIO: '$BIO',
|
||||
GITHUB: '$GITHUB',
|
||||
@ -77,6 +78,7 @@ var avatarEl = document.getElementById('avatar');
|
||||
if (env.AVATAR_URL) {
|
||||
avatarEl.src = env.AVATAR_URL;
|
||||
avatarEl.alt = env.AVATAR_ALT;
|
||||
avatarEl.srcset = env.AVATAR_2X_URL;
|
||||
} else {
|
||||
avatarEl.remove()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user