Merge pull request #35 from archtika/devel

Use english catalog for Postgres full-text search and fix logo scaling on mobile devices
This commit is contained in:
Thilo Hohlt
2025-04-08 13:11:00 +02:00
committed by GitHub
7 changed files with 11 additions and 18 deletions

View File

@@ -59,4 +59,6 @@ in
}; };
}; };
}; };
services.postgresql.settings.default_text_search_config = "pg_catalog.english";
} }

View File

@@ -30,4 +30,6 @@ in
group = "nginx"; group = "nginx";
}; };
}; };
services.postgresql.settings.default_text_search_config = "pg_catalog.english";
} }

View File

@@ -10,4 +10,5 @@ ALTER TABLE internal.user
DROP CONSTRAINT username_not_blocked; DROP CONSTRAINT username_not_blocked;
ALTER TABLE internal.user ALTER TABLE internal.user
ADD CONSTRAINT username_not_blocked CHECK (LOWER(username) NOT IN ('admin', 'administrator', 'api', 'auth', 'blog', 'cdn', 'docs', 'help', 'login', 'logout', 'profile', 'register', 'settings', 'setup', 'signin', 'signup', 'support', 'test', 'www')); ADD CONSTRAINT username_not_blocked CHECK (LOWER(username) NOT IN ('admin', 'administrator', 'api', 'auth', 'blog', 'cdn', 'docs', 'help', 'login', 'logout', 'profile', 'register', 'settings', 'setup', 'signin', 'signup', 'support', 'test', 'www'));

View File

@@ -136,7 +136,7 @@
</label> </label>
<div class="file-field"> <div class="file-field">
<label> <label>
Logo image: Logo image (height should be &lt;= 32px):
<input type="file" name="logo-image" accept={ALLOWED_MIME_TYPES.join(", ")} /> <input type="file" name="logo-image" accept={ALLOWED_MIME_TYPES.join(", ")} />
</label> </label>
{#if data.header.logo_image} {#if data.header.logo_image}

View File

@@ -33,7 +33,6 @@ header img {
object-position: center; object-position: center;
} }
nav,
header, header,
main { main {
padding-block: var(--space-s); padding-block: var(--space-s);
@@ -71,11 +70,6 @@ section {
scroll-margin-block-start: var(--space-xl); scroll-margin-block-start: var(--space-xl);
} }
.top-nav-logo {
max-block-size: var(--space-xl);
padding-block: var(--space-xs);
}
@media (min-width: 1525px) { @media (min-width: 1525px) {
#table-of-contents { #table-of-contents {
position: fixed; position: fixed;

View File

@@ -26,7 +26,6 @@ header > .container {
gap: var(--space-s); gap: var(--space-s);
} }
nav,
header, header,
main { main {
padding-block: var(--space-s); padding-block: var(--space-s);
@@ -49,11 +48,6 @@ section {
scroll-margin-block-start: var(--space-xl); scroll-margin-block-start: var(--space-xl);
} }
.top-nav-logo {
max-block-size: var(--space-xl);
padding-block: var(--space-xs);
}
.docs-navigation { .docs-navigation {
display: none; display: none;
position: fixed; position: fixed;

View File

@@ -50,9 +50,9 @@ test.describe("Website owner", () => {
await page.getByLabel("Logo text:").click(); await page.getByLabel("Logo text:").click();
await page.getByLabel("Logo text:").press("ControlOrMeta+a"); await page.getByLabel("Logo text:").press("ControlOrMeta+a");
await page.getByLabel("Logo text:").fill("Logo text"); await page.getByLabel("Logo text:").fill("Logo text");
await page.getByLabel("Logo image:").click(); await page.getByLabel(/Logo image/).click();
await page await page
.getByLabel("Logo image") .getByLabel(/Logo image/)
.setInputFiles(join(__dirname, "sample-files", "archtika-logo-512x512.png")); .setInputFiles(join(__dirname, "sample-files", "archtika-logo-512x512.png"));
await page.getByRole("button", { name: "Update header" }).click(); await page.getByRole("button", { name: "Update header" }).click();
await expect(page.getByText("Successfully updated header")).toBeVisible(); await expect(page.getByText("Successfully updated header")).toBeVisible();
@@ -122,9 +122,9 @@ for (const permissionLevel of permissionLevels) {
await page.getByLabel("Logo text:").click(); await page.getByLabel("Logo text:").click();
await page.getByLabel("Logo text:").press("ControlOrMeta+a"); await page.getByLabel("Logo text:").press("ControlOrMeta+a");
await page.getByLabel("Logo text:").fill("Logo text"); await page.getByLabel("Logo text:").fill("Logo text");
await page.getByLabel("Logo image:").click(); await page.getByLabel(/Logo image/).click();
await page await page
.getByLabel("Logo image") .getByLabel(/Logo image/)
.setInputFiles(join(__dirname, "sample-files", "archtika-logo-512x512.png")); .setInputFiles(join(__dirname, "sample-files", "archtika-logo-512x512.png"));
await page await page
.getByRole("button", { name: "Update header" }) .getByRole("button", { name: "Update header" })