Skip to content

Commit 15917bf

Browse files
committed
[ADD] a simple page to handle job titles
1 parent 7eb105a commit 15917bf

File tree

2,155 files changed

+186365
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,155 files changed

+186365
-2
lines changed

core/static/core/base.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.circle-red {
2+
border: 6px solid red;
3+
border-radius: 50%;
4+
height: 10px;
5+
width: 10px;
6+
}
7+
8+
.circle-green {
9+
border: 6px solid #1e911a;
10+
border-radius: 50%;
11+
height: 10px;
12+
width: 10px;
13+
}
14+
15+
.fa-slow-spin {
16+
-webkit-animation: fa-spin 3s infinite linear;
17+
animation: fa-spin 3s infinite linear;
18+
}
19+
20+
.fa-slower-spin {
21+
-webkit-animation: fa-spin 6s infinite linear;
22+
animation: fa-spin 6s infinite linear;
23+
}

core/static/core/base.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function intComma(value) {
2+
return value.toString().split(/(?=(?:...)*$)/)
3+
}
4+
5+
function intSpaceCardNumber(value) {
6+
return value.toString().split(/(?=(?:....)*$)/).toString().replaceAll(",", " ")
7+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.loader {
2+
border: 0 solid #f3f3f3;
3+
border-radius: 50%;
4+
width: 60px;
5+
height: 60px;
6+
-webkit-animation: spin 2s linear infinite; /* Safari */
7+
animation: spin 2s linear infinite;
8+
}
9+
10+
.timer-background {
11+
background-color: #ffffff;
12+
}
13+
14+
.timer-container {
15+
position: relative;
16+
display: flex;
17+
justify-content: center;
18+
align-items: center;
19+
height: 65px;
20+
direction: ltr;
21+
}
22+
23+
.timer {
24+
position: absolute;
25+
top: 50%;
26+
left: 50%;
27+
transform: translate(-50%, -50%);
28+
font-size: 14px;
29+
color: #3498db;
30+
}
31+
32+
.timer.info {
33+
color: #3498db;
34+
}
35+
.timer.warning {
36+
color: #bea021;
37+
}
38+
.timer.error {
39+
color: #ff4757;
40+
}
41+
42+
.loader.info {
43+
border-top: 2px solid #3498db;
44+
}
45+
.loader.warning {
46+
border-top: 2px solid #bea021;
47+
}
48+
.loader.error {
49+
border-top: 2px solid #ff4757;
50+
}
51+
52+
@-webkit-keyframes spin {
53+
0% { -webkit-transform: rotate(0deg); }
54+
100% { -webkit-transform: rotate(30deg); }
55+
}
56+
57+
@keyframes spin {
58+
0% { transform: rotate(0deg); }
59+
100% { transform: rotate(360deg); }
60+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
function hasTime(endDatetime) {
2+
let endDate = new Date(endDatetime)
3+
let now = new Date()
4+
let remained = endDate - now
5+
return remained > 0
6+
}
7+
8+
function formatTimer(endDatetime, startDatetime=null) {
9+
let endDate = new Date(endDatetime)
10+
let now = new Date()
11+
let remained = endDate - now
12+
remained = parseInt(remained / 1000)
13+
14+
let minutes = parseInt(remained / 60)
15+
let seconds = remained - minutes * 60
16+
17+
minutes = Math.abs(minutes).toString()
18+
seconds = Math.abs(seconds).toString()
19+
20+
if (minutes.length === 1)
21+
minutes = "0" + minutes
22+
23+
if (seconds.length === 1)
24+
seconds = "0" + seconds
25+
26+
let time = `${minutes}:${seconds}`
27+
28+
if (remained < 0)
29+
time = "-" + time
30+
31+
let passedTimePercent = 0;
32+
if (startDatetime) {
33+
let startDate = new Date(startDatetime)
34+
let passedTime = now - startDate
35+
let totalTime = endDate - startDate
36+
37+
passedTimePercent = (passedTime / totalTime) * 100
38+
}
39+
40+
return [time, passedTimePercent];
41+
42+
}
43+
44+
45+
function countDown(timer, loader, endDatetime, startDatetime =null) {
46+
const timerObject = document.querySelector(timer)
47+
const loaderObject = document.querySelector(loader)
48+
49+
let interval = setInterval(
50+
() => {
51+
let [remainedTime, passedTimePercent] = formatTimer(endDatetime, startDatetime)
52+
53+
if (passedTimePercent >= 50 && passedTimePercent < 80) {
54+
timerObject.classList.replace("info", "warning")
55+
loaderObject.classList.replace("info", "warning")
56+
}
57+
else if (passedTimePercent >= 80) {
58+
timerObject.classList.replace("info", "error")
59+
timerObject.classList.replace("warning", "error")
60+
loaderObject.classList.replace("info", "error")
61+
loaderObject.classList.replace("warning", "error")
62+
}
63+
64+
if (hasTime(endDatetime)) {
65+
timerObject.textContent = remainedTime
66+
} else {
67+
timerObject.textContent = "00:00"
68+
clearInterval(interval)
69+
window.location.reload();
70+
}
71+
72+
},
73+
1000
74+
)
75+
76+
}

core/static/core/fonts.css

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@font-face {
2+
font-family: Poppins-Medium;
3+
src: url('./fonts/poppins/Poppins-Medium.ttf');
4+
font-display: swap;
5+
}
6+
7+
@font-face {
8+
font-family: Poppins-Bold;
9+
src: url('./fonts/poppins/Poppins-Bold.ttf');
10+
font-display: swap;
11+
}
12+
13+
@font-face {
14+
font-family: Poppins-SemiBold;
15+
src: url('./fonts/poppins/Poppins-SemiBold.ttf');
16+
font-display: swap;
17+
}
18+
19+
@font-face {
20+
font-family: IRANSans-Regular;
21+
src: url("./fonts/IranSans/IRANSansWeb_Medium.ttf");
22+
font-display: swap;
23+
}
24+
25+
@font-face {
26+
font-family: IRANSans-Bold;
27+
src: url("./fonts/IranSans/IRANSansWeb_Bold.ttf");
28+
font-display: swap;
29+
}
30+
31+
.font-sans {
32+
font-family: IRANSans-Bold, Poppins-Bold, Arial, serif;
33+
}
57.3 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)