updated css
This commit is contained in:
1 parent
e487d6d3a2
commit
04a3aff5d1
4 files changed
+67
-72
No files matched your search
+18
-12
@@ -9,15 +9,18 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardicon>img {
|
.cardicon > img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
position: absolute;
|
/* position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
right:10px;
|
right: 10px; */
|
||||||
|
position: relative;
|
||||||
|
/* top: 10px; */
|
||||||
|
/* right: 10px; */
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -28,7 +31,7 @@
|
|||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card>.text>.mail {
|
.card > .text > .mail {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
@@ -37,14 +40,14 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card>.text>.username {
|
.card > .text > .username {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card>.text>.mail::after {
|
.card > .text > .mail::after {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@@ -55,7 +58,7 @@
|
|||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card>.text>h2::after {
|
.card > .text > h2::after {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@@ -66,7 +69,7 @@
|
|||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card>.text {
|
.card > .text {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 30px;
|
bottom: 30px;
|
||||||
@@ -81,26 +84,29 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card:hover {
|
.card:hover {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover>.cardicon {
|
.card:hover > .cardicon {
|
||||||
top: 30px;
|
top: 30px;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card>.text>.username:hover::after {
|
.card > .text > .username:hover::after {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card>.text>.mail:hover::after {
|
.card > .text > .mail:hover::after {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card:hover>.text {
|
.card:hover > .text {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-31
@@ -4,38 +4,16 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 10px 70px 10px 10px;
|
padding: 10px;
|
||||||
|
/* padding: 10px 70px 10px 10px; */
|
||||||
|
background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
/* width: 100%; */
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-shadow: white 0 0 30px;
|
text-shadow: white 0 0 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.usericon {
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 100%;
|
|
||||||
transition: 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.usericon > img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.username {
|
|
||||||
text-shadow: white 0 0 30px;
|
|
||||||
margin: 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
@@ -48,12 +26,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
.usericon:hover {
|
|
||||||
border-radius: 10px;
|
|
||||||
transform: translateY(-10px);
|
|
||||||
box-shadow: white 0 0 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.time:hover {
|
.time:hover {
|
||||||
text-shadow: white 0 0 20px;
|
text-shadow: white 0 0 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<h1 class="header-text">Dashboard</h1>
|
<h1 class="header-text">Dashboard</h1>
|
||||||
<h1 class="time"></h1>
|
<h1 class="time"></h1>
|
||||||
<div class="user">
|
<div style="width: 60px; height: 60px; position: relative">
|
||||||
<div class="card" tabindex="0">
|
<div class="card" tabindex="0">
|
||||||
<span class="cardicon">
|
<span class="cardicon">
|
||||||
<img src="img/user.jpeg" alt="" />
|
<img src="img/user.jpeg" alt="" />
|
||||||
|
|||||||
+45
-28
@@ -1,38 +1,55 @@
|
|||||||
const timeblock = document.querySelector('.time')
|
const timeblock = document.querySelector(".time");
|
||||||
|
|
||||||
let intervalid = true
|
let intervalid = true;
|
||||||
|
|
||||||
|
const renderTime = () => {
|
||||||
|
intervalid
|
||||||
|
? (timeblock.innerHTML = getTimeNow())
|
||||||
|
: (timeblock.innerHTML = [getDateNow(), getWeekDayNow()].join(" "));
|
||||||
|
};
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
intervalid?timeblock.innerHTML = getTimeNow():timeblock.innerHTML = [getDateNow(), getWeekDayNow()].join(' ')
|
renderTime();
|
||||||
}, 1000)
|
}, 1000);
|
||||||
|
|
||||||
const getTimeNow = () => {
|
const getTimeNow = () => {
|
||||||
let date = new Date()
|
let date = new Date();
|
||||||
let hours = date.getHours()
|
let hours = date.getHours();
|
||||||
if (hours < 10) hours = '0'+hours
|
if (hours < 10) hours = "0" + hours;
|
||||||
let minutes = date.getMinutes()
|
let minutes = date.getMinutes();
|
||||||
if (minutes < 10) minutes = '0'+minutes
|
if (minutes < 10) minutes = "0" + minutes;
|
||||||
let seconds = date.getSeconds()
|
let seconds = date.getSeconds();
|
||||||
if (seconds < 10) seconds = '0'+seconds
|
if (seconds < 10) seconds = "0" + seconds;
|
||||||
return [hours, minutes, seconds].join(':')
|
return [hours, minutes, seconds].join(":");
|
||||||
}
|
};
|
||||||
|
|
||||||
const getDateNow = () => {
|
const getDateNow = () => {
|
||||||
let date = new Date()
|
let date = new Date();
|
||||||
let year = date.getFullYear()
|
let year = date.getFullYear();
|
||||||
let month = date.getMonth()
|
let month = date.getMonth();
|
||||||
if (month < 10) month = '0'+month
|
if (month < 10) month = "0" + month;
|
||||||
let day = date.getDate()
|
let day = date.getDate();
|
||||||
if (day < 10) day = '0'+day
|
if (day < 10) day = "0" + day;
|
||||||
return [day, month, year].join('.')
|
return [day, month, year].join(".");
|
||||||
}
|
};
|
||||||
|
|
||||||
const getWeekDayNow = () => {
|
const getWeekDayNow = () => {
|
||||||
let date = new Date()
|
let date = new Date();
|
||||||
let weekdays = ['monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
|
let weekdays = [
|
||||||
return weekdays[date.getDay()-1]
|
"monday",
|
||||||
}
|
"Tuesday",
|
||||||
|
"Wednesday",
|
||||||
|
"Thursday",
|
||||||
|
"Friday",
|
||||||
|
"Saturday",
|
||||||
|
"Sunday",
|
||||||
|
];
|
||||||
|
return weekdays[date.getDay() - 1];
|
||||||
|
};
|
||||||
|
|
||||||
timeblock.addEventListener('click', () => {
|
timeblock.addEventListener("click", () => {
|
||||||
intervalid = !intervalid
|
intervalid = !intervalid;
|
||||||
})
|
renderTime();
|
||||||
|
});
|
||||||
|
|
||||||
|
renderTime();
|
||||||
Reference in new issue
Block a user