📄 IrbyImaging/Views/Home/ComingSoon.cshtml Documentation


🗂 Table of Contents

  1. Overview & Purpose
  2. File Structure
  3. Dependencies & Technologies
  4. Key Functional Areas
    1. Layout & Title Setup
    2. Home Button Navigation
    3. Main “Under Construction” Content
    4. Countdown Timer
    5. JavaScript Plugins & Initialization
  5. Code Walkthrough
  6. Sample UML Diagram
  7. Usage Example
  8. Conclusion

🏗 Overview & Purpose

The ComingSoon.cshtml view is designed to present a clean, responsive “Under Construction / Coming Soon” landing page for the IrbyImaging web application. It informs visitors that the page or feature is temporarily unavailable and provides a countdown timer to the launch date. This enhances user experience by:

  • Conveying a professional “in-progress” status.
  • Allowing visitors to navigate back to the Home page.
  • Displaying a real-time countdown to the anticipated availability date.

Intended Use
This view is intended to be returned by an MVC controller action (e.g., HomeController.ComingSoon()) when a feature or section is not yet ready for public access.


📂 File Structure

IrbyImaging/
└── Views/
    └── Home/
        └── ComingSoon.cshtml
  • Location: /Views/Home/ComingSoon.cshtml
  • Layout: Shares the master layout: ~/Views/Shared/_Layout.cshtml

🔧 Dependencies & Technologies

Category Tools / Libraries
Front‑end Framework Bootstrap 4+
JavaScript Library jQuery, MetisMenu, SimpleBar, Waves
Countdown Plugin jquery-countdown (jquery.countdown.min.js)
Icon Set Font Awesome (via <i class="fas ...">)
<!-- Core JS Dependencies -->
<script src="~/libs/jquery/jquery.min.js"></script>
<script src="~/libs/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="~/libs/metismenu/metisMenu.min.js"></script>
<script src="~/libs/simplebar/simplebar.min.js"></script>
<script src="~/libs/node-waves/waves.min.js"></script>

<!-- Countdown Feature -->
<script src="~/libs/jquery-countdown/jquery.countdown.min.js"></script>
<script src="~/js/pages/coming-soon.init.js"></script>
<script src="~/js/app.js"></script>

🛠 Key Functional Areas

1. Layout & Title Setup

@{
    ViewBag.Title = "Coming Soon";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
  • ViewBag.Title: Sets the <title> element of the rendered HTML to “Coming Soon”.
  • Layout: Points to the shared master template (_Layout.cshtml) for consistent header, footer, and styling.

2. Home Button Navigation

<div class="home-btn d-none d-sm-block">
    <a href="@Url.Action("Index", "Home")" class="text-white">
        <i class="fas fa-home h2"></i>
    </a>
</div>
  • Purpose: Offers a quick return link to the Home page.
  • CSS Classes:
    • d-none d-sm-block: Hidden on extra‑small screens, visible on small-and-up.
    • text-white: White icon to contrast with background.

3. Main “Under Construction” Content

<div class="maintenance-img">
  <img src="~/images/coming-soon.svg"
       alt="Coming Soon Image"
       class="img-fluid mx-auto d-block">
</div>
<h4 class="mt-2">THIS WEBPAGE IS UNDER CONSTRUCTION</h4>
<p class="text-muted">Please check back soon</p>
  • Illustration: Uses a vector graphic (coming-soon.svg) for visual appeal.
  • Message: Title (<h4>) and subtitle (<p>) inform the user of the page status.

4. Countdown Timer

<div data-countdown="2022/05/31" class="counter-number"></div>
  • Attribute data-countdown: Target date for the countdown plugin.
  • .counter-number: The plugin replaces this with a live timer.

Initialization handled in coming-soon.init.js:

// coming-soon.init.js
$('[data-countdown]').each(function() {
  var $this = $(this),
      finalDate = $(this).data('countdown');
  $this.countdown(finalDate, function(event) {
    $this.html(event.strftime('%D days %H:%M:%S'));
  });
});

5. JavaScript Plugins & Initialization

Plugin Purpose
MetisMenu Responsive sidebar menu
SimpleBar Custom scrollbars
Waves Click ripple effects
Countdown Live countdown timer

The primary initialization is in coming-soon.init.js, which:

  1. Selects elements with data-countdown.
  2. Parses the target date.
  3. Renders a live timer via jquery.countdown.

🔍 Code Walkthrough

@{
    /* Set page title and layout */
    ViewBag.Title = "Coming Soon";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<!-- Home Icon/Button -->
<div class="home-btn d-none d-sm-block">
    <a href="@Url.Action("Index", "Home")" class="text-white">
        <i class="fas fa-home h2"></i>
    </a>
</div>

<div class="row">
  <div class="text-center">

    <!-- Centered Content -->
    <div class="row justify-content-center mt-5">
      <div class="col-sm-4">
        <div class="maintenance-img">
          <img src="~/images/coming-soon.svg"
               alt="Coming Soon"
               class="img-fluid mx-auto d-block">
        </div>
      </div>
    </div>

    <!-- Main Message -->
    <h4 class="mt-2">THIS WEBPAGE IS UNDER CONSTRUCTION</h4>
    <p class="text-muted">Please check back soon</p>

    <!-- Countdown Timer -->
    <div class="row justify-content-center mt-2">
      <div class="col-md-8">
        <div data-countdown="2022/05/31" class="counter-number"></div>
      </div>
    </div>

  </div>
</div>

<!-- Scripts -->
<script src="~/libs/jquery/jquery.min.js"></script>
<!-- ...other scripts omitted for brevity... -->
<script src="~/js/pages/coming-soon.init.js"></script>
<script src="~/js/app.js"></script>

Flow Summary:

  1. Server renders view with Razor variables.
  2. Browser loads markup, displays “Under Construction” banner with image.
  3. Countdown script picks up the target date and animates the timer.

📈 Sample UML Diagram

Below is a simplified UML activity diagram representing the ComingSoon page initialization:

@startuml
start
:Render ComingSoon.cshtml;
:Apply _Layout.cshtml;
:Inject HomeButton & Main Content;
:Load CSS & HTML;
fork
  :Load jQuery & plugins;
  :Execute coming-soon.init.js;
fork again
  :Initialize countdown;
  :Animate timer on UI;
end fork
stop
@enduml

📝 Usage Example

Suppose you want to redirect users to the ComingSoon page from your controller:

public class HomeController : Controller
{
    // GET: /Home/ComingSoon
    public ActionResult ComingSoon()
    {
        // Possibly check feature flag or maintenance mode
        return View();
    }
}

Then in _Layout.cshtml or navigation, you can link:

<a asp-controller="Home" asp-action="ComingSoon">Features Coming Soon</a>

🔚 Conclusion

The ComingSoon.cshtml view provides a polished “Under Construction” interface with:

  • Responsive design via Bootstrap.
  • Real-time countdown using jquery-countdown.
  • Seamless integration with the shared layout and navigation.

By following this documentation, developers can:

  • Customize the target date via data-countdown.
  • Swap out the SVG illustration for branding.
  • Adjust styling or animation by editing CSS classes or JS initialization.

Happy coding! 🚧⏳🖼