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