Skip to content

Commit 969109d

Browse files
aRealCyborgayushnagar123
authored andcommitted
Added UI to upload page and Link to upload page on home page (#46)
* Added the true first step I mean how else are you suppose to fork it with your username if you do not even fork it? * Added a much better UI to upload page title * Added link button to upload page Added link to upload page on home page for GCI task. * Add files via upload * Update README.md * made UI more clear changed bottom button from upload to submit template
1 parent 2b17c6e commit 969109d

File tree

3 files changed

+98
-7
lines changed

3 files changed

+98
-7
lines changed

src/assets/upload.svg

Lines changed: 3 additions & 0 deletions
Loading

src/views/HomeView.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<div>
1212
<v-btn @click="addOrganization">Add access to an Organization</v-btn>
1313
</div>
14+
<div class="mt-5 orgs">Upload Template</div>
15+
<v-btn @click="upload">Upload</v-btn>
1416
</div>
1517
<div v-if="isLoading">
1618
<img src="@/assets/loaders/block.svg" alt="loading..." />
@@ -39,6 +41,7 @@ export default {
3941
this.$store.dispatch("loadUserOrgs");
4042
},
4143
methods: {
44+
4245
addOrganization() {
4346
window.open(
4447
"https://github.com/settings/connections/applications/" +
@@ -48,7 +51,10 @@ export default {
4851
},
4952
newBadge() {
5053
window.location.href = "#/newbadge";
51-
}
54+
},
55+
upload() {
56+
window.location.href = "#/upload";
57+
},
5258
}
5359
};
5460
</script>

src/views/Upload.vue

Lines changed: 88 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,91 @@
11
<template>
22
<div>
3-
<form action="http://localhost:5000/api/upload" method="POST" enctype="multipart/form-data">
4-
<input type="file" name="temp" id="temp">
5-
<input name="tempname" placeholder="Give your template name">
6-
<button type="submit">Upload</button>
7-
</form>
3+
<v-container>
4+
<v-layout justify-center>
5+
<img src="../assets/upload.svg">
6+
</v-layout>
7+
</v-container>
8+
<v-container>
9+
<v-layout justify-center>
10+
<form action="http://localhost:5000/api/upload" method="POST" enctype="multipart/form-data">
11+
<textarea name="tempname" rows="1" cols="25" placeholder="Input your template name"/>
12+
<v-container>
13+
<v-layout justify-center>
14+
<input type="file" style="display: none" name="temp" id="temp">
15+
<label for="temp" class="custom-file-upload button1">
16+
<i class="fas fa-cloud-upload"></i> Upload image
17+
</label>
18+
</input>
19+
</v-layout>
20+
</v-container>
21+
<v-container>
22+
<v-layout justify-center>
23+
<button class="upload-button button1" type="submit" >Submit Template</button>
24+
</v-layout>
25+
</v-container>
26+
</form>
27+
</v-layout>
28+
</v-container>
829
</div>
9-
</template>
30+
</template>
31+
32+
<style>
33+
.custom-file-upload {
34+
border: none;
35+
color: white;
36+
text-align: center;
37+
padding: 15px 27px;
38+
cursor: pointer;
39+
display: inline-block;
40+
font-size: 20px;;
41+
background-color: #2c75fe;
42+
}
43+
.upload-button {
44+
border: none;
45+
color: white;
46+
padding: 15px 15px;
47+
text-align: center;
48+
text-decoration: none;
49+
display: inline-block;
50+
font-size: 20px;
51+
background-color: #2c75fe;
52+
}
53+
54+
.button1 {border-radius: 12px;}
55+
56+
.button1:hover {
57+
background-color: #0743b4;
58+
color: white;
59+
}
60+
61+
.uploadimage {
62+
width: 100%;
63+
background-image: "../assets/upload.svg";
64+
background-size: cover;
65+
height: 150;
66+
padding: 150;
67+
padding-bottom: calc;
68+
}
69+
70+
textarea {
71+
border: 1px solid #0743b4;
72+
}
73+
74+
::-webkit-input-placeholder { /* Edge */
75+
color: #0743b4;
76+
font-size: 18px;
77+
opacity: 1;
78+
}
79+
80+
:-ms-input-placeholder { /* Internet Explorer 10-11 */
81+
color: #0743b4;
82+
font-size: 18px;
83+
opacity: 1;
84+
}
85+
86+
::placeholder {
87+
color: #0743b4;
88+
font-size: 18px;
89+
opacity: 1;
90+
}
91+
</style>

0 commit comments

Comments
 (0)