initialize project

This commit is contained in:
Afrina Alimi
2024-02-08 09:30:14 +08:00
commit 25d85dac75
206 changed files with 50977 additions and 0 deletions
@@ -0,0 +1,5 @@
<template>
<div class="modal-body">
<slot></slot>
</div>
</template>
@@ -0,0 +1,5 @@
<template>
<div class="modal-footer">
<slot></slot>
</div>
</template>
@@ -0,0 +1,6 @@
<template>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4><slot></slot></h4>
</div>
</template>
@@ -0,0 +1,38 @@
<template>
<div class="modal fade" v-bind:id="id" role="dialog">
<div class="modal-dialog">
<div class="modal-content" :class="aClass">
<slot></slot>
</div>
</div>
</div>
</template>
<script>
export default {
props:['id', 'aClass']
}
</script>
<style>
.primary{
background-color: #337ab7;
color: #fff;
}
.primary .modal-body{
background-color: #fff;
border-left: solid 1px #337ab7;
border-right: solid 1px #337ab7;
color: #000;
}
.primary .modal-footer{
background-color: #fff;
border-radius: 5px;
border-left: solid 1px #337ab7;
border-right: solid 1px #337ab7;
border-bottom: solid 1px #337ab7;
color: #000;
}
</style>
@@ -0,0 +1,75 @@
<template>
<center>
<div class="imgContainer">
<input
type="file"
:id="fileId"
class="file"
:name="fileName"
v-on:change="readFile(fileId, imageId)" />
<img
:src="imageSrc"
height="100%"
width="100%"
class="imgUpload img-rounded"
:id="imageId"/>
<span class="imgText">Select Image</span>
</div>
</center>
</template>
<script type="text/javascript">
export default {
props: {
fileId: {default:'fileId'},
fileName: {default:'file_name'},
imageId: {default:'imageId'},
imageSrc:{default:'#'}
},
methods: {
/**
* Print the selected file into image
* @param String fileID, String imageId
*
*/
readFile: function(fileId, imageId) {
var inputFile = $('#'+fileId)[0];
var inputImage = $('#'+imageId);
if (inputFile.files && inputFile.files[0]) {
var reader = new FileReader();
reader.onload = function(e) { inputImage.attr('src', e.target.result)};
reader.readAsDataURL(inputFile.files[0]);
}
}
}
}
</script>
<style type="text/css">
.imgContainer {
position: relative;
height: 200px;
width: 200px;
}
.file {
position: absolute;
height: 100%;
width: 100%;
opacity: 0;
}
.imgUpload {
background-color: #ffffff;
border:2px black solid;
}
.imgText {
position: absolute;
left: 0;
top: 45%;
width: 100%;
text-align: center;
}
</style>