Search in sources :

Example 1 with BootstrapBreadcrumb

use of com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb in project phoss-smp by phax.

the class SMPRendererSecure method getContent.

@Nonnull
public static IHCNode getContent(@Nonnull final ILayoutExecutionContext aLEC) {
    final HCNodeList ret = new HCNodeList();
    final BootstrapContainer aOuterContainer = ret.addAndReturnChild(new BootstrapContainer().setFluid(true));
    // Header
    aOuterContainer.addChild(_getNavbar(aLEC));
    // Breadcrumbs
    if (false) {
        final BootstrapBreadcrumb aBreadcrumbs = BootstrapBreadcrumbProvider.createBreadcrumb(aLEC);
        aBreadcrumbs.addClasses(CBootstrapCSS.D_NONE, CBootstrapCSS.D_SM_BLOCK);
        aOuterContainer.addChild(aBreadcrumbs);
    }
    // Content
    {
        final HCDiv aRow = aOuterContainer.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX).addClass(CBootstrapCSS.MT_2));
        final HCDiv aCol1 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX).addClass(CBootstrapCSS.MR_2));
        final HCDiv aCol2 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.FLEX_FILL));
        // left
        // We need a wrapper span for easy AJAX content replacement
        aCol1.addClass(CBootstrapCSS.D_PRINT_NONE).addChild(new HCSpan().setID(CLayout.LAYOUT_AREAID_MENU).addChild(getMenuContent(aLEC)));
        aCol1.addChild(new HCDiv().setID(CLayout.LAYOUT_AREAID_SPECIAL));
        // content - determine is exactly same as for view
        aCol2.addChild(BootstrapPageRenderer.getPageContent(aLEC));
    }
    aOuterContainer.addChild(SMPRendererPublic.createDefaultFooter(true, true, true));
    return ret;
}
Also used : HCDiv(com.helger.html.hc.html.grouping.HCDiv) HCSpan(com.helger.html.hc.html.textlevel.HCSpan) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapContainer(com.helger.photon.bootstrap4.layout.BootstrapContainer) BootstrapBreadcrumb(com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb) Nonnull(javax.annotation.Nonnull)

Example 2 with BootstrapBreadcrumb

use of com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb in project peppol-practical by phax.

the class LayoutAreaContentProviderSecure method getContent.

@Nonnull
public static IHCNode getContent(@Nonnull final LayoutExecutionContext aLEC) {
    final HCNodeList ret = new HCNodeList();
    // Header
    ret.addChild(_getNavbar(aLEC));
    final BootstrapContainer aOuterContainer = ret.addAndReturnChild(new BootstrapContainer().setFluid(true));
    // Breadcrumbs
    {
        final BootstrapBreadcrumb aBreadcrumbs = BootstrapBreadcrumbProvider.createBreadcrumb(aLEC);
        aBreadcrumbs.addClasses(CBootstrapCSS.D_NONE, CBootstrapCSS.D_SM_BLOCK);
        aOuterContainer.addChild(aBreadcrumbs);
    }
    // Content
    {
        final HCDiv aRow = aOuterContainer.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX));
        final HCDiv aCol1 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX).addClass(CBootstrapCSS.MR_2));
        final HCDiv aCol2 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.FLEX_FILL));
        // left
        // We need a wrapper span for easy AJAX content replacement
        aCol1.addClass(CBootstrapCSS.D_PRINT_NONE).addChild(new HCSpan().setID(CLayout.LAYOUT_AREAID_MENU).addChild(getMenuContent(aLEC)));
        aCol1.addChild(new HCDiv().setID(CLayout.LAYOUT_AREAID_SPECIAL));
        // content - determine is exactly same as for view
        aCol2.addChild(LayoutAreaContentProviderPublic.getPageContent(aLEC));
    }
    return ret;
}
Also used : HCDiv(com.helger.html.hc.html.grouping.HCDiv) HCSpan(com.helger.html.hc.html.textlevel.HCSpan) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapContainer(com.helger.photon.bootstrap4.layout.BootstrapContainer) BootstrapBreadcrumb(com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb) Nonnull(javax.annotation.Nonnull)

Example 3 with BootstrapBreadcrumb

use of com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb in project phoss-directory by phax.

the class SecureHTMLProvider method getContent.

@Nonnull
public static IHCNode getContent(@Nonnull final LayoutExecutionContext aLEC) {
    final HCNodeList ret = new HCNodeList();
    // Header
    ret.addChild(_getNavbar(aLEC));
    final BootstrapContainer aOuterContainer = ret.addAndReturnChild(new BootstrapContainer().setFluid(true));
    // Breadcrumbs
    {
        final BootstrapBreadcrumb aBreadcrumbs = BootstrapBreadcrumbProvider.createBreadcrumb(aLEC);
        aBreadcrumbs.addClasses(CBootstrapCSS.D_NONE, CBootstrapCSS.D_SM_BLOCK);
        aOuterContainer.addChild(aBreadcrumbs);
    }
    // Content
    {
        final HCDiv aRow = aOuterContainer.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX));
        final HCDiv aCol1 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX).addClass(CBootstrapCSS.MR_2));
        final HCDiv aCol2 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.FLEX_FILL));
        // left
        // We need a wrapper span for easy AJAX content replacement
        aCol1.addClass(CBootstrapCSS.D_PRINT_NONE).addChild(new HCSpan().setID(CLayout.LAYOUT_AREAID_MENU).addChild(getMenuContent(aLEC)).addChild(new HCDiv().addChild(new HCSmall().addChild(CDirectoryVersion.BUILD_VERSION))).addChild(new HCDiv().addChild(new HCSmall().addChild(CDirectoryVersion.BUILD_TIMESTAMP))));
        aCol1.addChild(new HCDiv().setID(CLayout.LAYOUT_AREAID_SPECIAL));
        // content - determine is exactly same as for view
        aCol2.addChild(BootstrapPageRenderer.getPageContent(aLEC));
    }
    return ret;
}
Also used : HCDiv(com.helger.html.hc.html.grouping.HCDiv) HCSpan(com.helger.html.hc.html.textlevel.HCSpan) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapContainer(com.helger.photon.bootstrap4.layout.BootstrapContainer) HCSmall(com.helger.html.hc.html.textlevel.HCSmall) BootstrapBreadcrumb(com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb) Nonnull(javax.annotation.Nonnull)

Example 4 with BootstrapBreadcrumb

use of com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb in project phoss-smp by phax.

the class SMPRendererPublic method getContent.

@Nonnull
public static IHCNode getContent(@Nonnull final LayoutExecutionContext aLEC) {
    final Locale aDisplayLocale = aLEC.getDisplayLocale();
    final HCNodeList ret = new HCNodeList();
    // Header
    ret.addChild(_getNavbar(aLEC));
    final BootstrapContainer aOuterContainer = ret.addAndReturnChild(new BootstrapContainer().setFluid(true));
    // Breadcrumbs
    if (false) {
        final BootstrapBreadcrumb aBreadcrumbs = BootstrapBreadcrumbProvider.createBreadcrumb(aLEC);
        aBreadcrumbs.addClasses(CBootstrapCSS.D_NONE, CBootstrapCSS.D_SM_BLOCK);
        aOuterContainer.addChild(aBreadcrumbs);
    }
    // Content
    aOuterContainer.addChild(BootstrapPageRenderer.getPageContent(aLEC));
    // Footer
    {
        final BootstrapContainer aDiv = createDefaultFooter(SMPWebAppConfiguration.isPublicShowApplicationName(), SMPWebAppConfiguration.isPublicShowSource(), SMPWebAppConfiguration.isPublicShowAuthor());
        {
            final BootstrapMenuItemRendererHorz aRenderer = new BootstrapMenuItemRendererHorz(aDisplayLocale);
            final HCUL aUL = new HCUL().addClass(CSS_CLASS_FOOTER_LINKS);
            for (final IMenuObject aMenuObj : FOOTER_OBJECTS) {
                if (aMenuObj instanceof IMenuSeparator)
                    aUL.addItem(aRenderer.renderSeparator(aLEC, (IMenuSeparator) aMenuObj));
                else if (aMenuObj instanceof IMenuItemPage)
                    aUL.addItem(aRenderer.renderMenuItemPage(aLEC, (IMenuItemPage) aMenuObj, false, false, false));
                else if (aMenuObj instanceof IMenuItemExternal)
                    aUL.addItem(aRenderer.renderMenuItemExternal(aLEC, (IMenuItemExternal) aMenuObj, false, false, false));
                else
                    throw new IllegalStateException("Unsupported menu object type!");
            }
            if (aUL.hasChildren())
                aDiv.addChild(aUL);
        }
        if (aDiv.hasChildren())
            aOuterContainer.addChild(aDiv);
    }
    return ret;
}
Also used : Locale(java.util.Locale) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapMenuItemRendererHorz(com.helger.photon.bootstrap4.uictrls.ext.BootstrapMenuItemRendererHorz) HCUL(com.helger.html.hc.html.grouping.HCUL) IMenuSeparator(com.helger.photon.core.menu.IMenuSeparator) BootstrapContainer(com.helger.photon.bootstrap4.layout.BootstrapContainer) IMenuItemPage(com.helger.photon.core.menu.IMenuItemPage) IMenuObject(com.helger.photon.core.menu.IMenuObject) BootstrapBreadcrumb(com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb) IMenuItemExternal(com.helger.photon.core.menu.IMenuItemExternal) Nonnull(javax.annotation.Nonnull)

Example 5 with BootstrapBreadcrumb

use of com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb in project peppol-practical by phax.

the class LayoutAreaContentProviderPublic method getContent.

@Nonnull
public static IHCNode getContent(@Nonnull final LayoutExecutionContext aLEC) {
    final Locale aDisplayLocale = aLEC.getDisplayLocale();
    final HCNodeList ret = new HCNodeList();
    // Header
    ret.addChild(_getNavbar(aLEC));
    final BootstrapContainer aOuterContainer = ret.addAndReturnChild(new BootstrapContainer().setFluid(true));
    // Breadcrumbs
    {
        final BootstrapBreadcrumb aBreadcrumbs = BootstrapBreadcrumbProvider.createBreadcrumb(aLEC);
        aBreadcrumbs.addClasses(CBootstrapCSS.D_NONE, CBootstrapCSS.D_SM_BLOCK);
        aOuterContainer.addChild(aBreadcrumbs);
    }
    // Content
    {
        final HCDiv aRow = aOuterContainer.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX));
        final HCDiv aCol1 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX));
        final HCDiv aCol2 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.ML_3).addClass(CBootstrapCSS.FLEX_FILL));
        // left
        // We need a wrapper span for easy AJAX content replacement
        aCol1.addClass(CBootstrapCSS.D_PRINT_NONE).addChild(new HCSpan().setID(CLayout.LAYOUT_AREAID_MENU).addChild(getMenuContent(aLEC)));
        aCol1.addChild(new HCDiv().setID(CLayout.LAYOUT_AREAID_SPECIAL));
        // content
        aCol2.addChild(getPageContent(aLEC));
    }
    // Footer
    {
        final BootstrapContainer aFooter = new BootstrapContainer().setFluid(true).setID(CLayout.LAYOUT_AREAID_FOOTER);
        aFooter.addChild(new HCP().addChild(AppHelper.getApplicationTitle() + " - created by Philip Helger").addChild(" - GitHub: ").addChild(new HCA(new SimpleURL("https://github.com/phax")).addChild("phax")).addChild(" - Twitter: ").addChild(new HCA(new SimpleURL("https://twitter.com/philiphelger")).addChild("@philiphelger")));
        if (FOOTER_ROW_COUNT > 0) {
            final BootstrapMenuItemRendererHorz aRenderer = new BootstrapMenuItemRendererHorz(aDisplayLocale);
            final HCDiv aTable = new HCDiv();
            aTable.addClass(CSS_CLASS_FOOTER_LINKS);
            for (int i = 0; i < FOOTER_ROW_COUNT; ++i) {
                final BootstrapRow aRow = aTable.addAndReturnChild(new BootstrapRow());
                aRow.createColumn(4).addChild(_getRenderedFooterMenuObj(aLEC, aRenderer, FOOTER_COL1.getAtIndex(i)));
                aRow.createColumn(4).addChild(_getRenderedFooterMenuObj(aLEC, aRenderer, FOOTER_COL2.getAtIndex(i)));
                aRow.createColumn(4).addChild(_getRenderedFooterMenuObj(aLEC, aRenderer, FOOTER_COL3.getAtIndex(i)));
            }
            aFooter.addChild(aTable);
        }
        aFooter.addChild(new HCP().addChild(new HCSmall().addChild("Disclaimer: This page is a personal project of Philip Helger." + " The content is neither provided nor approved by OpenPeppol AISBL." + " The official Peppol website is ").addChild(new HCA(new SimpleURL("https://www.peppol.eu")).addChild("www.peppol.eu").setTargetBlank())));
        ret.addChild(aFooter);
    }
    return ret;
}
Also used : Locale(java.util.Locale) HCDiv(com.helger.html.hc.html.grouping.HCDiv) HCSpan(com.helger.html.hc.html.textlevel.HCSpan) BootstrapRow(com.helger.photon.bootstrap4.grid.BootstrapRow) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapMenuItemRendererHorz(com.helger.photon.bootstrap4.uictrls.ext.BootstrapMenuItemRendererHorz) BootstrapContainer(com.helger.photon.bootstrap4.layout.BootstrapContainer) HCP(com.helger.html.hc.html.grouping.HCP) HCSmall(com.helger.html.hc.html.textlevel.HCSmall) HCA(com.helger.html.hc.html.textlevel.HCA) BootstrapBreadcrumb(com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb) SimpleURL(com.helger.commons.url.SimpleURL) ISimpleURL(com.helger.commons.url.ISimpleURL) Nonnull(javax.annotation.Nonnull)

Aggregations

HCNodeList (com.helger.html.hc.impl.HCNodeList)5 BootstrapBreadcrumb (com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb)5 BootstrapContainer (com.helger.photon.bootstrap4.layout.BootstrapContainer)5 Nonnull (javax.annotation.Nonnull)5 HCDiv (com.helger.html.hc.html.grouping.HCDiv)4 HCSpan (com.helger.html.hc.html.textlevel.HCSpan)4 HCSmall (com.helger.html.hc.html.textlevel.HCSmall)2 BootstrapMenuItemRendererHorz (com.helger.photon.bootstrap4.uictrls.ext.BootstrapMenuItemRendererHorz)2 Locale (java.util.Locale)2 ISimpleURL (com.helger.commons.url.ISimpleURL)1 SimpleURL (com.helger.commons.url.SimpleURL)1 HCP (com.helger.html.hc.html.grouping.HCP)1 HCUL (com.helger.html.hc.html.grouping.HCUL)1 HCA (com.helger.html.hc.html.textlevel.HCA)1 BootstrapRow (com.helger.photon.bootstrap4.grid.BootstrapRow)1 IMenuItemExternal (com.helger.photon.core.menu.IMenuItemExternal)1 IMenuItemPage (com.helger.photon.core.menu.IMenuItemPage)1 IMenuObject (com.helger.photon.core.menu.IMenuObject)1 IMenuSeparator (com.helger.photon.core.menu.IMenuSeparator)1