Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ MarkText is an open-source Markdown editor powered by the support of its communi

| [<img src="docs/assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [Scrape Google and other search engines from our fast, easy, and complete API.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="docs/assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## Screenshot

Expand Down
Binary file added docs/assets/sponsors/ukey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/i18n/README-ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ MarkText هو محرر Markdown مفتوح المصدر يعتمد على دعم

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [استخرج نتائج Google ومحركات البحث الأخرى من خلال واجهة برمجية سريعة وسهلة وشاملة.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## لقطة شاشة

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-de.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ MarkText ist ein Open-Source-Markdown-Editor, der von seiner Community unterstü

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [Extrahieren Sie Daten von Google und anderen Suchmaschinen über unsere schnelle, einfache und vollständige API.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## Screenshot

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ MarkText es un editor de Markdown de código abierto impulsado por el apoyo de s

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [Extrae resultados de Google y otros motores de búsqueda con nuestra API rápida, sencilla y completa.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## Capturas de pantalla

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ MarkText est un éditeur Markdown open-source soutenu par sa communauté. Si Mar

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [Extrayez les résultats de Google et d'autres moteurs de recherche grâce à notre API rapide, facile et complète.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## Captures d'écran

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ MarkText はコミュニティの支援によって成り立つオープンソ

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [高速で使いやすく完全な API で Google や他の検索エンジンからデータを取得できます。](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## スクリーンショット

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ MarkText는 커뮤니티의 지원으로 운영되는 오픈소스 Markdown 편

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [빠르고 쉬우며 완전한 API로 Google 및 기타 검색 엔진에서 데이터를 수집하세요.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## 스크린샷

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ MarkText é um editor Markdown de código aberto impulsionado pelo apoio de sua

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [Extraia dados do Google e de outros mecanismos de busca com nossa API rápida, fácil e completa.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## Capturas de tela

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ MarkText, topluluğunun desteğiyle hayata geçirilmiş açık kaynaklı bir Mar

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [Hızlı, kolay ve kapsamlı API'miz ile Google ve diğer arama motorlarından veri çekin.](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## Ekran Görüntüsü

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ MarkText 是一款由社区支持驱动的开源 Markdown 编辑器。如果 Mar

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [通过我们快速、便捷且完整的 API 抓取 Google 及其他搜索引擎的数据。](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## 截图

Expand Down
1 change: 1 addition & 0 deletions docs/i18n/README-zh_tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ MarkText 是一款由社群支持驅動的開源 Markdown 編輯器。如果 Mar

| [<img src="../assets/sponsors/serpapi.png" width="150">](https://serpapi.com/?utm_source=marktext) | [透過我們快速、便捷且完整的 API 抓取 Google 及其他搜尋引擎的資料。](https://serpapi.com/?utm_source=marktext) |
| ------------- |:-------------|
| [<img src="../assets/sponsors/ukey.png" width="150">](https://www.ukey.com) | [Secure hardware wallet made simple.](https://www.ukey.com) |

## 截圖

Expand Down
7 changes: 5 additions & 2 deletions packages/desktop/src/renderer/src/util/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ export const setEditorWidth = (value: string): void => {
const EDITOR_WIDTH_STYLE_ID = 'editor-width'
let result = ''
if (value && /^[0-9]+(?:ch|px|%)$/.test(value)) {
// Overwrite the theme value and add 100px for padding.
result = `:root { --editorAreaWidth: calc(100px + ${value}); }`
// Add 100px for the container's horizontal padding. Set both the legacy
// camelCase var (source mode) and the kebab-case var the active
// @muyajs/core engine reads for `.mu-container` max-width (issue #4828).
const width = `calc(100px + ${value})`
result = `:root { --editorAreaWidth: ${width}; --editor-area-width: ${width}; }`
}
let styleEle = document.querySelector(`#${EDITOR_WIDTH_STYLE_ID}`) as HTMLStyleElement | null
if (!styleEle) {
Expand Down
12 changes: 11 additions & 1 deletion packages/desktop/test/unit/specs/editor-theme-style.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,21 @@ describe('theme.ts style injection helpers', () => {
setEditorWidth(value)

expect(styleHtml(WIDTH_STYLE_ID)).toBe(
`:root { --editorAreaWidth: calc(100px + ${value}); }`
`:root { --editorAreaWidth: calc(100px + ${value}); --editor-area-width: calc(100px + ${value}); }`
)
}
)

it('overrides the active @muyajs/core width variable, not only the legacy one', () => {
// The WYSIWYG engine reads the kebab-case `--editor-area-width`
// (`.mu-container` max-width); the legacy camelCase `--editorAreaWidth`
// only reaches source mode. Both must be set or the preference is a no-op
// on the default theme (issue #4828).
setEditorWidth('60%')

expect(styleHtml(WIDTH_STYLE_ID)).toContain('--editor-area-width: calc(100px + 60%);')
})

it('clears the override (empty innerHTML) for an empty string', () => {
setEditorWidth('800px')
setEditorWidth('')
Expand Down
Binary file added packages/website/public/assets/ukey.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion packages/website/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,12 @@ h2.sec-title {
text-transform: uppercase;
color: var(--muted);
}
.sponsor-logos {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 22px;
}
.sponsor-logo {
display: inline-flex;
align-items: center;
Expand All @@ -1081,7 +1087,9 @@ h2.sec-title {
width: auto;
display: block;
}
[data-theme='dark'] .sponsor-logo img {
/* Logos that carry their own background can't be recolored, so exclude them
from the dark-mode inversion that transparent single-color logos rely on. */
[data-theme='dark'] .sponsor-logo img:not(.sponsor-logo-raw) {
filter: brightness(0) invert(1);
opacity: 0.9;
}
Expand Down
11 changes: 8 additions & 3 deletions packages/website/src/components/Support.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ export default function Support() {

<div className="sponsors-wall reveal d1">
<span className="sponsors-label">Sponsored by</span>
<a className="sponsor-logo" href={DOWNLOAD.serpapi} {...EXT_LINK} title="SerpApi">
<img src="/assets/serpapi.png" alt="SerpApi" loading="lazy" />
</a>
<div className="sponsor-logos">
<a className="sponsor-logo" href={DOWNLOAD.serpapi} {...EXT_LINK} title="SerpApi">
<img src="/assets/serpapi.png" alt="SerpApi" loading="lazy" />
</a>
<a className="sponsor-logo" href={DOWNLOAD.ukey} {...EXT_LINK} title="UKey Wallet">
<img className="sponsor-logo-raw" src="/assets/ukey.png" alt="UKey Wallet" loading="lazy" />
</a>
</div>
</div>
</div>
</section>
Expand Down
3 changes: 2 additions & 1 deletion packages/website/src/lib/downloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export const DOWNLOAD = {
sponsor: 'https://github.com/sponsors/marktext',
twitter:
'https://twitter.com/intent/tweet?via=marktextme&url=https://github.com/marktext/marktext/&text=What%20do%20you%20want%20to%20say%20to%20app?&hashtags=happyMarkText',
serpapi: 'https://serpapi.com/?utm_source=marktext'
serpapi: 'https://serpapi.com/?utm_source=marktext',
ukey: 'https://www.ukey.com'
}
Loading