Style update, delete redundant code
This commit is contained in:
parent
cf7a70e145
commit
c24ac247da
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@
|
||||
|
||||
static/icons/*
|
||||
*.db
|
||||
db.sql
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user