Skip to content

Commit

Permalink
Merge branch 'prod' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
NuwanJ authored Feb 5, 2024
2 parents a2f0bf3 + 2e4bca7 commit 2ce73f8
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions pages/courses/undergraduate_courses.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
layout: default
permalink: /courses/undergraduate
title: Undergraduate Courses
---

<div class="bg-secondary p-3 pb-1 rounded">
<h1 class="text-white">{{ page.title }}</h1>
<nav aria-label="breadcrumb">
<ol class="breadcrumb page-breadcrumb">
<li class="breadcrumb-item"><a href="{{ '/' | prepend: site.baseurl }}" class="link-light">Home</a></li>

<li class="breadcrumb-item">
<a href="{{ '/academics' | relative_url }}" class="link-light">
Academics
</a>
</li>

<li class="breadcrumb-item text-white">{{ page.title }}</li>
</ol>
</nav>
</div>

<div class="page-entry">
<div class="container pt-5 py-3">
{%- for sem in site.data.semesters -%}
<div class="container pb-3">
<h4>{{ sem[1]["title"] }}
<small><a class="ms-2 text-muted" href="{{ sem[1]['url'] }}"><i class="fa fa-link"></i></a></small>
</h4>
<p>{{ sem[1]["description"]}}</p>
</div>
<div class="container row">
{% assign sem_id = sem[0] %}
{%- for course in site.data.courses[sem_id]["courses"] -%}

{% assign course_prefix = course.code | slice: 0,2 %}

{% case course_prefix %}
{% when 'CO' %}
{% assign course_color = "btn-outline-primary" %}
{% when 'EE' %}
{% assign course_color = "btn-outline-success" %}
{% when 'EM' %}
{% assign course_color = "btn-outline-danger" %}
{% when 'GP' %}
{% assign course_color = "btn-outline-warning" %}
{% else %}
{% assign course_color = "btn-outline-secondary" %}
{% endcase %}

<div class="col-12 col-sm-6 col-md-4 d-grid">
<a href="{{ course.urls.view | relative_url}}"
class="btn btn-block mb-2 me-2 course-button {{ course_color }}">
<span class="font-monospace">{{course.code }} ({{ course.credits }}C)</span><br>
<b>{{ course.name }}</b></a>
</div>
{%- endfor -%}
</div>
<hr>
{%- endfor -%}
</div>
</div>

0 comments on commit 2ce73f8

Please sign in to comment.