refactor: change popup visual

This commit is contained in:
john-emerson14
2020-03-23 02:25:38 -03:00
parent 85a6da065d
commit f143b7da6d
2 changed files with 37 additions and 24 deletions

View File

@@ -17,8 +17,8 @@
<div id="stars3"></div> <div id="stars3"></div>
</section> </section>
<a href="#popup"> <a id="profilePicture" href="#popup">
<img id="profilePicture" src="https://avatars0.githubusercontent.com/u/43749971" alt="Profile Picture"> <img src="https://avatars0.githubusercontent.com/u/43749971" alt="Profile Picture">
</a> </a>
<div class="overlay" id="popup"> <div class="overlay" id="popup">
@@ -27,14 +27,14 @@
<img src="https://avatars0.githubusercontent.com/u/43749971" alt="Profile Picture"> <img src="https://avatars0.githubusercontent.com/u/43749971" alt="Profile Picture">
</div> </div>
<div class="popup-text"> <!-- <div class="popup-text">
<h1> <h1>
John Emerson John Emerson
</h1> </h1>
<p> <p>
But... the sensation that I've lost something lingers for a longtime after I wake up. But... the sensation that I've lost something lingers for a longtime after I wake up.
</p> </p>
</div> </div> -->
<a class="popup-close" onclick="history.back()">&times;</a> <a class="popup-close" onclick="history.back()">&times;</a>
</div> </div>

View File

@@ -2,6 +2,7 @@
:root { :root {
--bgColor: #223344; --bgColor: #223344;
--bgColor2: #090a0f;
--accentColor: #E6E6E6; --accentColor: #E6E6E6;
--font: 'Karla', sans-serif; --font: 'Karla', sans-serif;
--delay: .3s; --delay: .3s;
@@ -11,19 +12,21 @@ body {
margin: 0; margin: 0;
padding: 0; padding: 0;
min-height: 100vh; min-height: 100vh;
background: radial-gradient(ellipse at bottom, var(--bgColor) 0%, #090a0f 100%); font-family: var(--font);
background: radial-gradient(ellipse at bottom, var(--bgColor) 0%, var(--bgColor2) 100%);
opacity: 0; opacity: 0;
animation: 1s ease-out var(--delay) 1 transitionAnimation; /* duration/timing-function/delay/iterations/name */ animation: 1s ease-out var(--delay) 1 transitionAnimation; /* duration/timing-function/delay/iterations/name */
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
#profilePicture { #profilePicture, #profilePicture img {
position: relative; position: relative;
width: 96px; width: 96px;
height: 96px; height: 96px;
display: block; display: block;
margin: 35px auto 20px; margin: 35px auto 20px;
border-radius: 50%; border-radius: 50%;
-webkit-tap-highlight-color: transparent;
} }
#userName { #userName {
@@ -47,7 +50,6 @@ body {
.link { .link {
position: relative; position: relative;
font-family: var(--font);
background-color: transparent; background-color: transparent;
color: var(--accentColor); color: var(--accentColor);
border: solid var(--accentColor) 2px; border: solid var(--accentColor) 2px;
@@ -152,11 +154,13 @@ body {
/* top: -100vw; */ /* top: -100vw; */
/* right: -100vh; */ /* right: -100vh; */
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
max-width: 800px; max-width: 500px;
max-height: 599px; max-height: 500px;
width: 59%; width: auto;
height: 80%; height: auto;
margin: 64px;
background-color: var(--accentColor); background-color: var(--accentColor);
/* transform: rotate(32deg); */ /* transform: rotate(32deg); */
transform: scale(0); transform: scale(0);
@@ -165,15 +169,12 @@ body {
.popup-photo { .popup-photo {
display: flex; display: flex;
justify-content: flex-end; width: 100%;
align-content: flex-end;
width: 40%;
height: 100%; height: 100%;
overflow: hidden;
} }
.popup-photo img { .popup-photo img {
width: auto; width: 100%;
height: 100%; height: 100%;
} }
@@ -181,22 +182,21 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
width: 59%; width: 80%;
height: 100%; height: 100%;
padding: 4rem;
} }
.popup-text h1 { .popup-text h1 {
font-size: 2rem; font-size: 2rem;
font-weight: 599; font-weight: bold;
margin-bottom: 2rem; margin-bottom: 2rem;
text-transform: uppercase; text-transform: uppercase;
color: black; color: var(--bgColor2);
} }
.popup-text p { .popup-text p {
font-size: 0.8rem; font-size: 0.8rem;
color: black; color: var(--bgColor2);
line-height: 1.5; line-height: 1.5;
} }
@@ -218,16 +218,29 @@ body {
top: -1rem; top: -1rem;
width: 3rem; width: 3rem;
height: 3rem; height: 3rem;
font-size: 0.8rem; font-size: 1.7rem;
font-weight: 400; font-weight: 400;
border-radius: 100%; border-radius: 100%;
background-color: black; background-color: var(--bgColor);
z-index: 4; z-index: 4;
color: white; color: var(--accentColor);
line-height: 3rem; line-height: 3rem;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
text-decoration: none; text-decoration: none;
-webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
.popup-close:hover {
background-color: var(--accentColor);
color: var(--bgColor);
}
}
.popup-close:active {
background-color: var(--accentColor);
color: var(--bgColor);
} }