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/*
|
static/icons/*
|
||||||
*.db
|
*.db
|
||||||
|
db.sql
|
||||||
|
@ -3,7 +3,6 @@ package initializers
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"strconv"
|
|
||||||
. "Elektromarket/views"
|
. "Elektromarket/views"
|
||||||
. "Elektromarket/models"
|
. "Elektromarket/models"
|
||||||
. "Elektromarket/db"
|
. "Elektromarket/db"
|
||||||
@ -23,18 +22,6 @@ func initializePages() {
|
|||||||
Pages["purchasement"] = Page{"/purchasement", "templates/purchasement.html", map[string]interface{}{}, PurchasementView}
|
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() {
|
func initializeCategories() {
|
||||||
var rows *sql.Rows = DbSelect("Category", "id, name")
|
var rows *sql.Rows = DbSelect("Category", "id, name")
|
||||||
var id int
|
var id int
|
||||||
|
@ -74,15 +74,17 @@ a {
|
|||||||
|
|
||||||
.categoryTileContent {
|
.categoryTileContent {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
font-size: 25px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.categoryIcon {
|
.categoryIcon {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.productTile {
|
.productTile {
|
||||||
@ -96,6 +98,7 @@ a {
|
|||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.productPrice {
|
.productPrice {
|
||||||
|
Loading…
Reference in New Issue
Block a user