Skip to content

Conversation

@bhi049
Copy link
Contributor

@bhi049 bhi049 commented Dec 27, 2025

📄 Pull Request Overview

Closes #607

Updates the Single News Page to automatically convert plain text URLs into clickable links and adjusts mobile spacing to match the Figma layout.

🔧 Changes Made

  1. Linkify Directus body text (Single News Page)
  • Added linkify() usage for post.bodyText in NewsElementPage.tsx
  • Rendered linkified content via dangerouslySetInnerHTML
  1. Open links in a new tab
  • Updated shared linkify.ts to include:
    • target="_blank"
    • rel="noopener noreferrer"
  1. Mobile layout adjustments (padding + meta stacking)
  • Adjusted mobile padding for:
    • title
    • subtitle
    • body text
    • share button
  • Updated .metaContainer on mobile to stack items vertically (flex-direction: column) and align left, matching the Figma mobile layout.

Checklist Before Submission

  • Functionality: I have tested my code, and it works as expected.
  • JSDoc: I have added or updated JSDoc comments for all relevant code.
  • Debugging: No console.log() or other debugging statements are left.
  • Clean Code: Removed commented-out or unnecessary code.
  • Tests: Added new tests or updated existing ones for the changes made.
  • Documentation: Documentation has been updated (if applicable).

📝 Additional Information

Provide any additional context or information that reviewers may need to know:

  • Screenshots:
Näyttökuva 2025-12-27 kello 16 49 22 Näyttökuva 2025-12-27 kello 16 50 43
  • Dependencies: None
  • Known Issues: None

Copy link
Contributor

@Rutjake Rutjake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! The links from Directus are now functional and clickable. The padding adjustments also look good.

@Rutjake Rutjake merged commit edd92d2 into dev Jan 8, 2026
4 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in altzone-webpages Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants