From 18c29eb3d6f382a5031cef8a66149035fd97e35f Mon Sep 17 00:00:00 2001 From: bwhenn Date: Tue, 4 Jun 2024 17:18:24 -0700 Subject: [PATCH] styling updates --- assets/icons/edit.png | Bin 0 -> 6624 bytes assets/icons/more.png | Bin 0 -> 4729 bytes assets/scripts/ContactPage.js | 68 ++++++++++++++++++++++++++++++---- assets/scripts/Quote.js | 58 +++++++++++++++++++++++++++++ assets/styles/contactPage.css | 62 ++++++++++++++++++++++++++++++- assets/styles/homepage.css | 27 ++++++++++---- contactPage.html | 25 +++++++++---- index.html | 13 ++++--- 8 files changed, 222 insertions(+), 31 deletions(-) create mode 100644 assets/icons/edit.png create mode 100644 assets/icons/more.png create mode 100644 assets/scripts/Quote.js diff --git a/assets/icons/edit.png b/assets/icons/edit.png new file mode 100644 index 0000000000000000000000000000000000000000..100b27f74f6498ce9cd949c8d9b826294178d3cf GIT binary patch literal 6624 zcma)Be_Tvi*ne)5nJ|o4nOWIEqby+(LNpO&wiGX`{A?^rS~aUyqM92^MYL{6YE9M> zR%*9wQkolyAx-N?g=kdBrXMq8nwsXm=id6ff4_Y`b)Wma&-tG3dCqgrbM7r^g|FAJ zAzu#xfML>QOa2GI0+|+I#YUIUd!F{7i)F-O>1r$V6JxbC5#0}#FIyV{F!T`pi!I`8 zD@33ma%n*1s_>x5sLi{!K~z-K^pLR7h%KAt+op%_3eIR>@HO(;C|$B>^`6YOR~svH zLN+$&8l3Zk*+Kjf+^l~lT$o*vR8Uj5V#t97v*zRowp=FT9lohq!doCddVzEFgSC`b z5EA;5l~Eu)P;lX&;}$2&stSJpp=s=rL4U3c{dRa{7I%j8KG~PgvbNd#G_N%e_ZD?f zKfkK&Gm5BR(l$#9HRt0L`*QA{O$GP$GraZhiIQ1rZ=yb<`Cu*e6S3fAvs$DqHm4|; z>Aj@pxoYQUJlDgiH9R19l!(-03Da9q!-?geRZbb5!p09G#jnkVRMRFR&|Ckel{)Rs z2dI2|L2C9SIJpg>ME%OnpDB@g#s(G7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cHgEtSonFQ%3%7iT)b{(xtvjt}T}B|6k>xT|58) literal 0 HcmV?d00001 diff --git a/assets/icons/more.png b/assets/icons/more.png new file mode 100644 index 0000000000000000000000000000000000000000..0ba274cfeb891bb4b8fcde9138b8afc7264dd79c GIT binary patch literal 4729 zcmc&&`CAiL_rD2*@RADR0v3g6ZC|8DaRG!NASzP7HlPAo2!T)vh^z_$nh1$SrHX*o z1qC8n6d@BJ%BDd`)Vfq4NaL`UrKli7*o;98gnS44C%iv&o@btWa^{|8?wtGioSW18 zeY_W$SeXC-7VZ6R_dx)#sE7r|M(FS%^_3PK{*&+>BM|`8#|t;+S$ye_sPfAsFM5(+ zd_+=8=+SVHl9IA9DlR%PEHoi}WBk#`g7NKE04y=uyW7)0wQ#IA>YSLC);~2dw*K79 zQ=85N{o?jKXw82}J5Nwnd+s-m!T<7j(BzwQ-#?K7z@li!TOE^TuFM!h;+|IgA&j zI4(D0{s5T>EdAqSwXhk8Y0$wFG+7XfTOFTVjgw!6T}76}*u{XYoM&qG!9~Q8l`6MK z9o9@8gt%Sp#|yk%A#NfkM03BS?fB!PU#|te73q-nkF}{AfTYGfm__eRa<(V`g&kN< zk!gu(S1Jv_&~ORj2p7do*P$9@k%aaGrR#u~;S< zIe`J};h8dIuEtC(#9ncXU6nA6HNb$ZDO(r^rL^aOxv`{qAn|LssXYz5MiT^eBzFRk z?1&H6g>g&0b~xY?f;0`6 zn1CHwe}_9K=BAVRpmT#y<#fy4DKnsQ8diwXiv0i}aE8R>#3U2IzA@dBKZFH>-q#-( zoWXa?fPAOW0rIgDVgbGMLIk{a&usuKkWL2Y%bxoyz=@Q3x<#vNEfV&CjM3baOp%;;F1{;?gXkHo<|~~ zmF@blV(fL~3}Of0S2r1g<}N0)YbLTGy97|JLs;!EPGNw&_C1dxoBtU9p*3SU2=Fa+ zXSzjwt~2!~whIYGz8io?F0}&|gA+MlNqK#)0NmOGwtX zhOFOK~a@u+`MOnTFqr-|@FqeUY%$hQWGO{rcsX%n#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DJhn@8=B>kg$T_tdS2(lC<6=y9QU#-1OWQkO!rHI(nP z_R}d#?sv3VA4fNCov6b|zTY=WdS>9Ak7v)PF+5!PV~C01*3mfSIaNmX#JXxBoW5Td zsQDdqZeccvCsar_JStMw%`|keDh_@7Z9lVji!(uCiS79%Yq~G z+u!R$HMi~@0m-#qv8u!$l(!gsF_)`^jfgexo$Fga7Lex(3X%&Rh@y&4&w8I)_&ev{ cyapz99<4Github
LinkedIn
Phone #: ${contact.phone}
- Role: ${contact.role}
- Other: ${contact.other}
`; + Role: ${contact.role}
`; contactCard.appendChild(infoContainer); + + const buttonDiv = document.createElement('div'); + buttonDiv.className = 'button-container'; + + // Create a delete button for each task const deleteButton = document.createElement('button'); - deleteButton.innerHTML ='×'; + deleteButton.innerHTML ='delete button'; deleteButton.onclick = function () { - deleteContact(contact.id); - contactCard.remove(); + deleteContact(contact.id); + contactCard.remove(); }; - contactCard.appendChild(deleteButton); + buttonDiv.appendChild(deleteButton); + + // View more button + const viewOther = document.createElement('button'); + viewOther.className = "view-more-btn"; + viewOther.innerHTML ='more button'; + viewOther.setAttribute('other-info', contact.other); + viewOther.addEventListener('click', function() { + const moreInfo = this.getAttribute('other-info'); + openModalWithText(moreInfo); + }); + buttonDiv.appendChild(viewOther); + + // Edit button + const edit = document.createElement('button'); + edit.className = "edit-btn"; + edit.textContent = "Edit"; + edit.innerHTML ='edit button'; + edit.addEventListener('click', function() { + document.getElementById('name').value = contact.name; + document.getElementById('gender').value = contact.gender; + document.getElementById('github').value = contact.github; + document.getElementById('linkedin').value = contact.linkedin; + document.getElementById('email').value = contact.value; + document.getElementById('phone').value = contact.phone; + document.getElementById('role').value = contact.role; + document.getElementById('other').value = contact.other; + deleteContact(contact.id); + contactCard.remove(); + }); + buttonDiv.appendChild(edit); + + contactCard.appendChild(buttonDiv); contactContainer.appendChild(contactCard); document.getElementById('contact-form').reset() }); } +function openModalWithText(text) { + document.getElementById('moreText').textContent = ""; + document.getElementById('moreText').textContent = text; + document.getElementById('viewMoreModal').style.display = "block"; +} + function deleteContact(id) { contacts = contacts.filter(cont => cont.id !== id); saveContacts(); @@ -103,4 +144,17 @@ document.addEventListener('DOMContentLoaded', () => { saveContacts(); renderContacts(); }); + + const modal = document.getElementById('viewMoreModal'); + const closeBtn = document.querySelector('.modal .close'); + + closeBtn.onclick = function() { + modal.style.display = "none"; + }; + + window.onclick = function(event) { + if (event.target == modal) { + modal.style.visibility = "none"; + } + }; }); \ No newline at end of file diff --git a/assets/scripts/Quote.js b/assets/scripts/Quote.js new file mode 100644 index 0000000..176d374 --- /dev/null +++ b/assets/scripts/Quote.js @@ -0,0 +1,58 @@ +const category = 'inspirational'; +const apiKey = '0kYRIiEg1U21YoGtDo5eQQ==5UQuSZMfQwaOH6sT'; +const url = `https://api.api-ninjas.com/v1/quotes?category=${category}`; +const cacheKey = 'quotesCache'; +const cacheExpiryKey = 'quotesCacheExpiry'; +const oneDay = 24 * 60 * 60 * 1000; // One day in milliseconds + +function fetchQuotes() { + fetch(url, { + method: 'GET', + headers: { + 'X-Api-Key': apiKey, + 'Content-Type': 'application/json' + } + }) + .then(response => { + if (!response.ok) { + return response.text().then(text => { throw new Error(text) }); + } + return response.json(); + }) + .then(result => { + // Save the result to localStorage + localStorage.setItem(cacheKey, JSON.stringify(result)); + // Save the current timestamp to localStorage + localStorage.setItem(cacheExpiryKey, Date.now().toString()); + }) + .catch(error => { + console.error('Error:', error); + }); +} + + +function getCachedQuotes() { + const cachedData = localStorage.getItem(cacheKey); + const cacheExpiry = localStorage.getItem(cacheExpiryKey); + + if (cachedData && cacheExpiry) { + const expiryTime = parseInt(cacheExpiry, 10); + if (Date.now() - expiryTime < oneDay) { + // Cache is still valid + console.log('Using cached data:', JSON.parse(cachedData)); + document.getElementById('text').innerHTML = JSON.parse(cachedData)[0].quote; + document.getElementById('author').innerHTML = JSON.parse(cachedData)[0].author; + return; + } + } + + // Cache is expired or doesn't exist, fetch new data + fetchQuotes(); + + cachedData = localStorage.getItem(cacheKey); + console.log('Using cached data:', JSON.parse(cachedData)); + document.getElementById('text').innerHTML = JSON.parse(cachedData)[0].quote; +} + +// Call the function to get quotes +getCachedQuotes(); \ No newline at end of file diff --git a/assets/styles/contactPage.css b/assets/styles/contactPage.css index e9e20df..b8a3825 100644 --- a/assets/styles/contactPage.css +++ b/assets/styles/contactPage.css @@ -1,5 +1,5 @@ :root { - --bar-color: #4b0082; /* Indigo color for the navigation bar */ + --hover-color: #ffecb3; } body, html { @@ -35,6 +35,24 @@ body, html { transition: color 0.2s; } +button { + background-color: transparent; + border: none; +} + +.buttons { + width: 20px; + height: 20px; + margin-bottom: 10px; /* Adds space between the buttons */ +} + +button:hover { + transform: scale(1.10); +} + +a:hover { + color: var(--hover-color); +} .container { display: flex; @@ -54,10 +72,11 @@ body, html { } + .contact-card { display: flex; align-items: center; - width: 350px; + width: 370px; height: 250px; border-radius: 10px; background-color: rgba(217, 207, 222, 0.46); @@ -74,6 +93,8 @@ body, html { display: flex; flex-direction: column; justify-content: center; + margin-left: 10px; + margin-right: 10px; } #add-new-contact { @@ -148,3 +169,40 @@ input { from {background-position:0 0;} to {background-position:10000px 0;} } + + +.modal { + display: none; + position: fixed; + z-index: 3; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0,0,0); + background-color: rgba(0,0,0,0.4); +} + +.modal-content { + background-color: #fefefe; + margin: 15% auto; + border-radius: 20px; + padding: 20px; + border: 1px solid #888; + width: 80%; +} + +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: black; + text-decoration: none; + cursor: pointer; +} \ No newline at end of file diff --git a/assets/styles/homepage.css b/assets/styles/homepage.css index c7901d3..d1dc146 100644 --- a/assets/styles/homepage.css +++ b/assets/styles/homepage.css @@ -3,6 +3,7 @@ --content-color: #2c2c3d76; /* Darker content area */ --card-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white for cards */ --hover-color: #ffecb3; /* Light yellow for hover effects */ + --quote-color: #ffecb3 } /* ENTIRE PAGE SELECTORS */ @@ -52,9 +53,7 @@ body, html { /* MAIN SECTION SELECTORS */ #addProjButton { - position: fixed; - top: 90px; /* Adjust this value to position the button lower or higher */ - left: 20px; /* Adjust this value to position the button more to the right or left */ + position: relative; color: white; /* Button text color */ border: none; font-size: 36px; /* Increase the size of the plus sign */ @@ -62,11 +61,16 @@ body, html { cursor: pointer; background-color: transparent; /* Transparent background */ transition: background-color 0.3s; - z-index: 1000; /* Ensure it stays on top of other elements */ - display: flex; /* Center the plus sign */ - align-items: center; /* Center the plus sign */ - justify-content: center; /* Center the plus sign */ - line-height: 1; /* Adjust line height */ + z-index: 4; +} + +.add-project-card { + position: absolute; /* Positioning relative to nearest positioned ancestor */ + top: 0; + right: 0; + width: 30px; + height: 30px; + margin-right: 15px; } #addProjButton:hover { @@ -96,6 +100,13 @@ body, html { gap: 10px; } +.inspiration { + background-color: var(--quote-color); + padding-left: 20px; + padding-right: 20px; + border-radius: 10px; +} + .card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.3); transform: translateY(-5px); diff --git a/contactPage.html b/contactPage.html index e6d78f9..19260dc 100644 --- a/contactPage.html +++ b/contactPage.html @@ -49,14 +49,14 @@

Add Contact Information






@@ -66,6 +66,15 @@

Add Contact Information

+ + + \ No newline at end of file diff --git a/index.html b/index.html index 8fd6c0f..501e131 100644 --- a/index.html +++ b/index.html @@ -47,13 +47,12 @@ @@ -105,6 +104,8 @@

Task Manager

+ +