-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8665d47
commit 604a093
Showing
4 changed files
with
52 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,16 @@ | |
border-radius:8px; margin:0; background-color:#222; width:100%; aspect-ratio: 3.5/2 | ||
} | ||
#card #banner { | ||
position:relative; width:100%; height:50%; border:1px solid gray; border-radius:8px; background-color: #444; | ||
background-image: url('cardAssets/banner.jpg'); | ||
background-position: center; /* Center the image */ | ||
background-repeat: no-repeat; /* Do not repeat the image */ | ||
background-size: cover; | ||
position:relative; | ||
width:100%; | ||
height:50%; | ||
border:1px solid gray; | ||
border-radius:8px; | ||
background-color: #444; | ||
} | ||
#card #banner #picture { | ||
position:absolute; | ||
|
@@ -144,7 +153,7 @@ | |
<body> | ||
<div id="card"> | ||
<div id="banner"> | ||
<div id="picture"></div> | ||
<img id="picture" src="cardAssets/profile.jpg"/> | ||
</div> | ||
<h1 id="name">Daniel ████</h1> | ||
<h2 id="header">Let's connect</h2> | ||
|
@@ -173,42 +182,42 @@ <h1>Phone</h1> | |
// Function to fetch contact data from contacts.json and render it on the webpage | ||
async function fetchAndRenderContacts() { | ||
try { | ||
// const response = await fetch('cardAssets/contacts.json'); // Fetch the JSON file | ||
// const contactData = await response.json(); // Parse the JSON data | ||
const contactData = { | ||
"contacts": [ | ||
{ | ||
"contactType": "Email", | ||
"display": false, | ||
"value": "[email protected]", | ||
"link": "mailto:[email protected]" | ||
}, | ||
{ | ||
"contactType": "Phone", | ||
"display": false, | ||
"value": "+1-000-000-0000", | ||
"link": "tel:+10000000000" | ||
}, | ||
{ | ||
"contactType": "LinkedIn", | ||
"display": false, | ||
"value": "LinkedIn Profile", | ||
"link": "https://www.linkedin.com/in/username" | ||
}, | ||
{ | ||
"contactType": "X", | ||
"display": false, | ||
"value": "@DanielRedacted", | ||
"link": "https://x.com/DanielRedacted" | ||
}, | ||
{ | ||
"contactType": "Instagram", | ||
"display": false, | ||
"value": "@DanielRedacted", | ||
"link": "https://www.instagram.com/DanielRedacted" | ||
} | ||
] | ||
} | ||
const response = await fetch('cardAssets/contacts.json'); // Fetch the JSON file | ||
const contactData = await response.json(); // Parse the JSON data | ||
// const contactData = { | ||
// "contacts": [ | ||
// { | ||
// "contactType": "Email", | ||
// "display": true, | ||
// "value": "[email protected]", | ||
// "link": "mailto:[email protected]" | ||
// }, | ||
// { | ||
// "contactType": "Phone", | ||
// "display": true, | ||
// "value": "+1-000-000-0000", | ||
// "link": "tel:+10000000000" | ||
// }, | ||
// { | ||
// "contactType": "LinkedIn", | ||
// "display": true, | ||
// "value": "LinkedIn Profile", | ||
// "link": "https://www.linkedin.com/in/username" | ||
// }, | ||
// { | ||
// "contactType": "X", | ||
// "display": true, | ||
// "value": "@DanielRedacted", | ||
// "link": "https://x.com/DanielRedacted" | ||
// }, | ||
// { | ||
// "contactType": "Instagram", | ||
// "display": true, | ||
// "value": "@DanielRedacted", | ||
// "link": "https://www.instagram.com/DanielRedacted" | ||
// } | ||
// ] | ||
// } | ||
|
||
const contactList = document.querySelector('body'); // Get the HTML element to display contact info | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,31 +2,31 @@ | |
"contacts": [ | ||
{ | ||
"contactType": "Email", | ||
"display": false, | ||
"display": true, | ||
"value": "[email protected]", | ||
"link": "mailto:[email protected]" | ||
}, | ||
{ | ||
"contactType": "Phone", | ||
"display": false, | ||
"display": true, | ||
"value": "+1-000-000-0000", | ||
"link": "tel:+10000000000" | ||
}, | ||
{ | ||
"contactType": "LinkedIn", | ||
"display": false, | ||
"display": true, | ||
"value": "LinkedIn Profile", | ||
"link": "https://www.linkedin.com/in/username" | ||
}, | ||
{ | ||
"contactType": "X", | ||
"display": false, | ||
"display": true, | ||
"value": "@DanielRedacted", | ||
"link": "https://x.com/DanielRedacted" | ||
}, | ||
{ | ||
"contactType": "Instagram", | ||
"display": false, | ||
"display": true, | ||
"value": "@DanielRedacted", | ||
"link": "https://www.instagram.com/DanielRedacted" | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.