<%# Ruby Calculator - Interactive calculator built with Ruby on Rails %>
<%# Author: RSK World (Molla Samser, Founder | Rima Khatun, Designer & Tester) %>
<%# Contact: help@rskworld.in | +91 93305 39277 %>
<%# Website: https://rskworld.in %>
<%# Year: 2026 %>
<%# Description: Build a fully functional calculator using Ruby on Rails with modern UI %>

<!DOCTYPE html>
<html>
  <head>
    <title>Ruby Calculator - RSK World</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    
    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
    <%= javascript_importmap_tags %>
  </head>

  <body class="bg-light">
    <!-- Navigation -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary mb-4">
      <div class="container">
        <a class="navbar-brand" href="/">
          <i class="fas fa-gem text-danger"></i> Ruby Calculator
        </a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
          <ul class="navbar-nav ms-auto">
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="fas fa-calculator"></i> Calculator
              </a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/advanced">
                <i class="fas fa-gem"></i> Advanced
              </a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/converter">
                <i class="fas fa-exchange-alt"></i> Converter
              </a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/favorites">
                <i class="fas fa-star"></i> Favorites
              </a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="/calculator/history">
                <i class="fas fa-history"></i> History
              </a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="https://rskworld.in" target="_blank">
                <i class="fas fa-globe"></i> RSK World
              </a>
            </li>
          </ul>
        </div>
      </div>
    </nav>

    <!-- Flash Messages -->
    <% if flash[:notice] %>
      <div class="container">
        <div class="alert alert-success alert-dismissible fade show" role="alert">
          <%= flash[:notice] %>
          <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
        </div>
      </div>
    <% end %>

    <% if flash[:alert] %>
      <div class="container">
        <div class="alert alert-danger alert-dismissible fade show" role="alert">
          <%= flash[:alert] %>
          <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
        </div>
      </div>
    <% end %>

    <!-- Main Content -->
    <%= yield %>

    <!-- Footer -->
    <footer class="bg-dark text-white py-4 mt-5">
      <div class="container text-center">
        <h6><i class="fas fa-gem text-danger"></i> Ruby Calculator</h6>
        <p class="mb-1">Built with Ruby on Rails, HTML5, CSS3 & JavaScript</p>
        <p class="mb-1">© 2026 <a href="https://rskworld.in" target="_blank" class="text-white">RSK World</a></p>
        <p class="mb-0">Developed by: Molla Samser (Founder) | Rima Khatun (Designer & Tester)</p>
        <p class="mb-0">Contact: <a href="mailto:help@rskworld.in" class="text-white">help@rskworld.in</a> | +91 93305 39277</p>
      </div>
    </footer>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
  </body>
</html>
