001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.petstore.console.pages;
018
019import org.apache.juneau.console.freemarker.*;
020
021/**
022 * Builder twin of the About page ({@code about.ftlh}).
023 *
024 * <h5 class='section'>Example:</h5>
025 * <p class='bjava'>
026 *    <jk>return</jk> <jsm>twin</jsm>(<jv>req</jv>, AboutPageBuilders.<jsm>about</jsm>());
027 * </p>
028 */
029public final class AboutPageBuilders {
030
031   private AboutPageBuilders() {}
032
033   /**
034    * About.
035    *
036    * @return The page spec.
037    */
038   public static PageSpec about() {
039      return PageSpec.create().tab("about")
040         .html("overview", "About the petstore", """
041            <div class="jc-prose">
042            <p>The petstore is Apache Juneau's sample application and its console regression suite. Every page is built from
043            the same console pieces your own app can use: navigation, cards, data tables over BeanQuery, async jobs, themes
044            and a bearer-token guard.</p>
045            <p>The data is seeded deterministically, so the same pets, orders and users appear on every start.</p>
046            </div>""")
047         .html("links", "Elsewhere", """
048            <div class="jc-prose">
049            <ul>
050            <li><a href="/petstore/api">The REST API</a>, with its generated Swagger page.</li>
051            <li><a href="/petstore-ui">The React app</a>, a standalone single-page client of the same API.</li>
052            <li><a href="https://juneau.apache.org/docs/topics/JuneauPetstore">juneau-petstore</a>.</li>
053            </ul>
054            </div>""")
055         .html("beans", "REST utility beans", """
056            <div class="jc-prose">
057            <p>Three small beans for REST responses, shown against the <code>Pet</code> bean:</p>
058            <ul>
059            <li><a href="/console/about/beans/BeanDescription">BeanDescription</a>: the properties of a bean class.</li>
060            <li><a href="/console/about/beans/Hyperlink">Hyperlink</a>: a navigational link.</li>
061            <li><a href="/console/about/beans/SeeOtherRoot">SeeOtherRoot</a>: a redirect to the servlet root.</li>
062            </ul>
063            </div>""");
064   }
065}