internationalscholarsprogram commited on
Commit
c7edf3e
·
1 Parent(s): 4cc164d

feat: enforce consistent blue+underline+clickable link styling for all URLs

Browse files
app/services/normalizer.py CHANGED
@@ -395,12 +395,12 @@ def _normalize_steps(steps: list) -> list[dict]:
395
  low_label = label.lower()
396
  low_url = url.lower()
397
  is_telegram = "telegram" in low_label or "t.me" in low_url
398
- if step_num == 1 and is_telegram:
399
- plain_links.append(url)
400
- else:
401
- if step_num == 2 and "internationalscholarsprogram.com" in low_url and not re.match(r"^https?://", url, flags=re.IGNORECASE):
402
- url = "https://" + url
403
- links.append({"label": label, "url": url})
404
 
405
  if step_num == 2 and not any(
406
  "internationalscholarsprogram.com" in str(l.get("url", "")).lower()
 
395
  low_label = label.lower()
396
  low_url = url.lower()
397
  is_telegram = "telegram" in low_label or "t.me" in low_url
398
+ if step_num == 2 and "internationalscholarsprogram.com" in low_url and not re.match(r"^https?://", url, flags=re.IGNORECASE):
399
+ url = "https://" + url
400
+ # All links (including Telegram) are rendered as clickable anchors.
401
+ # For Telegram use the full URL as visible label so readers can see/type it.
402
+ link_label = url if is_telegram else label
403
+ links.append({"label": link_label, "url": url})
404
 
405
  if step_num == 2 and not any(
406
  "internationalscholarsprogram.com" in str(l.get("url", "")).lower()
app/static/css/print.css CHANGED
@@ -708,8 +708,8 @@ table.programs td:nth-child(5) {
708
 
709
  .hb-plain-url {
710
  font-weight: 400;
711
- color: #000000;
712
- text-decoration: none;
713
  }
714
 
715
  /* legacy step support */
 
708
 
709
  .hb-plain-url {
710
  font-weight: 400;
711
+ color: #1C75BC;
712
+ text-decoration: underline;
713
  }
714
 
715
  /* legacy step support */
app/templates/partials/blocks/enrollment_steps.html CHANGED
@@ -19,7 +19,7 @@
19
  {% if step.plain_links %}
20
  <ul class="hb-bullet-list">
21
  {% for plain_url in step.plain_links %}
22
- <li><span class="hb-plain-url">{{ plain_url | e }}</span></li>
23
  {% endfor %}
24
  </ul>
25
  {% endif %}
 
19
  {% if step.plain_links %}
20
  <ul class="hb-bullet-list">
21
  {% for plain_url in step.plain_links %}
22
+ <li><a href="{{ plain_url | e }}" target="_blank" rel="noopener noreferrer">{{ plain_url | e }}</a></li>
23
  {% endfor %}
24
  </ul>
25
  {% endif %}