source: trunk/MobileIndico/README.md@ 19290

Last change on this file since 19290 was 18646, checked in by tbretz, 8 years ago
Adapted to fit a nice markdown page
File size: 4.1 KB
Line 
1Quick access guide
2==================
3
4If you are happy with the existuing layout, you can access an event
5with a given id (example: 254) from a given indico server (example:
6https://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
10If you find that too long, you can use http://tinyurl.com to shorten
11the link.
12
13A 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
18Introduction
19============
20
21Mobile Indico is a simple web-page which converts an indico timetable
22into a mobile webpage. The trick is to request the data through the
23Indico Export API (https://indico.readthedocs.io/en/master/http_api/)
24and display it in a mobile friendly way.
25
26Therefore, the webpage requests the timetable (see 2.3.3) as JSON
27object which is then formatted to HTML in a Javascript. To avoid that a
28server is required (e.g. php script) which retrieves the JSON (to work
29around restirctions on cross site scripting) the JSONP interface is
30used.
31
32The trick of JSONP is to wrap the JSON opject into a script (Javascript
33function) and insert a `<script>` tag into the webpage. Thus the script
34containing the data is loaded and the data can be processed.
35
36The advantage now is that the client side browser will request the data
37directly from the indico server.
38
39
40Installation on your own server
41===============================
42
43First download all files from
44
45> https://trac.fact-project.org/browser/trunk/MobileIndico
46
47and copy them to a webserver.
48
49The current version is bound to a single indico server which is
50specified in indico.js in the first lines, as well as the number
51of 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
58Adapt that according to your needs.
59
60
61User access to indico.html
62==========================
63
64The default timetable is then accessed through
65
66> http://you.web-server.com/your-path/indico.html
67
68and another event (e.g. 215) through
69
70> http://you.web-server.com/your-path/indico.html?id=215
71
72A debug mode in which the received JSON object is displayed is
73available as well
74
75> http://you.web-server.com/your-path/indico.html?id=215&debug
76
77It 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
82Files
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
92Style sheet
93===========
94
95For 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```
Note: See TracBrowser for help on using the repository browser.