Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added the login or new user component #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ html, button {
cursor: url(../icons/ArrowSmall.cur), default;
}

/*login or signin*/
.login{
display:flex;
flex-direction:column;
align-items:center;
justify-content:flex-end;
}
.login p{
font-size: 16px;
font-weight: 500;
color:gray
}

.userLogin{
display:flex;
flex-direction:row;
justify-content: center;
background-color: #eeeeee;
}

/* sugar-vue-Icon */
.test {
width:80px;
Expand Down
15 changes: 15 additions & 0 deletions icons/login.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions icons/newuser-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 31 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@

<body id="body">
<div id="app">

<div class="userLogin">
<login ref="login"
id="1"
svgfile="icons/newuser-icon.svg"
color="8"
size="60"
x="-2"
is-native="true"
content="New User"
></login>

<login ref="login"
id="1"
svgfile="icons/login.svg"
color="8"
size="60"
x="-2"
is-native="true"
content="login"
></login>
</div>

<h2>Hello Sugarizer</h2>
<h3>{{ message }}</h3>
<icon-button ref="settings1"
Expand Down Expand Up @@ -158,7 +181,7 @@ <h3>{{ message }}</h3>

<icon ref="icon1"
id="1"
svgfile="icons/old-owner.svg"
svgfile="icons/owner-icon.svg"
color="8"
size="60"
x="-2"
Expand Down Expand Up @@ -229,6 +252,11 @@ <h3>{{ message }}</h3>
Product Name : {{product.name}} - Price : {{product.price}} ({{product.category}})
</li>
</ul>





</div>

<script src="js/icon.js"></script>
Expand All @@ -239,6 +267,8 @@ <h3>{{ message }}</h3>
<script src="js/filterbox.js"></script>
<script src="js/password.js"></script>
<script src="js/dialog.js"></script>
<script src="js/login.js"></script>
<script src="js/app.js"></script>
<script src="js/dummy.js"></script>
</body>
</html>
3 changes: 2 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const app = Vue.createApp({
"select-box": SelectBox,
"filter-box": FilterBox,
"password": Password,
"dialog-box": Dialog
"dialog-box": Dialog,
"login": Login,
},
data() {
return {
Expand Down
24 changes: 24 additions & 0 deletions js/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

/**
* @module Login
* @desc This is an icon component for both native and simple SVG icons
* @vue-prop {String} svgfile - Url of svg file
* @vue-prop {String} content - whether we are using it for login or signup
*/
const Login ={
name: 'Login',
template: `<div class="login" ref="login">
<img :src="svgfile" alt="login" class="login-image">
<p class="login-text">{{contentData}}</p>
</div>`,
props: ['svgfile','color','size','content'],
data() {
return {
contentData: this.content,
svgfile: this.svgfile,
}
},

};

if (typeof module !== 'undefined') module.exports = { Login }