Skip to content

Improve responsive layouts for course/UC/topic content - #87

Merged
marcelo-m7 merged 1 commit into
mainfrom
audit-codebase-for-mobile-support
Jan 14, 2026
Merged

marcelo-m7 merged 1 commit into
mainfrom
audit-codebase-for-mobile-support

Conversation

@marcelo-m7

Copy link
Copy Markdown
Collaborator

Motivation

  • Fix mobile and small-screen rendering issues where synced Markdown content, images, tables or iframes could overflow or be clipped.
  • Make course and UC detail areas more readable on narrow screens by stacking definition list terms and values.
  • Ensure dynamically-loaded synced content uses the same responsive rules as regular page content.

Description

  • Added responsive content styles in assets/scss/common/_custom.scss to constrain images, SVGs, videos, iframes, tables and pre blocks and enable safe overflow scrolling for tables and code blocks.
  • Applied a .facodi-rich-content helper and included it alongside existing .content so synced Markdown blocks render responsively in templates.
  • Updated templates layouts/course/single.html, layouts/uc/single.html and layouts/topic/single.html to add the facodi-rich-content class to synced content containers and to use col-12 col-sm-5 / col-12 col-sm-7 grid classes for definition lists to stack on small screens.
  • Updated static/js/loaders.js to emit the same responsive grid classes when populating course and UC detail dl elements so client-rendered content matches the templates.

Testing

  • Attempted to run the local site with hugo server -D --bind 0.0.0.0 --port 1313, but the command failed with hugo: command not found, so a local build/visual verification could not be performed in this environment.
  • No automated unit or CI tests were executed as part of this change in the current run.

Codex Task

Copilot AI review requested due to automatic review settings January 14, 2026 19:53
@monynha-online

monynha-online Bot commented Jan 14, 2026 •

Copy link
Copy Markdown

The preview deployment for FACODI is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2026-01-14 19:55:59 CET

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves responsive behavior for course, UC (curricular unit), and topic pages by ensuring that synced Markdown content and definition lists adapt properly to small screens. The changes fix overflow issues with images, tables, iframes, and code blocks on mobile devices and improve layout readability on narrow screens.

Changes:

  • Added responsive CSS rules for content containers that constrain media elements and enable horizontal scrolling for tables and code blocks
  • Added facodi-rich-content class to synced content containers in templates to apply responsive styles
  • Updated Bootstrap grid classes in definition lists from col-5/col-7 to col-12 col-sm-5/col-12 col-sm-7 to stack on mobile devices

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
assets/scss/common/_custom.scss Added responsive content styles that constrain images, videos, iframes, tables, and code blocks within .content and .facodi-rich-content classes
layouts/course/single.html Added facodi-rich-content class to synced content container and updated grid classes in definition list to support mobile stacking
layouts/uc/single.html Added facodi-rich-content class to synced content container and updated grid classes in definition list to support mobile stacking
layouts/topic/single.html Added facodi-rich-content class to synced content container
static/js/loaders.js Updated dynamically generated definition list grid classes to match the responsive template changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +55 to +59
table {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

Setting display: block on tables changes their layout behavior and may cause issues with table cell alignment and borders. Consider wrapping tables in a container div with overflow properties instead, or use display: table with overflow-x: auto on a wrapper element to preserve table semantics.

Copilot uses AI. Check for mistakes.
Comment on lines +33 to +42
<dt class="col-12 col-sm-5">{{ i18n "course_details_institution" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_school" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_ects" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_duration" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_language" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

The grid classes col-12 col-sm-5 / col-12 col-sm-7 will cause the definition list terms and values to stack vertically below the sm breakpoint (576px). However, the parent column has col-lg-4, which means on medium screens (768px-991px) the aside is already narrow. Consider using col-md-* breakpoints instead of col-sm-* to better align with the aside column's breakpoint, or test thoroughly on medium-sized screens where the aside is narrow but the sm breakpoint is already active.

Suggested change
<dt class="col-12 col-sm-5">{{ i18n "course_details_institution" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_school" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_ects" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_duration" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "course_details_language" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "course_details_institution" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "course_details_school" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "course_details_ects" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "course_details_duration" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "course_details_language" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>

Copilot uses AI. Check for mistakes.
Comment thread layouts/uc/single.html
Comment on lines +42 to +51
<dt class="col-12 col-sm-5">{{ i18n "uc_details_course" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_ects" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_semester" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_language" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_prerequisites" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>

Copilot AI Jan 14, 2026

Copy link

Choose a reason for hiding this comment

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

The grid classes col-12 col-sm-5 / col-12 col-sm-7 will cause the definition list terms and values to stack vertically below the sm breakpoint (576px). However, the parent column has col-xl-4, which means on large and medium screens the aside is already narrow. Consider using col-lg-* or col-md-* breakpoints instead of col-sm-* to better align with the aside column's breakpoint at xl, or test thoroughly on screens where the aside is narrow but the sm breakpoint is already active.

Suggested change
<dt class="col-12 col-sm-5">{{ i18n "uc_details_course" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_ects" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_semester" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_language" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-sm-5">{{ i18n "uc_details_prerequisites" }}</dt>
<dd class="col-12 col-sm-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "uc_details_course" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "uc_details_ects" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "uc_details_semester" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "uc_details_language" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>
<dt class="col-12 col-md-5">{{ i18n "uc_details_prerequisites" }}</dt>
<dd class="col-12 col-md-7 text-muted">—</dd>

Copilot uses AI. Check for mistakes.
@marcelo-m7

Copy link
Copy Markdown
Collaborator Author

@codex open a new pull request to apply changes based on the comments in this thread

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@marcelo-m7
marcelo-m7 merged commit 27abaec into main Jan 14, 2026
7 checks passed
@marcelo-m7
marcelo-m7 deleted the audit-codebase-for-mobile-support branch January 14, 2026 20:12
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