Style update, delete redundant code

This commit is contained in:
mikgor 2018-10-28 21:48:52 +01:00
parent cf7a70e145
commit c24ac247da
3 changed files with 5 additions and 14 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
static/icons/*
*.db
db.sql

View File

@ -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

View File

@ -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 {