File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,14 +132,7 @@ <h1 class="highlight">Guilherme Amaral</h1>
132132 </p>
133133 -->
134134
135- < button type ="application/pdf " class ="btn-cv " id ="abrir-modal ">
136- < i class ="fa-solid fa-cloud-arrow-down ">
137- < a href ="./GUILHERME-AMARAL-DEV.pdf " download ="GUILHERME-AMARAL-DEV.pdf "> </ a >
138- </ i >
139- < span class ="cv-letra " title ="Botão para baixar o currículo em pdf ">
140- Download CV
141- </ span >
142- </ button >
135+ < div id ="downloadCvBtn "> </ div >
143136 < div id ="divModal "> </ div >
144137 </ article >
145138 </ section >
Original file line number Diff line number Diff line change @@ -19,31 +19,36 @@ import { scrollSmooth } from '../utils/scrollSmooth';
1919import { TextTyper } from '../utils/TextTyper' ;
2020import { LoaderModel } from './LoaderModel' ;
2121import { NavBarModel } from './NavBarModel' ;
22+ import { DownloadCV } from '../views/DownloadCv' ;
2223
2324export class Model {
2425 public render ( ) : void {
2526 const element : HTMLElement | null = document . querySelector ( '#digit' ) ;
2627 const text = 'Desenvolvedor web Full Stack.' ;
2728 const interval = 100 ;
2829
30+ const progress = new Progress ( ) ;
31+ const nav = new NavBarModel ( ) ;
32+ const downloadCV = new DownloadCV ( ) ;
33+ const typer = new TextTyper ( ) ;
34+
2935 LoaderModel . onLoad ( ) ;
3036
3137 title ( ) ;
3238
33- const progress = new Progress ( ) ;
3439 progress . scroll ( ) ;
3540
36- const nav = new NavBarModel ( ) ;
3741 nav . togleNav ( ) ;
3842 new ThemeSwitcher ( ) ;
3943
4044 scrollSmooth ( ) ;
4145
42- const typer = new TextTyper ( ) ;
4346 typer . start ( element , text , interval ) ;
4447
4548 // const modal: Modal = new Modal();
4649 // createModal();
4750 // modal.togleModal();
51+
52+ downloadCV . render ( ) ;
4853 }
4954}
Original file line number Diff line number Diff line change 1+ export class DownloadCV {
2+ private button : HTMLElement | null = document . querySelector ( '#downloadCvBtn' ) ;
3+ private fileUrl : string =
4+ 'https://drive.google.com/uc?export=download&id=1PujszdPae5ke5kBYWEQh3CXziPg05Sgn' ;
5+
6+ private download ( ) : void {
7+ const link = document . createElement ( 'a' ) ;
8+ link . href = this . fileUrl ;
9+ link . download = 'GUILHERME AMARAL - CV.pdf' ;
10+
11+ document . body . appendChild ( link ) ;
12+ link . click ( ) ;
13+ document . body . removeChild ( link ) ;
14+ }
15+
16+ public render ( ) : void {
17+ if ( this . button ) {
18+ this . button . innerHTML = `
19+ <button
20+ title="Botão para baixar o currículo em PDF"
21+ type="button"
22+ class="btn-cv"
23+ onclick="${ this . download ( ) } ">
24+ <i class="fa-solid fa-cloud-arrow-down"></i>
25+ <span class="cv-letra">Download CV</span>
26+ </button>
27+ ` ;
28+ }
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments