fancl před 2 roky
rodič
revize
70ba48b4f1
3 změnil soubory, kde provedl 10 přidání a 4 odebrání
  1. 6 2
      element/entry.go
  2. 4 0
      element/table.go
  3. 0 2
      theme/default.go

+ 6 - 2
element/entry.go

@@ -9,6 +9,7 @@ type (
 	Entry struct {
 		Title Element
 		Items map[string]Element
+		Outro Element
 	}
 )
 
@@ -33,6 +34,9 @@ func (element *Entry) String() string {
 		br.WriteString(endTag(atom.Div.String()))
 		br.WriteString(endTag(atom.Div.String()))
 	}
+	if element.Outro != nil {
+		br.WriteString(element.Outro.Html())
+	}
 	br.WriteString(endTag(atom.Div.String()))
 	return br.String()
 }
@@ -45,9 +49,9 @@ func (element *Entry) AddItem(label string, txt *Text) *Entry {
 	return element
 }
 
-func NewEntry(title string) *Entry {
+func NewEntry(element Element) *Entry {
 	return &Entry{
-		Title: NewText(title, WithTextTag(atom.P)),
+		Title: element,
 		Items: make(map[string]Element),
 	}
 }

+ 4 - 0
element/table.go

@@ -10,6 +10,7 @@ type (
 		Title  Element
 		Header []Element
 		Body   [][]Element
+		Outro  Element
 	}
 )
 
@@ -53,6 +54,9 @@ func (table *Table) String() string {
 		br.WriteString(endTag(atom.Tbody.String()))
 	}
 	br.WriteString(endTag(atom.Table.String()))
+	if table.Outro != nil {
+		br.WriteString(table.Outro.Html())
+	}
 	br.WriteString(endTag(atom.Div.String()))
 	return br.String()
 }

+ 0 - 2
theme/default.go

@@ -183,8 +183,6 @@ func (theme *Default) Template() string {
 
 	.table-title{
 	  box-sizing: border-box;
-	  border-left: 3px solid #727cf5;
-	  padding: .38rem 0 .38rem .5rem;
 	  margin-bottom: 1rem;
 	}