- {{.Add $i 1}}
+ {{$track.Add $i 1}}
{{$track.Title}}
Delete
diff --git a/admin/releasehttp.go b/admin/releasehttp.go
index cd73e98..7d098e6 100644
--- a/admin/releasehttp.go
+++ b/admin/releasehttp.go
@@ -145,16 +145,7 @@ func serveEditLinks(release *model.Release) http.Handler {
func serveEditTracks(release *model.Release) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
-
- type editTracksData struct {
- Release *model.Release
- Add func(a int, b int) int
- }
-
- err := components["edittracks"].Execute(w, editTracksData{
- Release: release,
- Add: func(a, b int) int { return a + b },
- })
+ err := components["edittracks"].Execute(w, release)
if err != nil {
fmt.Printf("Error rendering edit tracks component for %s: %s\n", release.ID, err)
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
diff --git a/admin/static/admin.css b/admin/static/admin.css
index 877b5da..a6e0bc2 100644
--- a/admin/static/admin.css
+++ b/admin/static/admin.css
@@ -206,13 +206,13 @@ form {
width: 100%;
display: block;
}
-form label {
+label {
width: 100%;
margin: 1rem 0 .5rem 0;
display: block;
color: #10101080;
}
-form input {
+input {
margin: .5rem 0;
padding: .3rem .5rem;
display: block;
diff --git a/admin/static/edit-account.css b/admin/static/edit-account.css
index 7a4d34a..37351b2 100644
--- a/admin/static/edit-account.css
+++ b/admin/static/edit-account.css
@@ -5,11 +5,10 @@ div.card {
}
label {
- width: auto;
- margin: 0;
- display: flex;
- align-items: center;
- color: inherit;
+ width: 100%;
+ margin: 1rem 0 .5rem 0;
+ display: block;
+ color: #10101080;
}
input {
width: min(20rem, calc(100% - 1rem));
diff --git a/admin/static/edit-release.css b/admin/static/edit-release.css
index aa70e34..63d399e 100644
--- a/admin/static/edit-release.css
+++ b/admin/static/edit-release.css
@@ -228,14 +228,12 @@ dialog div.dialog-actions {
}
#editcredits .credit .credit-info .credit-attribute label {
- width: auto;
- margin: 0;
display: flex;
align-items: center;
}
#editcredits .credit .credit-info .credit-attribute input[type="text"] {
- margin: 0 0 0 .25em;
+ margin-left: .25em;
padding: .2em .4em;
flex-grow: 1;
font-family: inherit;
@@ -243,9 +241,6 @@ dialog div.dialog-actions {
border-radius: 4px;
color: inherit;
}
-#editcredits .credit .credit-info .credit-attribute input[type="checkbox"] {
- margin: 0 .3em;
-}
#editcredits .credit .artist-name {
font-weight: bold;
@@ -374,10 +369,8 @@ dialog div.dialog-actions {
#editlinks td input[type="text"] {
width: calc(100% - .6em);
height: 100%;
- margin: 0;
padding: 0 .3em;
border: none;
- border-radius: 0;
outline: none;
cursor: pointer;
background: none;
diff --git a/model/track.go b/model/track.go
index ca54ddd..d44c224 100644
--- a/model/track.go
+++ b/model/track.go
@@ -12,8 +12,6 @@ type (
Description string `json:"description"`
Lyrics string `json:"lyrics" db:"lyrics"`
PreviewURL string `json:"previewURL" db:"preview_url"`
-
- Number int
}
)