-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfiverr-fee.html
118 lines (113 loc) · 3.5 KB
/
fiverr-fee.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<title>Fiverr Fee - Ambratolm Web Tools</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="assets/buefy.min.css" />
<link rel="stylesheet" href="assets/bulmaswatch.min.css" />
<link rel="stylesheet" href="assets/custom.css" />
<script src="assets/fontawesome.all.min.js"></script>
<script src="assets/vue.min.js"></script>
<script src="assets/buefy.min.js"></script>
<script src="assets/currency.min.js"></script>
</head>
<body class="container">
<section id="app" class="section" v-cloak>
<div class="card">
<header class="card-header">
<h1 class="card-header-title">
<b-icon icon="file" pack="fas"></b-icon>
<span>Fiverr Fee</span>
</h1>
</header>
<div class="card-content">
<div class="columns is-multiline">
<div class="column is-full">
<b-field label="Amount" label-position="on-border">
<b-input
v-model="amount"
type="number"
size="is-large"
icon="dollar-sign"
icon-pack="fas"
/>
</b-field>
</div>
<div class="column">
<p class="heading is-capitalized">Type</p>
<p class="title">Seller</p>
<p class="subtitle has-text-grey-light">Earning</p>
</div>
<div class="column">
<p class="heading is-capitalized">Amount</p>
<p class="title">{{ amount | money }}</p>
</div>
<div class="column">
<p class="heading is-capitalized">Net</p>
<p class="title has-text-success">{{ net | money }}</p>
<p class="subtitle has-text-grey-light">
{{ netPc | percentage }}
</p>
</div>
<div class="column">
<p class="heading is-capitalized">Fee</p>
<p class="title has-text-danger">{{ fee | money }}</p>
<p class="subtitle has-text-grey-light">
{{ feePc | percentage }}
</p>
</div>
</div>
</div>
<footer class="card-footer">
<div class="card-footer-item">
<p class="has-text-grey-light">© Ambratolm 2021</p>
</div>
</footer>
</div>
</section>
</body>
<script>
new Vue({
el: "#app",
data() {
return {
amount: 10
};
},
computed: {
fee() {
return this.amount == 0
? 0
: currency(this.amount * 0.2).value || 0;
},
feePc() {
return this.amount == 0
? 0
: currency(this.fee).divide(this.amount).value || 0;
},
net() {
return this.amount == 0
? 0
: currency(this.amount).subtract(this.fee).value || 0;
},
netPc() {
return this.amount == 0
? 0
: currency(this.net).divide(this.amount).value || 0;
}
},
methods: {
},
filters: {
money(value) {
return currency(Number(value) || 0).format();
},
percentage(value) {
return `${currency((Number(value) || 0) * 100).value}%`;
}
}
});
</script>
</html>