File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 2929 ] ,
3030 "url" : "https://hariprashad-ravikumar.github.io"
3131}
32+ </ script >
33+ < script >
34+ // Function to update the date based on the last modified date of the PDF file
35+ window . onload = function ( ) {
36+ const pdfFilePath = 'cv/CV_HARI.pdf' ;
37+ const dateText = document . getElementById ( 'cv-date-text' ) ;
38+
39+ fetch ( pdfFilePath , { method : 'HEAD' } )
40+ . then ( response => {
41+ const lastModified = response . headers . get ( 'last-modified' ) ;
42+ if ( lastModified ) {
43+ const date = new Date ( lastModified ) ;
44+ const options = { year : 'numeric' , month : 'long' } ;
45+ const formattedDate = date . toLocaleDateString ( 'en-US' , options ) ;
46+ dateText . textContent = formattedDate ;
47+ }
48+ } )
49+ . catch ( error => {
50+ console . error ( "Error fetching PDF file:" , error ) ;
51+ } ) ;
52+
53+ // Toggle info box visibility
54+ const infoIcon = document . getElementById ( 'info-icon' ) ;
55+ const infoBox = document . getElementById ( 'info-box' ) ;
56+ const closeInfoBtn = document . getElementById ( 'close-info' ) ;
57+
58+ infoIcon . onclick = function ( ) {
59+ infoBox . style . display = infoBox . style . display === 'block' ? 'none' : 'block' ;
60+ } ;
61+
62+ closeInfoBtn . onclick = function ( ) {
63+ infoBox . style . display = 'none' ;
64+ } ;
65+ } ;
3266</ script >
3367
3468 < script type ="text/x-mathjax-config ">
You can’t perform that action at this time.
0 commit comments