Skip to content

Commit

Permalink
materials changes, small ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
valentin-stamate committed Sep 20, 2022
1 parent d31f1e8 commit 08650da
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 109 deletions.
4 changes: 4 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ testem.log
Thumbs.db
.angular
package-lock.json
firebase-debug.log
.firebase
.firebaserc
firebase.json
2 changes: 1 addition & 1 deletion frontend/src/app/pages/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
[ngClass]="isDonationDropdownOpened ? 'bg-gray-900' : 'bg-gray-800'">Donate</button>

<div id="donate-dropdown" class="popup absolute left-[9.5rem] z-10 mt-2 origin-top-left rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu">
<div *ngFor="let donation of donations; let i = index" class="flex gap-4 items-center px-4 py-2 text-sm text-gray-700">
<div *ngFor="let donation of donations; let i = index" class="hover:bg-gray-100 flex gap-4 items-center px-4 py-2 text-sm text-gray-700">
<i class="{{donation.icon}} text-[1.5rem]"></i>

<div class="flex flex-col gap-0">
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/app/widgets/w-materials/w-materials.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@
[class.bg-indigo-400]="_class.type === classTypes.FACULTY"
></div>

<img src="{{_class.photo || defaultClassPhoto}}" class="h-[12rem] aspect-square rounded-r-lg" alt="">
<img src="{{_class.photo || defaultClassPhoto}}" class="hidden sm:h-[12rem] sm:inline aspect-square rounded-r-lg" alt="">

<div class="flex flex-col basis-full gap-4 p-4">
<div class="text-xl font-bold">{{_class.name}}</div>

<div class="basis-full text-gray-600 text-sm">
<!-- TODO: About? -->
<div>Credits: {{_class.credits}}</div>
<div>Type: {{_class.type}}</div>
</div>
Expand All @@ -61,12 +60,14 @@
<a href="{{_class.materials}}" target="_blank">
<button class="w-full bg-gray-800 text-white px-3 py-2 rounded-md text-sm font-medium"
[disabled]="_class.materials === ''" [ngClass]="_class.materials === '' ? 'bg-gray-500 text-gray-300' : 'hover:bg-gray-900'">
<i class="fa-solid fa-download mr-1"></i>Download</button>
<i class="fa-solid fa-download mr-1"></i>
<span class="hidden sm:inline">Download</span></button>
</a>
<a href="{{_class.site}}" target="_blank">
<button class="w-full bg-gray-800 text-white px-3 py-2 rounded-md text-sm font-medium"
[disabled]="_class.materials === ''" [ngClass]="_class.materials === '' ? 'bg-gray-500 text-gray-300' : 'hover:bg-gray-900'">
<i class="fa-solid fa-arrow-up-right-from-square mr-1"></i>Site</button>
[disabled]="_class.site === ''" [ngClass]="_class.site === '' ? 'bg-gray-500 text-gray-300' : 'hover:bg-gray-900'">
<i class="fa-solid fa-arrow-up-right-from-square mr-1"></i>
<span class="hidden sm:inline">Site</span></button>
</a>
</div>
</div>
Expand Down
62 changes: 36 additions & 26 deletions frontend/src/shared/materials/b-first-year.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
{
"count": 2,
"name": "Computer Architecture and Operating Systems",
"nameRo": "Arhitectura Calculatoarelor și Sisteme de Operare",
"nameRo": "Arhitectura Calculatoarelor si Sisteme de Operare",
"short": "ACSO",
"credits": 5,
"photo": "https://i.postimg.cc/yYf7dvCQ/1435061-609.jpg",
Expand All @@ -29,8 +29,8 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
{
"count": 3,
"name": "Logics for Computer Science",
"nameRo": "Logică pentru Informatică",
"short": "Logică",
"nameRo": "Logica pentru Informatica",
"short": "Logica",
"credits": 6,
"materials": "https://drive.google.com/drive/folders/1oJ3ZUi6U8vO8u8CtVEDeAiPxH01ft2JV?usp=sharing",
"photo": "https://i.postimg.cc/G3yM920Z/birmingham-museums-trust-e0w-BK0x-JXYQ-unsplash.jpg",
Expand All @@ -41,8 +41,8 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
{
"count": 4,
"name": "Mathematics",
"nameRo": "",
"short": "Math",
"nameRo": "Matematica",
"short": "Mate",
"credits": 5,
"materials": "https://drive.google.com/drive/folders/1Wd7hRxnQvgHZd2-MZmX7_pdsfB-DjSpf?usp=sharing",
"photo": "https://i.postimg.cc/TYSwcgR3/istockphoto-536754333-612x612.jpg",
Expand All @@ -53,7 +53,7 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
{
"count": 5,
"name": "Introduction to Programming",
"nameRo": "",
"nameRo": "Introducere in Programare",
"short": "IP",
"credits": 4,
"materials": "https://drive.google.com/drive/folders/16--eviquuiV7dSIhYxKdu096SSpzBrG9?usp=sharing",
Expand All @@ -65,8 +65,8 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
{
"count": 6,
"name": "English Language I",
"nameRo": "",
"short": "English",
"nameRo": "Engleza",
"short": "Engleza",
"credits": 4,
"materials": "https://drive.google.com/drive/folders/1_rIjqlUQefGNzR-KXYu0f0rik_YHNtTb?usp=sharing",
"photo": "https://i.postimg.cc/90kWJHHn/The-Bennu-Bird-Ancient-Egyptian-Symbols-Egypt-Tours-Portal.jpg",
Expand All @@ -77,7 +77,7 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
{
"count": 7,
"name": "Competitive Programming",
"nameRo": "",
"nameRo": "Programare Competitiva",
"short": "PC",
"credits": 3,
"materials": "",
Expand All @@ -88,9 +88,9 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
},
{
"count": 8,
"name": "",
"name": "Pedagogy",
"nameRo": "Pedagogie",
"short": "PE",
"short": "Pedagogie",
"credits": 1,
"materials": "https://drive.google.com/drive/folders/1rPZsDCcoPzi1aYBpvq1HgfBu-LYxLrLK?usp=sharing",
"photo": "https://i.postimg.cc/LXCR8F58/the-art-teacher-ingrid-hyde.jpg",
Expand All @@ -101,8 +101,8 @@ const FIRST_SEMESTER_CLASSES: Class[] = [
{
"count": 9,
"name": "Physical Education",
"nameRo": "",
"short": "PE",
"nameRo": "Educatie Fizica",
"short": "Sport",
"credits": 1,
"materials": "",
"photo": "https://i.postimg.cc/C5R0ZrnH/2014-muhammad-ali-sonny-liston-demaryius-thomas-richesson-sports-art-1200x900.jpg",
Expand All @@ -116,7 +116,7 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
{
"count": 1,
"name": "Object Oriented Programming",
"nameRo": "",
"nameRo": "Programare Orientata Obiect",
"short": "OOP",
"credits": 6,
"materials": "https://drive.google.com/drive/folders/18PGvvs_iXxleo34OisrIyOz6xDMoKENO?usp=sharing",
Expand All @@ -128,7 +128,7 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
{
"count": 2,
"name": "Operating Systems",
"nameRo": "",
"nameRo": "Sisteme de Operare",
"short": "SO",
"credits": 6,
"materials": "https://drive.google.com/drive/folders/1V6bgZXlf8pgVSt8qGdjuD65MYneqrbcy?usp=sharing",
Expand All @@ -140,7 +140,7 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
{
"count": 3,
"name": "Algebraic Foundations of Computer Science",
"nameRo": "",
"nameRo": "Fundamente Algebrice ale Informaticii",
"short": "FAI",
"credits": 5,
"materials": "https://drive.google.com/drive/folders/1kNCBPjuDhf1xqkyYr8U786xSDRpnlmRR?usp=sharing",
Expand All @@ -152,7 +152,7 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
{
"count": 4,
"name": "Probabilities and Statistics",
"nameRo": "",
"nameRo": "Probabilitati si Statistica",
"short": "PS",
"credits": 4,
"materials": "https://drive.google.com/drive/folders/1qBU8OfQcdEyxAQJx1oLZKVE-HtiSWEWL?usp=sharing",
Expand All @@ -164,7 +164,7 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
{
"count": 5,
"name": "Algorithms Design",
"nameRo": "",
"nameRo": "Proiectarea Algoritmilor",
"short": "PA",
"credits": 5,
"materials": "https://drive.google.com/drive/folders/1eCysOHOyXOlNwjPsOrnTH-1UHftD3ZMK?usp=sharing",
Expand All @@ -176,8 +176,8 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
{
"count": 6,
"name": "English Language II",
"nameRo": "",
"short": "English",
"nameRo": "Engleza",
"short": "Engleza",
"credits": 5,
"materials": "https://drive.google.com/drive/folders/15bJzxNOgMBbCAj8dMdTgknG9wKPiKtw5?usp=sharing",
"photo": "https://i.postimg.cc/90kWJHHn/The-Bennu-Bird-Ancient-Egyptian-Symbols-Egypt-Tours-Portal.jpg",
Expand All @@ -188,7 +188,7 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
{
"count": 7,
"name": "Competitive Programming",
"nameRo": "",
"nameRo": "Programare Competitiva",
"short": "PC",
"credits": 3,
"materials": "",
Expand All @@ -197,12 +197,22 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
"password": "",
"type": ClassType.FACULTY,
},

/* TODO */
{
"count": 8,
"name": "Pedagogy",
"nameRo": "Pedagogie",
"short": "Pedagogie",
"credits": 1,
"materials": "",
"photo": "",
"site": "",
"password": "",
"type": ClassType.FACULTY,
},
{
"count": 9,
"name": "Ethics and Academic Integrity",
"nameRo": "",
"nameRo": "Etica si Integritate Academica",
"short": "EIA",
"credits": 1,
"materials": "https://drive.google.com/drive/folders/1xILmYT21HPUWfQM4PRIdf6nezPCG8LlO?usp=sharing",
Expand All @@ -212,9 +222,9 @@ const SECOND_SEMESTER_CLASSES: Class[] = [
"type": ClassType.FACULTY,
},
{
"count": 9,
"count": 10,
"name": "Physical Education II",
"nameRo": "",
"nameRo": "Educatie Fizica",
"short": "Sport",
"credits": 1,
"materials": "",
Expand Down
Loading

0 comments on commit 08650da

Please sign in to comment.