Skip to content

Commit

Permalink
chore: rename css
Browse files Browse the repository at this point in the history
  • Loading branch information
viktomas committed Aug 15, 2023
1 parent 2c6acc0 commit f7d0ec6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
File renamed without changes.
40 changes: 40 additions & 0 deletions assets/similar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}

h1 {
text-align: center;
margin: 20px;
}

ul {
list-style-type: none;
display: flex;
gap: 0.5em;
flex-wrap: wrap;
justify-content: center;
padding: 0;
}

img {
max-width: 200px;
max-height: 200px;
}


input[type="checkbox"] {
display:none;
}

input[type="checkbox"] + label{
display: flex;
padding: 0.5rem;
/* background-color: blue; */
}

input[type="checkbox"]:checked + label{
background-color: red;
}
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"sort"
)

//go:embed templates/index.html
var indexTemplate string
//go:embed templates/similar.html
var simlarTemplate string

//go:embed templates/compare-similar.html
var compareSimilarTemplate string
Expand All @@ -40,7 +40,7 @@ func main() {
})

http.HandleFunc("/similar", func(w http.ResponseWriter, r *http.Request) {
tmpl := template.Must(template.New("index").Parse(indexTemplate))
tmpl := template.Must(template.New("index").Parse(simlarTemplate))
imageFiles := getImageFiles(rootFolder)

err := tmpl.Execute(w, imageFiles)
Expand Down
2 changes: 1 addition & 1 deletion templates/compare-similar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>PicSort - Compare similar</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="stylesheet" href="/assets/compare-similar.css">
</head>
<body>
<h1>Decide which one will stay</h1>
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html → templates/similar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>PicSort</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="stylesheet" href="/assets/similar.css">
</head>
<body>
<h1>Images</h1>
Expand Down

0 comments on commit f7d0ec6

Please sign in to comment.