Adobe-Consulting-Services/acs-aem-commons

View on GitHub
ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/page/page.html

Summary

Maintainability
Test Coverage
<!--
  ~ ACS AEM Commons
  ~
  ~ Copyright (C) 2013 - 2023 Adobe
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!DOCTYPE html>
<html lang="en" class="spectrum spectrum--light spectrum--medium">
<head data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html">
    <meta charset="utf-8">
    <title>${currentPage.title || properties['jcr:title']}</title>
    <sly data-sly-test="${!wcmmode.disabled}"
         data-sly-call="${clientlib.all @ categories = [
            'cq.authoring.page',
            'cq.shared',
            'cq.foundation-main'
        ]
    }"></sly>

    <link rel="stylesheet" href="https://unpkg.com/@adobe/spectrum-css@2.15.1/dist/standalone/spectrum-light.css"/>
    <style>
        body {
            max-width: 1000px;
            margin: 1rem auto;
        }

        .main {
            padding: 2rem;
         }


    </style>
</head>
<body class="${componentContext.cssClassNames @ join=' '}" id="body"
      data-sly-use.requireAem="com.adobe.acs.commons.util.RequireAemModel">

<sly data-sly-include="header.html"/>

<div class="main">

    <div class="instructions"
        data-sly-resource="${'.' @ addSelectors='instructions'}"></div>
    </div>
    <!--/*
        If there are no requirements on the component
        OR
        If the runtime distribution is in the list of requirements
    */-->
    <div>
        <sly data-sly-test="${!(component.properties.requireAem.length) || (requireAem.distribution.value in component.properties.requireAem)}"
             data-sly-include="${component.properties.mainScript || 'main.html' }"/>

        <sly data-sly-test="${(component.properties.requireAem.length) && !(requireAem.distribution.value in component.properties.requireAem)}"
             data-sly-include="incompatible.html"/>
    </div>
</div>

<sly data-sly-include="footer.html"/>
</body>
</html>