Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: adjusting position of pagination #418

Merged
merged 5 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion activity/timeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (c *TimelineCompo) MarshalHTML(ctx context.Context) ([]byte, error) {
h.Div().Attr("v-pre", true).Text(userName).Class("font-weight-medium").ClassIf("text-grey", i != 0),
),
h.Div().Class("d-flex flex-row align-center ga-2").Children(
h.Div().Style("width: 16px"),
h.Div().Style("width: 16px; flex-shrink:0"),
c.humanContent(ctx, log, lo.If(i != 0, "text-grey").Else("")),
),
),
Expand Down
6 changes: 3 additions & 3 deletions pagebuilder/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ transform-origin: 0 0; transform:scale(0.5);width:200%;height:200%`),
h.Text(se),
).Class(fmt.Sprintf("bg-%s", ColorGreyLighten3)),
VBtn("Edit Page").AppendIcon("mdi-pencil").Color(ColorBlack).
Class("rounded-sm").Height(40).Variant(VariantFlat),
Class("rounded").Height(36).Variant(VariantElevated),
).Class("pa-6 w-100 d-flex justify-space-between align-center").Style(`position:absolute;bottom:0;left:0`),
).Style(`position:relative;height:320px;width:100%`).Class("border-thin rounded-lg").
Attr("@click",
web.Plaid().URL(fmt.Sprintf("%s/%s-editors/%v", b.prefix, pm.Info().URIName(), ps)).PushState(true).Go(),
),
h.Div(
h.A(h.Text(previewDevelopUrl)).Href(previewDevelopUrl),
VBtn("").Icon("mdi-file-document-multiple").Variant(VariantText).Size(SizeXSmall).Class("ml-1").
VBtn("").Icon("mdi-content-copy").Color(ColorSecondary).Width(20).Height(20).Variant(VariantText).Size(SizeXSmall).Class("ml-1 fix-btn-icon").
Attr("@click", fmt.Sprintf(`$event.view.window.navigator.clipboard.writeText(%s);vars.presetsMessage = { show: true, message: "success", color: "%s"}`, copyURL, ColorSuccess)),
).Class("d-inline-flex align-center"),
).Class("d-inline-flex align-center py-4"),
).Class("my-10")
}
}
Expand Down
4 changes: 2 additions & 2 deletions presets/common_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ func defaultToPage(config commonPageConfig, obj interface{}, ctx *web.EventConte
web.ParentSizeObserver("{ width, height }").Children(
VRow(
VCol(asideContent).Attr(":cols", `width>900?8:12`),
VCol(sidePanel).Attr(":cols", `width>900?4:12`),
VCol(sidePanel).Attr(":cols", `width>900?4:12`).Class("pl-15 pr-4 pt-23"),
),
),
)
).Class("pt-0")
}
}
return asideContent
Expand Down
2 changes: 1 addition & 1 deletion presets/detailing.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (b *DetailingBuilder) defaultPageFunc(ctx *web.EventContext) (r web.PageRes
actionButtonsCompo,
tabsContent,
),
).Fluid(true)
).Fluid(true).Class("px-0 pt-0")

return
}
Expand Down
4 changes: 2 additions & 2 deletions presets/listing_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ func (b *ListingBuilder) openListingDialog(evCtx *web.EventContext) (r web.Event
};`, compo.CompoID())

content := VCard().Attr("id", compo.CompoID()).Children(
VCardTitle().Class("d-flex align-center").Children(
VCardTitle().Class("d-flex align-center h-abs-26 py-6 px-6 content-box").Children(
titleCompo,
VSpacer(),
h.Div().Id(compo.ActionsComponentTeleportToID()),
VBtn("").Elevation(0).Icon("mdi-close").Class("ml-2").Attr("@click", CloseListingDialogVarScript),
VBtn("").Elevation(0).Size(SizeXSmall).Icon("mdi-close").Class("ml-2 dialog-close-btn").Attr("@click", CloseListingDialogVarScript),
),
VCardText().Class("pa-0").Children(
b.mb.p.dc.MustInject(injectorName, stateful.ParseQuery(compo)),
Expand Down
14 changes: 9 additions & 5 deletions presets/listing_compo.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,16 @@ func (c *ListingCompo) MarshalHTML(ctx context.Context) (r []byte, err error) {
VCard().Elevation(0).Children(
h.Tag("div").Children(
c.tabsFilter(ctx),
).Class("ml-2"),
c.toolbarSearch(ctx),
VCardText().Class("pa-2").Children(
).Class("px-6"),
h.Div(
c.toolbarSearch(ctx),
).Class(("px-4")),
VCardText().Class("px-6 pt-2").Children(
c.dataTable(ctx),
),
c.cardActionsFooter(ctx),
h.Div(
c.cardActionsFooter(ctx),
).Class(("px-4 pb-2")),
),
).MarshalHTML(ctx)
}
Expand Down Expand Up @@ -540,7 +544,7 @@ func (c *ListingCompo) dataTable(ctx context.Context) h.HTMLComponent {
if c.lb.disablePagination {
return dataTable
}
dataTableAdditions = h.Div().Class("mt-2").Children(
dataTableAdditions = h.Div().Style("margin-top:26px").Children(
vx.VXTablePagination().
Total(int64(totalCount)).
CurrPage(searchParams.Page).
Expand Down
20 changes: 10 additions & 10 deletions publish/version_compo.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func DefaultVersionComponentFunc(mb *presets.ModelBuilder, cfg ...VersionCompone
versionSwitch = v.VChip(
h.Text(`{{ xlocals.versionName }}`),
).Label(true).Variant(v.VariantOutlined).
Attr("style", "height:40px;").
Attr("style", "height:36px;").
On("click", web.Plaid().EventFunc(actions.OpenListingDialog).
URL(mb.Info().PresetsPrefix()+"/"+urlSuffix).
Query(filterKeySelected, slug).
Expand All @@ -102,8 +102,8 @@ func DefaultVersionComponentFunc(mb *presets.ModelBuilder, cfg ...VersionCompone
))

if !DeniedDo(verifier, obj, ctx.R, presets.PermUpdate, PermDuplicate) {
div.AppendChildren(v.VBtn(msgr.Duplicate).PrependIcon("mdi-file-document-multiple").
Height(40).Class("ml-2").Variant(v.VariantOutlined).
div.AppendChildren(v.VBtn(msgr.Duplicate).
Height(36).Class("ml-2").Variant(v.VariantOutlined).
Attr("@click", fmt.Sprintf(`locals.action="%s";locals.commonConfirmDialog = true`, EventDuplicateVersion)))
}
}
Expand All @@ -120,7 +120,7 @@ func DefaultVersionComponentFunc(mb *presets.ModelBuilder, cfg ...VersionCompone
}
publishBtn = h.Div(
v.VBtn(msgr.Publish).Attr("@click", publishEvent).Rounded("0").
Class("rounded-s ml-2").Variant(v.VariantFlat).Color(v.ColorPrimary).Height(40),
Class("rounded-s ml-2").Variant(v.VariantElevated).Color(v.ColorPrimary).Height(36),
)
}
case StatusOnline:
Expand All @@ -141,11 +141,11 @@ func DefaultVersionComponentFunc(mb *presets.ModelBuilder, cfg ...VersionCompone
publishBtn = h.Div(
h.Iff(unPublishEvent != "", func() h.HTMLComponent {
return v.VBtn(msgr.Unpublish).Attr("@click", unPublishEvent).
Class("ml-2").Variant(v.VariantFlat).Color(v.ColorError).Height(40)
Class("ml-2").Variant(v.VariantElevated).Color(v.ColorError).Height(36)
}),
h.Iff(rePublishEvent != "", func() h.HTMLComponent {
return v.VBtn(msgr.Republish).Attr("@click", rePublishEvent).
Class("ml-2").Variant(v.VariantFlat).Color(v.ColorPrimary).Height(40)
Class("ml-2").ClassIf("rounded-0 rounded-s", true).Variant(v.VariantElevated).Color(v.ColorPrimary).Height(36)
}),
).Class("d-inline-flex")
}
Expand All @@ -172,10 +172,10 @@ func DefaultVersionComponentFunc(mb *presets.ModelBuilder, cfg ...VersionCompone
scheduleBtn = v.VAutocomplete().PrependInnerIcon("mdi-alarm").Density(v.DensityCompact).
Variant(v.FieldVariantSoloFilled).ModelValue("Schedule Publish Time").
BgColor(v.ColorPrimaryLighten2).Readonly(true).
Width(600).HideDetails(true).Attr("@click", clickEvent).Class("ml-2 text-caption")
Width(600).HideDetails(true).Attr("@click", clickEvent).Class("ml-2 text-caption page-builder-autoCmp")
} else {
scheduleBtn = v.VBtn("").Children(v.VIcon("mdi-alarm").Size(v.SizeXLarge)).Rounded("0").Class("ml-1 rounded-e").
Variant(v.VariantFlat).Color(v.ColorPrimary).Height(40).Attr("@click", clickEvent)
scheduleBtn = v.VBtn("").Size(v.SizeSmall).Children(v.VIcon("mdi-alarm").Size(v.SizeXLarge)).Rounded("0").Class("rounded-e ml-abs-1").
Variant(v.VariantElevated).Color(v.ColorPrimary).Width(36).Height(36).Attr("@click", clickEvent)
}
div.AppendChildren(scheduleBtn)
// SchedulePublishDialog
Expand Down Expand Up @@ -402,7 +402,7 @@ func configureVersionListDialog(db *gorm.DB, pb *Builder, b *presets.Builder, pm
`, selected, filter.Encode(), filterKeySelected))).Go(),
),
),
v.VBtn(utilsMsgr.Cancel).Variant(v.VariantOutlined).Size(v.SizeSmall).Color(v.ColorSecondary).
v.VBtn(utilsMsgr.Cancel).Variant(v.VariantOutlined).Size(v.SizeSmall).
Class("text-none text-caption font-weight-regular").
Attr("@click", "vars.presetsListingDialog=false"),
)
Expand Down
Loading