-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add responsive homepage with dynamic product
- Loading branch information
1 parent
1ca198e
commit f23de0c
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>@yield('title', 'Welcome to Liberu Ecommerce')</title> | ||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-expand-lg navbar-light bg-light"> | ||
<a class="navbar-brand" href="#">Liberu Ecommerce</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav"> | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Products</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">About Us</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
<div class="container mt-4"> | ||
@yield('content') | ||
</div> | ||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> | ||
</body> | ||
</html> | ||
</new_file> | ||
|
||
<new_file file_path="resources/views/home.blade.php"> | ||
@extends('layouts.app') | ||
|
||
@section('title', 'Home') | ||
|
||
@section('content') | ||
<div class="row"> | ||
<div class="col-12"> | ||
<h1>Welcome to Liberu Ecommerce</h1> | ||
<p>Explore our innovative and dynamic shopping platform.</p> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<h2>Featured Products</h2> | ||
<div class="row"> | ||
@foreach($products as $product) | ||
<div class="col-md-4"> | ||
<div class="card" style="width: 18rem;"> | ||
<img src="{{ $product->image_url }}" class="card-img-top" alt="{{ $product->name }}"> | ||
<div class="card-body"> | ||
<h5 class="card-title">{{ $product->name }}</h5> | ||
<p class="card-text">{{ $product->description }}</p> | ||
<a href="#" class="btn btn-primary">View Product</a> | ||
</div> | ||
</div> | ||
</div> | ||
@endforeach | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<h2>Special Offers</h2> | ||
<!-- Special offers content goes here --> | ||
</div> | ||
</div> | ||
@endsection |