Skip to content

Feature/image position - Add per-image position suffix for slide layouts#33

Open
LeonFooC wants to merge 2 commits into
chektien:mainfrom
LeonFooC:feature/image-position
Open

Feature/image position - Add per-image position suffix for slide layouts#33
LeonFooC wants to merge 2 commits into
chektien:mainfrom
LeonFooC:feature/image-position

Conversation

@LeonFooC

@LeonFooC LeonFooC commented Jun 23, 2026

Copy link
Copy Markdown

Hi @chektien , I tried extending the image position feature, adding a suffix that allows you to indicate the position of the image.

I've compiled a implementation log which contains updates, changes, and bug information, mdq-implementation-log.md.

Adds an optional -right / -left / -top / -bottom / -background[:N] suffix to slide-image markdown so authors can place the visual relative to the body text without leaving markdown.

Examples
![alt](path "caption" -left)
![alt](path "caption" -top)
![alt](path "caption" -background:0.5)

  • All images on a slide must share the same position; mixed positions throw a parse error.
  • -background takes an optional opacity in [0, 1], default 0.3.
  • Existing decks render identically (no suffix maps to -right).
  • Both print and live viewer share the parser and produce matching layouts.

Coexists with slideLiveEmbed: when a slide sets both, the live embed wins and the static media grid is skipped, so position is only consulted on non-embed slides.

LeonFooC added 2 commits June 23, 2026 16:52
# Conflicts:
#	packages/client/src/components/SlideContent.tsx
#	packages/client/src/hooks/useSocket.ts
#	packages/client/src/index.css
#	packages/client/src/views/InstructorView.tsx
#	packages/client/src/views/PresentationView.tsx
#	packages/client/src/views/StudentView.tsx
#	packages/server/src/parser.ts
#	packages/server/src/print-mdq.ts
#	packages/server/src/socket.ts
#	packages/shared/src/index.ts
@LeonFooC LeonFooC marked this pull request as draft June 23, 2026 10:10
@LeonFooC LeonFooC marked this pull request as ready for review June 24, 2026 04:14
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