This commit is contained in:
1 parent
9cdd0b4000
commit
b1a60adbc2
2 files changed
+14
-9
No files matched your search
@@ -1,3 +1,5 @@
|
|||||||
|
import { readFileSync } from "node:fs";
|
||||||
|
import { resolve } from "node:path";
|
||||||
import { renderToStaticMarkup } from "react-dom/server";
|
import { renderToStaticMarkup } from "react-dom/server";
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import { CmsInfoPopup } from "@/components/cms-info-popup";
|
import { CmsInfoPopup } from "@/components/cms-info-popup";
|
||||||
@@ -5,6 +7,9 @@ import { CmsInfoPopup } from "@/components/cms-info-popup";
|
|||||||
describe("CmsInfoPopup", () => {
|
describe("CmsInfoPopup", () => {
|
||||||
it("renders the footer trigger", () => {
|
it("renders the footer trigger", () => {
|
||||||
const html = renderToStaticMarkup(<CmsInfoPopup />);
|
const html = renderToStaticMarkup(<CmsInfoPopup />);
|
||||||
expect(html).toContain("CMS Info");
|
const source = readFileSync(resolve(process.cwd(), "src/components/cms-info-popup.tsx"), "utf8");
|
||||||
|
expect(html).toContain("EpicNext Info");
|
||||||
|
expect(source).toContain(">EpicNext<");
|
||||||
|
expect(source).toContain("Modern Next.js CMS");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -3,14 +3,14 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
const cmsDetails = [
|
const cmsDetails = [
|
||||||
["Edition", "Next.js rebuild"],
|
["Edition", "EpicNext"],
|
||||||
["Interface", "Public CMS"],
|
["Interface", "Modern CMS"],
|
||||||
["Runtime", "Next.js App Router"],
|
["Runtime", "Next.js App Router"],
|
||||||
];
|
];
|
||||||
|
|
||||||
const credits = [
|
const credits = [
|
||||||
["Remco", "AtomCMS direction and original project"],
|
["Remco", "EpicNext direction and development"],
|
||||||
["Life", "Next.js experience and CMS refinements"],
|
["Life", "Next.js architecture and CMS refinements"],
|
||||||
];
|
];
|
||||||
|
|
||||||
export function CmsInfoPopup() {
|
export function CmsInfoPopup() {
|
||||||
@@ -32,16 +32,16 @@ export function CmsInfoPopup() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<button type="button" className="cms-info-trigger" onClick={() => setOpen(true)}>
|
<button type="button" className="cms-info-trigger" onClick={() => setOpen(true)}>
|
||||||
CMS Info
|
EpicNext Info
|
||||||
</button>
|
</button>
|
||||||
{open ? (
|
{open ? (
|
||||||
<div className="cms-info-backdrop" role="presentation" onMouseDown={() => setOpen(false)}>
|
<div className="cms-info-backdrop" role="presentation" onMouseDown={() => setOpen(false)}>
|
||||||
<section aria-labelledby="cms-info-title" aria-modal="true" className="cms-info-dialog" role="dialog" onMouseDown={(event) => event.stopPropagation()}>
|
<section aria-labelledby="cms-info-title" aria-modal="true" className="cms-info-dialog" role="dialog" onMouseDown={(event) => event.stopPropagation()}>
|
||||||
<button type="button" aria-label="Close CMS info" className="cms-info-close" onClick={() => setOpen(false)}>x</button>
|
<button type="button" aria-label="Close CMS info" className="cms-info-close" onClick={() => setOpen(false)}>x</button>
|
||||||
<div className="cms-info-kicker">CMS information</div>
|
<div className="cms-info-kicker">CMS information</div>
|
||||||
<h2 id="cms-info-title">AtomCMS</h2>
|
<h2 id="cms-info-title">EpicNext</h2>
|
||||||
<div className="cms-info-badge">Next.js edition</div>
|
<div className="cms-info-badge">Modern Next.js CMS</div>
|
||||||
<p className="cms-info-copy">A modern web layer for the hotel community, focused on fast navigation, clean administration, and a familiar AtomCMS experience.</p>
|
<p className="cms-info-copy">A modern web layer for the hotel community, focused on fast navigation, clean administration, and a coherent EpicNext experience.</p>
|
||||||
<dl className="cms-info-grid">
|
<dl className="cms-info-grid">
|
||||||
{cmsDetails.map(([label, value]) => <div key={label}><dt>{label}</dt><dd>{value}</dd></div>)}
|
{cmsDetails.map(([label, value]) => <div key={label}><dt>{label}</dt><dd>{value}</dd></div>)}
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
Reference in new issue
Block a user