1818 class =" download-button"
1919 title =" Download the generated code as a zip file"
2020 >
21- Download
2221 <IconDownload />
22+ <span class =" icon-text" >Download</span >
2323 </button >
2424 <a
2525 class =" external-links"
2828 rel =" noopener noreferrer"
2929 >
3030 <IconGitHub />
31+ <span class =" icon-text" >GitHub</span >
3132 </a >
3233 <a
3334 class =" external-links"
3637 rel =" noopener noreferrer"
3738 >
3839 <IconTwitter />
40+ <span class =" icon-text" >Twitter</span >
3941 </a >
4042 <a
4143 class =" external-links"
4446 rel =" noopener noreferrer"
4547 >
4648 <IconDiscord />
49+ <span class =" icon-text" >Discord</span >
4750 </a >
4851 </div >
52+ <div
53+ class =" download-success"
54+ v-show =" showDownloadMsg"
55+ @click =" showDownloadMsg = false"
56+ >
57+ <div class =" msg-wrapper" >
58+ <div class =" msg" >
59+ <h2 >🎉 Your Training Script Generated! 🎉</h2 >
60+ <p >
61+ Thanks for using Code-Generator! Feel free to reach out to us on
62+ <a
63+ class =" external-links msg-gh"
64+ href =" https://github.com/pytorch-ignite/code-generator"
65+ target =" _blank"
66+ rel =" noopener noreferrer"
67+ >
68+ GitHub </a
69+ >with any feedback, bug report, and feature request.
70+ </p >
71+ </div >
72+ </div >
73+ </div >
4974 </nav >
5075</template >
5176
@@ -58,11 +83,13 @@ import IconDiscord from './IconDiscord.vue'
5883import IconDownload from ' ./IconDownload.vue'
5984import IconGitHub from ' ./IconGitHub.vue'
6085import IconTwitter from ' ./IconTwitter.vue'
86+ import { ref } from ' vue'
6187
6288export default {
6389 components: { IconDiscord, IconDownload, IconGitHub, IconTwitter },
6490 setup () {
6591 let zip = new JSZip ()
92+ const showDownloadMsg = ref (false )
6693
6794 const downloadProject = () => {
6895 for (const filename in store .code ) {
@@ -71,9 +98,10 @@ export default {
7198 zip .generateAsync ({ type: ' blob' }).then ((content ) => {
7299 saveAs (content, ' ignite-project.zip' )
73100 })
101+ showDownloadMsg .value = true
74102 }
75103
76- return { version, downloadProject }
104+ return { version, downloadProject, showDownloadMsg }
77105 }
78106}
79107 </script >
@@ -95,6 +123,10 @@ h1 img {
95123.external-links {
96124 margin : 0 0.5rem ;
97125 font-size : var (--font-size );
126+ border-bottom : 2px solid transparent ;
127+ }
128+ .external-links :hover {
129+ border-bottom : 2px solid var (--c-brand-red );
98130}
99131.nav-bar {
100132 display : flex ;
@@ -123,11 +155,43 @@ h1 img {
123155 cursor : pointer ;
124156 font-family : var (--font-family-base );
125157 font-size : var (--font-size );
158+ padding-top : 0 ;
159+ padding-bottom : 0 ;
126160}
127- .iconify {
161+ .icons {
128162 vertical-align : middle ;
129163 position : relative ;
130- top : -3px ;
164+ top : -1px ;
165+ }
166+ .download-success {
167+ position : fixed ;
168+ top : 0 ;
169+ left : 0 ;
170+ background-color : rgba (101 , 110 , 133 , 0.8 );
171+ z-index : 10 ;
172+ width : 100vw ;
173+ height : 100vh ;
174+ }
175+ .msg-wrapper {
176+ display : block ;
177+ max-width : 38rem ;
178+ margin : 20vh auto 0 ;
179+ text-align : center ;
180+ padding : 0 1rem ;
181+ }
182+ .msg {
183+ padding : 2rem 1rem ;
184+ background-color : var (--c-white-light );
185+ color : var (--c-text );
186+ border-radius : 8px ;
187+ box-shadow : 0 0 5px 5px rgba (0 , 0 , 0 , 0.33 );
188+ }
189+ .msg-gh {
190+ margin : 0 ;
191+ color : var (--c-brand-red );
192+ }
193+ .icon-text {
194+ margin-left : 0.5rem ;
131195}
132196/* media queries */
133197@media (max-width : 768px ) {
@@ -137,9 +201,12 @@ h1 img {
137201 }
138202 .nav-bar {
139203 position : fixed ;
140- z-index : 11 ;
204+ z-index : 6 ;
141205 width : 100% ;
142206 background-color : var (--c-white );
143207 }
208+ .icon-text {
209+ display : none ;
210+ }
144211}
145212 </style >
0 commit comments