blob: 6946a7538e1a8c7811ec17b79ec73d1988c93ee1 [file] [log] [blame]
rsternber739261a2011-06-17 20:03:47 +00001<?php
2
rsternbercddc3e72012-06-26 22:37:23 +00003$NAV_ENTRIES = array(
4
5 "home" => array(
6 "sub-entries" => array(
rsternbercddc3e72012-06-26 22:37:23 +00007 "incubator" => array(
8 "label" => "Incubator",
9 "url" => "/rap/incubator/"
Tim Buschtöns268006f2013-06-05 11:26:07 +020010 ),
11 "about-project" => array(
12 "label" => "<span class='nav-redirect'>About this project</span>",
Ralf Sternberg6b3a62c2013-06-08 13:44:13 +020013 "url" => "http://projects.eclipse.org/projects/rt.rap"
rsternbercddc3e72012-06-26 22:37:23 +000014 )
15 )
16 ),
rsternberdb769812012-04-23 14:00:03 +000017
18 "demos" => array(
19 "label" => "Demos",
rsternbercddc3e72012-06-26 22:37:23 +000020 "url" => "/rap/demos/",
21 "sub-entries" => array(
22 "demos" => array(
23 "label" => "Demos",
24 "url" => "/rap/demos/"
25 ),
26 "built-on-rap" => array(
27 "label" => "Built on RAP",
28 "url" => "/rap/users/"
29 )
30 )
rsternberdb769812012-04-23 14:00:03 +000031 ),
32
33 "download" => array(
34 "label" => "Download",
35 "url" => "/rap/downloads/",
36 "sub-entries" => array(
37 "downloads" => array(
38 "label" => "Download RAP",
39 "url" => "/rap/downloads/"
40 ),
Ralf Sternbergee14f4b2013-06-11 22:26:38 +020041 "source" => array(
42 "label" => "Source Code",
43 "url" => "/rap/source/"
44 ),
Tim Buschtöns268006f2013-06-05 11:26:07 +020045 "incubator" => array(
46 "label" => "<span class='nav-redirect'>Add-Ons</span>",
47 "url" => "/rap/incubator/"
Tim Buschtöns8be9bc32013-08-23 15:51:25 +020048 ),
49 "noteworthy" => array(
50 "label" => "<span class='nav-redirect'>New and Noteworthy</span>",
51 "url" => "/rap/noteworthy/"
rsternberdb769812012-04-23 14:00:03 +000052 )
53 )
54 ),
55
Ralf Sternbergd69204a2013-06-11 12:51:13 +020056 "documentation" => array(
57 "label" => "Documentation",
58 "url" => "/rap/documentation/",
rsternberdb769812012-04-23 14:00:03 +000059 "sub-entries" => array(
Ralf Sternbergd69204a2013-06-11 12:51:13 +020060 "overview" => array(
61 "label" => "Overview",
62 "url" => "/rap/documentation/"
rsternberc95b00d2012-05-14 09:34:42 +000063 ),
rsternberdb769812012-04-23 14:00:03 +000064 "developers-guide" => array(
65 "label" => "Developer's Guide",
66 "url" => "/rap/developers-guide/"
67 ),
Ralf Sternbergc50dc5d2013-06-11 22:03:06 +020068 "noteworthy" => array(
69 "label" => "New and Noteworthy",
70 "url" => "/rap/noteworthy/"
71 ),
rsternberc95b00d2012-05-14 09:34:42 +000072 "articles" => array(
73 "label" => "Articles",
74 "url" => "/rap/articles/"
rsternberdb769812012-04-23 14:00:03 +000075 )
76 )
77 ),
78
Ralf Sternbergee14f4b2013-06-11 22:26:38 +020079 "community" => array(
80 "label" => "Community",
rsternberdb769812012-04-23 14:00:03 +000081 "url" => "/rap/getting-involved/",
82 "sub-entries" => array(
83 "getting-involved" => array(
84 "label" => "Getting Involved",
85 "url" => "/rap/getting-involved/"
86 ),
Tim Buschtönsf6bd23b2014-03-14 11:28:52 +010087 "forum" => array(
88 "label" => "<span class='nav-redirect'>Forum</span>",
89 "url" => "http://www.eclipse.org/forums/eclipse.technology.rap"
90 ),
rsternberdb769812012-04-23 14:00:03 +000091 "bugs" => array(
92 "label" => "Bugs",
93 "url" => "/rap/bugs/"
94 ),
Ralf Sternbergee14f4b2013-06-11 22:26:38 +020095 "support" => array(
96 "label" => "Support",
97 "url" => "/rap/support/"
rsternberdb769812012-04-23 14:00:03 +000098 )
99 )
100 )
101
102);
103
rsternbercddc3e72012-06-26 22:37:23 +0000104 $nav_logo_deco_class = $PAGE_NAV_POSITION[ 0 ] === 'home' ? 'class="active"' : '';
105 $nav_home_link_style = $PAGE_NAV_POSITION[ 0 ] === 'home' ? 'style="display:none;"' : '';
106?>
rsternber739261a2011-06-17 20:03:47 +0000107
rsternbercddc3e72012-06-26 22:37:23 +0000108<div id="header">
tbuschtobd2a22a2012-06-12 16:10:30 +0000109
rsternbercddc3e72012-06-26 22:37:23 +0000110 <div <?= $nav_logo_deco_class ?> id="rap-logo-deco"></div>
rsternber69283522012-06-27 09:57:41 +0000111 <a href="/rap/"><span id="rap-logo"></span></a>
rsternber739261a2011-06-17 20:03:47 +0000112
Ivan Furnadjiev601d0d42016-05-23 11:56:12 +0300113 <div id="rap-search-box">
114 <svg xmlns="http://www.w3.org/2000/svg" style="display:none">
Ivan Furnadjievd4e5ce42016-05-23 15:37:14 +0300115 <symbol xmlns="http://www.w3.org/2000/svg" id="sbx-icon-search-1" viewBox="0 0 40 40">
116 <path d="M27.6 29.15c-1.99 1.643-4.543 2.63-7.326 2.63-6.355 0-11.507-5.15-11.507-11.506 0-6.355 5.152-11.507 11.507-11.507 6.355 0 11.507 5.152 11.507 11.507 0 2.783-.987 5.335-2.63 7.325l7.392 7.392c.43.43.436 1.124.005 1.555-.428.428-1.122.428-1.555-.005L27.6 29.15zm-7.326.44c5.145 0 9.315-4.17 9.315-9.316 0-5.145-4.17-9.315-9.316-9.315-5.145 0-9.315 4.17-9.315 9.314 0 5.145 4.17 9.315 9.314 9.315zm16.813.81C38.982 27.292 40 23.72 40 20 40 8.954 31.046 0 20 0S0 8.954 0 20s8.954 20 20 20c3.76 0 7.37-1.04 10.5-2.974.514-.32.674-.994.355-1.51-.318-.514-.993-.673-1.508-.355C26.56 36.884 23.35 37.81 20 37.81c-9.835 0-17.808-7.973-17.808-17.808S10.165 2.192 20 2.192 37.808 10.165 37.808 20c0 3.314-.905 6.492-2.593 9.26-.315.515-.15 1.19.365 1.505.517.315 1.19.152 1.507-.365z"
Ivan Furnadjiev601d0d42016-05-23 11:56:12 +0300117 fill-rule="evenodd" />
118 </symbol>
119 <symbol xmlns="http://www.w3.org/2000/svg" id="sbx-icon-clear-3" viewBox="0 0 20 20">
120 <path d="M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z" fill-rule="evenodd" />
121 </symbol>
122 </svg>
Ivan Furnadjievd4e5ce42016-05-23 15:37:14 +0300123 <form id="sbx-form" action="#" novalidate="novalidate" class="searchbox sbx-custom">
Ivan Furnadjiev601d0d42016-05-23 11:56:12 +0300124 <div role="search" class="sbx-custom__wrapper">
125 <input id="search-query" type="search" name="search" placeholder="Search..." autocomplete="off" required="required" class="sbx-custom__input">
126 <button type="submit" title="Submit your search query." class="sbx-custom__submit">
127 <svg role="img" aria-label="Search">
Ivan Furnadjievd4e5ce42016-05-23 15:37:14 +0300128 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#sbx-icon-search-1"></use>
Ivan Furnadjiev601d0d42016-05-23 11:56:12 +0300129 </svg>
130 </button>
Ivan Furnadjievd4e5ce42016-05-23 15:37:14 +0300131 <button type="button" id="sbx-remove" title="Clear the search query." class="sbx-custom__reset">
Ivan Furnadjiev601d0d42016-05-23 11:56:12 +0300132 <svg role="img" aria-label="Reset">
133 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#sbx-icon-clear-3"></use>
134 </svg>
135 </button>
136 </div>
137 </form>
138 </div>
139
rsternbercddc3e72012-06-26 22:37:23 +0000140 <div id="navigation">
141 <ul>
rsternber67958e22011-11-17 17:34:52 +0000142
rsternbercddc3e72012-06-26 22:37:23 +0000143<?
144 // top level
145 foreach( $NAV_ENTRIES as $navId => $navData ) {
rsternber6654f322012-07-21 19:46:03 +0000146 if( array_key_exists( 'label', $navData ) ) {
rsternbercddc3e72012-06-26 22:37:23 +0000147 $active = $navId === $PAGE_NAV_POSITION[ 0 ] ? 'class="active"' : '';
148 echo "<li $active><a href=\"{$navData[ 'url' ]}\">{$navData[ 'label' ]}</a></li>";
rsternberc95b00d2012-05-14 09:34:42 +0000149 }
rsternber67958e22011-11-17 17:34:52 +0000150 }
rsternbercddc3e72012-06-26 22:37:23 +0000151?>
rsternber67958e22011-11-17 17:34:52 +0000152
rsternbercddc3e72012-06-26 22:37:23 +0000153 </ul>
154 <div class="stop"></div>
155 </div>
156</div>
157
158<div id="nav-bar">
159 <div id="nav-container">
160 <ul <?= $nav_home_link_style ?> id="nav-home">
161 <li>
162 <a href="/rap/">&lt; Home</a>
163 </li>
164 </ul>
165 <ul id="nav">
166
167<?
168 // second level
169 $nav_secondLevelEntries = $NAV_ENTRIES[ $PAGE_NAV_POSITION[ 0 ] ][ 'sub-entries' ];
170 foreach( $nav_secondLevelEntries as $navId => $navData ) {
171 $active = $navId === $PAGE_NAV_POSITION[ 1 ] ? ' class="active"' : '';
172 echo "<li><a {$active} href=\"{$navData[ 'url' ]}\">{$navData[ 'label' ]}</a></li>";
173 }
174?>
175
176 </ul>
rsternbere02f46d2012-06-26 22:44:38 +0000177 <div class="stop"></div>
rsternbercddc3e72012-06-26 22:37:23 +0000178 </div>
179</div>