File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 1111{% comment %} Separate workshops into active and inactive {% endcomment %}
1212{% for workshop in workshops %}
1313 {% assign is_active = false %}
14+ {% assign workshop_title_lower = workshop.title | downcase %}
1415
1516 {% comment %} Check if workshop is in upcoming workshops {% endcomment %}
1617 {% for upcoming in site.data.upcoming_workshops.workshops %}
17- {% if upcoming.title == workshop.title %}
18+ {% assign upcoming_title_lower = upcoming.title | downcase %}
19+ {% if upcoming_title_lower == workshop_title_lower %}
20+ {% assign is_active = true %}
21+ {% break %}
22+ {% elsif upcoming_title_lower contains workshop_title_lower %}
23+ {% assign is_active = true %}
24+ {% break %}
25+ {% elsif workshop_title_lower contains upcoming_title_lower %}
1826 {% assign is_active = true %}
1927 {% break %}
2028 {% endif %}
Original file line number Diff line number Diff line change 55 < meta charset ="utf-8 ">
66 < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
77 < title > {{ page.title | default: "D-Lab Workshops" }}</ title >
8- < link rel ="icon " type ="image/png " sizes ="32x32 " href ="static/images/favicon-32x32.png ">
9- < link rel ="icon " type ="image/png " sizes ="16x16 " href ="static/images/favicon-16x16.png ">
8+ < link rel ="icon " type ="image/png " sizes ="32x32 " href ="{{ '/ static/images/favicon-32x32.png' | relative_url }} ">
9+ < link rel ="icon " type ="image/png " sizes ="16x16 " href ="{{ '/ static/images/favicon-16x16.png' | relative_url }} ">
1010 <!-- Bootstrap CSS -->
1111 < link rel ="stylesheet " href ="https://bootswatch.com/4/litera/bootstrap.min.css ">
1212 <!-- Fontawesome JS -->
1313 < script defer src ="https://use.fontawesome.com/releases/v5.0.10/js/all.js " integrity ="sha384-slN8GvtUJGnv6ca26v8EzVaR9DC58QEwsIk9q1QXdCU8Yu8ck/tL/5szYlBbqmS+ " crossorigin ="anonymous "> </ script >
1414
1515 <!-- Custom CSS -->
16- < link rel ="stylesheet " href ="static/stylesheets/style.css ">
17- < link rel ="stylesheet " href ="static/stylesheets/custom-home.css ">
16+ < link rel ="stylesheet " href ="{{ '/ static/stylesheets/style.css' | relative_url }} ">
17+ < link rel ="stylesheet " href ="{{ '/ static/stylesheets/custom-home.css' | relative_url }} ">
1818</ head >
1919
2020< body class ="w-100 h-100 ">
7373 < script src ="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js " integrity ="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl " crossorigin ="anonymous "> </ script >
7474
7575 <!-- Workshop Status JS -->
76- < script src ="static/javascripts/workshop-status.js "> </ script >
76+ < script src ="{{ '/ static/javascripts/workshop-status.js' | relative_url }} "> </ script >
7777
7878</ body >
7979</ html >
Original file line number Diff line number Diff line change 44( function ( ) {
55 'use strict' ;
66
7- // Configuration
8- const UPCOMING_WORKSHOPS_URL = 'data/upcoming_workshops.json' ;
9- const WORKSHOP_MAPPINGS_URL = 'data/workshop_mappings.yml' ;
7+ // Configuration - detect base URL
8+ const baseUrl = window . location . pathname . includes ( '/dlab-workshops/' ) ? '/dlab-workshops' : '' ;
9+ const UPCOMING_WORKSHOPS_URL = baseUrl + '/data/upcoming_workshops.json' ;
10+ const WORKSHOP_MAPPINGS_URL = baseUrl + '/data/workshop_mappings.yml' ;
1011
1112 // Cache for performance
1213 let workshopData = null ;
8889 return title . toLowerCase ( )
8990 . replace ( / [ ^ a - z 0 - 9 \s ] / g, '' )
9091 . replace ( / \s + / g, ' ' )
92+ . replace ( / p a r t s \s + \d + [ - – ] \d + / g, 'parts' ) // Normalize "Parts 1-3" to just "parts"
9193 . trim ( ) ;
9294 }
9395
You can’t perform that action at this time.
0 commit comments