Commit 8927c5ba authored by Erick Lopez's avatar Erick Lopez

Implemented CSS to product catalog

parent 875b9307
...@@ -473,3 +473,122 @@ footer a { ...@@ -473,3 +473,122 @@ footer a {
font-size: 24px; font-size: 24px;
} }
} }
/* Product Details Views */
#productList {
padding: 2vw;
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
grid-template-rows: repeat(0, minmax(0, 1fr));
column-gap: 4vw;
}
#productListTitle {
grid-area: 1/5/2/9;
align-self: center;
font-size: 3.5em;
}
#folderList {
grid-area: 2/1/3/5;
}
#penorganizerList {
grid-area: 2/5/3/9;
}
#plannerList {
grid-area: 2/9/3/13;
}
.collection{
padding: 2vw;
background-color: #d1d7d7;
border-radius: 1vw;
display: flex;
flex-direction: column;
}
.collectionName {
font-size: 2em;
font-weight: 400;
text-decoration: underline;
color: #2aabe4;
margin-bottom: 2vw;
}
.itemListing {
display: flex;
padding-left: 1em;
}
.itemName {
color: #2aabe4;
font-size: 1.7em;
}
.itemPrice {
font-size: 1.7em;
}
#productDetailsArea {
padding: 2.5vw;
padding-top: 3.5vw;
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
grid-template-rows: repeat(0, minmax(0, 1fr));
column-gap: 1vw;
}
#productName {
grid-area: 1/5/2/9;
align-self: center;
font-size: 2.5em;
text-decoration: underline;
}
#productPic {
grid-area: 2/1/5/5
}
#productPic img {
width: 30vw;
height: 30vw;
border-radius: 1vw;
box-shadow: 0.5vw 0.5vw 0.5vw rgb(191, 175, 178);
}
#productPrice {
grid-area: 2/6/3/10;
justify-self: start;
align-self: start;
}
#productPersonalization {
grid-area: 2/10/3/13;
align-self: start;
text-align: left;
}
#productPersonalization div{
padding-left: 1.5vw;
}
#productDetails {
grid-area: 3/6/5/10;
justify-self: start;
align-self: start;
display: column;
text-align: left;
}
#productDetails div{
padding-left: 1.5vw;
}
#productFeatures {
grid-area: 3/10/5/13;
justify-self: start;
align-self: start;
text-align: left;
}
#feature {
text-align: left;
padding-left: 2em;
}
<!DOCTYPE html> {% extends 'base.html' %}
<html lang="en"> {% block content-header %}
<li><a href="/admin-pd/agents">Agents</a></li>
<li><a href="/admin-pd/customers">Customers</a></li>
<header> <li><a href="/admin-pd/products/catalog">Products</a></li>
<h1>{{product.item_name}} Specs</h1> <li><a href="/admin-pd/orders">Orders</a></li>
{% endblock %}
</header> {% block content %}
<main id="productDetailsArea">
<main> <h1 id="productName">{{product.item_name}} Specs</h1>
<div> <a href="https://placeholder.com" id="productPic"><img src="https://via.placeholder.com/150"></a>
{% if product.folder.collection == "F" %} <div id="productPrice">
<div> Lenght: {{product.folder.length}} inches</div> <h2> Price: </h2>
<div> Width: {{product.folder.width}} inches</div> <div>₱ {{product.price}}</div>
<div> Thickness: {{product.folder.thickness}} inches</div> </div>
<div id="productPersonalization">
<h2> Personalization Limit:</h2>
<div>Up to {{product.personalization_limit}} letters</div>
</div>
<div id="productDetails">
{% if product.folder.collection == "F" %}
<h2> Dimensions:</h2>
<div> Length: {{product.folder.length}} inches</div>
<div> Width: {{product.folder.width}} inches</div>
<div> Thickness: {{product.folder.thickness}} inches</div>
{% elif product.penorganizer.collection == "PO" %} {% elif product.penorganizer.collection == "PO" %}
<div> Slots: {{product.penorganizer.slots}}</div> <h2> Slots: </h2>
<div>{{product.penorganizer.slots}}</div>
{% elif product.planner.collection == "P" %} {% elif product.planner.collection == "P" %}
<div> Lenght: {{product.planner.length}} inches</div> <h2> Dimensions:</h2>
<div> Width: {{product.planner.width}} inches</div> <div> Lenght: {{product.planner.length}} inches</div>
<div> Thickness: {{product.planner.thickness}} inches</div> <div> Width: {{product.planner.width}} inches</div>
<div> Thickness: {{product.planner.thickness}} inches</div>
{% endif %} {% endif %}
<div> Personalization: Up to {{product.personalization}} letters</div> </div>
</div><br> <div id="productFeatures">
<div class="collection" id="folder"> <h2> Features: </h2>
<div> Features: </div>
{% for description in description_list %} {% for description in description_list %}
{% if product.item_id == description.item_id.item_id %} {% if product.item_id == description.item_id.item_id %}
<li>{{ description.feature_id.feature }}</li> <li id="feature">{{ description.feature_id.feature }}</li>
{% endif %} {% endif %}
{% endfor %}
</div> </div>
{% endfor %} <br><br><br><br><br><br>
<footer> </main>
<div class="footer-container"> {% endblock %}
<a href="/admin-pd">©Last Minute Surplus</a> \ No newline at end of file
</div>
</footer>
\ No newline at end of file
<!DOCTYPE html> {% extends 'base.html' %}
<html lang="en"> {% block content-header %}
<li><a href="/admin-pd/agents">Agents</a></li>
<head> <li><a href="/admin-pd/customers">Customers</a></li>
<meta charset="UTF-8" /> <li><a href="/admin-pd/products/catalog">Products</a></li>
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <li><a href="/admin-pd/orders">Orders</a></li>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> {% endblock %}
<title>Product Catalog</title> {% block content %}
</head> <main id="productList">
<header> <h1 id="productListTitle">Product Catalog</h1>
<h1>This is the products html</h1> <div class="collection" id="folderList">
<h2 class="collectionName">Folders</h2>
</header>
<main> {% for folder in folder_list %}
<div class="collection" id="folder"> <div class="itemListing">
<h2>Folders</h2> <a href="{% url 'products:products-detail' folder.item_id %}">
{% for folder in folder_list %} <p class="itemName">{{ folder.item_name }}</p>
<div class="card-content-main"> </a>
<a href="{% url 'products:products-detail' folder.item_id %}"> <p class="itemPrice">₱{{ folder.price }}</p>
<div class="item_name">{{ folder.item_name }}</div> </div>
</a>
<div class="price">₱{{ folder.price }}</div><br>
{% endfor %} {% endfor %}
</div> </div>
<h2>Pen Organizers</h2> <div class="collection" id="penorganizerList">
<h2 class="collectionName">Pen Organizers</h2>
{% for pen in pen_organizer_list %} {% for pen in pen_organizer_list %}
<div class="card-content-main"> <div class="itemListing">
<a href="{% url 'products:products-detail' pen.item_id %}"> <a href="{% url 'products:products-detail' pen.item_id %}" >
<div class="item_name">{{ pen.item_name }}</div> <p class="itemName">{{ pen.item_name }}</p>
</a> </a>
<div class="price">₱{{ pen.price }}</div><br> <p class="itemPrice">₱{{ pen.price }}</p>
{% endfor %} </div>
</div> {% endfor %}
<h2>Planners</h2> </div>
<div class="collection" id="plannerList">
<h2 class="collectionName">Planners</h2>
{% for planner in planner_list %} {% for planner in planner_list %}
<div class="card-content-main"> <div class="itemListing">
<a href="{% url 'products:products-detail' planner.item_id %}"> <a href="{% url 'products:products-detail' planner.item_id %}" >
<div class="item_name">{{ planner.item_name }}</div> <p class="itemName">{{ planner.item_name }}</p>
</a> </a>
<div class="price">₱{{ planner.price }}</div><br> <p class="itemPrice">₱{{ planner.price }}</p>
{% endfor %} </div>
</main> {% endfor %}
<footer>
<div class="footer-container">
<a href="/admin-pd">©Last Minute Surplus</a>
</div> </div>
</footer> </main>
</html> {% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment