Improved groups
This commit is contained in:
parent
6a92dc23bb
commit
3f27562581
@ -2,12 +2,28 @@ component Group(group *arn.Group)
|
|||||||
GroupTabs(group)
|
GroupTabs(group)
|
||||||
|
|
||||||
if group.Name != ""
|
if group.Name != ""
|
||||||
h1= group.Name
|
h1.mountable= group.Name
|
||||||
else
|
else
|
||||||
h1 untitled
|
h1.mountable untitled
|
||||||
|
|
||||||
p= len(group.Members)
|
.group-view
|
||||||
p= group.CreatedBy
|
.group-sidebar.mountable
|
||||||
|
.group-sidebar-section
|
||||||
|
h3 Description
|
||||||
|
.group-description!= markdown.Render(group.Description)
|
||||||
|
|
||||||
|
.group-sidebar-section
|
||||||
|
h3 Rules
|
||||||
|
.group-rules!= markdown.Render(group.Rules)
|
||||||
|
|
||||||
|
.group-sidebar-section
|
||||||
|
h3 Members
|
||||||
|
.user-avatars.group-members
|
||||||
|
each member in group.Members
|
||||||
|
Avatar(member.User())
|
||||||
|
|
||||||
|
.group-feed.mountable
|
||||||
|
p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin fermentum tellus congue, placerat augue vel, porta tortor. Nunc in elementum enim. Vestibulum ut arcu sed diam dapibus feugiat. Nam posuere, lectus et pellentesque interdum, mi orci aliquet lacus, a posuere lacus mi ac urna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec suscipit enim nec dui consectetur, vitae pulvinar urna commodo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
|
||||||
|
|
||||||
component GroupTabs(group *arn.Group)
|
component GroupTabs(group *arn.Group)
|
||||||
.tabs
|
.tabs
|
||||||
|
23
pages/group/group.scarlet
Normal file
23
pages/group/group.scarlet
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
.group-view
|
||||||
|
horizontal-wrap
|
||||||
|
width 100%
|
||||||
|
|
||||||
|
< 1100px
|
||||||
|
.group-view
|
||||||
|
vertical
|
||||||
|
|
||||||
|
.group-feed
|
||||||
|
flex 0.75
|
||||||
|
padding 1rem
|
||||||
|
|
||||||
|
.group-sidebar
|
||||||
|
flex 0.25
|
||||||
|
|
||||||
|
.group-sidebar-section
|
||||||
|
ui-element
|
||||||
|
padding 0.5rem 1rem
|
||||||
|
margin-bottom content-padding
|
||||||
|
|
||||||
|
.group-members
|
||||||
|
margin-bottom 0.5rem
|
||||||
|
justify-content flex-start
|
@ -66,7 +66,11 @@ func RenderField(b *bytes.Buffer, v *reflect.Value, field reflect.StructField, i
|
|||||||
|
|
||||||
switch field.Type.String() {
|
switch field.Type.String() {
|
||||||
case "string":
|
case "string":
|
||||||
b.WriteString(components.InputText(idPrefix+field.Name, fieldValue.String(), field.Name, ""))
|
if field.Tag.Get("type") == "textarea" {
|
||||||
|
b.WriteString(components.InputTextArea(idPrefix+field.Name, fieldValue.String(), field.Name, ""))
|
||||||
|
} else {
|
||||||
|
b.WriteString(components.InputText(idPrefix+field.Name, fieldValue.String(), field.Name, ""))
|
||||||
|
}
|
||||||
case "[]string":
|
case "[]string":
|
||||||
b.WriteString(components.InputTags(idPrefix+field.Name, fieldValue.Interface().([]string), field.Name, field.Tag.Get("tooltip")))
|
b.WriteString(components.InputTags(idPrefix+field.Name, fieldValue.Interface().([]string), field.Name, field.Tag.Get("tooltip")))
|
||||||
case "bool":
|
case "bool":
|
||||||
|
Loading…
Reference in New Issue
Block a user