mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 10:18:46 +03:00
fix(site): drop the free button from the companions shelf (#62489)
This commit is contained in:
@@ -23,11 +23,11 @@
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* The icon spans both rows; the name sits over the category, and the button on the right. */
|
||||
/* The icon spans both rows; the name sits over the category. */
|
||||
[data-component="companion"] {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: 3.5rem minmax(0, 1fr) auto;
|
||||
grid-template-columns: 3.5rem minmax(0, 1fr);
|
||||
grid-template-rows: auto auto;
|
||||
align-items: center;
|
||||
/* The icons carry a 10% margin of their own, so the visible gap to the text is about 14px. */
|
||||
@@ -109,38 +109,12 @@
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
[data-slot="get"] {
|
||||
grid-column: 3;
|
||||
grid-row: 1 / 3;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
height: 2rem;
|
||||
padding: 0 0.75rem;
|
||||
background: var(--bg-strong);
|
||||
color: var(--text-inverted);
|
||||
font-size: var(--fs-small);
|
||||
font-weight: 500;
|
||||
transition:
|
||||
background-color 150ms ease,
|
||||
transform 160ms var(--ease-out);
|
||||
|
||||
&:active {
|
||||
transform: scale(0.97);
|
||||
}
|
||||
}
|
||||
|
||||
/* Hovering anywhere on the row colours the name like the site's other links. */
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
[data-component="companion"]:hover {
|
||||
[data-slot="link"] {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
[data-slot="get"] {
|
||||
background: var(--bg-strong-hover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,24 +122,16 @@
|
||||
[data-slot="link"] {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
[data-slot="get"] {
|
||||
background: var(--bg-strong-hover);
|
||||
}
|
||||
}
|
||||
|
||||
[data-component="companion"]:has(:focus-visible) {
|
||||
[data-slot="link"] {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
[data-slot="get"] {
|
||||
background: var(--bg-strong-hover);
|
||||
}
|
||||
}
|
||||
|
||||
/* Below about 1408px a quarter column is too narrow for the name, category and button, so the
|
||||
apps take thirds instead. */
|
||||
/* Below about 1408px a quarter column is too narrow for the name and category, so the apps take
|
||||
thirds instead. */
|
||||
@media (max-width: 88rem) {
|
||||
[data-slot="track"] {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
@@ -214,7 +180,7 @@
|
||||
&[data-style="outline compact"],
|
||||
&[data-style="list"] {
|
||||
[data-component="companion"] {
|
||||
grid-template-columns: 2.5rem auto minmax(0, 1fr) auto;
|
||||
grid-template-columns: 2.5rem auto minmax(0, 1fr);
|
||||
grid-template-rows: auto;
|
||||
column-gap: 0.375rem;
|
||||
}
|
||||
@@ -242,11 +208,6 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[data-slot="get"] {
|
||||
grid-column: 4;
|
||||
grid-row: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-style="outline compact"] [data-component="companion"] {
|
||||
|
||||
@@ -10,9 +10,9 @@ import { SectionHeading } from "./on-this-page"
|
||||
import { siteSettings } from "./settings"
|
||||
|
||||
/**
|
||||
* "Works great with OpenCode": Anomaly's apps in one row, like an app store shelf (icon, name,
|
||||
* category, Free button), the same on every product page. On phones the row scrolls sideways. The
|
||||
* `companionStyle` setting swaps the ruled grid for grey tiles or a ruled list.
|
||||
* "Works great with OpenCode": Anomaly's apps in one row (icon, name and category), the same on
|
||||
* every product page. On phones the row scrolls sideways. The `companionStyle` setting swaps the
|
||||
* ruled grid for grey tiles or a ruled list.
|
||||
*/
|
||||
export function Companions() {
|
||||
const i18n = useI18n()
|
||||
@@ -43,17 +43,6 @@ export function Companions() {
|
||||
</span>
|
||||
</a>
|
||||
<span data-slot="category">{appCopy()[app.id].category}</span>
|
||||
{/* The same link again, so screen readers and the tab order skip it. */}
|
||||
<a
|
||||
data-slot="get"
|
||||
href={link.href}
|
||||
target={target}
|
||||
rel={rel}
|
||||
tabindex="-1"
|
||||
aria-hidden="true"
|
||||
>
|
||||
{i18n.t("site.companions.free")}
|
||||
</a>
|
||||
</li>
|
||||
)
|
||||
}}
|
||||
|
||||
@@ -468,7 +468,6 @@ export const dict = {
|
||||
"site.code.failed": "فشل",
|
||||
"site.code.copied": "نُسخ إلى الحافظة",
|
||||
"site.code.failedHint": "تعذّر النسخ. حدّد الكود بنفسك.",
|
||||
"site.companions.free": "مجاني",
|
||||
"site.announcement.label": "جديد. {{message}}",
|
||||
"site.announcement.aside": "الجديد في OpenCode",
|
||||
"site.announcement.dismiss": "إخفاء الإعلان",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Falhou",
|
||||
"site.code.copied": "Copiado",
|
||||
"site.code.failedHint": "Não foi possível copiar. Selecione o código.",
|
||||
"site.companions.free": "Grátis",
|
||||
"site.announcement.label": "Novo. {{message}}",
|
||||
"site.announcement.aside": "Novidades do OpenCode",
|
||||
"site.announcement.dismiss": "Dispensar aviso",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Mislykkedes",
|
||||
"site.code.copied": "Kopieret til udklipsholderen",
|
||||
"site.code.failedHint": "Kunne ikke kopiere. Markér koden i stedet.",
|
||||
"site.companions.free": "Gratis",
|
||||
"site.announcement.label": "Nyt. {{message}}",
|
||||
"site.announcement.aside": "Nyt i OpenCode",
|
||||
"site.announcement.dismiss": "Luk meddelelse",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Fehlgeschlagen",
|
||||
"site.code.copied": "In die Zwischenablage kopiert",
|
||||
"site.code.failedHint": "Kopieren fehlgeschlagen. Markiere den Code stattdessen.",
|
||||
"site.companions.free": "Gratis",
|
||||
"site.announcement.label": "Neu. {{message}}",
|
||||
"site.announcement.aside": "Neu in OpenCode",
|
||||
"site.announcement.dismiss": "Hinweis schließen",
|
||||
|
||||
@@ -337,7 +337,6 @@ export const dict = {
|
||||
"site.moreProducts": "More products",
|
||||
"site.contents": "Contents",
|
||||
"site.companions": "Works great with OpenCode",
|
||||
"site.companions.free": "Free",
|
||||
"site.announcement.label": "New. {{message}}",
|
||||
"site.announcement.aside": "New in OpenCode",
|
||||
"site.announcement.dismiss": "Dismiss announcement",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Error",
|
||||
"site.code.copied": "Copiado al portapapeles",
|
||||
"site.code.failedHint": "No se ha podido copiar. Selecciona el código.",
|
||||
"site.companions.free": "Gratis",
|
||||
"site.announcement.label": "Novedad. {{message}}",
|
||||
"site.announcement.aside": "Novedades en OpenCode",
|
||||
"site.announcement.dismiss": "Cerrar aviso",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Échec",
|
||||
"site.code.copied": "Copié dans le presse-papiers",
|
||||
"site.code.failedHint": "Copie impossible. Sélectionnez plutôt le code.",
|
||||
"site.companions.free": "Gratuit",
|
||||
"site.announcement.label": "Nouveau. {{message}}",
|
||||
"site.announcement.aside": "Nouveau dans OpenCode",
|
||||
"site.announcement.dismiss": "Masquer l'annonce",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Errore",
|
||||
"site.code.copied": "Copiato negli appunti",
|
||||
"site.code.failedHint": "Copia non riuscita. Seleziona il codice.",
|
||||
"site.companions.free": "Gratis",
|
||||
"site.announcement.label": "Novità. {{message}}",
|
||||
"site.announcement.aside": "Novità in OpenCode",
|
||||
"site.announcement.dismiss": "Chiudi l'annuncio",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "失敗",
|
||||
"site.code.copied": "クリップボードにコピーしました",
|
||||
"site.code.failedHint": "コピーできませんでした。コードを選択してください。",
|
||||
"site.companions.free": "無料",
|
||||
"site.announcement.label": "新着。{{message}}",
|
||||
"site.announcement.aside": "OpenCodeの新着情報",
|
||||
"site.announcement.dismiss": "お知らせを閉じる",
|
||||
|
||||
@@ -487,7 +487,6 @@ export const dict = {
|
||||
"site.code.failed": "실패",
|
||||
"site.code.copied": "클립보드에 복사됨",
|
||||
"site.code.failedHint": "복사하지 못했습니다. 코드를 직접 선택하세요.",
|
||||
"site.companions.free": "무료",
|
||||
"home.openSource.star": "GitHub에서 스타",
|
||||
"home.openSource.starCount": ", 스타 {{count}}개",
|
||||
"home.openSource.contribute": "기여하기",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Mislyktes",
|
||||
"site.code.copied": "Kopiert til utklippstavlen",
|
||||
"site.code.failedHint": "Kunne ikke kopiere. Merk koden i stedet.",
|
||||
"site.companions.free": "Gratis",
|
||||
"site.announcement.label": "Nytt. {{message}}",
|
||||
"site.announcement.aside": "Nytt i OpenCode",
|
||||
"site.announcement.dismiss": "Lukk kunngjøring",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Błąd",
|
||||
"site.code.copied": "Skopiowano do schowka",
|
||||
"site.code.failedHint": "Nie udało się skopiować. Zaznacz kod ręcznie.",
|
||||
"site.companions.free": "Za darmo",
|
||||
"site.announcement.label": "Nowość. {{message}}",
|
||||
"site.announcement.aside": "Nowości w OpenCode",
|
||||
"site.announcement.dismiss": "Zamknij ogłoszenie",
|
||||
|
||||
@@ -468,7 +468,6 @@ export const dict = {
|
||||
"site.code.failed": "Ошибка",
|
||||
"site.code.copied": "Скопировано в буфер обмена",
|
||||
"site.code.failedHint": "Не удалось скопировать. Выделите код вручную.",
|
||||
"site.companions.free": "Бесплатно",
|
||||
"site.announcement.label": "Новое. {{message}}",
|
||||
"site.announcement.aside": "Новое в OpenCode",
|
||||
"site.announcement.dismiss": "Скрыть объявление",
|
||||
|
||||
@@ -814,7 +814,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -832,7 +832,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -807,7 +807,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -807,7 +807,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -809,7 +809,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -809,7 +809,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -809,7 +809,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -824,7 +824,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -824,7 +824,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -807,7 +807,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -832,7 +832,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -814,7 +814,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -824,7 +824,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -832,7 +832,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -814,7 +814,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -824,7 +824,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -824,7 +824,6 @@
|
||||
"site.code.failed": "16x0vp90aq8zn",
|
||||
"site.code.failedHint": "3j5tgdyb2ch7a",
|
||||
"site.companions": "3opx7l8sy83z1",
|
||||
"site.companions.free": "1a4b4925hrn0n",
|
||||
"site.contents": "2wa7zs8d7zo8y",
|
||||
"site.cycle.extensions": "2o7eq3wk39v6v",
|
||||
"site.cycle.next": "3va5iu1gj9xr1",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "ไม่สำเร็จ",
|
||||
"site.code.copied": "คัดลอกไปยังคลิปบอร์ดแล้ว",
|
||||
"site.code.failedHint": "คัดลอกไม่ได้ ให้เลือกโค้ดแทน",
|
||||
"site.companions.free": "ฟรี",
|
||||
"site.announcement.label": "ใหม่ {{message}}",
|
||||
"site.announcement.aside": "ใหม่ใน OpenCode",
|
||||
"site.announcement.dismiss": "ปิดประกาศ",
|
||||
|
||||
@@ -484,7 +484,6 @@ export const dict = {
|
||||
"site.code.failed": "Başarısız",
|
||||
"site.code.copied": "Panoya kopyalandı",
|
||||
"site.code.failedHint": "Kopyalanamadı. Kodu elle seçin.",
|
||||
"site.companions.free": "Ücretsiz",
|
||||
"site.announcement.label": "Yeni. {{message}}",
|
||||
"site.announcement.aside": "OpenCode'da yeni",
|
||||
"site.announcement.dismiss": "Duyuruyu kapat",
|
||||
|
||||
@@ -466,7 +466,6 @@ export const dict = {
|
||||
"site.code.failed": "Помилка",
|
||||
"site.code.copied": "Скопійовано в буфер обміну",
|
||||
"site.code.failedHint": "Не вдалося скопіювати. Виділіть код вручну.",
|
||||
"site.companions.free": "Безкоштовно",
|
||||
"site.announcement.label": "Нове. {{message}}",
|
||||
"site.announcement.aside": "Нове в OpenCode",
|
||||
"site.announcement.dismiss": "Приховати оголошення",
|
||||
|
||||
@@ -487,7 +487,6 @@ export const dict = {
|
||||
"site.code.failed": "失败",
|
||||
"site.code.copied": "已复制到剪贴板",
|
||||
"site.code.failedHint": "无法复制,请手动选择代码。",
|
||||
"site.companions.free": "免费",
|
||||
"home.openSource.star": "在 GitHub 上加星标",
|
||||
"home.openSource.starCount": ",{{count}} 个星标",
|
||||
"home.openSource.contribute": "参与贡献",
|
||||
|
||||
@@ -487,7 +487,6 @@ export const dict = {
|
||||
"site.code.failed": "失敗",
|
||||
"site.code.copied": "已複製到剪貼簿",
|
||||
"site.code.failedHint": "無法複製,請手動選取程式碼。",
|
||||
"site.companions.free": "免費",
|
||||
"home.openSource.star": "在 GitHub 上給星星",
|
||||
"home.openSource.starCount": ",{{count}} 顆星星",
|
||||
"home.openSource.contribute": "參與貢獻",
|
||||
|
||||
Reference in New Issue
Block a user