adjust layout and add detials button

This commit is contained in:
Robin Olsen
2026-02-25 12:39:21 +01:00
parent 1438d0e567
commit 6264f9dfc9
10 changed files with 101 additions and 169 deletions

View File

@@ -92,7 +92,7 @@ templ IssueForm(props IssueFormProps) {
}
type IssueTableProps struct {
Issues []models.Issue
Issues []*models.Issue
}
templ IssueTable(props IssueTableProps) {
@@ -111,7 +111,7 @@ templ IssueTable(props IssueTableProps) {
)
}
templ IssueRows(issues []models.Issue) {
templ IssueRows(issues []*models.Issue) {
for _, issue := range issues {
<tr class="hover">
<td class="px-4 py-2 border">

View File

@@ -219,7 +219,7 @@ func IssueForm(props IssueFormProps) templ.Component {
}
type IssueTableProps struct {
Issues []models.Issue
Issues []*models.Issue
}
func IssueTable(props IssueTableProps) templ.Component {
@@ -263,7 +263,7 @@ func IssueTable(props IssueTableProps) templ.Component {
})
}
func IssueRows(issues []models.Issue) templ.Component {
func IssueRows(issues []*models.Issue) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {

View File

@@ -14,10 +14,10 @@ templ Layout(props LayoutProps) {
@Header(props.Header)
<div class="flex">
//@Sidebar(props.Routes) Hidden until we need it
@props.Modal
<main class="flex-1 p-1 overflow-auto">
{ children... }
</main>
@props.Modal
</div>
</body>
</html>

View File

@@ -71,15 +71,7 @@ func Layout(props LayoutProps) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<div class=\"flex\"><main class=\"flex-1 p-1 overflow-auto\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</main>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<div class=\"flex\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -87,7 +79,15 @@ func Layout(props LayoutProps) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div></body></html>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<main class=\"flex-1 p-1 overflow-auto\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</main></div></body></html>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}