File tree Expand file tree Collapse file tree 3 files changed +27
-10
lines changed
features/components/ExploreMore Expand file tree Collapse file tree 3 files changed +27
-10
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,17 @@ const ContactData = {
39
39
40
40
const InfoData = {
41
41
paragraphHeader : [
42
- "Hi, i am Quyet by name - here is something about me ✌️. "
42
+ "Hi, my name is Quyet and here's a little bit about me! ✌️"
43
43
] ,
44
44
paragraphBody : [
45
- `🍀 I am a Python Developer, with ${ getWorkingTimes ( ) } in Web Development` ,
46
- "🍀 I love computer, technology and animals" ,
47
- "🍀 Currently, DevOps is my main field" ,
48
- "Always and always welcome new kind friends!" ,
45
+ `🍀 I have ${ getWorkingTimes ( ) } of experience in web development.` ,
46
+ "🍀 I love computer, technology and animals." ,
47
+ "🍀 Currently, I'm focused on DevOps as my primary field." ,
49
48
] ,
50
49
paragraphFooter : [
51
- "Welcome to come here with me ♥️" ,
52
- "Hope you have a nice day ♥️"
50
+ "I'm always happy to make new friends!" ,
51
+ "Please feel free to reach out to me. ♥️" ,
52
+ "Wishing you a wonderful day! ♥️" ,
53
53
]
54
54
} ;
55
55
Original file line number Diff line number Diff line change @@ -119,6 +119,21 @@ export function getWeekNumber(): number {
119
119
return week_number
120
120
}
121
121
122
+ // count the number of day in current year at this time
123
+ export function getDayNumber ( ) : number {
124
+ let currentDate : any = new Date ( ) ;
125
+ let currentYear : any = currentDate . getFullYear ( ) ;
126
+ let firstDayOfYear : any = new Date ( currentYear , 0 , 1 ) ;
127
+ return Math . ceil ( ( currentDate - firstDayOfYear ) / ( 1000 * 60 * 60 * 24 ) ) ;
128
+ }
129
+
130
+ // count number of all the days in current year
131
+ export function getDaysOfYear ( ) : number {
132
+ let today = new Date ( ) ;
133
+ let currentYear = today . getFullYear ( ) ;
134
+ return ( currentYear % 4 === 0 ) ? 366 : 365 ;
135
+ }
136
+
122
137
/**
123
138
* when user click outside of the header,
124
139
* close the header popup
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import { getWeekNumber } from '../../../common/function/functions'
2
+ import { getWeekNumber , getDayNumber , getDaysOfYear } from '../../../common/function/functions'
3
3
import './ExploreMore.scss'
4
4
5
5
import ProgressBar from "@ramonak/react-progress-bar" ;
6
6
7
7
function ExploreMore ( ) {
8
- const week_str = `Current week: ${ getWeekNumber ( ) } / 52`
9
- const percent = Math . floor ( getWeekNumber ( ) / 52 * 100 )
8
+ const week_str = `Current week: ${ getWeekNumber ( ) } / 52`
9
+ const day_str = `Current day: ${ getDayNumber ( ) } / ${ getDaysOfYear ( ) } `
10
+ const percent = Math . floor ( getDayNumber ( ) / getDaysOfYear ( ) * 100 )
10
11
return ( < >
11
12
< div className = 'weekly-progress' >
12
13
< span > { week_str } </ span >
14
+ < span > { day_str } </ span >
13
15
< ProgressBar
14
16
completed = { percent }
15
17
labelSize = { "10px" }
You can’t perform that action at this time.
0 commit comments