From 4f9fcdc8986948ea3ac1c3e00b21a584d70afee7 Mon Sep 17 00:00:00 2001 From: rawleyIfowler Date: Wed, 23 Feb 2022 17:14:15 -0600 Subject: [PATCH] adjusted css for blog posts page --- models/blog_post.go | 4 ++-- static/index.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/blog_post.go b/models/blog_post.go index 9315cbb..4591e9f 100644 --- a/models/blog_post.go +++ b/models/blog_post.go @@ -22,8 +22,8 @@ import ( type BlogPost struct { gorm.Model - Url string `json:"url" gorm:"primaryKey"` - Title string `json:"title"` + Url string `json:"url" gorm:"primaryKey" gorm:"unique"` + Title string `json:"title" gorm:"unique"` Date string `json:"date"` Content string `json:"content"` Comments []Comment `gorm:"foreignKey:Id"` diff --git a/static/index.css b/static/index.css index b4a9608..144a907 100644 --- a/static/index.css +++ b/static/index.css @@ -131,12 +131,12 @@ a:hover:after { } .post-record { - padding-left: 6px; padding-right: 6px; width: 200px + 2vw; display: flex; flex-direction: row; flex-wrap: wrap; + justify-content: space-between; margin-top: 12px; }