Skip to content

feature: Align code snippet on the left instead of center#168

Open
tizot wants to merge 2 commits into
reuseman:mainfrom
tizot:refactor/templates
Open

feature: Align code snippet on the left instead of center#168
tizot wants to merge 2 commits into
reuseman:mainfrom
tizot:refactor/templates

Conversation

@tizot

@tizot tizot commented Nov 19, 2022

Copy link
Copy Markdown
  • refactor: Make card templates more easily editable
  • feature: Align code snippet on the left instead of center

@tizot tizot changed the title refactor/templates feature: Align code snippet on the left instead of center Nov 19, 2022
@tizot

tizot commented Nov 19, 2022

Copy link
Copy Markdown
Author

Hi @reuseman ! 👋
This is a small PR mainly to fix how snippets of code are displayed in Anki.
By default, card content is centered, including text in HTML <pre> tags. I just added a CSS rule to align code on the left.

I also took the liberty to extract the card templates in a separate file so that it is easier to change them (also reduced a bit the code duplication).

@tizot

tizot commented Nov 19, 2022

Copy link
Copy Markdown
Author

CleanShot 2022-11-19 at 20 30 41@2x

becknik pushed a commit to becknik/obsidian-anki-flashcards that referenced this pull request Apr 24, 2025
becknik pushed a commit to becknik/obsidian-anki-flashcards that referenced this pull request Apr 24, 2025
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.

1 participant