Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/apps/web/app/page.tsx
blob: ca8672efc71d924b1f22ae0ee98ce4f36a40e95a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1

import type { Metadata } from "next";
import { Footer } from "@/components/Footer";
import { SiteHeader } from "@/components/SiteHeader";
import { AreaIcon, areaKinds } from "@/components/site/AreaIcon";
import { getHomeMessages } from "@/lib/home-messages";
import { getLocale } from "@/lib/locale.server";
import { forwardArrow, getMessages } from "@/lib/localization";
import "./site.css";

export async function generateMetadata(): Promise<Metadata> {
  const { metadata } = getMessages(await getLocale());
  return {
    title: metadata.homeTitle,
    description: metadata.homeDescription,
    alternates: { canonical: "https://progmasoft.com/" },
    robots: { index: true, follow: true },
  };
}

/**
 * progmasoft.com. Progmasoft is presented as a pool of technology areas; the
 * products have their own catalog on product.progmasoft.com.
 */
export default async function Homepage() {
  const locale = await getLocale();
  const { hero, pool, principles, developers } = getHomeMessages(locale);
  const arrow = forwardArrow(locale);
  return (
    <div className="pm-page">
      <SiteHeader locale={locale} />
      <main>
        <section className="pm-hero">
          <div className="pm-shell pm-hero-inner">
            <div>
              <p className="eyebrow">{hero.eyebrow}</p>
              <h1>
                {hero.titleStart} <span>{hero.titleAccent}</span>
              </h1>
              <p className="pm-lede">{hero.description}</p>
              <div className="pm-actions">
                <a className="button" href="#technology">
                  {hero.explore}
                </a>
                <a
                  className="button button-secondary"
                  href="https://product.progmasoft.com/"
                >
                  {hero.products} {arrow}
                </a>
              </div>
            </div>
            <div className="pm-pool-visual" aria-label={hero.poolLabel}>
              {pool.areas.map(([title], index) => (
                <div className="pm-pool-tile" key={title}>
                  <span className={`pm-icon pm-icon-${areaKinds[index]}`}>
                    <AreaIcon kind={areaKinds[index] ?? "languages"} />
                  </span>
                  <strong>{title}</strong>
                </div>
              ))}
            </div>
          </div>
        </section>

        <section className="pm-section" id="technology">
          <div className="pm-shell">
            <div className="pm-heading">
              <p className="eyebrow">{pool.eyebrow}</p>
              <h2>{pool.title}</h2>
              <p>{pool.description}</p>
            </div>
            <div className="pm-bento">
              {pool.areas.map(([title, description], index) => (
                <article
                  className={`pm-card${[0, 3, 4].includes(index) ? " pm-card-wide" : ""}`}
                  key={title}
                >
                  <span className={`pm-icon pm-icon-${areaKinds[index]}`}>
                    <AreaIcon kind={areaKinds[index] ?? "languages"} />
                  </span>
                  <h3>{title}</h3>
                  <p>{description}</p>
                </article>
              ))}
            </div>
            <div className="pm-catalog">
              <p>{pool.catalog}</p>
              <a className="pm-link" href="https://product.progmasoft.com/">
                {pool.catalogLink} {arrow}
              </a>
            </div>
          </div>
        </section>

        <section className="pm-section pm-section-muted" id="principles">
          <div className="pm-shell">
            <div className="pm-heading">
              <p className="eyebrow">{principles.eyebrow}</p>
              <h2>{principles.title}</h2>
            </div>
            <div className="pm-principles">
              {principles.items.map(([title, description], index) => (
                <article key={title}>
                  <span>{String(index + 1).padStart(2, "0")}</span>
                  <h3>{title}</h3>
                  <p>{description}</p>
                </article>
              ))}
            </div>
          </div>
        </section>

        <section className="pm-section" id="developers">
          <div className="pm-shell pm-band">
            <div>
              <p className="eyebrow">{developers.eyebrow}</p>
              <h2>{developers.title}</h2>
              <p>{developers.description}</p>
              <div className="pm-actions">
                <a
                  className="button button-light"
                  href="https://console.progmasoft.com/"
                >
                  {developers.console}
                </a>
                <a
                  className="button button-secondary"
                  href="https://account.progmasoft.com/"
                >
                  {developers.account}
                </a>
              </div>
            </div>
            <pre className="pm-code" dir="ltr">
              <code>
                <b>GET</b> https://credentials.progmasoft.com
                {"\n"}
                {"    "}/.well-known/openid-configuration
                {"\n\n"}
                <b>scope</b> openid profile email
                {"\n"}
                {"      "}viget.packages.read
              </code>
            </pre>
          </div>
        </section>
      </main>
      <Footer locale={locale} />
    </div>
  );
}