WebTheoryAss3(020,021)
WebTheoryAss3(020,021)
WebTheoryAss3(020,021)
Campus
Submitted by:
Nimbra bibi(Fa21-bse-020)
Wasifa Kanwal(Fa21-bse-021)
Index.blade.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Online Shop</title>
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
<script src="script.js" defer></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
</head>
<body>
<!-- Top Bar with Search, Nationwide Shipping, and Auth Buttons in One Row -->
<div class="top-bar1">
<!-- Search Box on the Left -->
<div class="search-box">
<input type="text" placeholder="Search..." />
</div>
<div class="icons">
<a href="/GroceryStore/conatct"><img
src="https://img.icons8.com/ios/50/000000/contact-card.png" alt="Contact"></a>
<a href="/GroceryStore/cart"><img
src="https://img.icons8.com/ios/50/000000/shopping-cart--v1.png" alt="Cart"></a>
</div>
</header>
<!-- Slider Section -->
<div class="slider">
<div class="slide"><img src=" {{ asset('assets/slide/veg.jfif') }}" alt="Slide
1"></div>
<div class="slide"><img src="{{ asset('assets/slide/cak.jfif') }}"alt="Slide
2"></div>
<div class="slide"><img src="{{ asset('assets/slide/drink.jfif') }}" alt="Slide
3"></div>
<div class="controls">
<button id="playBtn" class="control-btn">
<span class="material-icons">play_arrow</span>
</button>
<button id="pauseBtn" class="control-btn">
<span class="material-icons">pause</span>
</button>
</div>
</div>
</body>
</html>
Shop.blade.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Us - My Online Shop</title>
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
</head>
<body>
<!-- Top Bar with Search, Nationwide Shipping, and Auth Buttons in One Row -->
<div class="top-bar1">
<!-- Search Box on the Left -->
<div class="search-box">
<input type="text" placeholder="Search..." />
</div>
<section class="shop-section">
<!-- Oil & Masala Category -->
<h3>Oil & Masala</h3>
<div class="product-row">
<div class="product-card">
<img src="{{asset('assets/shop/product-11/02.jpg')}}" alt="Product 1">
<p>Oil Product 1</p>
<div class="rating">★ ★ ★ ★</div>
<div class="price">₨ 1,000</div>
<button class="add-to-cart">Add to Cart</button>
</div>
<div class="product-card">
<img src="{{asset('assets/shop/product-10/02.jpeg')}}" alt="Product 2">
<p>Oil Product 2</p>
<div class="rating">★ ★ ★ ★</div>
<div class="price">₨ 2,500</div>
<button class="add-to-cart">Add to Cart</button>
</div>
<div class="product-card">
<img src="{{asset('assets/shop/product-07/02.jpg')}}" alt="Product 3">
<p>Oil Product 3</p>
<div class="rating">★ ★ ★ ★</div>
<div class="price">₨ 3,000</div>
<button class="add-to-cart">Add to Cart</button>
</div>
</div>
</body>
</html>
Contact.blade.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us - My Online Shop</title>
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
</head>
<body>
<!-- Top Bar with Search, Nationwide Shipping, and Auth Buttons in One Row -->
<div class="top-bar1">
<!-- Search Box on the Left -->
<div class="search-box">
<input type="text" placeholder="Search..." />
</div>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="phone">Phone</label>
<input type="tel" id="phone" name="phone" required>
<label for="subject">Subject</label>
<input type="text" id="subject" name="subject" required>
</form>
</div>
<div class="form-column">
<label for="message">Message</label>
<textarea id="message" name="message" rows="18 "
required></textarea>
<button class="send-message">Send Message</button>
</div>
</div>
</section>
</body>
</html>
About.blade.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Us - My Online Shop</title>
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
</head>
<body>
<!-- Top Bar with Search, Nationwide Shipping, and Auth Buttons in One Row -->
<div class="top-bar1">
<!-- Search Box on the Left -->
<div class="search-box">
<input type="text" placeholder="Search..." />
</div>
</body>
</html>
Signin.blade.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign In - My Online Shop</title>
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
<script src="script.js" defer></script>
</head>
<body>
<!-- Top Bar with Search, Nationwide Shipping, and Auth Buttons in One Row -->
<div class="top-bar1">
<!-- Search Box on the Left -->
<div class="search-box">
<input type="text" placeholder="Search..." />
</div>
</body>
</html>
Signup.blade.php:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up - My Online Shop</title>
<link rel="stylesheet" href="{{ asset('css/styles.css') }}">
</head>
<body>
<!-- Top Bar with Search, Nationwide Shipping, and Auth Buttons in One Row -->
<div class="top-bar1">
<!-- Search Box on the Left -->
<div class="search-box">
<input type="text" placeholder="Search..." />
</div>
<div class="form-group">
<button type="submit" class="submit-button">Sign Up</button>
<p>If you already have an account, click <span style="text-
decoration:underline; color: rgb(35, 35, 133);"><a href="/GroceryStore/signin">Sign
In</a></span></p>
</div>
</fieldset>
</form>
</section>
<script src="script.js"></script>
</body>
</html>
Web.php:
<?php
use Illuminate\Support\Facades\Route;
//Route::get('/student', 'App\Http\Controllers\AppController@index');
Route::get('GroceryStore/index', 'App\Http\Controllers\AppController@Home');
Route::get('GroceryStore/cart', 'App\Http\Controllers\AppController@cart');
Route::get('GroceryStore/signin', 'App\Http\Controllers\AppController@signin');
Route::get('GroceryStore/signup', 'App\Http\Controllers\AppController@signup');
Route::get('GroceryStore/shop', 'App\Http\Controllers\AppController@shop');
Route::get('GroceryStore/about', 'App\Http\Controllers\AppController@about');
Route::get('GroceryStore/conatct', 'App\Http\Controllers\AppController@contact');
AppController.php:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class appController extends Controller
{
//
public function Home () {
return view('GroceryStore/index');}
public function cart () {
return view('GroceryStore/cart');
}
public function about () {
return view('GroceryStore/about');
}
public function contact () {
return view('GroceryStore/conatct');
}
public function shop () {
return view('GroceryStore/shop');
}
public function signin() {
return view('GroceryStore/signin');
}
public function signup () {
return view('GroceryStore/signup');
}
Styles:
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
a {
text-decoration: none;
color: #000;
}
/* Top Bar Styling */
.top-bar1 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 20px;
background-color: #28a745; /* Green background */
font-family: Arial, sans-serif;
font-size: 14px;
color: #fff;
}
.search-box input {
display: flex;
align-items: center;
width: 100%;
margin-top: 2px;
font-size: 14px;
padding-left: 5px;
color: #333;
}
.auth-button {
text-decoration: none;
color: #fff;
background-color: #c22b2b; /* Blue background for buttons */
padding: 5px 15px;
border-radius: 5px;
font-size: 14px;
height: 20px;
font-weight: bold;
transition: background-color 0.3s;
}
.auth-button:hover {
background-color: #c44636; /* Darker blue on hover */
}
/* Top Bar */
.top-bar {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
font-size: 14px;
margin-right: 5px ;
}
/* Header Styles */
header {
display: flex;
margin-top: 0%;
justify-content: space-between;
align-items: center;
padding: 10px 50px; /* Reduced padding */
background-color: #f8f8f8;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.logo img {
height: 60px;
.navbar ul {
list-style: none;
display: flex;
gap: 20px;
}
.navbar ul li a {
padding: 10px 15px;
position: relative;
}
.navbar ul li a:hover {
color: #007BFF; /* Change color on hover */
}
.icons a {
margin-left: 15px;
}
.icons img {
width: 20px;
}
/* Slider Styles */
.slider {
width: 100%;
height: 400px;
overflow: hidden;
position: relative;
}
.slider .slide {
width: 100%;
height: 100%;
/* Controls Styles */
.controls {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
display: flex; /* Use flexbox to align items */
gap: 10px; /* Space between buttons */
}
.control-btn {
width: 50px; /* Make buttons circular */
height: 50px; /* Match width and height */
border: none; /* Remove default button border */
border-radius: 50%; /* Circular shape */
display: flex; /* Center icon inside the button */
align-items: center;
justify-content: center;
background-color: #060706; /* Background color for buttons */
color: white; /* Icon color */
cursor: pointer; /* Pointer cursor on hover */
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Optional shadow */
}
.control-btn:hover {
background-color: #0056b3; /* Slightly darker on hover */
}
.control-btn .material-icons {
font-size: 24px; /* Icon size */
}
h2 {
font-size: 28px;
margin-bottom: 20px;
}
.product-card {
display: inline-block;
width: 25%;
padding: 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
text-align: center;
margin: 20px;
}
.product-card img {
width: 80%;
height: 200px;
object-fit: cover;
}
.product-card p {
margin-top: 10px;
}
.shop-section {
padding: 50px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.product-card {
width: 23%; /* Four cards in a row */
margin-bottom: 30px;
padding: 15px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
text-align: center;
}
.product-card img {
width: 100%;
height: auto;
object-fit: cover;
}
.rating {
color: gold; /* Gold stars for rating */
}
.price {
font-weight: bold;
margin-top: 10px;
}
.add-to-cart {
background-color: #28a745; /* Green button */
color: white;
border: none;
padding: 10px 15px;
cursor: pointer;
margin-top: 10px;
}
.add-to-cart:hover {
background-color: #218838; /* Darker green on hover */
}
.contact-section h2 {
font-size: 28px;
margin-bottom: 20px;
}
.map-section {
margin-bottom: 40px;
}
.form-section {
display: flex;
justify-content: space-between;
}
.form-column {
flex: 1;
margin: 0 20px; /* Space between columns */
}
.form-column label {
display: block;
margin-bottom: 5px;
}
.form-column input,
.form-column textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 4px;
}
.send-message {
background-color: #28a745; /* Green button */
color: white;
border: none;
padding: 10px 15px;
cursor: pointer;
}
.send-message:hover {
background-color: #218838; /* Darker green on hover */
}
/* Cart Section Styles */
.cart-section {
padding: 50px;
text-align: center;
}
.cart-section h2 {
font-size: 28px;
margin-bottom: 30px;
}
.cart-items {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.cart-item {
display: flex;
align-items: center;
justify-content: space-between;
width: 80%;
padding: 15px;
border: 1px solid #ccc;
border-radius: 5px;
}
.cart-item img {
width: 100px;
height: auto;
object-fit: cover;
}
.item-details {
flex: 1;
padding: 0 15px;
text-align: left;
}
.item-details h4 {
margin: 0;
}
.price {
font-weight: bold;
margin: 5px 0;
}
.quantity {
width: 60px;
padding: 5px;
border: 1px solid #ccc;
border-radius: 4px;
}
.remove-item {
background-color: #dc3545; /* Red */
color: white;
border: none;
padding: 8px 12px;
cursor: pointer;
border-radius: 4px;
}
Output: