Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #199 from GCE-NEIIST/develop
Browse files Browse the repository at this point in the history
GCE-Thesis v1.1
  • Loading branch information
RafaelAPB authored Jun 10, 2019
2 parents 26450ca + e448246 commit 2379a5d
Show file tree
Hide file tree
Showing 17 changed files with 398 additions and 303 deletions.
30 changes: 10 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,43 @@
[![Build Status](https://travis-ci.com/RafaelAPB/GCE-NEIIST.svg?token=XFiDrRAqvqphcoasyH7N&branch=master)](https://travis-ci.com/RafaelAPB/GCE-NEIIST)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)




# GCE-NEIIST webapp
![GCE-Thesis][logo]


[logo]: https://web.ist.utl.pt/~ist180970/assets/img/favicon.png
[GCE-NEIIST][GCE] is the home for our student's group, Grupo de Contacto com Empresas.

This platform aims to provide services for [Técnico Lisboa](www.tecnico.ulisboa.pt) students, such as:
* Informative service about the group.
* Events sign up (i.e. programming competitions, open-days)
* GCE-Thesis: Using AI to classify MEIC masters' theses proposals. We provide a simple and intuitive interface to navigate through them.
* GCE-Inside View: A project that shows different careers on Computer Science and Engineering.
* GCE-Thesis: Using AI to classify MEIC masters' theses proposals. We provide a simple and intuitive interface to navigate through them.
* Mr Thesis: a friendly chatbot, complementary to GCE-Thesis, that helps student to find a suitable thesis for themselves.

**Upcoming** : GCE-Thesis v2: A smart chatbot that helps students to pick their master thesis.

Note that this is a **WIP** project.
Note that this is a **WIP** project, and it is on alpha phase.

---

####
## Setup and Run
1. [Fork, Clone, Remote](https://github.com/GCE-NEIIST/GCE-NEIIST-webapp/wiki/Fork,-Clone,-Remote)

2. DEPRECATED - [Set environment variables](https://github.com/GCE-NEIIST/GCE-NEIIST-webapp/wiki/Setting-Environment-Variables).

1. Fork the project (for more info see [Fork, Clone, Remote](https://github.com/GCE-NEIIST/GCE-NEIIST-webapp/wiki/Fork,-Clone,-Remote))

2. Set the backend environment variables, by duplicating .env.example (home directory of the project). Rename it to .env and set its values.
This step includes the configuration of [Mlab][mlab]
3. Set the frontend environment variables, by duplicating angular-src/.scripts/set-env.env.example. Rename it to set-env.env, and set its values.
### Run the App


In order to run the project the required libraries need to be installed.

1. Install [node][node].

2. On the home directory of the project, run ```npm run first-setup```.

1. Create an account and a MongoDB Deployment in [Mlab][mlab], up to Step 3.
1. Go to your deployment and create a new user. (Save this username and password they will be used later)
1. Set the environment variables by **duplicating** .env.example. Rename the duplicated file to .env. and replace its values.
1. Duplicate angular-src/.scripts/set-env.env.example. Set FENIX_CLIENT_ID, on angular-src/.scripts/set-env.env.
1. Run ```npm run first-setup```. This script installs dependencies and builds the front end.
1. If you wish,[follow our recommendations](https://github.com/GCE-NEIIST/GCE-NEIIST-webapp/wiki/Recommendations).
3. If you wish, [follow our recommendations](https://github.com/GCE-NEIIST/GCE-NEIIST-webapp/wiki/Recommendations).
1. In case of errors, see our [Troubleshooting page](https://github.com/GCE-NEIIST/GCE-NEIIST-webapp/wiki/Troubleshooting).

## Running the server
1. Go to the main directory and run ``node gce_base`` or ``nodemon gce_base``.
1. Go to the main directory and run ``npm run start`` or ``nodemon gce_base``.
1. To access the user interface, open a browser (Chrome is recommended) and go to ``localhost:8080``.


Expand Down
3 changes: 2 additions & 1 deletion angular-src/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const appRoutes: Routes = [
PartnersCarouselComponent,
AboutUsComponent,
GceArticlesComponent,
GetAdviceComponent
GetAdviceComponent,
PartnersCarouselComponent

],
imports: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#feedback-button {
cursor: pointer;
font-size:17px;
color:white;
position: fixed;
Expand Down
9 changes: 9 additions & 0 deletions angular-src/src/app/general/gce-thesis/areas-dump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,13 @@ export class AreasDump{

return this.areas[course];
}

public isThesisAvailable(course: string){
for (const c in this.availableCourses){
if (course.includes(this.availableCourses[c])) {
return true;
}
}
return false;
}
}
17 changes: 14 additions & 3 deletions angular-src/src/app/general/gce-thesis/gce-thesis.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="container middlePage">
<div class="sidenav">


<div *ngIf="gce_thesis_available" class="container middlePage">

<div class="sidenav">
<ng-container *ngIf="!specializationBool"><ng-container *ngFor="let area of areas">
<div *ngIf="selectedAreas.indexOf(area)>-1;else smallLabel">
<div class="bigColorLabel" [ngStyle]="{'background-color':areaAdvanced[area][0] }" (click)="changeSelectedAreas(area)" placement="right" [ngbTooltip]="area">
Expand Down Expand Up @@ -162,7 +163,17 @@ <h5 class="card-title">{{ thesis.title }}</h5>
</div>
<div id="white-div"></div>
</div>
</div>
</div>
</div>
<div *ngIf="!gce_thesis_available" class="container middlePage">
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">Curso não suportado!</h4>

<p>{{course}} ainda não é suportado pelo GCE-Thesis. Se gostarias de ter esta funcionalidade disponível para o teu curso, entra em contacto com o teu coordenador de mestrado ou com o teu núcleo.</p>
</div>

</div>

<ng-template #content let-modal>

Expand Down
32 changes: 24 additions & 8 deletions angular-src/src/app/general/gce-thesis/gce-thesis.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export class GceThesisComponent implements OnInit, OnDestroy {
showRecomendations: boolean;
specializationBool = false;
it = false;
isProfessor = false;
course: string = '';
areas: string[] = [];
areaAdvanced: { [area: string]: string[]}= {};
gce_thesis_available: boolean;

specializationAreas: string[] = [
'Network Services and Applications',
Expand Down Expand Up @@ -81,11 +83,14 @@ export class GceThesisComponent implements OnInit, OnDestroy {
@ViewChild('proposalTable') proposalTable;
ngOnInit() {
this.loadUser();
this.getAreas();
this.getThesesByArea();
this.getRecommendedTheses();
this.thesisService.currentTheses.subscribe(availableTheses => this.availableTheses = availableTheses);
this.thesisService.currentIds.subscribe(ids => this.idsBot = ids);
if (this.gce_thesis_available) {
this.getAreas();
this.getThesesByArea();
this.getRecommendedTheses();
this.thesisService.currentTheses.subscribe(availableTheses => this.availableTheses = availableTheses);
this.thesisService.currentIds.subscribe(ids => this.idsBot = ids);
}


}

Expand Down Expand Up @@ -143,13 +148,24 @@ export class GceThesisComponent implements OnInit, OnDestroy {

loadUser() {
this.user = this.studentService.loadStudentProfile();
this.course = this.user['courses'][0];
this.it = this.course.includes("Engenharia Informática e de Computadores");
this.isProfessor = this.user['roles'].includes("TEACHER");
this.course = this.loadFirstSupportedCourse(this.user['courses']);
this.it = this.course.includes("Engenharia Informática e de Computadores") || this.isProfessor;
}

loadFirstSupportedCourse(courses){
for (const c in courses){
if (this.thesisService.isThesisAvailable(courses[c])) {
this.gce_thesis_available=true;
return courses[c];
}
}
this.gce_thesis_available=false;
return courses[0];
}

getAreas(){

this.areaAdvanced = this.thesisService.getAreasFromDump(this.course);

this.areas = []
Expand Down
68 changes: 39 additions & 29 deletions angular-src/src/app/general/home/home.component.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@

.header-nightsky {
width: 100%;
height: 100%;
width: 100%;
height: 100%;

font-family: 'Montserrat', sans-serif;
background: url("https://web.ist.utl.pt/~ist180970/assets/img/background.png");
background-size: cover;
position: fixed;

font-family: 'Montserrat', sans-serif;
background-color: black;
background: url("http://web.ist.utl.pt/ist186413/assets/GCE-Thesis-Background.png") no-repeat center;
background-position: bottom;
color: white;
background-size: cover;
color: black;
padding-bottom: 390px;
margin-top:-60px;
padding-top:40px;
margin-top:-60px;
padding-top:40px;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
Expand All @@ -23,7 +25,7 @@ width: 100%;
width: 100px;
position: fixed;
left: 0px;
margin-top: 8em;
margin-top: 23.5em;
margin-right: -2.5em;
z-index: 1000;
display: block;
Expand Down Expand Up @@ -61,21 +63,21 @@ width: 100%;
text-align: center;
}

.header-nightsky .hero h1 {
color: white;
font-weight: bold;
font-size: 60px;
margin-bottom: 36px;
}
.header-nightsky .hero img {
width: 750px;
height: auto;
max-width: 100%;
max-height: 100%;
margin-top: 5em;

}

.header-nightsky .hero p {
color: rgba(255, 255, 255, 0.6);
font-size: 22px;
max-width: 660px;
margin: 0 auto 20px;
font-weight: normal;
line-height: 1.5;
.header-nightsky .partners {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background-color: rgba(0,0,0,0.8);
}

.header-nightsky .btn-primary {
Expand All @@ -84,7 +86,7 @@ width: 100%;
border-color: #fffbfb !important;
outline:none;
margin-right: 20px;
margin-top: 20px;
margin-top: 60px;
font-size: 24px;
padding: 18px 24px;
transition:0.2s background-color;
Expand All @@ -101,6 +103,7 @@ width: 100%;
background: url('https://cdn.discordapp.com/attachments/316948358856179723/546010490950778880/google-original-material-image_1.png') no-repeat;
}
.header-nightsky .btn-primary:hover {
cursor: pointer;
background-color:rgba(0,219,255,0.4);
}

Expand All @@ -112,11 +115,10 @@ width: 100%;
z-index:10;
}


.icon {
line-height: 1.6;
line-height: 1.6;
margin: 15px 0px;
padding: 10px 15px;
padding: 10px 5px;
opacity: 1;
font-size: 52px;
text-transform: uppercase;
Expand All @@ -130,9 +132,17 @@ width: 100%;

@media screen and (max-width: 767px) {



.header-nightsky .hero h1{
font-size: 42px;
}

.header-nightsky .hero img {
width: 250px;
height: auto;
}

.header-nightsky .btn-primary {
width: 150px;
}

}
26 changes: 19 additions & 7 deletions angular-src/src/app/general/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
<div class="header-nightsky">
<nav class="navbar navbar-expand-lg fixed-top navbar-primary" >
<div class="container SN">
<a class="icon" rel="tooltip" title="Like us on Facebook" data-placement="bottom" href="https://www.facebook.com/gce.neiist" target="_blank">
<a class="icon" rel="tooltip" title="Like us on Facebook" data-placement="bottom" href="https://www.facebook.com/gce.neiist" target="_blank" style="margin-left: 10px;">
<i class="fa fa-facebook-f"></i>
<!-- <p class="d-lg-none">Facebook</p> -->
</a>
<a class="icon" rel="tooltip" title="Follow us on Instagram" data-placement="bottom" href="https://www.instagram.com/gce.neiist" target="_blank">
<i class="fa fa-instagram"></i>
<!-- <p class="d-lg-none">GitHub</p> -->
</a>
<a class="icon" rel="tooltip" title="GCE's GitHub" data-placement="bottom" href="https://github.com/RafaelAPB/GCE-NEIIST" target="_blank">
<i class="fa fa-github"></i>
<!-- <p class="d-lg-none">GitHub</p> -->
</a>

</div>
</nav>
<div class="hero" style="padding-bottom: 1.5rem">

<img src="https://web.ist.utl.pt/~ist180970/assets/img/favicon.png" style="height:300px;">
<div class="hero">

<p>Uma plataforma desenhada por estudantes para estudantes 🙌</p>
<img src="http://web.ist.utl.pt/ist186413/assets/GCE-Thesis-Header.png">

</div>

<div class="hero">
<div class="btn btn-primary" routerLink="/thesis">Encontra a tese perfeita para ti!</div>
<div class="btn btn-primary" routerLink="/thesis">Encontra a tese perfeita para ti</div>

</div>

<div class="hero partners">
<app-partners-carousel></app-partners-carousel>

</div>
</div>

</div>
7 changes: 6 additions & 1 deletion angular-src/src/app/general/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ import { Component, OnInit } from '@angular/core';
export class HomeComponent implements OnInit {
isHome = true;
constructor() { }

ngOnInit() {
document.body.style.backgroundColor = 'black';
}

ngOnDestroy() {
document.body.style.backgroundColor = 'white';
}

}
Loading

0 comments on commit 2379a5d

Please sign in to comment.