diff --git a/.gitignore b/.gitignore index 56aafbe..ab1a13f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ static/icons/* *.db +db.sql diff --git a/initializers/initializers.go b/initializers/initializers.go index 636dbbd..b942c6f 100644 --- a/initializers/initializers.go +++ b/initializers/initializers.go @@ -3,7 +3,6 @@ package initializers import ( "net/http" "database/sql" - "strconv" . "Elektromarket/views" . "Elektromarket/models" . "Elektromarket/db" @@ -23,18 +22,6 @@ func initializePages() { Pages["purchasement"] = Page{"/purchasement", "templates/purchasement.html", map[string]interface{}{}, PurchasementView} } -func insertCategories() { - for i := range Categories { - DbInsert("Category", "name", "'"+Categories[i].Name+"'") - } -} - -func insertProducts() { - for i := range Products { - DbInsert("Product", "categoryId, name, description, imgUrl, quantity, price","'"+strconv.Itoa(Products[i].Category.Id)+"','"+Products[i].Name+"','"+Products[i].Description+"','"+Products[i].ImgUrl+"','"+strconv.Itoa(Products[i].Quantity)+"','"+strconv.Itoa(Products[i].Price)+"'") - } -} - func initializeCategories() { var rows *sql.Rows = DbSelect("Category", "id, name") var id int diff --git a/static/css/style.css b/static/css/style.css index 74bf95c..3144144 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -74,15 +74,17 @@ a { .categoryTileContent { margin: auto; - font-size: 25px; + font-size: 24px; } .categoryIcon { width: 50px; height: 50px; background-size: 100%; + background-repeat: no-repeat; background-position: center; margin: 10px auto; + background-repeat: no-repeat; } .productTile { @@ -96,6 +98,7 @@ a { background-size: 100%; background-position: center; margin: auto; + background-repeat: no-repeat; } .productPrice {