diff --git a/app/static/css/profile.css b/app/static/css/profile.css index 8fde9fe..c71538d 100644 --- a/app/static/css/profile.css +++ b/app/static/css/profile.css @@ -56,6 +56,7 @@ display: flex; margin-top: -50px; margin-bottom: 10px; + flex-wrap: wrap; } .profile-info-heading { @@ -66,6 +67,20 @@ text-transform: uppercase; } +.edit-follow-button { + align-self: center; + margin-left: auto; + margin-top: 10px +} + +@media (max-width: 600px) { + .edit-follow-button { + margin-left: 16px; + margin-right: 100px; + margin-top: 16px; + } +} + .profile-details { margin-top: 65px; margin-left: 20px; @@ -135,7 +150,6 @@ .prof-flex { flex-direction: column; } - .prof-flex .file-buttons { margin-left: 0; } @@ -144,117 +158,118 @@ /*================================================== Entire Custom Tag ==================================================*/ + .tag-container { -position: relative; -width: 100%; -display: inline-grid; -grid-template-rows: auto 10px; -grid-template-areas: "input" "dropdown"; + position: relative; + width: 100%; + display: inline-grid; + grid-template-rows: auto 10px; + grid-template-areas: "input" "dropdown"; } /*================================================== Custom Tag Input + Chosen Item Display ==================================================*/ -.tag-field { -border: 1px solid #eeeeee; -border-radius: 4px; -display: flex; -flex-wrap: wrap; -padding: .25rem 0.75rem; -min-height: 1rem; -overflow-x: hidden; -flex-grow: 1; -transition: 0.25s; +.tag-field { + border: 1px solid #ddd; + border-radius: 4px; + display: flex; + flex-wrap: wrap; + padding: .25rem 0.75rem; + min-height: 1rem; + overflow-x: hidden; + flex-grow: 1; + transition: 0.25s; } .tag-field-focus { -border: #5aa3cf solid 1px; -box-shadow: 0px 0px 0px 3px #b1ddf8; + border: #5aa3cf solid 1px; + box-shadow: 0px 0px 0px 3px #b1ddf8; } .tag-input { -width: 2rem !important; -max-width: 100% !important; -flex-grow: 1 !important; -border: none !important; -box-shadow: none !important; -color: #505050 !important; -font-weight: 700 !important; -font-family: Poppins, sans-serif !important; -font-size: 1em !important; + width: 2rem !important; + max-width: 100% !important; + flex-grow: 1 !important; + border: none !important; + box-shadow: none !important; + color: #5a5a5a !important; + font-weight: 700 !important; + font-family: Poppins, sans-serif !important; + font-size: 1em !important; } .tag-input:focus { -outline: none !important; + outline: none !important; } /*================================================== Custom Tag Input Prediction Dropdown ==================================================*/ -.tag-dropdown { -position: absolute; -min-height: 1.5rem; -box-sizing: border-box; -width: 100%; -margin-top: -4px; -z-index: 2; -display: none; -grid-area: dropdown; -transition: box-shadow 0.25s; +.tag-dropdown { + position: absolute; + min-height: 1.5rem; + box-sizing: border-box; + width: 100%; + margin-top: -4px; + z-index: 2; + display: none; + grid-area: dropdown; + transition: box-shadow 0.25s; } .tag-field-focus+.tag-dropdown-focus { -background-color: white; -border: #5aa3cf solid 1px; -border-top: 1px solid #eeeeee; -box-shadow: 0px 3px 0px 0px #b1ddf8, 1px 2px 0 2px #b1ddf8, -1px 2px 0 2px #b1ddf8; -border-radius: 0 0 4px 4px; -display: block; + background-color: white; + border: #5aa3cf solid 1px; + border-top: 1px solid #eeeeee; + box-shadow: 0px 3px 0px 0px #b1ddf8, 1px 2px 0 2px #b1ddf8, -1px 2px 0 2px #b1ddf8; + border-radius: 0 0 4px 4px; + display: block; } .dropdown-item { -line-height: 3rem; -padding-left: 0.5rem; -background-color: white; -cursor: pointer; -color: #505050; -font-weight: 700; -font-family: Poppins, sans-serif; -font-size: 1em; + line-height: 3rem; + padding-left: 0.5rem; + background-color: white; + cursor: pointer; + color: #505050; + font-weight: 700; + font-family: Poppins, sans-serif; + font-size: 1em; } .dropdown-item:last-child { -border-radius: 0 0 2.5px 2.5px; + border-radius: 0 0 2.5px 2.5px; } -.dropdown-item:hover, -.dropdown-item:focus { -outline: none; -background-color: #5aa3cf; -color: white; +.dropdown-item:hover, .dropdown-item:focus { + outline: none; + background-color: #5aa3cf; + color: white; } /*================================================== Custom Tag Input Chosen Items ==================================================*/ + .chosen-item { -margin: 0.2rem 0.2rem; -padding: 0 0.75rem; -background-color: #e2eefc; -border-radius: 2rem; -display: inline-flex; -align-items: center; -color: #505050; -font-weight: 700; -font-family: Poppins, sans-serif; -font-size: 1em; + margin: 0.2rem 0.2rem; + padding: 0 0.75rem; + background-color: #e2eefc; + border-radius: 2rem; + display: inline-flex; + align-items: center; + color: #505050; + font-weight: 700; + font-family: Poppins, sans-serif; + font-size: 1em; } .delete-button { -height: 16px; -width: 16px; -margin-left: 0.5rem; -cursor: pointer; -} + height: 16px; + width: 16px; + margin-left: 0.5rem; + cursor: pointer; +} \ No newline at end of file diff --git a/app/static/css/style.css b/app/static/css/style.css index 0d2284e..c9898d6 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -292,12 +292,33 @@ input:focus { footer { background-color: var(--grey-dark); margin-top: 0; + overflow-x: hidden; } .footer-title-par { font-size: 1.5rem; } +.main-footer { + display: grid; + grid-template-columns: auto auto auto; + grid-template-areas: "brand navigation more"; +} + +@media (max-width: 600px) { + .main-footer { + display: grid; + grid-template-columns: auto auto; + grid-template-rows: auto auto; + grid-template-areas: "navigation more" "brand brand"; + margin-left: 1rem; + } + + #footer-brand { + margin-top: 3rem; + } +} + .reverse { display: flex; flex-direction: column-reverse; diff --git a/app/static/js/base.js b/app/static/js/base.js index 953b66f..e932e84 100644 --- a/app/static/js/base.js +++ b/app/static/js/base.js @@ -291,7 +291,7 @@ if (slideshow) { const localstore = window.localStorage; function betaLaunch(login) { - if (!localstore.getItem("launch-modal") && new Date() <= Date.parse('22 May 2021 00:00:00 EST')) { + if (!localstore.getItem("launch-modal") && new Date() <= Date.parse('18 June 2021 00:00:00 EST')) { window.location.hash = "launch-modal-0"; localstore.setItem("launch-modal", true); } else { diff --git a/app/static/js/taginput.js b/app/static/js/taginput.js index cadd04d..b55a494 100644 --- a/app/static/js/taginput.js +++ b/app/static/js/taginput.js @@ -27,31 +27,32 @@ function generateTagInputs() { } }); - console.log(dictionary) - - Array.from(field.options).map(opt => commonChoices.push(opt.value)); + const chosenChoices = []; + [...field.options].map(opt => { + if (!chosenChoices.includes(opt.innerHTML) && opt.selected) { + chosenChoices.push(opt.innerHTML); + } + }); //Renders custom tag input with given props in place of input field.outerHTML = `
-
` + renderList(chosenChoices, id); + document.querySelector(`[data-tags-display="${id}"]`).innerHTML += ` + + ` + changeSelectValue(chosenChoices, id); } } -//Delete button for tags -const deleteButton = - ` - - ` - //Implements field interactions const tagFields = document.getElementsByClassName("tag-field"); for (let i = 0; i < tagFields.length; i++) { @@ -509,6 +510,12 @@ function inputFocus(e, state) { //Renders chosen items list into the tag field function renderList(list, tagId) { + //Delete button for tags + const deleteButton = + ` + + ` + //Records chosen items list const tagDisplay = document.querySelector(`[data-tags-display="${tagId}"]`); @@ -532,15 +539,20 @@ function renderList(list, tagId) { function changeSelectValue(list, tagId) { //Records chosen items list const tagData = document.getElementById(tagId); + tagData.innerHTML = ""; //Checks if list exists if (list && list.length) { - tagData.innerHTML = ""; + + //Add option to list for (let i = 0; i < list.length; i++) { - tagData.innerHTML += ``; + tagData.innerHTML += ``; + } + + //Selects all options in list + for (var i = 0; i < tagData.options.length; i++) { + tagData.options[i].selected = true; } - } else { - tagData.innerHTML = ""; } } diff --git a/app/templates/base.html b/app/templates/base.html index c80eab0..6a531e8 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -91,13 +91,13 @@