Script Rate Calculator Untuk Blogger

GISTARIAU
0

Script Rate Calculator

Script ini berfungsi untuk menghitung kebutuhan pendapatan harian atau bulanan anda, dengan target profit pasti.

Sumber artikel:​ GISTARIAU.com

📄 HTML CODE

<style>
/* === CODING RATE CALCULATOR By GISTARIAU.com === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.gistariau-rate-box {
max-width: 520px;
margin: 30px auto;
background: #ffffff;
border-radius: 16px;
box-shadow: 0 20px 40px rgba(15,118,110,.12);
padding: 28px;
font-family: 'Inter', Arial, sans-serif;
color: #0f172a;
}

.gistariau-rate-box h3 {
text-align: center;
font-size: 22px;
font-weight: 700;
color: #0f766e;
margin-bottom: 8px;
}

.gistariau-rate-box p.subtitle {
text-align: center;
font-size: 14px;
color: #475569;
margin-bottom: 24px;
}

.gistariau-rate-box label {
font-weight: 600;
font-size: 14px;
margin-top: 14px;
display: block;
}

.gistariau-rate-box input {
width: 100%;
margin-top: 6px;
padding: 12px 14px;
border-radius: 10px;
border: 1px solid #cbd5e1;
font-size: 14px;
transition: all .2s ease;
}

.gistariau-rate-box input:focus {
outline: none;
border-color: #0f766e;
box-shadow: 0 0 0 3px rgba(15,118,110,.15);
}

.gistariau-rate-box button {
width: 100%;
margin-top: 26px;
padding: 14px;
background: linear-gradient(135deg, #0f766e, #134e4a);
color: #ffffff;
border: none;
border-radius: 12px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: transform .15s ease, box-shadow .15s ease;
}

.gistariau-rate-box button:hover {
transform: translateY(-2px);
box-shadow: 0 12px 30px rgba(15,118,110,.35);
}

.gistariau-rate-result {
margin-top: 26px;
background: #f0fdfa;
border-left: 5px solid #0f766e;
padding: 18px;
border-radius: 12px;
display: none;
}

.gistariau-rate-result p {
margin: 6px 0;
font-size: 14px;
}

.gistariau-rate-result strong {
color: #0f766e;
font-weight: 700;
}

@media(max-width:480px){
.gistariau-rate-box {
padding: 22px;
}
}
</style>
<div class="gistariau-rate-box">
<h3>Kalkulator Rate Minimum</h3>
<p class="subtitle">Menentukan tarif ideal berdasarkan kebutuhan & profit
<span style="
font-size:0;
line-height:0;
color:transparent;
user-select:text;
white-space:nowrap;
">
&#83;&#117;&#109;&#98;&#101;&#114;&#32;&#97;&#114;&#116;&#105;&#107;&#101;&#108;&#58;&#8203;
<a href="&#104;&#116;&#116;&#112;&#115;&#58;&#47;&#47;&#119;&#119;&#119;&#46;&#103;&#105;&#115;&#116;&#97;&#114;&#105;&#97;&#117;&#46;&#99;&#111;&#109;&#47;" target="_blank" rel="noopener">
&#71;&#73;&#83;&#84;&#65;&#82;&#73;&#65;&#85;&#46;&#99;&#111;&#109;
</a>
</span>
</p>

<label>Target Penghasilan Bulanan (Rp)</label>
<input type="number" id="income" placeholder="Contoh: 15000000">

<label>Biaya Operasional Bulanan (Rp)</label>
<input type="number" id="cost" placeholder="Contoh: 4000000">

<label>Jam Kerja per Bulan</label>
<input type="number" id="hours" placeholder="Contoh: 160">

<label>Target Profit Margin (%)</label>
<input type="number" id="margin" placeholder="Contoh: 30">

<button onclick="calculateRate()">Hitung Rate Minimum</button>

<div class="gistariau-rate-result" id="result"></div>
</div>

<script>
function rupiah(n){
return new Intl.NumberFormat('id-ID',{
style:'currency',
currency:'IDR'
}).format(n);
}

function calculateRate(){
const income = Number(document.getElementById('income').value);
const cost = Number(document.getElementById('cost').value);
const hours = Number(document.getElementById('hours').value);
const margin = Number(document.getElementById('margin').value) / 100;

if(!income || !cost || !hours){
alert('Lengkapi semua data terlebih dahulu');
return;
}

const totalNeed = income + cost;
const baseRate = totalNeed / hours;
const finalRate = baseRate + (baseRate * margin);

const resultBox = document.getElementById('result');
resultBox.style.display = 'block';
resultBox.innerHTML = `
<p>Total Kebutuhan Bulanan:<br><strong>${rupiah(totalNeed)}</strong></p>
<p>Rate Dasar per Jam:<br><strong>${rupiah(baseRate)}</strong></p>
<p>Rate Minimum (Profit Included):<br><strong>${rupiah(finalRate)}</strong></p>
`;
}
</script>

🔍 Live Preview

Tags
  • Lebih baru

    Script Rate Calculator Untuk Blogger

Posting Komentar

0 Komentar

Posting Komentar (0)
3/related/default
close