-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathhelp.html
More file actions
824 lines (745 loc) · 23.2 KB
/
help.html
File metadata and controls
824 lines (745 loc) · 23.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
<!DOCTYPE html>
<html lang="en">
<head>
<title> UI Manual</title>
</head>
<body>
<div id="lab"> <!-- The Lab Document
Container -->
<!-- %%%%%%%%%%%%%%% 48 columns %%%%%%%%%%%%% -->
<!-- %%%%%%%%%%%%%%% 48 columns %%%%%%%%%%%%% -->
<!-- %%%%%%%%%%%%%%% 48 columns %%%%%%%%%%%%% -->
<!-- The lab Header contains the logo and the
name of the lab, usually displayed on the
top of the page-->
<header id="lab-header">
<div id="lab-header-logo" class="logo">
<!-- Enclose the logo image of your lab or
write it in text-->
<img src="images/logo.jpg" />
</div>
<div id="lab-header-heading" class="heading">
<!-- Write the name of your lab and link
it to the home page of your lab (h1
tag is preferred while writing your
lab name)-->
<a href="../index.html">Virtual Labs</a>
</div>
<!-- Add any additional element you want to
add to the lab header, For example :
Help (Enclosing them with suitable div
is recommended)-->
</header>
<!-- The lab article is the main content area
where all the experiment content sits-->
<article id="lab-article">
<!-- The lab article has an header, optional
navigational menu, number of sections,
an optional sidebar and a closing
footer-->
<header id="lab-article-header">
<!-- You can add a welcome message or
title of the experiment enclosed in h1 tag
here -->
<div id="lab-article-heading" class="heading">
User Manual
</div>
<!-- Add any additional element if
required with proper enclosing-->
</header>
<!-- Navigation menu is useful to organize
the view of multiple sections inside the
article-->
<nav id="lab-article-navigation">
<ul id="lab-article-navigation-menu">
<!-- The menu will be dynamically
generated to contain the headings of
your sections or instead write the menu
items of your choice individually
enclosed in <li> tag as shown below-->
</ul>
</nav>
<!-- All the sections of your lab or
experiment can be enclosed together with a
div element as shown below-->
<div id="lab-article-sections">
<!-- Section 1: Installation -->
<section id="lab-article-section-1">
<div id="lab-article-section-1-icon" class="icon">
<!-- Enclose the icon image of your
lab or write it in text-->
<img src="../images/introduction.jpg"
/>
</div>
<!-- The heading for the section can be
enclosed in a div tag and shown with
a <h2> tag -->
<div id="lab-article-section-1-heading"
class="heading">
Installation
</div>
<!-- Write the section content inside a
paragraph element, You can also include
images with <img> tag -->
<div id="lab-article-section-1-content"
class="content">
<p> Welcome! This manual guides you through the
process of assembling your virtual lab's content
using the <strong> ui template </strong>.
</p>
<p>
If you are reading this help after a local
installation, then you have probably already
installed the ui template and you can skip this
section. If you are reading this from the web,
then you need to do the following steps to
install the template.
</p>
<h3> Downloading <span class="code">ui.tgz</span></h3>
<p>
The first step in the installation is the downloading of the ui template.
</p>
<ol>
<li>Download
the <span class="code">ui.tgz</span>
file from this link <a
href="http://devel.virtual-labs.ac.in/portal/ui.tgz">ui.tgz </a>
</li>
<li>Unzip the file. This should create a
directory <span class="code"> ui/</span> </li>
</ol>
</div>
</section>
<section id="lab-article-section-2">
<div id="lab-article-section-2-icon" class="icon">
<!-- Enclose the icon image of your
lab or write it in text-->
<img src="../images/introduction.jpg"
/>
</div>
<!-- The heading for the section can be
enclosed in a div tag and shown with
a <h2> tag -->
<div id="lab-article-section-2-heading"
class="heading">
ui directory
</div>
<!-- Write the section content inside a
paragraph element, You can also include
images with <img> tag -->
<div id="lab-article-section-2-content"
class="content">
<p>
The <span class="code">ui</span>
has <span class="code">
src</span> and <span class="code">
scripts</span> directory inside it.
<br/>
The <span class="code"> ui/</span>
directory has the following file
structure:
</p>
<p>
<table>
<tr>
<td>
<span class="code">
ui/src/lab/
</span>
</td>
<td>
<p>All the source files for
the lab are here. The files
<span class="code">index.html
</span> and <span class="code">
default.html</span> have been
made read only as these need
not be edited.
</p>
<br/>
<p>
In case you want to edit the
html pages, you should edit
only the <span class="code">
content.html</span> file in
<span class="code">ui/src/lab/</span>
and the <span class="code">
ui/src/lab/exp1/</span> directory.
</p>
<br/>
<p>
While adding new experiments,
make sure you create new
directories following the same
structure under <span class="code">
ui/src/lab/"EXPERIMENT-ID"</span>
and change the <span class="code">
content.html</span> in the
same directory. Make sure inside
the <span class="code">
ui/src/lab/"EXPERIMENT-ID"</span>
directory, the files
<span class="code">index.html
</span> and <span class="code">
default.html</span> are not edited.
</p>
<br/>
<p>
In addition, the <span class="code">
ui/src/lab</span> directory
contains <span class="code">js</span>,
<span class="code">images</span>, and
<span class="code">css</span>
directories. These directories
are there to hold your own
custom files.
</p>
</td>
</tr>
<tr>
<td>
<span class="code">
ui/src/lib/
</span>
</td>
<td>
<p>
All the library files (like
MathJax, jQuery, modernizr)
are in this directory.
</p>
</td>
</tr>
<tr>
<td>
<span class="code">
ui/src/themes/
</span>
</td>
<td>
<p>
Two themes are supplied
with this release.
<br/>
* maroon-grid (uses iiith style, which does
not display icons)
<br />
* blue-icon (uses the iitb
style, which uses icons for
sections) <br /> Of course,
you are free to design your
own theme, and place it in the
themes directory.
</p>
</td>
</tr>
<tr>
<td>
<span class="code">
ui/src/makefile
</span>
</td>
<td>
<p>
This file is used for building a release
(described below).
</p>
</td>
</tr>
<tr>
<td>
<span class="code">
ui/scripts/
</span>
</td>
<td>
<p>
This directory has the shellscript
<span class="code">transfer.sh</span>.
This file has to be run when the
user wishes to test his lab
on the test or deployment server.
Run the file from the
<span class="code">ui/scripts</span>
directory using the following command:
</p>
<pre>
<span class="code" >
./transfer.sh [USERNAME-ON-DEVEL] [OPTIONAL NAME-OF-THEME] [OPTIONAL -F] </span>
</pre>
<p>
where
<ul>
<li>
<b>USERNAME-ON-DEVEL</b> is the login name for the
developer on <span class="code" >
devel.virtual-labs.ac.in </span>and
<li>
<b>OPTIONAL NAME-OF-THEME</b> is an optional
parameter which could be <b>maroon-grid</b> or
<b>blue-icon</b> or your own
theme name.
<li>The <b>-F</b> option is meant for building
to the deployment server. For detailed help on
<span class="code"> transfer.sh</span>
, please refer to the <span class="code">
BUILD </span> section.
</ul>
</p>
</td>
</tr>
</table>
</p>
</div>
</section>
<section id="lab-article-section-3">
<div id="lab-article-section-3-icon"
class="icon">
<!-- Enclose the icon image of your lab
or write it in text-->
<img src="../images/introduction.jpg" />
</div>
<!-- The heading for the section can be
enclosed in a div tag and shown with
a <h2> tag -->
<div id="lab-article-section-3-heading"
class="heading">
Build
</div>
<!-- Write the section content inside a
paragraph element, You can also include
images with <img> tag -->
<div id="lab-article-section-3-content"
class="content">
<p>
The build process is completed with the
following three milestones.
</p>
<h3>Build 1 : Local build</h3>
<p>
The purpose of the local build is to be
able to view the content locally.
Once you run the makefile inside the
<span class="code">ui/src/</span> on the local machine, the
<span class="code">ui/build/</span> is created.
This is a local build deliverable of the lab's
content. To run the makefile and create
this local build, you need to go to
<span class="code">ui/src</span>
and run
</p>
<pre>
<span class="code">make -k theme=theme-name clean all</span>
</pre>
<p>
The theme-name is one of
</p>
<p>
<ul>
<b>
<li> maroon-grid</li>
<li> blue-icon </li>
</b>
</ul>
</p>
<p>
or, the command
</p>
<pre>
<span class="code">make clean all</span>
</pre>
<p>
which uses the default theme <b>maroon-grid</b>.
</p>
<p>
The first time around, this build will
take quite long, because it copies
the <span class="code">ui/src/MathJax</span>
directory. The next time onwards, this
won't be the case.
</p>
<pre>
<span class="code">make clean </span>
</pre>
<p>
will clean the <span class="code">ui/build/</span>
directory (but keep the js directory intact)
</p>
<h3>Structure of the build directory </h3>
<pre>
build/
|-- content.html
|-- css/
| |-- default.css
| |-- override.css
| `-- style.css
|
|-- default.html
|
|-- exp1/
| |-- media/
| |-- content.html
| |-- default.html
| `-- index.html
|
|-- help/
| |-- css/
| |-- override.css
| |-- help.html
| |-- images/
| `-- index.html
|
|-- images/
| |-- Pendulum.JPG
| | ...
| |
| `-- theory.jpg
|
|-- index.html
|
|-- js
| |-- MathJax/
| |-- MathJax-version.txt
| |-- jquery-1.4.2.min.js
| `-- modernizr-1.5.min.js
|
`-- theme-maroon-grid
</pre>
<h3>Build 2 : Build on the Test server</h3>
<p>
The second level build creates a
<span class="code">public_html/build/</span> inside the
home page of your lab on the test server.
The test server simulates the setup of the deployment server.
It will enable you to check whether your latest build works on
a public server (besides your local machine).
In order to deploy the lab on the deployment server,
<b>the build must first
be run on the test server. </b>
</p>
<p>
You need to run the following command from inside the
<span class="code">ui/scripts/</span> directory:
</p>
<pre>
<span class="code">
./transfer.sh [USERNAME-ON-DEVEL] [OPTIONAL NAME-OF-THEME]
</span>
</pre>
<p>
where
</p>
<p>
<ul>
<li><b>USERNAME-ON-DEVEL</b> is the login name for the
developer on <span class="code">
devel.virtual-labs.ac.in </span> </li>
<li>
<b>OPTIONAL NAME-OF-THEME</b> is an optional
parameter which could be <b>maroon-grid</b> or
<b>blue-icon</b> or your own
theme name.
</li>
</ul>
</p>
<p>
Once this command is run, you can view the
lab running on the URL
</p>
<p>
<span class="code">
http://devel.virtual-labs.ac.in/test/~LAB-ID/build/
</span>
</p>
<p>where <b>LAB-ID</b> is of the form <b>cseNN</b>. For example: cse09
</p>
<p>
NOTE
<ul>
<li>If you do not have the ssh keys to
<span class="code">devel.virtual-labs.ac.in</span>
installed on the local machine under the
correct directory <span class="code">(/home/$USER/.ssh/)</span>,
the script will prompt you for the
password multiple times.
</li>
<li>The test server may take some time
to load the new build after running the script. Please keep
refreshing the web page on the browser
until it reflects your changes.
</li>
</ul>
</p>
<h3>Build 3 : Build for the Deployment server</h3>
<p>
The third level of the build will serve as the final
build for the deployment server. The build directory
created as a result of this final build will
run on the <b>deployment server</b>. To make the final build,
you need to run the following command from inside the
<span class="code">ui/scripts/</span> directory:
<pre>
<span class="code">
./transfer.sh [USERNAME-ON-DEVEL] [OPTIONAL NAME-OF-THEME] [-F] </span></pre>
</p>
<p>
where
<ul>
<li> <b>USERNAME-ON-DEVEL</b> is the login name for the
developer on <span class="code">devel.virtual-labs.ac.in
</span> </li>
<li>
<b>OPTIONAL NAME-OF-THEME</b> is an optional
parameter which could be <b>maroon-grid</b> or
<b>blue-icon</b> or your own
theme name. </li>
<li>The <b>-F</b> option indicates that
the script must make a <span class="code" >final-build</span>.
Please note that the <b>-F</b> option must be mentioned as the
last argument only.</li>
</ul>
</p>
<p>
Once this command is run, a <span class="code">
final-build</span> will be created inside the <span class="code">
public_html </span>directory on the test server. This
<span class="code"> final-build </span> will be transferred
automatically to the deployment server.
</p>
<p>
NOTE
<ul>
<li>If you do not have the ssh keys to
<span class="code">devel.virtual-labs.ac.in</span>
installed on the local machine under the
correct directory <span class="code"> (/home/$USER/.ssh/)</span>
, the script will prompt you for the
password multiple times.
</li>
<li>The test server may take some time
to load the new build after running the script. Please keep
refreshing the web page on the browser
until it reflects your changes.
</li>
</ul>
</p>
</div>
</section>
<section id="lab-article-section-4">
<div id="lab-article-section-4-icon"
class="icon">
<!-- Enclose the icon image of your lab
or write it in text-->
<img src="../images/introduction.jpg" />
</div>
<!-- The heading for the section can be
enclosed in a div tag and shown with
a <h2> tag -->
<div id="lab-article-section-4-heading"
class="heading">
Content
</div>
<!-- Write the section content inside a
paragraph element, You can also include
images with <img> tag -->
<div id="lab-article-section-4-content"
class="content">
<p>
This template features a demo of a
science lab with a sample
<span class="code">"simple pendulum"
</span> experiment. The following
section will help you to configure this
template as per your lab experiments.
</p>
<p>
The <span class="code">ui/src/lab/</span>
directory contains three files:
</p>
<p>
<ul>
<li><span class="code">index.html</span></li>
<li><span class="code">default.html</span></li>
<li><span class="code">content.html</span></li>
</ul>
</p>
<p>
The same structure has been followed
inside the <span class="code">
ui/src/lab/"EXPERIMENT_ID"</span> directory.
The description and the read-write
permits for those file have been
tabulated here as follows :
</p>
<p>
<table>
<tr>
<th>file</th>
<th>permissions</th>
<th>description</th>
</tr>
<tr>
<td><span class="code">index.html</span></td>
<td>read-only</td>
<td>home-page</td>
</tr>
<tr>
<td><span class="code">default.html</span></td>
<td>read-only</td>
<td>default-content</td>
</tr>
<tr>
<td><span class="code">content.html</span></td>
<td>read-write</td>
<td>editable-content</td>
</tr>
</table>
</p>
<h3>Editing content.html</h3>
<p> The structure of content
for <span class="code">
ui/src/lab/content.html</span>
is shown below:
<img src="images/content.png"/>
</p>
<p>
To add your lab's content, edit this
file.
Add <span class="code">class="default"
</span> to inherit the default
structure and behaviour of any element.
Elements shown in purple are the ones that
you might want to inherit as default.
<emph>Exclude the </emph> <span class="code">
class="default"</span> attribute for
any element to which you want to
add your own content.
By default,
<span class="code">nav</span>
generates a list of sections
while <span class="code">aside</span>
and <span class="code">footer</span>
are empty.
</p>
<h3> Adding experiment content </h3>
<p>
While adding new experiments,
make sure you create new
directories following the same
structure under <span class="code">
ui/src/lab/"EXPERIMENT-ID"</span>
and change the <span class="code">
content.html</span> in the
same directory. Make sure inside
the <span class="code">
ui/src/lab/"EXPERIMENT_ID"</span>
directory, the files
<span class="code">index.html
</span> and <span class="code">
default.html</span> are not edited.
</p>
<h3> Embedding multimedia</h3>
<p>
The <span class="code">embed</span>
tag can be used to embed
multimedia files.
</p>
</div>
</section>
<section id="lab-article-section-5">
<div id="lab-article-section-5-icon"
class="icon">
<!-- Enclose the icon image of your lab
or write it in text-->
<img src="../images/introduction.jpg" />
</div>
<!-- The heading for the section can be
enclosed in a div tag and shown with
a <h2> tag -->
<div id="lab-article-section-5-heading"
class="heading">
Style
</div>
<!-- Write the section content inside a
paragraph element, You can also include
images with <img> tag -->
<div id="lab-article-section-5-content"
class="content">
<h3> Change CSS styles </h3>
<p>
The css styles have been defined
under the <span class="code">
ui/src/lab/css/</span>.
However in case you wish to define
your own css styles, you can add
your styles to the file
<span class="code">
ui/src/lab/css/override.css
</span>.
</p>
<h3> Add your own CSS and JS files </h3>
<p>
In order to add your own js and
css files, you will need to modify
the read write permissions of
<span class="code">
ui/src/lab/index.html</span> and
then include the references of the
css files.
</p>
<p>
(Note: <span class="code">
ui/src/lab/index.html</span> is
currently a read-only file. In
order to write to it you will
need to modify its read write
permissions by doing a
<span class="code">
chmod 755 "path/file/" </span>).
The syntax for adding css file to
index.html is as follows:
</p>
<span class="code">
<pre>
<link rel="stylesheet" href="css/YOURSTYLE.css" />
</pre>
</span>
<p>
Similarly, you can add js and
other files by including their
references in the
<span class="code">
ui/src/lab/index.html</span> file
as shown below for a js file.
</p>
<span class="code">
<pre>
<script type="text/javascript" src="js/YOURJS.js" > </script >
</pre>
</span>
</p>
</div>
</section>
</div>
<!-- An article can have a sidebar that contain --
-- related links and additional material (its --
-- optional at this moment)-->
<aside id="lab-article-sidebar">
<!-- put the content that you want to appear
in the sidebar-->
</aside>
<!-- Article footer can display related content
and additional links -->
<footer id="lab-article-footer">
<!-- Put the content that you want to appear
here-->
</footer>
</article>
<!-- Links to other labs, about us page can be
kept the lab footer-->
<footer id="lab-footer">
<!-- Put the content here-->
</footer>
</div>
</body>
</html>