Author: Matt Stauffer (mattstauffer)
Committer: Derick Rethans (derickr)
Date: 2026-10-30T13:09:17Z
Commit: Create shared footer logic so the whole site can share footer with re… · php/web-php@14b101f · GitHub
Raw diff: https://github.com/php/web-php/commit/14b101ff27b62bbbb796635ff97f199c03e40857.diff
Create shared footer logic so the whole site can share footer with release pages
Changed paths:
A include/shared-footer.inc
A public/styles/shared-footer.css
M include/footer.inc
M include/header.inc
M include/layout.inc
M public/styles/theme-base.css
M src/Themes/ReleasePage.php
Diff:
diff --git a/include/footer.inc b/include/footer.inc
index c0acdbb4a2..7baef52188 100644
--- a/include/footer.inc
+++ b/include/footer.inc
@@ -59,36 +59,16 @@
</div><!-- layout -->
-<?php if(!isset($config['footer']) || $config['footer']): ?>
- <footer>
- <div class="container footer-content">
- <div class="row-fluid">
- <ul class="footmenu">
-<?php
-global $LANG;
-if (!empty($_SERVER['BASE_PAGE'])
- && str_starts_with($_SERVER['BASE_PAGE'], 'manual/' . $LANG . '/')) {
-?>
- <li><a href="/manual/<?php echo $LANG; ?>/copyright.php">Copyright © 2001-<?php echo date('Y'); ?> The PHP Documentation Group</a></li>
-<?php
-} else {
-?>
- <li><a href="/copyright.php">Copyright © 2001-<?php echo date('Y'); ?> The PHP Group</a></li>
<?php
+// Render the fancy shared footer on every page unless the caller opts out with
+// 'footer' => false — used by the release landing pages (releases/*/release.inc),
+// which emit the footer inline via ReleasePage::getPrefooter().
+//
+// 'footer_credit' optionally supplies extra markup for the footer's credit row.
+if (($config['footer'] ?? true) !== false) {
+ echo fancy_footer($config['footer_credit'] ?? '');
}
?>
- <li><a href="/my.php">My PHP.net</a></li>
- <li><a href="/contact.php">Contact</a></li>
- <li><a href="/sites.php">Other PHP.net sites</a></li>
- <li><a href="/privacy.php">Privacy policy</a></li>
-<?php if (!empty($_SERVER['BASE_PAGE']) && strncmp($_SERVER['BASE_PAGE'], 'manual', 6) !== 0): ?>
- <li><a href="https://github.com/php/web-php/blob/master/public/<?php echo urlencode($_SERVER['BASE_PAGE']); ?>">View Source</a></li>
-<?php endif; ?>
- </ul>
- </div>
- </div>
- </footer>
-<?php endif; ?>
<?php
// if elephpants enabled, insert placeholder nodes
// to be populated with images via javascript.
diff --git a/include/header.inc b/include/header.inc
index 5cedcb97aa..4660e5fb39 100644
--- a/include/header.inc
+++ b/include/header.inc
@@ -16,6 +16,13 @@ if (isset($config["css_overwrite"])) {
$css_files = $config["css_overwrite"];
}
+// The fancy footer is the default for classic pages (see footer.inc); load its
+// standalone stylesheet everywhere except the release landing pages, which ship
+// their own footer styles in php85.css.
+if (!in_array('php85.css', $css_files, true) && !in_array('/styles/php85.css', $css_files, true)) {
+ $css_files[] = '/styles/shared-footer.css';
+}
+
foreach($css_files as $filename) {
// files that do not start with / are assumed to be located in the /styles
// directory
diff --git a/include/layout.inc b/include/layout.inc
index fa0f2a0348..176ad76161 100644
--- a/include/layout.inc
+++ b/include/layout.inc
@@ -520,6 +520,20 @@ function site_footer(array $config = []): void
require __DIR__ . "/footer.inc";
}
+// Render the shared footer template to a string
+function fancy_footer(string $extraCredit = ''): string
+{
+ // Credit manual/documentation pages to the PHP Documentation Group;
+ // everything else to the PHP Group.
+ $copyrightHolder = (!empty($_SERVER['BASE_PAGE']) && str_starts_with($_SERVER['BASE_PAGE'], 'manual/'))
+ ? 'The PHP Documentation Group'
+ : 'The PHP Group';
+
+ ob_start();
+ require __DIR__ . "/shared-footer.inc";
+ return (string) ob_get_clean();
+}
+
function sha256_html(string $checksum): string
{
$checksum = htmlspecialchars($checksum, ENT_QUOTES, 'UTF-8');
diff --git a/include/shared-footer.inc b/include/shared-footer.inc
new file mode 100644
index 0000000000..bcd9ff0eaa
--- /dev/null
+++ b/include/shared-footer.inc
@@ -0,0 +1,109 @@
+<?php
+/**
+ * Template for the shared "fancy" footer.
+ *
+ * Expected variables in scope:
+ * string $copyrightHolder Name credited in the copyright line.
+ * string $extraCredit Optional extra markup for the credits row (may be '').
+ *
+ * The markup is CSS-framework agnostic: it carries both the release-page class
+ * names (footer-grid, social-icons, …) and a top-level `php-footer` class, so the
+ * caller can dress it with either the Tailwind build in /styles/php85.css or the
+ * standalone /styles/shared-footer.css.
+ *
+ * @var string $copyrightHolder
+ * @var string $extraCredit
+ */
+?>
+<footer class="php-footer">
+ <div class="footer-container">
+ <div class="footer-grid">
+ <div>
+ <a href="/" class="footer-logo">
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -1 100 50" fill="currentColor">
+ <path d="m7.579 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"></path>
+ <path d="m41.093 0 7.314 0-2.067 10.123 6.572 0c3.604 0.071 6.289 0.813 8.056 2.226 1.802 1.413 2.332 4.099 1.59 8.056l-3.551 17.649-7.42 0 3.392-16.854c0.353-1.767 0.247-3.021-0.318-3.763-0.565-0.742-1.784-1.113-3.657-1.113l-5.883-0.053-4.346 21.783-7.314 0 7.632-38.054 0 0"></path>
+ <path d="m70.412 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"></path>
+ </svg>
+ </a>
+
+ <p>PHP is developed and maintained by a global community of contributors.
+ <a href="https://thephp.foundation/" target="_blank">The PHP Foundation</a> helps fund this work. <br>
+ If PHP is part of your business or projects, consider sponsoring the Foundation.</p>
+
+ <div class="social-icons">
+ <a href="PHP | LinkedIn; target="_blank" rel="noopener noreferrer">
+ <span class="sr-only">Linkedin</span>
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
+ <path fill-rule="evenodd" clip-rule="evenodd"
+ d="M11.9428 1.75H12.0572C14.2479 1.74999 15.9686 1.74998 17.312 1.93059C18.6886 2.11568 19.7809 2.50271 20.6391 3.36091C21.4973 4.21911 21.8843 5.31137 22.0694 6.68802C22.25 8.03144 22.25 9.75214 22.25 11.9428V12.0572C22.25 14.2479 22.25 15.9686 22.0694 17.312C21.8843 18.6886 21.4973 19.7809 20.6391 20.6391C19.7809 21.4973 18.6886 21.8843 17.312 22.0694C15.9686 22.25 14.2479 22.25 12.0572 22.25H11.9428C9.7521 22.25 8.03144 22.25 6.68802 22.0694C5.31137 21.8843 4.21911 21.4973 3.36091 20.6391C2.50272 19.7809 2.11568 18.6886 1.93059 17.312C1.74998 15.9686 1.74999 14.2479 1.75 12.0572V12.0572V11.9428V11.9428C1.74999 9.75211 1.74998 8.03144 1.93059 6.68802C2.11568 5.31137 2.50272 4.21911 3.36091 3.36091C4.21911 2.50271 5.31137 2.11568 6.68802 1.93059C8.03143 1.74998 9.75214 1.74999 11.9428 1.75ZM8.00195 10.5C8.00195 9.94771 7.55424 9.5 7.00195 9.5C6.44967 9.5 6.00195 9.94771 6.00195 10.5L6.00195 17C6.00195 17.5523 6.44967 18 7.00195 18C7.55424 18 8.00195 17.5523 8.00195 17L8.00195 10.5ZM11.002 9C11.4073 9 11.7564 9.2412 11.9134 9.58791C12.5213 9.215 13.2365 9 14.002 9C16.2111 9 18.002 10.7909 18.002 13V17C18.002 17.5523 17.5542 18 17.002 18C16.4497 18 16.002 17.5523 16.002 17V13C16.002 11.8954 15.1065 11 14.002 11C12.8974 11 12.002 11.8954 12.002 13L12.002 17C12.002 17.5523 11.5542 18 11.002 18C10.4497 18 10.002 17.5523 10.002 17L10.002 10C10.002 9.44771 10.4497 9 11.002 9ZM8.25977 7C8.25977 7.69036 7.70012 8.25 7.00977 8.25H7.00078C6.31043 8.25 5.75078 7.69036 5.75078 7C5.75078 6.30964 6.31043 5.75 7.00078 5.75H7.00977C7.70012 5.75 8.25977 6.30964 8.25977 7Z"
+ fill="currentColor"></path>
+ </svg>
+ </a>
+ <a href="https://fosstodon.org/@php" target="_blank" rel="noopener noreferrer">
+ <span class="sr-only">@php@fosstodon.org</span>
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
+ <path fill="currentColor"
+ d="M21.5 6.5c-.3-2.2-2.3-3.9-4.6-4.2-.4 0-1.9-.3-5.3-.3s-4.2.2-4.6.3c-2.2.3-4.3 1.9-4.8 4C2 7.6 2 8.8 2 9.9a38.5 38.5 0 0 0 .8 7.9c.4 2 2.4 3.5 4.2 4.2a11.6 11.6 0 0 0 7 .1l1.5-.6v-1.6a19 19 0 0 1-4.1.4c-2.3 0-3-1-3.2-1.5a4.7 4.7 0 0 1-.2-1.3c1.3.3 2.7.5 4 .5h1c1.3 0 2.7-.1 4-.4h.2a5 5 0 0 0 4.3-4.8V6.5Zm-3.3 7.9H16V9c0-1.1-.4-1.7-1.4-1.7-1 0-1.6.7-1.6 2v3h-2.2v-3c0-1.3-.5-2-1.6-2-1 0-1.4.6-1.4 1.7v5.3H5.6V8.9c0-1.1.3-2 .9-2.6a3 3 0 0 1 2.3-1c1.2 0 2 .4 2.6 1.2l.5 1 .6-1c.5-.8 1.4-1.2 2.5-1.2 1 0 1.8.3 2.4 1 .6.6.8 1.5.8 2.6v5.5Z"></path>
+ </svg>
+ </a>
+ <a href="https://github.com/php/" target="_blank" rel="noopener noreferrer">
+ <span class="sr-only">GitHub</span>
+ <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
+ <path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
+ clip-rule="evenodd" fill-rule="evenodd"></path>
+ </svg>
+ </a>
+ </div>
+
+ <a href="https://thephp.foundation/sponsor/" target="_blank" class="button-primary">Donate</a>
+ </div>
+ <div class="footer-links-container">
+ <div class="footer-links-grid">
+ <div>
+ <h3>PHP</h3>
+ <ul role="list">
+ <li><a href="/my.php">My PHP.net</a></li>
+ <li><a href="/downloads.php">Downloads</a></li>
+ <li><a href="/contact.php">Contact</a></li>
+ <li><a href="/sites.php">Other PHP.net sites</a></li>
+ </ul>
+ </div>
+ <div>
+ <h3>Learn</h3>
+ <ul role="list">
+ <li><a href="/docs.php">Documentation</a></li>
+ <li><a href="/get-involved.php">Get Involved</a></li>
+ <li><a href="/support.php">Help</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="footer-links-grid">
+ <div>
+ <h3>The PHP Foundation</h3>
+ <ul role="list">
+ <li><a href="https://thephp.foundation/" target="_blank" rel="noopener noreferrer">
+ About the Foundation</a></li>
+ <li><a href="https://thephp.foundation/sponsor/" target="_blank"
+ rel="noopener noreferrer">Sponsor</a>
+ </li>
+ <li><a href="https://thephp.foundation/contact/" target="_blank"
+ rel="noopener noreferrer">Contact</a>
+ </li>
+ </ul>
+ </div>
+ <div>
+ <h3>Legal</h3>
+ <ul role="list">
+ <li><a href="/privacy.php">Privacy policy</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="footer-credits">
+ <p>Copyright © 2001-<?= date('Y') ?> <?= $copyrightHolder ?>.</p>
+ <?= $extraCredit ?>
+ </div>
+ </div>
+</footer>
diff --git a/public/styles/shared-footer.css b/public/styles/shared-footer.css
new file mode 100644
index 0000000000..495571c2e9
--- /dev/null
+++ b/public/styles/shared-footer.css
@@ -0,0 +1,257 @@
+/*
+ * Standalone, framework-free styling for the shared "fancy" footer
+ * (see include/shared-footer.inc -> fancy_footer()).
+ *
+ * This is the vanilla-CSS counterpart to the Tailwind build in php85.css that
+ * the release pages use. It is fully self-contained; every rule is scoped under
+ * `.php-footer` so it can sit at the bottom of a classic php.net page without
+ * leaking into, or inheriting from, the rest of that page's styles.
+ */
+
+.php-footer {
+ --footer-fg: #ffffffcc; /* body / link text */
+ --footer-fg-strong: #ffffff; /* headings, logo, hover */
+ --footer-accent: #6b58ff; /* Donate button */
+ --footer-accent-hover: #5a47e6;
+ --footer-border: #ffffff1a;
+
+ isolation: isolate;
+ position: relative;
+ z-index: 10;
+ clear: both;
+ /* Transparent so the classic pages' dark-grey (#333) textured html
+ background shows through, blending the footer into the page. */
+ background-color: transparent;
+ line-height: normal;
+ text-align: left;
+}
+
+/*
+ * Match the width of the classic site chrome (#layout, .navbar__inner):
+ * fluid below 1200px, then fixed 1170px / 1440px, centered.
+ */
+.php-footer .footer-container {
+ width: auto;
+ max-width: none;
+ margin-inline: auto;
+ padding-inline: 0;
+ padding-top: 4rem;
+ padding-bottom: 2rem;
+ box-sizing: border-box;
+}
+
+@media (min-width: 1200px) {
+ .php-footer .footer-container {
+ width: 1170px;
+ }
+}
+
+@media (min-width: 1500px) {
+ .php-footer .footer-container {
+ width: 1440px;
+ }
+}
+
+/* --- top grid: brand column + link columns ------------------------------ */
+
+.php-footer .footer-grid > div > *:not(:last-child) {
+ margin-bottom: 2rem;
+}
+
+.php-footer .footer-logo {
+ display: inline-block;
+ height: 2.5rem;
+ border: 0;
+ text-decoration: none;
+}
+
+.php-footer .footer-logo svg {
+ display: inline-block;
+ height: 2.5rem;
+ width: auto;
+ color: var(--footer-fg-strong);
+}
+
+.php-footer p {
+ margin: 0;
+ font-size: 0.875rem;
+ line-height: 1.5rem;
+ text-wrap: balance;
+ color: var(--footer-fg);
+}
+
+.php-footer p a {
+ color: inherit;
+ text-decoration: underline;
+ text-underline-offset: 2px;
+ border: 0;
+}
+
+.php-footer p a:hover {
+ color: var(--footer-fg-strong);
+}
+
+/* --- social icons ------------------------------------------------------- */
+
+.php-footer .social-icons {
+ display: flex;
+ column-gap: 1.5rem;
+}
+
+.php-footer .social-icons a {
+ display: inline-flex;
+ color: var(--footer-fg);
+ border: 0;
+ text-decoration: none;
+}
+
+.php-footer .social-icons a:hover {
+ color: var(--footer-fg-strong);
+}
+
+.php-footer .social-icons svg {
+ width: 1.5rem;
+ height: 1.5rem;
+}
+
+/* --- Donate button ------------------------------------------------------ */
+
+.php-footer .button-primary {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ min-height: 2.5rem;
+ padding-inline: 1.25rem;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: var(--footer-fg-strong);
+ background-color: var(--footer-accent);
+ border: 0;
+ border-radius: 9999px;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+.php-footer .button-primary:hover {
+ background-color: var(--footer-accent-hover);
+}
+
+.php-footer .button-primary:focus-visible {
+ outline: 2px solid var(--footer-fg-strong);
+ outline-offset: 2px;
+}
+
+/* --- link columns ------------------------------------------------------- */
+
+.php-footer .footer-links-container {
+ margin-top: 4rem;
+ display: grid;
+ gap: 2rem;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+}
+
+.php-footer .footer-links-grid h3 {
+ margin: 0;
+ font-size: 0.875rem;
+ line-height: 1.5rem;
+ font-weight: 600;
+ color: var(--footer-fg-strong);
+}
+
+.php-footer .footer-links-grid ul {
+ list-style: none;
+ margin: 1.5rem 0 0;
+ padding: 0;
+}
+
+.php-footer .footer-links-grid li:not(:last-child) {
+ margin-bottom: 1rem;
+}
+
+.php-footer .footer-links-grid a {
+ font-size: 0.875rem;
+ line-height: 1.5rem;
+ color: var(--footer-fg);
+ border: 0;
+ text-decoration: underline;
+ text-underline-offset: 2px;
+}
+
+.php-footer .footer-links-grid a:hover {
+ color: var(--footer-fg-strong);
+}
+
+.php-footer .footer-links-grid div:first-of-type {
+ margin-bottom: 2.5rem;
+}
+
+/* --- copyright credits -------------------------------------------------- */
+
+.php-footer .footer-credits {
+ margin-top: 0;
+ padding-top: 2rem;
+ border-top: 1px solid var(--footer-border);
+}
+
+.php-footer .footer-credits p {
+ font-size: 0.875rem;
+ line-height: 1.5rem;
+ color: var(--footer-fg);
+}
+
+.php-footer .footer-credits p a {
+ color: inherit;
+ text-decoration: underline;
+ text-underline-offset: 2px;
+}
+
+/* --- accessibility helper (in case the host page lacks one) -------------- */
+
+.php-footer .sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ border: 0;
+}
+
+/* --- responsive --------------------------------------------------------- */
+
+@media (min-width: 48rem) {
+ .php-footer .footer-links-grid {
+ display: grid;
+ gap: 2rem;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ }
+
+ .php-footer .footer-links-grid div:first-of-type {
+ margin-bottom: 0;
+ }
+}
+
+@media (min-width: 64rem) {
+ .php-footer .footer-container {
+ padding-top: 7rem;
+ }
+
+ .php-footer .footer-credits {
+ margin-top: 6rem;
+ }
+}
+
+@media (min-width: 80rem) {
+ .php-footer .footer-grid {
+ display: grid;
+ gap: 2rem;
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ }
+
+ .php-footer .footer-links-container {
+ margin-top: 0;
+ grid-column: span 2 / span 2;
+ }
+}
diff --git a/public/styles/theme-base.css b/public/styles/theme-base.css
index e2c8f16778..00dafff1d5 100644
--- a/public/styles/theme-base.css
+++ b/public/styles/theme-base.css
@@ -610,38 +610,6 @@ pre.info {
#results_nav_list li.current {
font-weight: bolder;
}
-/* Footer styling */
-
-body > footer {
- clear: both;
- overflow: auto;
- line-height:3rem;
-}
-body > footer .footer-content {
- margin: 1.5rem auto 0 ;
- padding:0 1.5rem;
- -moz-box-sizing:border-box;
- box-sizing:border-box;
-}
-
-body > footer ul {
- margin:0;
- padding:0;
-}
-
-body > footer .footmenu li {
- display: inline-block;
- margin:0 0.75rem;
-}
-body > footer a {
- display:inline-block;
- border-bottom:0;
-}
-body > footer a:hover,
-body > footer a:focus {
- color:var(--light-magenta-color);
-}
-
/* {{{ ElePHPants photo stream */
div.elephpants {
@@ -1256,8 +1224,7 @@ div.soft-deprecation-notice blockquote.sidebar {
#breadcrumbs-inner,
#goto div,
#trick div,
- #layout,
- body > footer .footer-content {
+ #layout {
width:1170px;
}
}
@@ -1267,8 +1234,7 @@ div.soft-deprecation-notice blockquote.sidebar {
#breadcrumbs-inner,
#goto div,
#trick div,
- #layout,
- body > footer .footer-content {
+ #layout {
width:1440px;
}
}
diff --git a/src/Themes/ReleasePage.php b/src/Themes/ReleasePage.php
index e695cbed43..29ba944b9b 100644
--- a/src/Themes/ReleasePage.php
+++ b/src/Themes/ReleasePage.php
@@ -76,7 +76,7 @@ public static function getHeroSection(
public static function getPrefooter(string $title, string $upgradeNow, string $description, string $extraCredit = ''): string
{
- $currentYear = date('Y');
+ $footer = fancy_footer($extraCredit);
return <<<HTML
<section class="cta-footer">
@@ -105,98 +105,7 @@ public static function getPrefooter(string $title, string $upgradeNow, string $d
</div>
</section>
- <footer>
- <div class="footer-container">
- <div class="footer-grid">
- <div>
- <a href="/" class="footer-logo">
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -1 100 50" fill="currentColor">
- <path d="m7.579 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"></path>
- <path d="m41.093 0 7.314 0-2.067 10.123 6.572 0c3.604 0.071 6.289 0.813 8.056 2.226 1.802 1.413 2.332 4.099 1.59 8.056l-3.551 17.649-7.42 0 3.392-16.854c0.353-1.767 0.247-3.021-0.318-3.763-0.565-0.742-1.784-1.113-3.657-1.113l-5.883-0.053-4.346 21.783-7.314 0 7.632-38.054 0 0"></path>
- <path d="m70.412 10.123 14.204 0c4.169 0.035 7.19 1.237 9.063 3.604 1.873 2.367 2.491 5.6 1.855 9.699-0.247 1.873-0.795 3.71-1.643 5.512-0.813 1.802-1.943 3.427-3.392 4.876-1.767 1.837-3.657 3.003-5.671 3.498-2.014 0.495-4.099 0.742-6.254 0.742l-6.36 0-2.014 10.07-7.367 0 7.579-38.001 0 0m6.201 6.042-3.18 15.9c0.212 0.035 0.424 0.053 0.636 0.053 0.247 0 0.495 0 0.742 0 3.392 0.035 6.219-0.3 8.48-1.007 2.261-0.742 3.781-3.321 4.558-7.738 0.636-3.71 0-5.848-1.908-6.413-1.873-0.565-4.222-0.83-7.049-0.795-0.424 0.035-0.83 0.053-1.219 0.053-0.353 0-0.724 0-1.113 0l0.053-0.053"></path>
- </svg>
- </a>
-
- <p>PHP is developed and maintained by a global community of contributors.
- <a href="https://thephp.foundation/" target="_blank">The PHP Foundation</a> helps fund this work. <br>
- If PHP is part of your business or projects, consider sponsoring the Foundation.</p>
-
- <div class="social-icons">
- <a href="PHP | LinkedIn; target="_blank" rel="noopener noreferrer">
- <span class="sr-only">Linkedin</span>
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
- <path fill-rule="evenodd" clip-rule="evenodd"
- d="M11.9428 1.75H12.0572C14.2479 1.74999 15.9686 1.74998 17.312 1.93059C18.6886 2.11568 19.7809 2.50271 20.6391 3.36091C21.4973 4.21911 21.8843 5.31137 22.0694 6.68802C22.25 8.03144 22.25 9.75214 22.25 11.9428V12.0572C22.25 14.2479 22.25 15.9686 22.0694 17.312C21.8843 18.6886 21.4973 19.7809 20.6391 20.6391C19.7809 21.4973 18.6886 21.8843 17.312 22.0694C15.9686 22.25 14.2479 22.25 12.0572 22.25H11.9428C9.7521 22.25 8.03144 22.25 6.68802 22.0694C5.31137 21.8843 4.21911 21.4973 3.36091 20.6391C2.50272 19.7809 2.11568 18.6886 1.93059 17.312C1.74998 15.9686 1.74999 14.2479 1.75 12.0572V12.0572V11.9428V11.9428C1.74999 9.75211 1.74998 8.03144 1.93059 6.68802C2.11568 5.31137 2.50272 4.21911 3.36091 3.36091C4.21911 2.50271 5.31137 2.11568 6.68802 1.93059C8.03143 1.74998 9.75214 1.74999 11.9428 1.75ZM8.00195 10.5C8.00195 9.94771 7.55424 9.5 7.00195 9.5C6.44967 9.5 6.00195 9.94771 6.00195 10.5L6.00195 17C6.00195 17.5523 6.44967 18 7.00195 18C7.55424 18 8.00195 17.5523 8.00195 17L8.00195 10.5ZM11.002 9C11.4073 9 11.7564 9.2412 11.9134 9.58791C12.5213 9.215 13.2365 9 14.002 9C16.2111 9 18.002 10.7909 18.002 13V17C18.002 17.5523 17.5542 18 17.002 18C16.4497 18 16.002 17.5523 16.002 17V13C16.002 11.8954 15.1065 11 14.002 11C12.8974 11 12.002 11.8954 12.002 13L12.002 17C12.002 17.5523 11.5542 18 11.002 18C10.4497 18 10.002 17.5523 10.002 17L10.002 10C10.002 9.44771 10.4497 9 11.002 9ZM8.25977 7C8.25977 7.69036 7.70012 8.25 7.00977 8.25H7.00078C6.31043 8.25 5.75078 7.69036 5.75078 7C5.75078 6.30964 6.31043 5.75 7.00078 5.75H7.00977C7.70012 5.75 8.25977 6.30964 8.25977 7Z"
- fill="currentColor"></path>
- </svg>
- </a>
- <a href="https://fosstodon.org/@php" target="_blank" rel="noopener noreferrer">
- <span class="sr-only">@php@fosstodon.org</span>
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
- <path fill="currentColor"
- d="M21.5 6.5c-.3-2.2-2.3-3.9-4.6-4.2-.4 0-1.9-.3-5.3-.3s-4.2.2-4.6.3c-2.2.3-4.3 1.9-4.8 4C2 7.6 2 8.8 2 9.9a38.5 38.5 0 0 0 .8 7.9c.4 2 2.4 3.5 4.2 4.2a11.6 11.6 0 0 0 7 .1l1.5-.6v-1.6a19 19 0 0 1-4.1.4c-2.3 0-3-1-3.2-1.5a4.7 4.7 0 0 1-.2-1.3c1.3.3 2.7.5 4 .5h1c1.3 0 2.7-.1 4-.4h.2a5 5 0 0 0 4.3-4.8V6.5Zm-3.3 7.9H16V9c0-1.1-.4-1.7-1.4-1.7-1 0-1.6.7-1.6 2v3h-2.2v-3c0-1.3-.5-2-1.6-2-1 0-1.4.6-1.4 1.7v5.3H5.6V8.9c0-1.1.3-2 .9-2.6a3 3 0 0 1 2.3-1c1.2 0 2 .4 2.6 1.2l.5 1 .6-1c.5-.8 1.4-1.2 2.5-1.2 1 0 1.8.3 2.4 1 .6.6.8 1.5.8 2.6v5.5Z"></path>
- </svg>
- </a>
- <a href="https://github.com/php/" target="_blank" rel="noopener noreferrer">
- <span class="sr-only">GitHub</span>
- <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
- <path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"
- clip-rule="evenodd" fill-rule="evenodd"></path>
- </svg>
- </a>
- </div>
-
- <a href="https://thephp.foundation/sponsor/" target="_blank" class="button-primary">Donate</a>
- </div>
- <div class="footer-links-container">
- <div class="footer-links-grid">
- <div>
- <h3>PHP</h3>
- <ul role="list">
- <li><a href="/my.php">My PHP.net</a></li>
- <li><a href="/downloads.php">Downloads</a></li>
- <li><a href="/contact.php">Contact</a></li>
- <li><a href="/sites.php">Other PHP.net sites</a></li>
- </ul>
- </div>
- <div>
- <h3>Learn</h3>
- <ul role="list">
- <li><a href="/docs.php">Documentation</a></li>
- <li><a href="/get-involved.php">Get Involved</a></li>
- <li><a href="/support.php">Help</a></li>
- </ul>
- </div>
- </div>
- <div class="footer-links-grid">
- <div>
- <h3>The PHP Foundation</h3>
- <ul role="list">
- <li><a href="https://thephp.foundation/" target="_blank" rel="noopener noreferrer">
- About the Foundation</a></li>
- <li><a href="https://thephp.foundation/sponsor/" target="_blank"
- rel="noopener noreferrer">Sponsor</a>
- </li>
- <li><a href="https://thephp.foundation/contact/" target="_blank"
- rel="noopener noreferrer">Contact</a>
- </li>
- </ul>
- </div>
- <div>
- <h3>Legal</h3>
- <ul role="list">
- <li><a href="/privacy.php">Privacy policy</a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div class="footer-credits">
- <p>Copyright © 2001-$currentYear The PHP Group.</p>
- $extraCredit
- </div>
- </div>
- </footer>
+ $footer
<!-- noise -->
<svg class="noise" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" preserveAspectRatio="none">