Skip to content

Commit 3a9614a

Browse files
sandershihackerDerekTBrown
authored andcommitted
* Updated Schemas * Load Screen * Loading Screen * publish subscribe and dynamic explore page * deleted swap file * publish subscribe * template fixes * added start for reactive publication * template issue * . * . * course_records publish * course_records reactively publish * revert meteor update * publish subscribe and lineheight for searchpage icons * fixed indentation and removed test file * indentation * indentation * Accounts page and fixed random erro * toolbar for mobile devices * toolbar * account.html fixes * Toolbar made responsive * Responsive toolbar fixes * created userlist component * course_records course_id validation * indentation * markdown * import changes * validation addition * Forms Module Deprecated Warning. Issue #110 * indentation * Use routerLink * api changes (#126) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations (#127) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations * course pages now uses Child Routing * deleted LabData class * school name * search function * icon size and #136 * dashboard pull data from database * fix inappropriate file naming for gradelist and lablist * more templating issues * . * . * markdown default * lablist and gradelist * template changes * explore page changes * delete instructor page * user schema * indentation * indentation * explore publish and taskview sidenav * explore view links to course/courseId * taskview sidenav * taskview * taskview sidenav changes * Extend terminal on small width * . * . * Added UserList Component in Courses * Edit Course * . * course dashboard get courseid from url * delete userlist * input * delete userlist * publish for global admin * Fixed router params * Issue 161 fixed: instructor field in courses * . * fix nextButton * . * Issue #171 * Issue #168 * Issue 160: CourseList * Removed LabView * Enrollable field for buttons on explore pages * TaskView -> LabView * Fixed Gradelist, Lablist and styling issues * Issue #162 Completed * TaskView toolbar color darken * remove tests * Combine Subscriptions * Reactive Subscription for CourseList and GradeList * instructor view of course dashboard * Dashboard not logged in * markdown editor for labview * . * . * remove test * Syllabus update on course_dashboard for instructors works * onChange detect for mdeditor * fixed reversed md text editor * Disable links to non-accessible tasks for students * Fixed merge issues * markdown on explore * . * indentation * indentation * indentation * Course Permissions Editing functionality complete * course settings for instructors complete * #192 * . * Wed Aug 3 11:06:55 EDT 2016 * #208 * Not Logged In View of Dashboard * #181 * #199 * . * Fri Aug 5 14:25:02 EDT 2016
1 parent f9f421e commit 3a9614a

File tree

16 files changed

+233
-102
lines changed

16 files changed

+233
-102
lines changed

client/imports/ui/components/mdeditor/mdeditor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
ngAfterViewInit(){
3030
var self = this;
3131
// Instantiate SimpleMDE
32-
this.mde = new SimpleMDE({ element: this.elementRef.nativeElement.value });
32+
this.mde = new SimpleMDE({ element: this.textarea.nativeElement });
3333
// Read initial data from task markdown
3434
this.mde.value(self.mdData);
3535
// Catch changes

client/imports/ui/pages/course/course.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<a md-button [routerLink]="['/course/' + courseId + '/labs']">Labs</a>
1010
<a md-button [routerLink]="['/course/' + courseId + '/grades']" *ngIf="!isInstruct()">Grades</a>
1111
<a md-button [routerLink]="['/course/' + courseId]" *ngIf="isInstruct()">Students</a>
12+
<a md-button [routerLink]="['/course/' + courseId + '/lab-create']" *ngIf="isInstruct()">Upload</a>
1213
</div>
1314
</div>
1415
</md-toolbar>
@@ -17,7 +18,8 @@
1718
<a md-button [routerLink]="['/course/' + courseId]">{{ courseNumber }} Home</a>
1819
<a md-button [routerLink]="['/course/' + courseId + '/labs']">Labs</a>
1920
<a md-button [routerLink]="['/course/' + courseId + '/grades']" *ngIf="!isInstruct()">Grades</a>
20-
<a md-button [routerLink]="['/course/' + courseId]" *ngIf="isInstruct()">Students</a>
21+
<a md-button [routerLink]="['/course/' + courseId]" *ngIf="isInstruct()">Students</a>
22+
<a md-button [routerLink]="['/course/' + courseId + '/lab-create']" *ngIf="isInstruct()">Upload</a>
2123
</div>
2224
<md-icon fontIcon="tuxicon-right"></md-icon>
2325
</md-toolbar>

client/imports/ui/pages/course/course.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141

4242
this.subscribe('user-courses', () => {
4343
this.autorun(() => {
44-
this.courseNumber = Collections.courses.findOne({ _id: this.courseId }).course_number;
44+
if(typeof Collections.courses.findOne({ _id: this.courseId }) !== "undefined") {
45+
this.courseNumber = Collections.courses.findOne({ _id: this.courseId }).course_number;
46+
}
4547
});
4648
}, true);
4749
}

client/imports/ui/pages/dashboard/dashboard.html

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,51 @@
6262
</div>
6363

6464
<!-- Non-Logged In Dashboard -->
65-
<div class="tuxlab-dashboard" *ngIf="!user">
66-
<md-card>
67-
<md-card-title>
68-
<h1>Welcome to TuxLab!</h1>
69-
</md-card-title>
70-
<md-card-content>
71-
72-
</md-card-content>
73-
</md-card>
74-
</div>
65+
<div class="tuxlab-dashboard-nonuser" *ngIf="!user">
66+
67+
<!-- Section with Login and Background Picture -->
68+
<div class="login-section">
69+
<div class="login-wrapper">
70+
<div class="login-card">
71+
<h1>Welcome to TuxLab!</h1>
72+
<md-card>
73+
<md-card-content>
74+
<tuxlab-login></tuxlab-login>
75+
</md-card-content>
76+
</md-card>
77+
</div>
78+
</div>
79+
</div>
80+
81+
<!-- About Section -->
82+
<div class="about-section">
83+
<div class="set-max-width">
84+
<h1>About TuxLab</h1>
85+
<p>
86+
TuxLab is an opensource platform for creating interactive Linux courses.
87+
Click on the link below to read more about TuxLab!
88+
Come back if you like what you see, go away if you do not.
89+
Scroll down to browse some of the available courses on the site!
90+
</p>
91+
<div class="button-wrapper">
92+
<a md-raised-button href="http://www.tuxlab.org">Go To TuxLab.org</a>
93+
</div>
94+
</div>
95+
</div>
96+
97+
<!-- Courses Section -->
98+
<div class="courses-section">
99+
<div class="set-max-width">
100+
<h1>Explore Courses</h1>
101+
<p>
102+
These are some courses that you will be able to enroll
103+
in once you have registered.
104+
</p>
105+
<div>
106+
<tuxlab-exploreview></tuxlab-exploreview>
107+
</div>
108+
109+
</div>
110+
</div>
111+
112+
</div>

client/imports/ui/pages/dashboard/dashboard.ts

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,38 @@
1515
import { courses } from '../../../../../collections/courses.ts';
1616
import { course_records } from '../../../../../collections/course_records.ts';
1717

18+
// Explore
19+
import { ExploreView } from '../../components/explore/explore.ts';
20+
21+
// Login
22+
import Login from '../account/login.ts';
23+
1824
// Define Dashboard Component
1925
@Component({
20-
selector: 'tuxlab-dashboard',
21-
templateUrl: '/client/imports/ui/pages/dashboard/dashboard.html',
22-
directives: [
23-
MATERIAL_DIRECTIVES,
24-
MD_SIDENAV_DIRECTIVES,
25-
ROUTER_DIRECTIVES
26-
]
26+
selector: 'tuxlab-dashboard',
27+
templateUrl: '/client/imports/ui/pages/dashboard/dashboard.html',
28+
directives: [
29+
MATERIAL_DIRECTIVES,
30+
MD_SIDENAV_DIRECTIVES,
31+
ROUTER_DIRECTIVES,
32+
Login,
33+
ExploreView
34+
]
2735
})
2836

2937
// Export Dashboard Class
3038
@InjectUser('user')
3139
export default class Dashboard extends MeteorComponent {
32-
user : Meteor.User;
40+
user : Meteor.User;
3341
private courses = [];
3442
private grades = [];
3543

3644
constructor() {
3745
super();
3846

39-
this.subscribe('user-courses', () => {
40-
this.courses = courses.find({}, { limit: 5 }).fetch();
41-
}, true);
47+
this.subscribe('user-courses', () => {
48+
this.courses = courses.find({}, { limit: 5 }).fetch();
49+
}, true);
4250
this.subscribe('course-records', () => {
4351
let records = course_records.find().fetch();
4452
for(let i = 0; i < records.length; i++) {

client/imports/ui/pages/lab/labcreate.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export default class LabCreate extends MeteorComponent {
4646
this.lab.file = "";
4747
this.uploaded = false;
4848
this.output = "Compiling... Errors will display below.";
49+
50+
document.getElementById('course-content').style.maxWidth = "100%";
4951
}
5052

5153
/* UPLOAD HANDLER */

client/imports/ui/routes/course.routes.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { GradeList } from '../pages/course/gradelist.ts';
1212
import { LabList } from '../pages/course/lablist.ts';
1313
import { CourseDashboard } from '../pages/course/course_dashboard.ts';
1414
import { GradeView } from '../pages/course/gradeview.ts';
15+
import LabCreate from '../pages/lab/labcreate.ts'
1516
import LabView from '../pages/lab/labview.ts';
1617

1718
export const courseRoutes: RouterConfig = [
@@ -23,7 +24,8 @@ export const courseRoutes: RouterConfig = [
2324
{ path: 'grades', component: GradeList },
2425
{ path: 'labs', component: LabList },
2526
{ path: 'labs/:labid', canActivate: [ GuardAuth, CourseGuardRecord ], component: LabView },
26-
{ path: 'grades/:gradeid', canActivate: [ GuardAuth ], component: GradeView }
27+
{ path: 'grades/:gradeid', canActivate: [ GuardAuth ], component: GradeView },
28+
{ path: 'lab-create', component: LabCreate }
2729
// { path: 'users', as: 'UserList', component: UserList },
2830
// { path: 'user/:userid', as: 'UserView', component: UserView },
2931
// { path: 'labs', as: 'LabList', component: LabList },

client/imports/ui/routes/routes.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ import { provideRouter, RouterConfig } from '@angular/router';
1414
// Error
1515
import ErrorPage from '../pages/error/error.ts'
1616

17-
// Lab
18-
import LabCreate from '../pages/lab/labcreate.ts'
19-
2017
// Course
2118
import { courseRoutes } from './course.routes.ts';
2219
import { CourseGuardRecord } from './course.guard.record.ts';
@@ -40,7 +37,6 @@ const routes : RouterConfig = [
4037
{ path: 'login', component: Login },
4138
{ path: 'terms', component: Terms },
4239
{ path: 'privacy', component: Privacy },
43-
{ path: 'lab-create', component: LabCreate },
4440
{ path: 'explore', component: Explore },
4541
{ path: 'courses', component: CourseList },
4642
{ path: 'error/:code', component: ErrorPage },

client/style/dashboard/_dashboard.scss

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,67 @@
6363
}
6464
}
6565
}
66+
67+
.tuxlab-dashboard-nonuser {
68+
.login-section {
69+
background-image: $university-splash-image;
70+
background-repeat: no-repeat;
71+
background-size: cover;
72+
box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.5);
73+
height: 55vh;
74+
padding-top: 15vh;
75+
.login-wrapper {
76+
max-width: $tuxlab-max-width;
77+
margin: 0 auto;
78+
.login-card {
79+
width: 500px;
80+
margin:0;
81+
h1 {
82+
color: #e5e5e6;
83+
font-family: "Open Sans";
84+
font-weight: 300;
85+
font-size: 46px;
86+
text-align: center;
87+
}
88+
md-card {
89+
margin: 0;
90+
background-color: rgba(255, 255, 255, 0.6);
91+
md-card-content {
92+
margin: 0;
93+
padding: 0;
94+
}
95+
}
96+
.tuxlab-login {
97+
height: 250px;
98+
}
99+
}
100+
}
101+
}
102+
.section-text {
103+
h1 {
104+
color: #444444;
105+
font-family: "Open Sans";
106+
font-weight: 300;
107+
font-size: 46px;
108+
padding: 15px;
109+
}
110+
.button-wrapper {
111+
margin-top: 20px;
112+
margin-bottom: 15px;
113+
text-align: center;
114+
a {
115+
color: white;
116+
background-color: #4fafef;
117+
}
118+
}
119+
}
120+
.about-section {
121+
background-color: white;
122+
padding: 15px;
123+
@extend .section-text;
124+
}
125+
.courses-section {
126+
padding: 15px;
127+
@extend .section-text;
128+
}
129+
}

client/style/explore/_explore.scss

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@
22
width:100%;
33
max-width:$tuxlab-max-width;
44
margin:0 auto;
5-
6-
md-tab-group {
7-
background-color: white;
8-
margin: 30px;
9-
.md-active.md-tab-label {
10-
background-color: #ffd54f;
11-
}
12-
md-ink-bar {
13-
background-color: white;
14-
}
15-
}
16-
.md-tab-header {
17-
background-color: #ffc400;
18-
}
19-
205
#search-view {
216
display: none;
227
}
@@ -143,4 +128,17 @@
143128
float: left;
144129
}
145130
}
131+
md-tab-group {
132+
background-color: white;
133+
margin: 30px;
134+
.md-active.md-tab-label {
135+
background-color: #ffd54f;
136+
}
137+
md-ink-bar {
138+
background-color: white;
139+
}
140+
}
141+
.md-tab-header {
142+
background-color: #ffc400;
143+
}
146144
}

0 commit comments

Comments
 (0)