Skip to content

Visual improvements#111

Merged
aalemayhu merged 4 commits into
2anki:devfrom
alpkaanaksu:dev
Aug 15, 2020
Merged

Visual improvements#111
aalemayhu merged 4 commits into
2anki:devfrom
alpkaanaksu:dev

Conversation

@alpkaanaksu
Copy link
Copy Markdown
Collaborator

@alpkaanaksu alpkaanaksu commented Aug 15, 2020

August 15 - Responsiveness improvements

  • added wrap to the two buttons (Get Started and YouTube)
  • changed "learn more about notion2anki" text to be shorter, keeping it or changing it is up to you
  • changed the style of Discord server button to enable proper wrap, couldn't figure out how I can make the button bigger, please fix it if you can (Background larger, the text is inside the button with white color)
  • increased the margins on the .column class. Every div element with the class "column" is affected.

August 12 - Minor improvements to the fonts size selector

  • rounded corners
  • the size of the font selector frame doesn't change with the selected text size.

- Enabled wrap in two buttons (Get Started and YouTube)
- changed "learn more about notion2anki" text to be shortter, keeping it or changing it is up to you
- changed the style of Discord server button to enable proper wrap, cpuldn't figure out how I can make the button bigger, please fix it if you can (Background larger, text is inside the button with white color)
- increased the margins on the .column class. Every ddiv element with the class "column" is affected.
@aalemayhu aalemayhu merged commit 19af3ab into 2anki:dev Aug 15, 2020
aalemayhu added a commit that referenced this pull request May 20, 2026
…2484)

## Summary

Two gallery fixes in the same surface, prompted by user feedback after
#2482 + #2483 deployed.

### 1. Cards fill the iframe edge to edge

\`notion.css\` ships with \`body { margin: 2em auto; max-width: 900px
}\` — that meant every Notion-flavoured starter (Default
Basic/Cloze/Type-the-answer, Only Notion variants) rendered with a band
of the gallery card background showing through the top and bottom of the
iframe. Visible as a \"offset\" between the preview wrap and the card
content.

Separately, \"Raw Note (no style)\" has \`cssFile: null\` so
\`noteType.css\` is empty — the wrapper left both html and body
transparent, so the thumbnail showed whatever was behind the iframe.

Fix in \`renderNoteTypePreview.ts > buildPreviewDocument\`:
- Wrapper sets a default \`background: #fff; color: #111\` on html and
body.
- Wrapper re-asserts \`margin: 0 / padding: 0 / max-width: none / width:
100% / height: 100%\` on html and body *after* the template CSS, with
\`!important\` so notion.css's \`body { margin: 2em auto; max-width:
900px }\` no longer wins.
- Templates that set their own \`.card\` background (Quote = #1c1917,
Alex Deluxe = blue gradient, Abhiyan = night-mode dark) still win
because that selector is more specific than the body reset.

### 2. Section reorder — Starter note types lead the page

Visible sections were ordered:
1. Your note types
2. Official 2anki templates
3. Starter note types

Reordered to:
1. Your note types
2. **Starter note types** (Clean Basic, Modern Cloze, Vocabulary,
Medical, Code, Minimal, Quote, Math & Science — polished designs)
3. Official 2anki templates (Default / Only Notion / Raw / Abhiyan /
Alex variants)

User's own work still leads. The polished gallery comes next so the
first impression is the strong designs, not the historical defaults.

## Test plan

- [x] \`pnpm --filter 2anki-web vitest run src/pages/TemplatesPage\` —
44 tests pass
- [x] \`pnpm --filter 2anki-web typecheck\` clean
- [x] \`pnpm --filter 2anki-web lint\` clean
- [ ] After deploy: hard-refresh \`/templates\`, confirm Only Notion
thumbnails fill the iframe (no dark band top/bottom), confirm Raw Note
(no style) has a white background, confirm Starter section appears above
Official

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants