mirror of
https://github.com/httpjamesm/AnonymousOverflow.git
synced 2025-06-21 08:30:58 +00:00
refactor: rely heavier on the templating engine
style: fix comments spacing on mobile
This commit is contained in:
parent
c0df07abad
commit
3b79efc83c
7 changed files with 151 additions and 46 deletions
17
src/types/answer.go
Normal file
17
src/types/answer.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package types
|
||||
|
||||
import "html/template"
|
||||
|
||||
type FilteredAnswer struct {
|
||||
Upvotes string
|
||||
IsAccepted bool
|
||||
|
||||
AuthorName string
|
||||
AuthorURL string
|
||||
|
||||
Timestamp string
|
||||
|
||||
Body template.HTML
|
||||
|
||||
Comments []FilteredComment
|
||||
}
|
8
src/types/comment.go
Normal file
8
src/types/comment.go
Normal file
|
@ -0,0 +1,8 @@
|
|||
package types
|
||||
|
||||
type FilteredComment struct {
|
||||
Text string
|
||||
Timestamp string
|
||||
AuthorName string
|
||||
AuthorURL string
|
||||
}
|
12
src/types/question.go
Normal file
12
src/types/question.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
package types
|
||||
|
||||
import "html/template"
|
||||
|
||||
type FilteredQuestion struct {
|
||||
Title string
|
||||
Body template.HTML
|
||||
Timestamp string
|
||||
AuthorName string
|
||||
AuthorURL string
|
||||
ShortenedBody string
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue