From 7eb6911f03520b307dac214a8cbb704e96502b35 Mon Sep 17 00:00:00 2001 From: Sijmen Schoon Date: Mon, 4 Nov 2019 00:41:08 +0100 Subject: [PATCH] fix some crap --- routes/cart.pl | 4 ++++ style.css | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/routes/cart.pl b/routes/cart.pl index 38774aa..c4a38eb 100644 --- a/routes/cart.pl +++ b/routes/cart.pl @@ -1,6 +1,10 @@ :- http_handler(root(cart/add/ProductName), cart_add(ProductName), []). % GET /cart/add/ProductName +cart_add(ProductName, Request) :- + \+ product(ProductName, _), !, + http_redirect(see_other, root(.), Request). + cart_add(ProductName, Request) :- http_session_id(SessionId), assert_cart_entry(SessionId, ProductName), diff --git a/style.css b/style.css index 09e42e8..e6f4932 100644 --- a/style.css +++ b/style.css @@ -25,6 +25,10 @@ main { border-radius: 5px; color: rgba(0, 0, 0, .87); text-decoration: none; + + overflow-wrap: break-word; + overflow: hidden; + text-overflow: ellipsis; } .product__name {