From 73c786b1c22b01f18db46524a785c21576dd0b78 Mon Sep 17 00:00:00 2001 From: Emruz Hossain Date: Sat, 2 Jan 2021 22:29:38 +0600 Subject: [PATCH] Add education section (#168) * Add education section * Add education-alt section * Add translations --- exampleSite/data/bn/sections/education.yaml | 89 +++++++++++ exampleSite/data/en/sections/education.yaml | 89 +++++++++++ i18n/bn.toml | 26 ++- i18n/cn.toml | 26 ++- i18n/de.toml | 26 ++- i18n/en.toml | 26 ++- i18n/es.toml | 24 +++ i18n/fr.toml | 26 ++- i18n/id.toml | 26 ++- i18n/it.toml | 26 ++- i18n/jp.toml | 26 ++- i18n/ru.toml | 26 ++- i18n/vn.toml | 26 ++- layouts/index.html | 1 + layouts/partials/sections/education-alt.html | 110 +++++++++++++ layouts/partials/sections/education.html | 101 ++++++++++++ static/assets/css/layouts/main.css | 8 + static/assets/css/sections/education.css | 158 +++++++++++++++++++ static/assets/js/main.js | 24 +++ 19 files changed, 854 insertions(+), 10 deletions(-) create mode 100644 exampleSite/data/bn/sections/education.yaml create mode 100644 exampleSite/data/en/sections/education.yaml create mode 100644 layouts/partials/sections/education-alt.html create mode 100644 layouts/partials/sections/education.html create mode 100644 static/assets/css/sections/education.css diff --git a/exampleSite/data/bn/sections/education.yaml b/exampleSite/data/bn/sections/education.yaml new file mode 100644 index 0000000..d5acb08 --- /dev/null +++ b/exampleSite/data/bn/sections/education.yaml @@ -0,0 +1,89 @@ +# section information +section: + name: শিক্ষা জীবন + id: education + template: sections/education.html + enable: true + weight: 4 + showOnNavbar: true + # Can optionally hide the title in sections + # hideTitle: true + +degrees: +- name: কোয়ান্টাম ক্রিপ্টোগ্রাফিতে পি. এইচ. ডি. + icon: fa-microscope + timeframe: ২০১৬-২০২০ + institution: + name: এ. বি. সি. প্রযুক্তি বিশ্ববিদ্যালয় + url: "#" + grade: + scale: সিজিপিএ + achieved: ৪ + outOf: ৩.৬ + publications: + - title: অর্থহীন লেখা যার মাঝে আছে অনেক কিছু। + url: "#" + - title: হ্যাঁ, এই লেখার মাঝেই আছে অনেক কিছু। + url: "#" + - title: যদি তুমি মনে করো, এটা তোমার কাজে লাগবে, তাহলে তা লাগবে কাজে। + url: "#" +- name: কম্পিউটার সায়েন্স এন্ড ইঞ্জিনিয়ারিং এ বি.এসসি + icon: fa-graduation-cap + timeframe: ২০১২-২০১৬ + institution: + name: এক্স ওয়াই জেড বিশ্ববিদ্যালয় + url: "#" + grade: + scale: সিজিপিএ + achieved: ৪ + outOf: ৩.৫ + takenCourses: + # if true, the courses will be rendered as a table otherwise it will render as a list and the grades will be hidden. + showGrades: true + courses: + - name: ডেটা স্ট্রাকচারস এবং অ্যালগরিদম + achieved: ৩.৭৫ + outOf: ৪ + - name: নেটওয়ার্ক সিকিউরিটি + achieved: ৩.৮০ + outOf: ৪ + - name: অপারেটিং সিস্টেম + achieved: ৩.৫ + outOf: ৪ + - name: কৃত্রিম বুদ্ধিমত্তা + achieved: ৩.৭৫ + outOf: ৪ + publications: + - title: নিজের ভাষায় লেখা দেখতে অভ্যস্ত হও। + url: "#" + - title: মনে রাখবে লেখা অর্থহীন হয়, যখন তুমি তাকে অর্থহীন মনে করো; আর লেখা অর্থবোধকতা তৈরি করে, যখন তুমি তাতে অর্থ ঢালো। + url: "#" + extracurricularActivities: + - কোনো লেখাই তোমার কাছে অর্থবোধকতা তৈরি করতে পারে, যদি তুমি সেখানে অর্থদ্যোতনা দেখতে পাও। + - যে কথাকে কাজে লাগাতে চাও, তাকে কাজে লাগানোর কথা চিন্তা করার আগে ভাবো, তুমি কি সেই কথার জাদুতে আচ্ছন্ন হয়ে গেছ কিনা। + - তুমি যদি নিশ্চিত হও যে, তুমি কোনো মোহাচ্ছাদিত আবহে আবিষ্ট হয়ে অন্যের শেখানো বুলি আত্মস্থ করছো না, তাহলে তুমি নির্ভয়ে, নিশ্চিন্তে অগ্রসর হও। + - তুমি সেই কথাকে জানো, বুঝো, আত্মস্থ করো; মনে রাখবে, যা অনুসরণ করতে চলেছো, তা আগে অনুধাবন করা জরুরি; এখানে কিংকর্তব্যবিমূঢ় হবার কোনো সুযোগ নেই। +- name: উচ্চমাধ্যমিক সার্টিফিকেট + icon: fa-university + timeframe: ২০১০-২০১২ + institution: + name: এমএসটি বিজ্ঞান কলেজ + url: "#" + grade: + scale: জিপিএ + achieved: ৫ + outOf: ৫ + extracurricularActivities: + - কোনো কথা শোনামাত্রই কি তুমি তা বিশ্বাস করবে? + - হয়তো বলবে, করবে, হয়তো বলবে “আমি করবো না।” + - তাই কোন কথাটি কাজে লাগবে, তা নির্ধারণ করবে তুমি— হ্যাঁ, তুমি। + - নিজেই ঠিক করো, নিজের ভাষাটা কি অর্থহীন, নাকি কিছু সত্যিই বলছে! +- name: মাধ্যমিক সার্টিফিকেট + icon: fa-school + timeframe: ২০০৫-২০১০ + institution: + name: জে কে স্কুল অফ সায়েন্স + grade: + scale: জিপিএ + achieved: ৫ + outOf: ৪.৫ diff --git a/exampleSite/data/en/sections/education.yaml b/exampleSite/data/en/sections/education.yaml new file mode 100644 index 0000000..6c7e819 --- /dev/null +++ b/exampleSite/data/en/sections/education.yaml @@ -0,0 +1,89 @@ +# section information +section: + name: Education + id: education + template: sections/education.html # Use "sections/education-alt.html for alternate template. + enable: true + weight: 4 + showOnNavbar: true + # Can optionally hide the title in sections + # hideTitle: true + +degrees: +- name: Ph.D in Quantum Cryptography + icon: fa-microscope + timeframe: 2016-2020 + institution: + name: ABC University of Technology + url: "#" + grade: #(optional) + scale: CGPA + achieved: 3.6 + outOf: 4 + publications: #(optional) + - title: Lorem ipsum dolor sit amet, consectetur adipiscing elit. + url: "#" + - title: Fusce eu augue ut odio porttitor pulvinar. + url: "#" + - title: Nullam vitae orci tincidunt purus viverra pulvinar. + url: "#" +- name: B.Sc. in Computer Science & Engineering + icon: fa-graduation-cap + timeframe: 2012-2016 + institution: + name: University of XYZ + url: "#" + grade: #(optional) + scale: CGPA + achieved: 3.5 + outOf: 4 + takenCourses: #(optional) + # if true, the courses will be rendered as a table otherwise it will render as a list and the grades will be hidden. + showGrades: true + courses: + - name: Data Structures and Algorithm + achieved: 3.75 + outOf: 4 + - name: Network Security + achieved: 3.80 + outOf: 4 + - name: Operating System + achieved: 3.5 + outOf: 4 + - name: Artificial Intelligent + achieved: 3.75 + outOf: 4 + publications: #(optional) + - title: Lorem ipsum dolor sit amet, consectetur adipiscing elit. + url: "#" + - title: Fusce eu augue ut odio porttitor pulvinar. + url: "#" + extracurricularActivities: #(optional) + - In vitae facilisis est, eget porta sem. + - Vestibulum consectetur lorem justo, at laoreet lorem feugiat et. + - Duis sed massa feugiat, ornare justo et, aliquam est. + - Pellentesque ut fringilla magna. +- name: Higher Secondary School Certificate + icon: fa-university + timeframe: 2010-2012 + institution: + name: MST College of Science + url: "#" + grade: #(optional) + scale: GPA + achieved: 5 + outOf: 5 + extracurricularActivities: #(optional) + - In vitae facilisis est, eget porta sem. + - Vestibulum consectetur lorem justo, at laoreet lorem feugiat et. + - Duis sed massa feugiat, ornare justo et, aliquam est. + - Pellentesque ut fringilla magna. +- name: Secondary School Certificate + icon: fa-school + timeframe: 2005-2010 + institution: + name: JK School of Science + grade: #(optional) + scale: GPA + achieved: 4.5 + outOf: 5 diff --git a/i18n/bn.toml b/i18n/bn.toml index 5f6e04a..a39e5f9 100644 --- a/i18n/bn.toml +++ b/i18n/bn.toml @@ -45,4 +45,28 @@ other = "পূর্ববর্তী" other = "পরবর্তী" [improve_this_page] -other = "এই পৃষ্ঠাটি উন্নত করুন" \ No newline at end of file +other = "এই পৃষ্ঠাটি উন্নত করুন" + +[out_of] +other = "এর মধ্যে" + +[publications] +other = "প্রকাশনা সমূহ" + +[taken_courses] +other = "গৃহীত কোর্সসমূহ" + +[course_name] +other = "কোর্সের নাম" + +[total_credit] +other = "মোট ক্রেডিট" + +[obtained_credit] +other = "অর্জিত ক্রেডিট" + +[extracurricular_activities] +other = "পাঠক্রম বহির্ভূত কার্যক্রম" + +[see_more] +other = "আরো দেখুন" diff --git a/i18n/cn.toml b/i18n/cn.toml index 12f968b..00c01e0 100644 --- a/i18n/cn.toml +++ b/i18n/cn.toml @@ -48,4 +48,28 @@ other = "上一篇" other = "下一篇" [improve_this_page] -other = "改善此页面" \ No newline at end of file +other = "改善此页面" + +[out_of] +other = "之" + +[publications] +other = "刊物" + +[taken_courses] +other = "选修课程" + +[course_name] +other = "课程名" + +[total_credit] +other = "总信用" + +[obtained_credit] +other = "获得信贷" + +[extracurricular_activities] +other = "课外活动" + +[see_more] +other = "查看更多" diff --git a/i18n/de.toml b/i18n/de.toml index c5d8ebe..85f1a11 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -48,4 +48,28 @@ other = "Vorherige" other = "Nächste" [improve_this_page] -other = "Diese Seite verbessern" \ No newline at end of file +other = "Diese Seite verbessern" + +[out_of] +other = "van de" + +[publications] +other = "Publicaties" + +[taken_courses] +other = "Cursussen gevolgd" + +[course_name] +other = "Cursus naam" + +[total_credit] +other = "Totaal krediet" + +[obtained_credit] +other = "Krediet verkregen" + +[extracurricular_activities] +other = "Buitenschoolse activiteiten" + +[see_more] +other = "Bekijk meer" diff --git a/i18n/en.toml b/i18n/en.toml index 0831649..3a7aaf2 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -48,4 +48,28 @@ other = "Prev" other = "Next" [improve_this_page] -other = "Improve this page" \ No newline at end of file +other = "Improve this page" + +[out_of] +other = "out of" + +[publications] +other = "Publications" + +[taken_courses] +other = "Taken Courses" + +[course_name] +other = "Course Name" + +[total_credit] +other = "Total Credit" + +[obtained_credit] +other = "Obtained Credit" + +[extracurricular_activities] +other = "Extracurricular Activities" + +[see_more] +other = "See More" diff --git a/i18n/es.toml b/i18n/es.toml index cfd898b..a660c5d 100644 --- a/i18n/es.toml +++ b/i18n/es.toml @@ -49,3 +49,27 @@ other = "Siguiente" [improve_this_page] other = "Mejorar esta página" + +[out_of] +other = "de" + +[publications] +other = "Publicaciones" + +[taken_courses] +other = "Cursos tomados" + +[course_name] +other = "Nombre del curso" + +[total_credit] +other = "Crédito total" + +[obtained_credit] +other = "Crédito obtenido" + +[extracurricular_activities] +other = "Actividades extracurriculares" + +[see_more] +other = "Ver más" diff --git a/i18n/fr.toml b/i18n/fr.toml index 0157e98..44fa609 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -48,4 +48,28 @@ other = "Précédent" other = "Suivant" [improve_this_page] -other = "Améliorez cette page" \ No newline at end of file +other = "Améliorez cette page" + +[out_of] +other = "sur" + +[publications] +other = "Publications" + +[taken_courses] +other = "Taken Courses" + +[course_name] +other = "Cours suivis" + +[total_credit] +other = "Crédit total" + +[obtained_credit] +other = "Crédit obtenu" + +[extracurricular_activities] +other = "Activités extra-scolaires" + +[see_more] +other = "En savoir plus" diff --git a/i18n/id.toml b/i18n/id.toml index c84fc44..244803f 100644 --- a/i18n/id.toml +++ b/i18n/id.toml @@ -48,4 +48,28 @@ other = "Sebelumnya" other = "Lanjut" [improve_this_page] -other = "Perbaiki halaman ini" \ No newline at end of file +other = "Perbaiki halaman ini" + +[out_of] +other = "dari" + +[publications] +other = "Publikasi" + +[taken_courses] +other = "Kursus yang Diambil" + +[course_name] +other = "Nama kursus" + +[total_credit] +other = "Total Kredit" + +[obtained_credit] +other = "Memperoleh Kredit" + +[extracurricular_activities] +other = "Kegiatan ekstrakulikuler" + +[see_more] +other = "Lihat Selengkapnya" diff --git a/i18n/it.toml b/i18n/it.toml index 892d50f..bbfa747 100644 --- a/i18n/it.toml +++ b/i18n/it.toml @@ -48,4 +48,28 @@ other = "Precedente" other = "Successivo" [improve_this_page] -other = "Migliora questa pagina" \ No newline at end of file +other = "Migliora questa pagina" + +[out_of] +other = "su" + +[publications] +other = "Pubblicazioni" + +[taken_courses] +other = "Corsi presi" + +[course_name] +other = "Nome del corso" + +[total_credit] +other = "Credito totale" + +[obtained_credit] +other = "Credito ottenuto" + +[extracurricular_activities] +other = "Attività extracurriculari" + +[see_more] +other = "Vedi altro" diff --git a/i18n/jp.toml b/i18n/jp.toml index d768b27..5676860 100644 --- a/i18n/jp.toml +++ b/i18n/jp.toml @@ -36,7 +36,7 @@ other = "ご入力いただいたメールアドレスが他人に開示され other = "登録" [hugoAttributionText] -other = "Powered by" +other = "搭載" [prev] other = "前" @@ -46,3 +46,27 @@ other = "次" [improve_this_page] other = "編集リクエストを送る" + +[out_of] +other = "のうち" + +[publications] +other = "出版物" + +[taken_courses] +other = "受講したコース" + +[course_name] +other = "コース名" + +[total_credit] +other = "合計クレジット" + +[obtained_credit] +other = "取得したクレジット" + +[extracurricular_activities] +other = "課外活動" + +[see_more] +other = "続きを見る" diff --git a/i18n/ru.toml b/i18n/ru.toml index 725d4bb..2a525c9 100644 --- a/i18n/ru.toml +++ b/i18n/ru.toml @@ -48,4 +48,28 @@ other = "Предыдущий" other = "Следующий" [improve_this_page] -other = "Улучшить эту страницу" \ No newline at end of file +other = "Улучшить эту страницу" + +[out_of] +other = "из" + +[publications] +other = "Публикации" + +[taken_courses] +other = "Пройденные курсы" + +[course_name] +other = "Название курса" + +[total_credit] +other = "Общий кредит" + +[obtained_credit] +other = "Полученный кредит" + +[extracurricular_activities] +other = "Внеклассные занятия" + +[see_more] +other = "Узнать больше" diff --git a/i18n/vn.toml b/i18n/vn.toml index 83669f1..331b699 100644 --- a/i18n/vn.toml +++ b/i18n/vn.toml @@ -48,4 +48,28 @@ other = "Trước" other = "Tiếp theo" [improve_this_page] -other = "Cải thiện trang này" \ No newline at end of file +other = "Cải thiện trang này" + +[out_of] +other = "trên" + +[publications] +other = "Ấn phẩm" + +[taken_courses] +other = "Đã thực hiện các khóa học" + +[course_name] +other = "Tên khóa học" + +[total_credit] +other = "Tổng số tín dụng" + +[obtained_credit] +other = "Tín dụng thu được" + +[extracurricular_activities] +other = "Các hoạt động ngoại khóa" + +[see_more] +other = "Xem thêm" diff --git a/layouts/index.html b/layouts/index.html index 17cab83..72c9e4b 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -19,6 +19,7 @@ + diff --git a/layouts/partials/sections/education-alt.html b/layouts/partials/sections/education-alt.html new file mode 100644 index 0000000..7d9597f --- /dev/null +++ b/layouts/partials/sections/education-alt.html @@ -0,0 +1,110 @@ +{{ $sectionID := replace (lower .section.name) " " "-" }} +{{ if .section.id }} +{{ $sectionID = .section.id }} +{{ end }} + +
+ {{ if not (.section.hideTitle) }} +

{{ .section.name }}

+ {{ end }} + +
+ + + {{ range .degrees}} + + + + + + + + {{ end }} + +
+
+
+ +
+
+
+
+
+
+
+ {{ if .institution.url }} +
{{ .institution.name }}
+ {{ else }} +
{{ .institution.name }}
+ {{ end }} +
+
{{ .timeframe }}
+
+
{{ .name }}
+ {{ if .grade }} +
{{ .grade.scale }}: {{ .grade.achieved }} {{ i18n "out_of" }} {{ .grade.outOf }}
+ {{ end }} + {{ if .publications }} +
+
{{i18n "publications"}}
+ +
+ {{ end }} + {{ if .takenCourses }} +
+
{{ i18n "taken_courses" }}
+ {{ if .takenCourses.showGrades }} + + + + + + + + {{ range $index,$course := .takenCourses.courses }} + + + + + + {{ end }} + +
{{ i18n "course_name" }}{{ i18n "total_credit" }}{{ i18n "obtained_credit" }}
{{ $course.name }}{{ $course.outOf }}{{ $course.achieved }}
+ {{ else }} +
    + {{ range $index,$course := .takenCourses.courses }} +
  • {{ $course.name }}
  • + {{ end }} +
+ {{ end }} + {{ if gt (len .takenCourses.courses) 2 }} + + {{ end }} +
+ {{ end }} + {{ if .extracurricularActivities }} +
+
{{ i18n "extracurricular_activities" }}
+
    + {{ range .extracurricularActivities }} +
  • {{ . }}
  • + {{ end }} +
+
+ {{ end }} +
+
+
+
+
+
+ +
+
+
+
\ No newline at end of file diff --git a/layouts/partials/sections/education.html b/layouts/partials/sections/education.html new file mode 100644 index 0000000..b6b5aee --- /dev/null +++ b/layouts/partials/sections/education.html @@ -0,0 +1,101 @@ +{{ $sectionID := replace (lower .section.name) " " "-" }} +{{ if .section.id }} +{{ $sectionID = .section.id }} +{{ end }} + +
+ {{ if not (.section.hideTitle) }} +

{{ .section.name }}

+ {{ end }} + +
+ + + {{ range .degrees}} + + + + + + {{ end }} + +
+
+
+ +
+
+
+
+
+
+
+ {{ if .institution.url }} +
{{ .institution.name }}
+ {{ else }} +
{{ .institution.name }}
+ {{ end }} +
+
{{ .timeframe }}
+
+
{{ .name }}
+ {{ if .grade }} +
{{ .grade.scale }}: {{ .grade.achieved }} {{ i18n "out_of"}} {{ .grade.outOf }}
+ {{ end }} + {{ if .publications }} +
+
{{ i18n "publications"}}
+ +
+ {{ end }} + {{ if .takenCourses }} +
+
{{ i18n "taken_courses"}}
+ {{ if .takenCourses.showGrades }} + + + + + + + + {{ range $index,$course := .takenCourses.courses }} + + + + + + {{ end }} + +
{{ i18n "course_name"}}{{ i18n "total_credit"}}{{ i18n "obtained_credit"}}
{{ $course.name }}{{ $course.outOf }}{{ $course.achieved }}
+ {{ else }} +
    + {{ range $index,$course := .takenCourses.courses }} +
  • {{ $course.name }}
  • + {{ end }} +
+ {{ end }} + {{ if gt (len .takenCourses.courses ) 2 }} + + {{ end }} +
+ {{ end }} + {{ if .extracurricularActivities }} +
+
{{ i18n "extracurricular_activities"}}
+
    + {{ range .extracurricularActivities }} +
  • {{ . }}
  • + {{ end }} +
+
+ {{ end }} +
+
+
+
\ No newline at end of file diff --git a/static/assets/css/layouts/main.css b/static/assets/css/layouts/main.css index 248df5a..e733588 100644 --- a/static/assets/css/layouts/main.css +++ b/static/assets/css/layouts/main.css @@ -83,6 +83,14 @@ a:hover { color: #e5e9f2 !important; } +.btn-link{ + color: #248aaa; +} + +.btn-link:hover{ + color: #207089; +} + .bg-white { background-color: #f9fafc !important; } diff --git a/static/assets/css/sections/education.css b/static/assets/css/sections/education.css new file mode 100644 index 0000000..e095394 --- /dev/null +++ b/static/assets/css/sections/education.css @@ -0,0 +1,158 @@ +.education-section .education-info-table { + width: 100%; +} + +.education-section .education-info-table tr { + padding: 0.1rem; +} + +.education-section .timeframe { + color: #8392A5; + text-align: right; +} +.education-section .icon { + width: 2rem; + padding-left: 0; + padding-right: 0; + position: relative; +} + +.education-section .icon .hline { + position: absolute; + left: 1rem; + top: 0; + background-color: #248aaa; + height: 100%; + width: 2px; +} + +.education-section .education-info-table tr:first-child .hline { + height: 60%; + top: auto; +} + +.education-section .education-info-table tr:last-child .hline { + height: 50%; +} + +.education-section .icon-holder { + background-color: #248aaa; + border-radius: 50%; + height: 2rem; + width: 2rem; + padding: 0.2rem; + text-align: center; + color: #e5e9f2; + position: relative; +} + +.education-section .line { + width: 5%; + padding-left: 0; + padding-right: 0; +} + +.education-section .line div { + height: 2px; + /* width: 100%; */ + margin-right: -1px; + background-color: #248aaa; +} + +.education-section .degree-info { + padding: 1rem; + margin-top: 0.5rem; + margin-bottom: 0.5rem; + border-left: 2px solid #248aaa; + border-top: 1px solid #C0CCDA; + border-bottom: 1px solid #C0CCDA; + border-right: 1px solid #C0CCDA; + border-radius: 5px; +} + +.education-section .degree-info h5{ + margin-bottom: 0.3rem; +} + +.education-section .taken-courses table { + margin-left: 1rem; + width: 100%; + transition: all 0.3s ease-out; +} + +.education-section .taken-courses .hidden-course { + display: none; + transition: all 1s ease-out; +} + +.education-section .taken-courses ul { + margin-bottom: 0; +} + +/*============ Education Alter Template =============*/ +.education-alt .degree-info{ + border-right: 2px solid #248aaa; +} + + +/* ============= Device specific fixes ======= */ + +/* Large screens such as TV */ + +@media only screen and (min-width: 1824px) {} + +/* Extra large devices (large desktops, 1200px and up) */ + +@media (max-width: 1400px) {} + +@media (max-width: 1200px) {} + +/* IPad Pro */ + +@media (max-width: 1024px) { + .education-section .container { + padding-left: 0; + } +} + +/* Large devices (desktops, 992px and up) */ + +@media (max-width: 992px) {} + +/* Medium devices (tablets, 768px and up) */ + +@media only screen and (max-width: 768px) {} + +/* Small devices (landscape phones, 576px and up) */ + +@media only screen and (max-width: 576px) { + .education-section { + padding-left: 0.5rem; + padding-right: 0.5rem; + } + .education-section .container{ + padding-right: 0; + } + + .education-section .icon { + display: none; + } + .education-section .line{ + display: none; + } + .education-section .timeframe{ + text-align: left; + } +} + +/* iPhoneX, iPhone 6,7,8 */ + +@media only screen and (max-width: 375px) {} + +/* Galaxy S5, Moto G4 */ + +@media only screen and (max-width: 360px) {} + +/* iPhone 5 or before */ + +@media only screen and (max-width: 320px) {} \ No newline at end of file diff --git a/static/assets/js/main.js b/static/assets/js/main.js index 47c0886..4975634 100644 --- a/static/assets/js/main.js +++ b/static/assets/js/main.js @@ -138,3 +138,27 @@ function toggleTOC() { } } +// Show more rows in the taken courses table +function showMoreCourses(elem) { + + // find the courses + let courses = elem.parentNode.getElementsByClassName("course"); + if (courses == null) { + return + } + + // toggle hidden-course class from the third elements + for (var i = 0; i < courses.length; i++) { + if (i > 1 && courses[i].classList !== null) { + courses[i].classList.toggle("hidden-course"); + } + } + + // toggle the button text + let btnText = elem.innerText; + if (btnText == "Show More") { + elem.innerText = "Show Less"; + } else { + elem.innerText = "Show More"; + } +}