1 | Mobile Indico
|
---|
2 | =============
|
---|
3 |
|
---|
4 | Mobile Indico is a simple web-page which converts an indico timetable
|
---|
5 | into a mobile webpage. The trick is to request the data through the
|
---|
6 | Indico Export API (https://indico.readthedocs.io/en/master/http_api/)
|
---|
7 | and display it in a mobile friendly way.
|
---|
8 |
|
---|
9 | Therefore, the webpage requests the timetable (see 2.3.3) as JSON
|
---|
10 | object which is then formatted to HTML in a Javascript. To avoid that a
|
---|
11 | server is required (e.g. php script) which retrieves the JSON (to work
|
---|
12 | around restirctions on cross site scripting) the JSONP interface is
|
---|
13 | used.
|
---|
14 |
|
---|
15 | The trick of JSONP is to wrap the JSON opject into a script (Javascript
|
---|
16 | function) and insert a <script> tag into the webpage. Thus the script
|
---|
17 | containing the data is loaded and the data can be processed.
|
---|
18 |
|
---|
19 |
|
---|
20 | Installation
|
---|
21 | ============
|
---|
22 |
|
---|
23 | First download all files from
|
---|
24 |
|
---|
25 | https://trac.fact-project.org/browser/trunk/MobileIndico
|
---|
26 |
|
---|
27 | and copy them to a webserver.
|
---|
28 |
|
---|
29 | The current version is bound to a single indico server which is
|
---|
30 | specified in indico.js in the first line, as well as the number
|
---|
31 | of the default event if no event is specified:
|
---|
32 |
|
---|
33 | var indico_url = "https://indico.scc.kit.edu/indico/";
|
---|
34 | var default_event = 215;
|
---|
35 |
|
---|
36 | Adapt that according to your needs.
|
---|
37 |
|
---|
38 |
|
---|
39 | Access
|
---|
40 | ======
|
---|
41 |
|
---|
42 | The default timetable is then accessed through
|
---|
43 |
|
---|
44 | http://you.web-server.com/your-path/indico.html
|
---|
45 |
|
---|
46 | and another event (e.g. 215) through
|
---|
47 |
|
---|
48 | http://you.web-server.com/your-path/indico.html?id=215
|
---|
49 |
|
---|
50 | A debug mode in which the received JSON object is displayed is
|
---|
51 | available as well
|
---|
52 |
|
---|
53 | http://you.web-server.com/your-path/indico.html?id=215&debug
|
---|
54 |
|
---|
55 |
|
---|
56 | Files
|
---|
57 | =====
|
---|
58 |
|
---|
59 | indico.css: A simple style sheet to format the output
|
---|
60 | indico.svg: The indico logo at the header line
|
---|
61 | rwth.avg: The rwth logo at the footer
|
---|
62 | indico.js: The javascript retrieving the data and formatting the html
|
---|
63 | indico.html: The main html page for user access
|
---|
64 |
|
---|
65 |
|
---|
66 | Style sheet
|
---|
67 | ===========
|
---|
68 |
|
---|
69 | For formatting purpose, the data is wrapped in classes like this:
|
---|
70 |
|
---|
71 | <indico>
|
---|
72 | Date
|
---|
73 | <session>
|
---|
74 | <date>
|
---|
75 | Time
|
---|
76 | </date>
|
---|
77 | <body>
|
---|
78 | <type>
|
---|
79 | entryType
|
---|
80 | <location>
|
---|
81 | Location
|
---|
82 | </location>
|
---|
83 | </type>
|
---|
84 | <contribution>
|
---|
85 | <date>
|
---|
86 | Time
|
---|
87 | <title>
|
---|
88 | Title
|
---|
89 | </title>
|
---|
90 | </date>
|
---|
91 | <presenters>
|
---|
92 | Name Affiliation Email
|
---|
93 | </presenters>
|
---|
94 | <presenters>
|
---|
95 | ...
|
---|
96 | </presenters>
|
---|
97 | ...
|
---|
98 | <description>
|
---|
99 | Description
|
---|
100 | </description>
|
---|
101 | <material>
|
---|
102 | <title>
|
---|
103 | Title
|
---|
104 | </title>
|
---|
105 | <resources>
|
---|
106 | <url>
|
---|
107 | URL
|
---|
108 | </url>
|
---|
109 | <description>
|
---|
110 | Description
|
---|
111 | </description>
|
---|
112 | ...
|
---|
113 | </resources>
|
---|
114 | <description>
|
---|
115 | Description
|
---|
116 | </description>
|
---|
117 | </material>
|
---|
118 | <material>
|
---|
119 | ...
|
---|
120 | </material>
|
---|
121 | ...
|
---|
122 | </contribution>
|
---|
123 | <contribution>
|
---|
124 | ...
|
---|
125 | </contribution>
|
---|
126 | ....
|
---|
127 | </body>
|
---|
128 | </session>
|
---|
129 | <session>
|
---|
130 | ...
|
---|
131 | </session>
|
---|
132 | ...
|
---|
133 | </indico>
|
---|