htmg.html

 <!doctype html>


<html lang="bn">

<head>

  <meta charset="utf-8" />

  <meta name="viewport" content="width=device-width, initial-scale=1" />

  <title>FAIR BANGLA — Demo Website</title>

  <meta name="description" content="Simple responsive website template (single file). Customize logo, colors and content." /> <style>

    /* ============================

       Simple responsive stylesheet

       ============================ */

    :root{

      --bg:#0f1724; /* deep navy */

      --card:#0b1220;

      --muted:#94a3b8;

      --accent:#06b6d4; /* teal-cyan */

      --glass: rgba(255,255,255,0.04);

      --radius:14px;

      --maxw:1100px;

      color-scheme: dark;

    }

    *{box-sizing:border-box}

    html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial}

    body{

      background:linear-gradient(180deg,var(--bg),#071126 120%);

      color:#e6eef6; -webkit-font-smoothing:antialiased;

      line-height:1.5; padding:32px; display:flex; align-items:center; justify-content:center;

    }


    .container{width:100%;max-width:var(--maxw);}


    header{display:flex;align-items:center;justify-content:space-between;margin-bottom:28px}

    .brand{display:flex;gap:14px;align-items:center}

    .logo{width:56px;height:56px;border-radius:12px;background:linear-gradient(135deg,var(--accent),#7c3aed);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;color:#031024}

    h1.site-title{font-size:18px;margin:0}

    .nav{display:flex;gap:12px;align-items:center}

    .btn{background:var(--accent);color:#012026;padding:10px 14px;border-radius:10px;border:0;cursor:pointer;font-weight:600}

    .btn.ghost{background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted)}


    /* Hero */

    .hero{display:grid;grid-template-columns:1fr 420px;gap:28px;align-items:center;margin-bottom:34px}

    .card{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border-radius:var(--radius); padding:28px; box-shadow:0 6px 20px rgba(2,6,23,0.6);}

    .hero-title{font-size:28px;margin:0 0 10px}

    .hero-sub{color:var(--muted);margin:0 0 18px}

    .features{display:flex;gap:12px;flex-wrap:wrap}

    .feature{background:var(--glass);padding:10px 12px;border-radius:10px;color:var(--muted);font-size:14px}


    /* Right panel: quick card / login */

    .right-card{display:flex;flex-direction:column;gap:12px}

    .balance{font-size:32px;font-weight:700}

    .small{font-size:13px;color:var(--muted)}


    /* Grid of sections */

    .grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}

    .panel{padding:18px;border-radius:12px;background:rgba(255,255,255,0.02)}

    .panel h3{margin:0 0 8px;font-size:15px}

    .panel p{margin:0;color:var(--muted);font-size:13px}


    footer{margin-top:28px;text-align:center;color:var(--muted);font-size:13px}


    /* Login modal */

    .modal-backdrop{position:fixed;inset:0;background:rgba(1,4,11,0.6);display:none;align-items:center;justify-content:center;padding:20px}

    .modal{width:100%;max-width:420px;background:var(--card);padding:22px;border-radius:12px}

    .field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}

    label{font-size:13px;color:var(--muted)}

    input{padding:10px;border-radius:8px;border:1px solid rgba(255,255,255,0.04);background:transparent;color:inherit}

    .row{display:flex;gap:8px}


    /* Responsive */

    @media (max-width:960px){

      .hero{grid-template-columns:1fr}

      .grid{grid-template-columns:repeat(1,1fr)}

      header{flex-direction:column;align-items:flex-start;gap:12px}

    }


    /* small helpers */

    .muted{color:var(--muted)}

    a.link{color:var(--accent);text-decoration:none;font-weight:600}

  </style></head>

<body>

  <div class="container">

    <header>

      <div class="brand">

        <div class="logo">FB</div>

        <div>

          <h1 class="site-title">FAIR BANGLA</h1>

          <div class="muted" style="font-size:13px">Topup & App Panel</div>

        </div>

      </div><nav class="nav">

    <button class="btn ghost" id="demo-data">Demo data</button>

    <button class="btn" id="open-login">Login</button>

  </nav>

</header>


<main>

  <section class="hero">

    <div class="card">

      <h2 class="hero-title">Simple, clean, ready-to-customize website template</h2>

      <p class="hero-sub">একটি single-file HTML টেমপ্লেট — লোগো, টেক্সট, রং বদল করে ব্যবহার করুন।</p>


      <div class="features">

        <div class="feature">Responsive</div>

        <div class="feature">Login modal</div>

        <div class="feature">Admin-ready</div>

        <div class="feature">Easy to host</div>

      </div>


      <div style="margin-top:18px;display:flex;gap:10px">

        <button class="btn" onclick="downloadHTML()">Download HTML</button>

        <button class="btn ghost" onclick="scrollToSection()">View sections</button>

      </div>


      <div class="grid" style="margin-top:18px">

        <div class="panel">

          <h3>About</h3>

          <p>FAIR BANGLA is a demo panel template. Change the copy and connect backend endpoints to make it live.</p>

        </div>

        <div class="panel">

          <h3>Usage</h3>

          <p>Host on any static host (Netlify, Vercel, GitHub Pages) or integrate into your app folder.</p>

        </div>

        <div class="panel">

          <h3>Support</h3>

          <p>Want help wiring login to a server? Ask and I will provide PHP/Node examples.</p>

        </div>

      </div>

    </div>


    <aside class="right-card card">

      <div>

        <div class="small">Wallet balance</div>

        <div class="balance" id="wallet">TK 0</div>

        <div class="small muted">Last updated: <span id="last-updated">—</span></div>

      </div>


      <div style="margin-top:12px;display:flex;gap:8px">

        <button class="btn" onclick="credit(100)">Add TK100</button>

        <button class="btn ghost" onclick="withdraw(50)">Withdraw 50</button>

      </div>


      <hr style="border:none;border-top:1px solid rgba(255,255,255,0.03);margin:12px 0">

      <div class="small muted">Quick links</div>

      <div style="display:flex;gap:8px;margin-top:8px">

        <a class="link" href="#">Admin</a>

        <a class="link" href="#">Downloads</a>

      </div>

    </aside>

  </section>


</main>


<footer>

  © <span id="year"></span> FAIR BANGLA — Built with a single HTML file.

</footer>


  </div> <!-- Login modal --> <div class="modal-backdrop" id="modal">

    <div class="modal">

      <h3 style="margin-top:0">Login to Admin</h3>

      <div class="field">

        <label for="email">Email or Username</label>

        <input id="email" placeholder="user@example.com" />

      </div>

      <div class="field">

        <label for="password">Password</label>

        <input id="password" type="password" placeholder="••••••••" />

      </div>

      <div style="display:flex;gap:8px;justify-content:flex-end">

        <button class="btn ghost" id="close-modal">Cancel</button>

        <button class="btn" id="do-login">Login</button>

      </div>

    </div>

  </div> <script>

    // Simple JS interactions: keeps everything client-side so you can wire to backend later.

    const modal = document.getElementById('modal');

    document.getElementById('open-login').addEventListener('click', ()=> modal.style.display = 'flex');

    document.getElementById('close-modal').addEventListener('click', ()=> modal.style.display = 'none');


    // Demo wallet logic

    let wallet = 0;

    const walletEl = document.getElementById('wallet');

    const updatedEl = document.getElementById('last-updated');

    function setWallet(v){ wallet = Math.max(0, Math.round(v)); walletEl.textContent = 'TK ' + wallet; updatedEl.textContent = new Date().toLocaleString('bn-BD'); }

    function credit(x){ setWallet(wallet + x); }

    function withdraw(x){ if(wallet < x){ alert('Insufficient balance'); return } setWallet(wallet - x); }

    // demo buttons

    document.getElementById('demo-data').addEventListener('click', ()=> { setWallet(1250); alert('Demo data loaded (TK 1,250)'); });


    // Login (dummy) — replace with fetch to your server

    document.getElementById('do-login').addEventListener('click', ()=>{

      const u = document.getElementById('email').value.trim();

      const p = document.getElementById('password').value;

      if(!u || !p){ alert('Enter username and password'); return }

      // Example: check hardcoded demo credentials (change/remove in production)

      if((u === 'Black' && p === 'Black1835') || (u === 'admin' && p === 'admin')){

        alert('Login successful — redirecting to admin...');

        modal.style.display = 'none';

        // simulate redirect

        window.location.href = '#admin';

      } else {

        alert('Invalid credentials (demo). To wire real auth replace this JS with a POST to your server.');

      }

    });


    // Download the current HTML as file (client-side)

    function downloadHTML(){

      const doc = '<!doctype html>\n' + document.documentElement.outerHTML;

      const blob = new Blob([doc], {type: 'text/html'});

      const url = URL.createObjectURL(blob);

      const a = document.createElement('a');

      a.href = url; a.download = 'website.html'; document.body.appendChild(a); a.click(); a.remove();

      URL.revokeObjectURL(url);

    }


    function scrollToSection(){ window.scrollTo({top:0,behavior:'smooth'}); }

    document.getElementById('year').textContent = new Date().getFullYear();


    // initialize

    setWallet(0);

  </script></body>

</html>

Comments

Post a Comment