Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Add CatalogCard and move Templates onto it

Juan Denis29dc925e6e39
diff --git a/frontend/src/components/ds/CatalogCard.jsx b/frontend/src/components/ds/CatalogCard.jsx
new file mode 100644
index 00000000..93f68663
--- /dev/null
+++ b/frontend/src/components/ds/CatalogCard.jsx
@@ -0,0 +1,94 @@
+import { Star } from 'lucide-react';
+import { cn } from '@/lib/utils';
+import { t } from '@/i18n/t';
+
+/**
+ * The one card for things you browse to install or deploy: extensions,
+ * templates, database engines, server templates. Anything you operate
+ * (servers, services, containers, sites) is a table row, not a card.
+ *
+ * <CatalogGrid>
+ * <CatalogCard
+ * icon={<img src={logo} alt="" />}
+ * title="Grafana"
+ * sub="v10.2 · by ServerKit"
+ * tag="Monitoring"
+ * description="Dashboards for every metric you already collect."
+ * facts=":3000 · 256 MB RAM"
+ * action={<Button size="sm">Deploy</Button>}
+ * onClick={() => openDetail(entry)}
+ * />
+ * </CatalogGrid>
+ *
+ * One tag, one action. Version, author and counts go in `sub` / `facts` as
+ * plain text rather than as more badges.
+ */
+export function CatalogCard({
+ icon,
+ title,
+ sub,
+ tag,
+ description,
+ facts,
+ action,
+ featured = false,
+ onClick,
+ className,
+ as: Tag = 'li',
+}) {
+ const handleKeyDown = onClick
+ ? (event) => {
+ if (event.target !== event.currentTarget) return;
+ if (event.key === 'Enter' || event.key === ' ') {
+ event.preventDefault();
+ onClick(event);
+ }
+ }
+ : undefined;
+
+ return (
+ <Tag
+ className={cn('sk-catalog-card', onClick && 'is-clickable', className)}
+ onClick={onClick}
+ onKeyDown={handleKeyDown}
+ role={onClick ? 'button' : undefined}
+ tabIndex={onClick ? 0 : undefined}
+ >
+ <div className="sk-catalog-card__head">
+ {icon && <span className="sk-catalog-card__icon">{icon}</span>}
+ <span className="sk-catalog-card__id">
+ <span className="sk-catalog-card__title">
+ {title}
+ {featured && (
+ <Star
+ size={12}
+ className="sk-catalog-card__featured"
+ aria-label={t('app.catalogCard.featured', 'Featured')}
+ />
+ )}
+ </span>
+ {sub && <span className="sk-catalog-card__sub">{sub}</span>}
+ </span>
+ {tag && <span className="sk-catalog-card__tag">{tag}</span>}
+ </div>
+ {description && <p className="sk-catalog-card__desc">{description}</p>}
+ {(facts || action) && (
+ <div className="sk-catalog-card__foot">
+ <span className="sk-catalog-card__facts">{facts}</span>
+ {action && (
+ // Clicking the action must not also open the card.
+ <span className="sk-catalog-card__action" onClick={(e) => e.stopPropagation()}>
+ {action}
+ </span>
+ )}
+ </div>
+ )}
+ </Tag>
+ );
+}
+
+export function CatalogGrid({ children, className, as: Tag = 'ul' }) {
+ return <Tag className={cn('sk-catalog-grid', className)}>{children}</Tag>;
+}
+
+export default CatalogCard;
diff --git a/frontend/src/components/ds/index.js b/frontend/src/components/ds/index.js
index a21f2569..5ae38562 100644
--- a/frontend/src/components/ds/index.js
+++ b/frontend/src/components/ds/index.js
@@ -23,6 +23,7 @@ export { FilterDrawer, FilterButton } from './FilterDrawer';
export { countActiveFilters, emptyFilterValue } from './filterValues';
export { PageTopbar } from './PageTopbar';
export { DataTable } from './DataTable';
+export { CatalogCard, CatalogGrid } from './CatalogCard';
export { SortChipBar } from './SortChipBar';
export { DataTableFooter } from './DataTableFooter';
export { ListToolbar } from './ListToolbar';
diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.json
index bdc4d8c1..f653a373 100644
--- a/frontend/src/i18n/locales/ar.json
+++ b/frontend/src/i18n/locales/ar.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "قوالب التصفية",
"fits": "يناسب",
"gitRepo": "الريبو Git",
- "hasDocumentation": "لديها وثائق",
- "hasWebsite": "لديه موقع على الانترنت",
"importAZip": "قم باستيراد ملف ZIP",
"importFromGithub": "الاستيراد من GitHub",
"loadingTemplates": "تحميل القوالب",
diff --git a/frontend/src/i18n/locales/bn.json b/frontend/src/i18n/locales/bn.json
index 762e1bc6..eb15d90d 100644
--- a/frontend/src/i18n/locales/bn.json
+++ b/frontend/src/i18n/locales/bn.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "ফিল্টার টেমপ্লেট",
"fits": "মানানসই",
"gitRepo": "Git রেপো",
- "hasDocumentation": "ডকুমেন্টেশন আছে",
- "hasWebsite": "ওয়েবসাইট আছে",
"importAZip": "একটি জিপ আমদানি করুন",
"importFromGithub": "GitHub থেকে আমদানি করুন",
"loadingTemplates": "টেমপ্লেট লোড হচ্ছে",
diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json
index d12a81bb..ffb10f0a 100644
--- a/frontend/src/i18n/locales/de.json
+++ b/frontend/src/i18n/locales/de.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Filtervorlagen",
"fits": "Passt",
"gitRepo": "Git-Repo",
- "hasDocumentation": "Dokumentation vorhanden",
- "hasWebsite": "Hat eine Website",
"importAZip": "Importieren Sie eine ZIP-Datei",
"importFromGithub": "Von GitHub importieren",
"loadingTemplates": "Laden von Vorlagen",
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json
index 67aa4b0f..358f9641 100644
--- a/frontend/src/i18n/locales/en.json
+++ b/frontend/src/i18n/locales/en.json
@@ -776,6 +776,9 @@
"startCommand": "Start command",
"usingTheRepositorySOwnDockerfile": "Using the repository's own Dockerfile."
},
+ "catalogCard": {
+ "featured": "Featured"
+ },
"chatBubble": {
"closeAssistantAltA": "Close assistant (Alt+A)",
"openAssistantAltA": "Open assistant (Alt+A)"
@@ -6371,8 +6374,6 @@
"filterTemplates": "Filter templates",
"fits": "Fits",
"gitRepo": "Git repo",
- "hasDocumentation": "Has documentation",
- "hasWebsite": "Has website",
"importAZip": "Import a ZIP",
"importFromGithub": "Import from GitHub",
"loadingTemplates": "Loading templates",
diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json
index 5a971434..9f59dedc 100644
--- a/frontend/src/i18n/locales/es.json
+++ b/frontend/src/i18n/locales/es.json
@@ -5939,8 +5939,6 @@
"filterTemplates": "Filtrar plantillas",
"fits": "Cabe",
"gitRepo": "Repositorio git",
- "hasDocumentation": "Con documentación",
- "hasWebsite": "Con sitio web",
"importAZip": "Importar un ZIP",
"importFromGithub": "Importar desde GitHub",
"loadingTemplates": "Cargando plantillas",
diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json
index e132bda5..52720831 100644
--- a/frontend/src/i18n/locales/fr.json
+++ b/frontend/src/i18n/locales/fr.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Filtrer les modèles",
"fits": "Convient",
"gitRepo": "Dépôt Git",
- "hasDocumentation": "Possède de la documentation",
- "hasWebsite": "A un site Web",
"importAZip": "Importer un ZIP",
"importFromGithub": "Importer depuis GitHub",
"loadingTemplates": "Chargement des modèles",
diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.json
index 06ce09bd..8aa6cb13 100644
--- a/frontend/src/i18n/locales/id.json
+++ b/frontend/src/i18n/locales/id.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Filter templat",
"fits": "Cocok",
"gitRepo": "Repo Git",
- "hasDocumentation": "Memiliki dokumentasi",
- "hasWebsite": "Memiliki situs web",
"importAZip": "Impor ZIP",
"importFromGithub": "Impor dari GitHub",
"loadingTemplates": "Memuat templat",
diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json
index e5043d9d..0aada37f 100644
--- a/frontend/src/i18n/locales/it.json
+++ b/frontend/src/i18n/locales/it.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Filtra modelli",
"fits": "Adatto",
"gitRepo": "Deposito Git",
- "hasDocumentation": "Ha documentazione",
- "hasWebsite": "Ha un sito web",
"importAZip": "Importa un ZIP",
"importFromGithub": "Importa da GitHub",
"loadingTemplates": "Caricamento modelli",
diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json
index 89283c38..f124fd84 100644
--- a/frontend/src/i18n/locales/ko.json
+++ b/frontend/src/i18n/locales/ko.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "템플릿 필터링",
"fits": "적합",
"gitRepo": "힘내 레포",
- "hasDocumentation": "문서 있음",
- "hasWebsite": "웹사이트 있음",
"importAZip": "ZIP 가져오기",
"importFromGithub": "GitHub에서 가져오기",
"loadingTemplates": "템플릿 로드 중",
diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.json
index cb655dc7..35515012 100644
--- a/frontend/src/i18n/locales/pl.json
+++ b/frontend/src/i18n/locales/pl.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Szablony filtrów",
"fits": "Pasuje",
"gitRepo": "Repozytorium Git",
- "hasDocumentation": "Posiada dokumentację",
- "hasWebsite": "Posiada stronę internetową",
"importAZip": "Zaimportuj plik ZIP",
"importFromGithub": "Import z GitHub",
"loadingTemplates": "Ładowanie szablonów",
diff --git a/frontend/src/i18n/locales/pt.json b/frontend/src/i18n/locales/pt.json
index 15780aed..bda42caa 100644
--- a/frontend/src/i18n/locales/pt.json
+++ b/frontend/src/i18n/locales/pt.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Filtrar modelos",
"fits": "Serve",
"gitRepo": "repositório Git",
- "hasDocumentation": "Possui documentação",
- "hasWebsite": "Tem site",
"importAZip": "Importe um ZIP",
"importFromGithub": "Importar do GitHub",
"loadingTemplates": "Carregando modelos",
diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.json
index b5109ea7..b45c90a2 100644
--- a/frontend/src/i18n/locales/ru.json
+++ b/frontend/src/i18n/locales/ru.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Шаблоны фильтров",
"fits": "Подходит",
"gitRepo": "Git repo",
- "hasDocumentation": "Имеет документацию",
- "hasWebsite": "Имеет веб-сайт",
"importAZip": "Импортировать ZIP-архив",
"importFromGithub": "Импорт из GitHub",
"loadingTemplates": "Загрузка шаблонов",
diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.json
index bbbc0e23..60e064aa 100644
--- a/frontend/src/i18n/locales/th.json
+++ b/frontend/src/i18n/locales/th.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "เทมเพลตตัวกรอง",
"fits": "พอดี",
"gitRepo": "ที่เก็บ Git",
- "hasDocumentation": "มีเอกสาร",
- "hasWebsite": "มีเว็บไซต์",
"importAZip": "นำเข้า ZIP",
"importFromGithub": "นำเข้าจาก GitHub",
"loadingTemplates": "กำลังโหลดเทมเพลต",
diff --git a/frontend/src/i18n/locales/tr.json b/frontend/src/i18n/locales/tr.json
index ab29eaef..11ea3368 100644
--- a/frontend/src/i18n/locales/tr.json
+++ b/frontend/src/i18n/locales/tr.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Şablonları filtrele",
"fits": "uyar",
"gitRepo": "Git deposu",
- "hasDocumentation": "Belgeleri var",
- "hasWebsite": "Web sitesi var",
"importAZip": "Bir ZIP'i içe aktar",
"importFromGithub": "GitHub'den içe aktar",
"loadingTemplates": "Şablonlar yükleniyor",
diff --git a/frontend/src/i18n/locales/vi.json b/frontend/src/i18n/locales/vi.json
index 87d0f305..7aa5bb09 100644
--- a/frontend/src/i18n/locales/vi.json
+++ b/frontend/src/i18n/locales/vi.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "Lọc mẫu",
"fits": "Phù hợp",
"gitRepo": "Kho lưu trữ Git",
- "hasDocumentation": "Có tài liệu",
- "hasWebsite": "Có trang web",
"importAZip": "Nhập ZIP",
"importFromGithub": "Nhập từ GitHub",
"loadingTemplates": "Đang tải mẫu",
diff --git a/frontend/src/i18n/locales/zh-Hans.json b/frontend/src/i18n/locales/zh-Hans.json
index 95879167..22112e16 100644
--- a/frontend/src/i18n/locales/zh-Hans.json
+++ b/frontend/src/i18n/locales/zh-Hans.json
@@ -5919,8 +5919,6 @@
"filterTemplates": "过滤器模板",
"fits": "适合",
"gitRepo": "Git 仓库",
- "hasDocumentation": "有文档",
- "hasWebsite": "有网站",
"importAZip": "导入 ZIP",
"importFromGithub": "从 GitHub 导入",
"loadingTemplates": "加载模板",
diff --git a/frontend/src/i18n/locales/zh-Hant.json b/frontend/src/i18n/locales/zh-Hant.json
index dfa89cc3..03fc087e 100644
--- a/frontend/src/i18n/locales/zh-Hant.json
+++ b/frontend/src/i18n/locales/zh-Hant.json
@@ -6137,8 +6137,6 @@
"filterTemplates": "篩選範本",
"fits": "適合",
"gitRepo": "Git 儲存庫",
- "hasDocumentation": "包含文件",
- "hasWebsite": "有網站",
"importAZip": "匯入 ZIP",
"importFromGithub": "從 GitHub 匯入",
"loadingTemplates": "載入範本",
diff --git a/frontend/src/pages/Templates.jsx b/frontend/src/pages/Templates.jsx
index f07b1853..88cab28f 100644
--- a/frontend/src/pages/Templates.jsx
+++ b/frontend/src/pages/Templates.jsx
@@ -1,7 +1,7 @@
import { useCallback, useState, useEffect, useMemo, useRef } from 'react';
import { useNavigate, useSearchParams } from 'react-router-dom';
import {
- Search, Star, ExternalLink, BookOpen, Container, Globe, BarChart3,
+ Search, BookOpen, Container, Globe, BarChart3,
Database, Shield, Cloud, MessageSquare, Video, Music, Image, Home,
Code, Server, GitBranch, Workflow, HardDrive, Lock, Users, FileText,
Layers, LayoutTemplate, Check, Cpu,
@@ -12,10 +12,9 @@ import api from '../services/api';
import { useToast } from '../contexts/useToast.js';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
-import { Badge } from '@/components/ui/badge';
import {
SearchField, FilterDrawer, FilterButton, countActiveFilters, Drawer,
- DataTableFooter,
+ DataTableFooter, CatalogCard, CatalogGrid,
} from '@/components/ds';
import { useTableChrome, GridViewPicker, GridToolsMenu } from '@/components/ds/grid';
import ServerPicker from '@/components/templates/ServerPicker';
@@ -549,79 +548,45 @@ const Templates = () => {
actions={chromeActions}
/>
- {/* Templates Grid */}
- <div className="templates-grid">
- {deployManaged && (
- <ManagedCard capability="fleet" profile={managedProfile} compact />
- )}
- {sortedTemplates.length === 0 ? (
- <EmptyState
- icon={LayoutTemplate}
- title={t('app.templates.noTemplatesFound', 'No templates found')}
- description={hasActiveFilters ? t('app.templates.tryAdjustingYourFilters', 'Try adjusting your filters') : t('app.templates.noTemplatesAreAvailableYet', 'No templates are available yet')}
- action={hasActiveFilters && (
- <Button variant="outline" size="sm" onClick={clearAllFilters}>
- {t('app.templates.clearFilters', 'Clear Filters')}
- </Button>
- )}
- />
- ) : (
- sortedTemplates.map(template => {
+ {deployManaged && (
+ <ManagedCard capability="fleet" profile={managedProfile} compact />
+ )}
+ {sortedTemplates.length === 0 ? (
+ <EmptyState
+ icon={LayoutTemplate}
+ title={t('app.templates.noTemplatesFound', 'No templates found')}
+ description={hasActiveFilters ? t('app.templates.tryAdjustingYourFilters', 'Try adjusting your filters') : t('app.templates.noTemplatesAreAvailableYet', 'No templates are available yet')}
+ action={hasActiveFilters && (
+ <Button variant="outline" size="sm" onClick={clearAllFilters}>
+ {t('app.templates.clearFilters', 'Clear Filters')}
+ </Button>
+ )}
+ />
+ ) : (
+ <CatalogGrid>
+ {sortedTemplates.map(template => {
const isRepo = (template.kind || 'compose') === 'repo';
return (
- <div key={template.id} className="tpl-card" onClick={() => !deployManaged && handleDeploy(template)}>
- {isFeatured(template.id) && (
- <span className="tpl-ft" title={t('app.templates.featured', 'Featured')}>
- <Star size={14} />
- </span>
- )}
- <div className="tpl-top">
- <span className="tpl-ico">
- {renderIcon(template, 22)}
- </span>
- <div className="tpl-id">
- <div className="tpl-name">{template.name}</div>
- <div className="tpl-ver">v{template.version}</div>
- </div>
- </div>
- <p className="tpl-desc">{template.description}</p>
- <div className="tpl-tags">
- <Badge variant={isRepo ? 'info' : 'outline'} className="tpl-kind">
- {isRepo ? 'Git repo' : 'One-click'}
- </Badge>
- {(template.categories || []).slice(0, 2).map(cat => (
- <span key={cat} className="tg">
- {cat}
- </span>
- ))}
- {template.website && (
- <span className="tpl-link" title={t('app.templates.hasWebsite', 'Has website')}>
- <ExternalLink size={12} />
- </span>
- )}
- {template.documentation && (
- <span className="tpl-link" title={t('app.templates.hasDocumentation', 'Has documentation')}>
- <BookOpen size={12} />
- </span>
- )}
- {!deployManaged && (
- <Button
- size="sm"
- className="tpl-deploy"
- onClick={(e) => {
- e.stopPropagation();
- handleDeploy(template);
- }}
- >
+ <CatalogCard
+ key={template.id}
+ icon={renderIcon(template, 22)}
+ title={template.name}
+ sub={`v${template.version}`}
+ tag={isRepo ? t('app.templates.gitRepo', 'Git repo') : t('app.templates.oneClick', 'One-click')}
+ featured={isFeatured(template.id)}
+ description={template.description}
+ facts={(template.categories || []).slice(0, 2).join(' · ')}
+ onClick={deployManaged ? undefined : () => handleDeploy(template)}
+ action={!deployManaged && (
+ <Button variant="outline" size="sm" onClick={() => handleDeploy(template)}>
<Rocket size={12} /> {t('app.templates.deploy', 'Deploy')}
</Button>
- )}
- </div>
- </div>
+ )}
+ />
);
- })
- )}
- </div>
+ })}
+ </CatalogGrid>
+ )}
{/* Under the cards, not above them: `templates` is what the category
and search query returned, `sortedTemplates` is what the kind
diff --git a/frontend/src/styles/components/_design-system.scss b/frontend/src/styles/components/_design-system.scss
index 7112d047..bbd683b1 100644
--- a/frontend/src/styles/components/_design-system.scss
+++ b/frontend/src/styles/components/_design-system.scss
@@ -1536,6 +1536,75 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');
&__chevron { color: var(--text-faint); flex-shrink: 0; margin-left: 4px; }
}
+// ------------------------------------------------------------
+// CatalogCard / CatalogGrid — the one card for installable or deployable
+// things (extensions, templates, engines). Flat surface, one tag in plain
+// text, one action. Operated resources are tables, never these.
+// ------------------------------------------------------------
+.sk-catalog-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
+ gap: 12px;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.sk-catalog-card {
+ display: flex; flex-direction: column; gap: 10px;
+ min-width: 0;
+ padding: 14px;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius-lg);
+ transition: border-color 0.12s, background 0.12s;
+
+ &.is-clickable { cursor: pointer; }
+ &.is-clickable:hover { border-color: var(--border); background: var(--surface-2); }
+ &.is-clickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
+
+ &__head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
+ &__icon {
+ display: inline-flex; align-items: center; justify-content: center;
+ flex-shrink: 0;
+ width: 36px; height: 36px;
+ border-radius: var(--radius-md);
+ background: var(--surface-2);
+ color: var(--text-dim);
+ overflow: hidden;
+
+ img, svg:not(.lucide) { width: 24px; height: 24px; object-fit: contain; }
+ }
+ &__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
+ &__title {
+ display: inline-flex; align-items: center; gap: 6px;
+ font-weight: 600; font-size: 13.5px; color: var(--text);
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+ }
+ &__featured { flex-shrink: 0; color: var(--text-faint); fill: currentColor; }
+ &__sub {
+ font-family: var(--mono); font-size: 11.5px; color: var(--text-faint);
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+ }
+ &__tag { flex-shrink: 0; font-size: 12px; color: var(--text-faint); white-space: nowrap; }
+ &__desc {
+ margin: 0;
+ font-size: 13px; line-height: 1.45; color: var(--text-dim);
+ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
+ overflow: hidden;
+ }
+ &__foot {
+ display: flex; align-items: center; justify-content: space-between; gap: 8px;
+ margin-top: auto;
+ }
+ &__facts {
+ min-width: 0;
+ font-family: var(--mono); font-size: 11.5px; color: var(--text-faint);
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
+ }
+ &__action { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
+}
+
// ------------------------------------------------------------
// ErrorState — consistent empty error panel.
// ------------------------------------------------------------
diff --git a/frontend/src/styles/pages/_templates.scss b/frontend/src/styles/pages/_templates.scss
index 0824dfd1..a82638d6 100644
--- a/frontend/src/styles/pages/_templates.scss
+++ b/frontend/src/styles/pages/_templates.scss
@@ -1,7 +1,6 @@
// ============================================
-// TEMPLATES PAGE (redesign — catalog grid, see docs/REDESIGN_MAP.md #13)
-// Catalog cards use the demo's .tpl-card pattern, page-scoped here (NOT a
-// design-system primitive). Detail/install modal styles stay below.
+// TEMPLATES PAGE. Cards are the shared CatalogCard (_design-system.scss);
+// this file holds the quickstart row and the detail/install modal styles.
// ============================================
.templates-page {
@@ -24,159 +23,6 @@
font-size: $font-size-lg;
}
}
-
- // ── Catalog grid ────────────────────────────────────────
- .templates-grid {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
- gap: 14px;
- padding-top: $space-1;
- }
-
- // ── Template card (demo .tpl-card pattern) ──────────────
- .tpl-card {
- position: relative;
- display: flex;
- flex-direction: column;
- padding: $space-4;
- background: var(--surface);
- border: 1px solid var(--border-soft);
- border-radius: var(--radius);
- cursor: pointer;
- transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s;
-
- &:hover {
- border-color: var(--border-strong);
- transform: translateY(-2px);
- box-shadow: var(--shadow-md);
-
- .tpl-deploy {
- opacity: 1;
- pointer-events: auto;
- }
- }
- }
-
- .tpl-top {
- display: flex;
- align-items: center;
- gap: $space-3;
- margin-bottom: 11px;
- }
-
- .tpl-ico {
- width: 42px;
- height: 42px;
- border-radius: 11px;
- display: grid;
- place-items: center;
- flex-shrink: 0;
- overflow: hidden;
- background: var(--surface-2);
- color: var(--accent-bright);
-
- img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- padding: 6px;
- }
-
- svg {
- flex-shrink: 0;
- }
- }
-
- .tpl-id {
- min-width: 0;
- }
-
- .tpl-name {
- font-size: $font-size-base;
- font-weight: $font-weight-semibold;
- color: $text-primary;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- .tpl-ver {
- font-family: var(--mono);
- font-size: 10.5px;
- color: var(--text-faint);
- margin-top: 1px;
- }
-
- // Featured flag — amber star, top-right
- .tpl-ft {
- position: absolute;
- top: 13px;
- right: 13px;
- color: var(--amber);
-
- svg {
- fill: currentColor;
- }
- }
-
- .tpl-desc {
- margin: 0;
- font-size: $font-size-sm + 0.5;
- color: var(--text-faint);
- line-height: 1.5;
- flex: 1;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- }
-
- .tpl-tags {
- display: flex;
- align-items: center;
- gap: 5px;
- flex-wrap: wrap;
- margin-top: $space-3;
- min-height: 26px;
-
- .tg {
- font-family: var(--mono);
- font-size: 10px;
- padding: 2px 7px;
- border-radius: 5px;
- background: var(--surface-2);
- color: var(--text-dim);
- text-transform: capitalize;
- white-space: nowrap;
- }
- }
-
- .tpl-link {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: 20px;
- height: 20px;
- border-radius: 5px;
- background: var(--surface-2);
- color: var(--text-faint);
- }
-
- // Hover-reveal Deploy button
- .tpl-deploy {
- margin-left: auto;
- height: 26px;
- padding: 3px 10px;
- font-size: $font-size-sm;
- opacity: 0;
- pointer-events: none;
- transition: opacity 0.14s;
-
- &:focus-visible {
- opacity: 1;
- pointer-events: auto;
- }
- }
}
// The result count, the removable filter chips and the two-button sort toggle
@@ -252,11 +98,6 @@
}
}
-// Kind badge on catalog cards ("Git repo" / "One-click").
-.tpl-kind {
- text-transform: none;
-}
-
// Repo-template detail body
.repo-detail {
display: flex;
@@ -702,20 +543,6 @@
}
// Responsive
-@media (max-width: $breakpoint-md) {
- .templates-page {
- .templates-grid {
- grid-template-columns: 1fr;
- }
-
- // No hover on touch — keep Deploy reachable
- .tpl-deploy {
- opacity: 1;
- pointer-events: auto;
- }
- }
-}
-
.sk-srvpick__resource-picker {
width: 100%;