Skip to content

Commit

Permalink
Merge pull request #2 from sethwalker1/Jekyll
Browse files Browse the repository at this point in the history
Finalized First Prototype - 7/10
  • Loading branch information
sethwalker1 authored Jul 21, 2021
2 parents d042550 + a8234e8 commit 3564e04
Show file tree
Hide file tree
Showing 21 changed files with 550 additions and 72 deletions.
16 changes: 16 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Prevent viewing of htaccess file.
<Files .htaccess>
order allow,deny
deny from all
</Files>

# Prevent directory listings
# Options All -Indexes

ErrorDocument 404 /404.php

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
41 changes: 26 additions & 15 deletions 404.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
---
permalink: /404.html
permalink: /404
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
<p><strong>Page not found :(</strong></p>
<p>Redirecting you to the home page in <span>5</span>...</p>
</div>

<script>
setInterval(() => {
let countdown = document.querySelector('.container p > span');
let count = parseInt(countdown.innerHTML);

countdown.innerHTML = count - 1;
if (count > 1) return;
window.location.href = '/';
}, 1000);
</script>
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ theme: minima
plugins:
- jekyll-feed

include:
- .htaccess

# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
Expand Down
78 changes: 78 additions & 0 deletions _data/toppings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[
{
"name": "Pepperoni",
"cost": 0.00
},
{
"name": "Sausage",
"cost": 0.00
},
{
"name": "Bacon",
"cost": 0.00
},
{
"name": "Beef",
"cost": 0.00
},
{
"name": "Chicken",
"cost": 0.00
},
{
"name": "Anchovies",
"cost": 0.00
},
{
"name": "Japapenos",
"cost": 0.00
},
{
"name": "Onions",
"cost": 0.00
},
{
"name": "Banana Peppers",
"cost": 0.00
},
{
"name": "Black Olives",
"cost": 0.00
},
{
"name": "Mushrooms",
"cost": 0.00
},
{
"name": "Pineapple",
"cost": 0.00
},
{
"name": "Provolone Cheese",
"cost": 0.00
},
{
"name": "Cheddar Cheese",
"cost": 0.00
},
{
"name": "Green Peppers",
"cost": 0.00
},
{
"name": "Spinach",
"cost": 0.00
},
{
"name": "Red Peppers",
"cost": 0.00
},
{
"name": "Shredded Parmesan",
"cost": 0.00
},
{
"name": "Buffalo Sauce",
"cost": 0.00
}
]
4 changes: 4 additions & 0 deletions _includes/checkbox.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="{{ include.id }}" {% if include.checked %}checked{% endif %}>
<label class="custom-control-label" for="{{ include.id }}">{{ include.label }}</label>
</div>
14 changes: 7 additions & 7 deletions _includes/menuItem.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="col-6 menuItem">
<div class="row">
<div class="col-sm-6 menuItem">
<div class="row py-3">
<div class="col-md-6 col-lg-4 px-2">
<img src="{{ include.img }}" class="squareImg w-100">
</div>
<div class="col-md-6 col-lg-8">
<h3>{{ include.name }}</h3>
<h3 class="mt-2">{{ include.name }}</h3>
<p>{{ include.desc }}</p>
<a class="btn btn-secondary" data-mdb-toggle="modal" data-mdb-target="#menuModal">Order</a>
</div>
<div class="col-md-6 col-lg-4">
<img src="{{ include.img }}" class="menuItemImg">
<a class="btn btn-secondary" data-mdb-toggle="modal" data-mdb-target="#menuModal" onclick="change_preview('{{ include.img }}')">Order</a>
</div>
</div>
</div>
69 changes: 52 additions & 17 deletions _includes/menuModal.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,56 @@
<div id="menuModal" class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<h3 class="modal-title">Pizza Builder</h3>
<button
type="button"
class="btn-close"
data-mdb-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div class="modal-body col">
<div class="row mb-3">
<div class="col">
<img id="preview_pizza" class="squareImg" style="height: 12rem;">
</div>
<div class="col">
<div class="card">
<div class="card-body">
<h5 class="card-title">My Pizza</h5>
<div class="row" style="margin-left: 0">
Quantity
<div class="col-3">
<input class="form-control form-control-sm mb-2" type="text" value="1">
</div>
</div>
<button id="add_to_cart" class="btn btn-secondary btn-block" type="submit">Add to Cart</button>
</div>
</div>
</div>
</div>
<div class="row">
<h5>Toppings</h5>
<div class="col">
{% assign size = site.data.toppings.size %}
{% assign breakcol = size | divided_by: 3.0 | ceil %}

{% for i in (1..size) %}
{% assign j = i | minus: 1 %}
{% assign item = site.data.toppings[j] %}
{% assign id = "topping_" | append: item.name | downcase %}
{% include checkbox.html id=id label=item.name %}

{% assign row = i | modulo: breakcol %}
{% if row == 0 %}
</div><div class="col">
{% endif %}
{% endfor %}
</div>
</div>
<!-- Tabs navs -->
<ul class="nav nav-tabs mb-3" id="ex1" role="tablist">
{%- comment -%} <ul class="nav nav-tabs mb-3" id="ex1" role="tablist">
<li class="nav-item" role="presentation">
<a
class="nav-link active"
Expand Down Expand Up @@ -78,21 +116,18 @@ <h5 class="modal-title">Modal title</h5>
>
Tab 3 content
</div>
</div>
</div> {%- endcomment -%}
<!-- Tabs content -->
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-mdb-dismiss="modal"
>
Close
</button>
<button type="button" class="btn btn-primary">
Save changes
</button>
</div>
</div>
</div>
</div>

<script>
document.querySelector('#add_to_cart').addEventListener('click', e => {
e.preventDefault();
localStorage.setItem('loginToken', '123');
window.location.href = '/cart';
});
</script>

16 changes: 11 additions & 5 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Navbar -->
<nav class="navbar navbar-expand-lg bg-secondary navbar-light ">
<nav class="navbar navbar-expand-lg bg-secondary navbar-dark">
<!-- Container wrapper -->
<div class="container-fluid">

<!-- Navbar brand -->
<a class="navbar-brand" href="#">{{ site.title }}</a>
<a class="navbar-brand" href="/">{{ site.title }}</a>

<!-- Toggle button -->
<button class="navbar-toggler" type="button" data-mdb-toggle="collapse" data-mdb-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
Expand All @@ -17,7 +17,7 @@

<!-- Dropdown -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
{%- comment -%} <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-mdb-toggle="dropdown" aria-expanded="false">
<i class="fas fa-align-justify"></i>
</a>
<!-- Dropdown menu -->
Expand All @@ -34,15 +34,21 @@
<li>
<a class="dropdown-item" href="#">Something else here</a>
</li>
</ul>
</ul> {%- endcomment -%}
</li>

</ul>

<!-- Icons -->
<ul class="navbar-nav d-flex flex-row me-1">
<li class="nav-item me-3 me-lg-0">
<a class="nav-link" href="#"><i class="fas fa-shopping-cart"></i></a>
<a class="nav-link" href="/login"><i class="fas fa-user-alt"></i></a>
</li>
<li class="nav-item me-3 me-lg-0">
<a class="nav-link" href="/logout"><i class="fas fa-sign-out-alt"></i></a>
</li>
<li class="nav-item me-3 me-lg-0">
<a class="nav-link" href="/cart"><i class="fas fa-shopping-cart"></i></a>
</li>
</ul>

Expand Down
26 changes: 16 additions & 10 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,35 @@
<title>{{ site.title }} | {{ page.title }}</title>
<!-- Font Awesome -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css"
rel="stylesheet"
/>
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
rel="stylesheet"
href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
rel="stylesheet"
/>
<!-- MDB -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.6.0/mdb.min.css"
rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.6.0/mdb.min.css"
rel="stylesheet"
/>

<link href="cdn/css/index.css" rel="stylesheet" />
<link href="/cdn/css/global.css" rel="stylesheet" />
</head>
<body>
{% include navbar.html %}
{{ content }}
<div class="container-fluid {% if page.container_class %}{{ page.container_class }}{% endif %}">
{{ content }}
</div>
</body>
<!-- MDB -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.6.0/mdb.min.js"
type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.6.0/mdb.min.js"
></script>
<script
type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/popper.js/1.10.1/umd/popper.min.js"
></script>
</html>
Loading

0 comments on commit 3564e04

Please sign in to comment.