From 0832bde63036a40c9b148ee2d900341122387586 Mon Sep 17 00:00:00 2001 From: ViBiOh Date: Thu, 16 Apr 2020 23:20:17 +0200 Subject: [PATCH] feat: Adding create modal (#14) --- templates/ketchup.html | 87 +++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 13 deletions(-) diff --git a/templates/ketchup.html b/templates/ketchup.html index 1d89e2d3..971126a1 100644 --- a/templates/ketchup.html +++ b/templates/ketchup.html @@ -1,14 +1,20 @@ -{{ define "delete-modal" }} - + +{{ end }} + +{{ define "delete-modal" }} + @@ -37,7 +59,7 @@

{{ .Repository }}

#delete-modal-{{ .ID }}:target, #edit-modal-{{ .ID }}:target, {{ end }} - #action-modal:target { + #create-modal:target { display: flex; z-index: 5; } @@ -46,13 +68,46 @@

{{ .Repository }}

#delete-modal-{{ .ID }}:target ~ .content, #edit-modal-{{ .ID }}:target ~ .content, {{ end }} - #action-modal:target ~ .content { + #create-modal:target ~ .content { display: flex; z-index: 5; } .target { + align-items: center; display: flex; + height: var(--icon-large); + } + + .target:hover { + background-color: var(--grey); + } + + .target__content { + width: 30rem; + } + + .target__action { + display: none; + } + + .target:hover .target__action { + display: inline-block; + } + + @media screen and (max-width: 640px) { + .target { + width: auto; + } + + .target__content { + flex: 1 1; + width: auto; + } + + .target__action { + display: inline-block; + } } @@ -82,12 +137,18 @@

{{ .Repository }}

+ {{ template "create-modal" }} + +

+ Create +

+ {{ range $index, $target := . }} {{ template "edit-modal" $target }} {{ template "delete-modal" $target }}
- +

{{ $target.Repository }}

@@ -101,10 +162,10 @@

{{ .Repository }}

{{ end }}
- + Edit icon - + Delete icon