-
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
604a093
commit a0c8d81
Showing
2 changed files
with
20 additions
and
41 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 |
---|---|---|
|
@@ -55,6 +55,13 @@ | |
overflow-y: scroll; | ||
} | ||
|
||
@media (orientation: landscape) { | ||
body { | ||
max-width: 3.5in; | ||
margin: auto; | ||
} | ||
} | ||
|
||
#card { | ||
border-radius:8px; margin:0; background-color:#222; width:100%; aspect-ratio: 3.5/2 | ||
} | ||
|
@@ -135,6 +142,7 @@ | |
background-color: #222; | ||
color:white; | ||
border-radius: 8px; | ||
text-decoration: none; | ||
} | ||
.row > a h1 { | ||
margin:0; | ||
|
@@ -170,55 +178,20 @@ <h2 id="header">Let's connect</h2> | |
<div class="row"> | ||
<button style="box-shadow: 0 2px 0 0 gray; color:white; font-weight:bold; background-color: #444; border:none; border-radius:8px; margin:8px; height:44px; flex:1;">Save Contact</button> | ||
</div> | ||
<div class="row"> | ||
<!-- <div class="row"> | ||
<a> | ||
<div class="icon"></div> | ||
<h1>Phone</h1> | ||
<p>(000)000-0000</p> | ||
</a> | ||
</div> | ||
<div class="row"></div> | ||
</div> --> | ||
|
||
<script> | ||
// 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": 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 contactData = await response.json(); // Parse the JSON data | ||
const contactList = document.querySelector('body'); // Get the HTML element to display contact info | ||
|
||
// Iterate over the contacts and display | ||
|
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