Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 30, 2026

Motivation

  • Provide a new Prettyblock that renders a banner of links to AI assistants so editors can offer one-click prompts for the current page.
  • Links must include an interpolated prompt containing the page title and url so the assistant receives page context.
  • The block should work with the existing Prettyblocks system and be compatible with Bootstrap 5 while remaining retro-compatible with Bootstrap 4 classes.

Description

  • Added a new Smarty template views/templates/hook/prettyblocks/prettyblock_llm_links.tpl that renders an optional heading and a responsive grid of LLM link items using placeholders and safe escaping.
  • Registered the new block in src/Service/EverblockPrettyBlocks.php (everblock_llm_links) with configuration fields and a repeater for each LLM entry including label, base_url, prompt_template, icon, icon_alt, and open_in_new_tab.
  • Implemented client-side interpolation in views/js/everblock.js via initPrettyblockLlmLinks() to replace {{title}} and {{url}} in prompt templates and set the final href (encodeURIComponent applied).
  • Added layout and visual rules in views/css/everblock.css to style the new block (.prettyblock-llm-links*) with grid/column padding and 92×92 icon sizing, and ensured links include rel="noopener noreferrer" when opened in a new tab.

Testing

  • No automated tests were run for this change.

Codex Task

@CySSoO CySSoO merged commit acd11f8 into master Jan 30, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants