Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

Commit 29be11a

Browse files
committed
Move a-lot of stuff around, add more navigation.
1 parent 1bffa7e commit 29be11a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+197
-104
lines changed

src/_layouts/default.haml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
!!! 5
22
%html
33
%head
4-
%title PGM XML Documentation
4+
%title PGM Documentation
55
%meta{:"http-equiv" => "Content-Type", :content => "text/html;charset=utf-8"}
66
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
77
- @rand = SecureRandom.hex(13)
@@ -21,30 +21,35 @@
2121
.navbar-header
2222
%a.navbar-brand{:href => "/"}
2323
%img{:src => "https://oc.tc/assets/logo.png"}
24-
PGM XML Documentation
24+
PGM Documentation
2525
%button.navbar-toggle{:type => "button", :"data-toggle" => "collapse", :"data-target" => ".navbar-main-collapse"}
2626
%span.sr-only Toggle navigation
2727
%span.icon-bar
2828
%span.icon-bar
2929
%span.icon-bar
3030
%nav.collapse.navbar-collapse.navbar-main-collapse
3131
%ul.nav.navbar-nav.navbar-right
32-
%li{:class => (current_page.include?("index") ? "active" : "")}
32+
%li{:class => (current_page.include?("/src/index") ? "active" : "")}
3333
%a{:href => "/"}
3434
%i.glyphicon.glyphicon-home
35-
Home
36-
%li{:class => (current_page.include?("modules") ? "active" : "")}
37-
%a{:href => "/modules/main"}
38-
%i.glyphicon.glyphicon-th-large
39-
Modules
40-
%li{:class => (current_page.include?("reference") ? "active" : "")}
41-
%a{:href => "/reference/inventory"}
42-
%i.glyphicon.glyphicon-book
43-
Reference
44-
%li{:class => (current_page.include?("examples") ? "active" : "")}
45-
%a{:href => "/examples"}
35+
Overview
36+
%li{:class => (current_page.include?("/src/xml") ? "active" : "")}
37+
%a{:href => "/xml/"}
4638
%i.glyphicon.glyphicon-file
47-
Examples
39+
XML Docs
40+
%li{:class => (current_page.include?("/src/api") ? "active" : "")}
41+
%a{:href => "/api/"}
42+
%i.glyphicon.glyphicon-globe
43+
API Docs
44+
- if current_page.include?("/xml/")
45+
.container
46+
%ul.nav.nav-tabs.subnav
47+
= partial('xml_nav')
48+
- elsif current_page.include?("/api/")
49+
.container
50+
%ul.nav.nav-tabs.subnav
51+
= partial('api_nav')
52+
4853
= yield
4954
.container
5055
%hr

src/_partials/api_nav.haml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
%li.pull-right{:class => (current_page.include?("/src/api/reference") ? "active" : "")}
2+
%a{:href => "/api/reference/"}
3+
%i.glyphicon.glyphicon-book
4+
Reference
5+
%li.pull-right{:class => (current_page.match(/\/src\/api\/[^\/]*$/) != nil ? "active" : "")}
6+
%a{:href => "/api/"}
7+
%i.glyphicon.glyphicon-transfer
8+
Usage

src/_partials/examples_sidebar.haml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
- @nav_title = "Map XML Examples"
22
- @subnav_content = [\
3-
- {"path" => "examples/snowy_wars", "name" => "Snowy Wars"},\
4-
- {"path" => "examples/viridun", "name" => "Viridun"},\
5-
- {"path" => "examples/harb", "name" => "Harb"},\
6-
- {"path" => "examples/rfv3", "name" => "Race For Victory 3"},\
7-
- {"path" => "examples/eldritch", "name" => "GS: Eldritch"}]
3+
- {"path" => "xml/examples/snowy_wars", "name" => "Snowy Wars"},\
4+
- {"path" => "xml/examples/viridun", "name" => "Viridun"},\
5+
- {"path" => "xml/examples/harb", "name" => "Harb"},\
6+
- {"path" => "xml/examples/rfv3", "name" => "Race For Victory 3"},\
7+
- {"path" => "xml/examples/eldritch", "name" => "GS: Eldritch"}]
88

99
= partial('sidebar')

src/_partials/modules_sidebar.haml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
- @nav_title = "XML Modules"
22
- @subnav_content = [\
3-
- {"path" => "modules/main", "name" => "Main Map Element"},\
4-
- {"path" => "modules/includes", "name" => "XML File Includes"},\
5-
- {"path" => "modules/tutorial", "name" => "Map Tutorial"},\
3+
- {"path" => "xml/", "name" => "Main Map Element", "match" => /xml\/index\.[^\/]*$/},\
4+
- {"path" => "xml/includes", "name" => "XML File Includes"},\
5+
- {"path" => "xml/tutorial", "name" => "Map Tutorial"},\
66
- "Game Modes",\
7-
- {"path" => "modules/gamemode_ctw", "name" => "Capture the Wool"},\
8-
- {"path" => "modules/gamemode_dtm", "name" => "Destroy the Monument"},\
9-
- {"path" => "modules/gamemode_blitz", "name" => "Blitz"},\
10-
- {"path" => "modules/gamemode_dtc", "name" => "Destroy the Core"},\
11-
- {"path" => "modules/gamemode_tdm", "name" => "Team Death-match"},\
12-
- {"path" => "modules/gamemode_other", "name" => "Other Game Modes"},\
7+
- {"path" => "xml/gamemode_ctw", "name" => "Capture the Wool"},\
8+
- {"path" => "xml/gamemode_dtm", "name" => "Destroy the Monument"},\
9+
- {"path" => "xml/gamemode_blitz", "name" => "Blitz"},\
10+
- {"path" => "xml/gamemode_dtc", "name" => "Destroy the Core"},\
11+
- {"path" => "xml/gamemode_tdm", "name" => "Team Death-match"},\
12+
- {"path" => "xml/gamemode_other", "name" => "Other Game Modes"},\
1313
- "Game Settings",\
14-
- {"path" => "modules/teams", "name" => "Teams"},\
15-
- {"path" => "modules/rules", "name" => "Rules"},\
16-
- {"path" => "modules/kits", "name" => "Kits"},\
17-
- {"path" => "modules/classes", "name" => "Classes"},\
18-
- {"path" => "modules/items", "name" => "Items & Armor"},\
19-
- {"path" => "modules/potions", "name" => "Potion Effects"},\
20-
- {"path" => "modules/repair_remove", "name" => "Repair & Remove"},\
21-
- {"path" => "modules/disabledamage", "name" => "Disable Damage"},\
22-
- {"path" => "modules/projectiles", "name" => "Projectiles"},\
23-
- {"path" => "modules/tnt", "name" => "TNT"},\
24-
- {"path" => "modules/mobs", "name" => "Mob Spawning"},\
25-
- {"path" => "modules/killreward", "name" => "Kill Reward"},\
26-
- {"path" => "modules/other_settings", "name" => "Other Settings"},\
14+
- {"path" => "xml/teams", "name" => "Teams"},\
15+
- {"path" => "xml/rules", "name" => "Rules"},\
16+
- {"path" => "xml/kits", "name" => "Kits"},\
17+
- {"path" => "xml/classes", "name" => "Classes"},\
18+
- {"path" => "xml/items", "name" => "Items & Armor"},\
19+
- {"path" => "xml/potions", "name" => "Potion Effects"},\
20+
- {"path" => "xml/repair_remove", "name" => "Repair & Remove"},\
21+
- {"path" => "xml/disabledamage", "name" => "Disable Damage"},\
22+
- {"path" => "xml/projectiles", "name" => "Projectiles"},\
23+
- {"path" => "xml/tnt", "name" => "TNT"},\
24+
- {"path" => "xml/mobs", "name" => "Mob Spawning"},\
25+
- {"path" => "xml/killreward", "name" => "Kill Reward"},\
26+
- {"path" => "xml/other_settings", "name" => "Other Settings"},\
2727
- "Filters & Regions",\
28-
- {"path" => "modules/filters", "name" => "Filters"},\
29-
- {"path" => "modules/regions", "name" => "Regions"},\
30-
- {"path" => "modules/spawns", "name" => "Spawns"},\
31-
- {"path" => "modules/playable_region", "name" => "Playable Region"},\
32-
- {"path" => "modules/lanes", "name" => "Lanes"},\
33-
- {"path" => "modules/portals", "name" => "Portals"},\
34-
- {"path" => "modules/score_boxes", "name" => "Score Boxes"}]
28+
- {"path" => "xml/filters", "name" => "Filters"},\
29+
- {"path" => "xml/regions", "name" => "Regions"},\
30+
- {"path" => "xml/spawns", "name" => "Spawns"},\
31+
- {"path" => "xml/playable_region", "name" => "Playable Region"},\
32+
- {"path" => "xml/lanes", "name" => "Lanes"},\
33+
- {"path" => "xml/portals", "name" => "Portals"},\
34+
- {"path" => "xml/score_boxes", "name" => "Score Boxes"}]
3535

3636
= partial('sidebar')

src/_partials/reference_sidebar.haml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- @nav_title = "General Reference"
22
- @subnav_content = [\
3-
- {"path" => "reference/inventory", "name" => "Inventory"},\
4-
- {"path" => "reference/formatting", "name" => "Formatting & Colors"},\
5-
- {"path" => "reference/enchantments", "name" => "Enchantments"},\
6-
- {"path" => "reference/potion_effects", "name" => "Potions"}]
3+
- {"path" => "xml/reference/inventory", "name" => "Inventory"},\
4+
- {"path" => "xml/reference/formatting", "name" => "Formatting & Colors"},\
5+
- {"path" => "xml/reference/enchantments", "name" => "Enchantments"},\
6+
- {"path" => "xml/reference/potion_effects", "name" => "Potions"}]
77

88
= partial('sidebar')

src/_partials/sidebar.haml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
%ul.dropdown-menu.subnav-dropdown{:role => "menu", :"style" => "width: 100%;"}
77
- @subnav_content.each do |item|
88
- if item.kind_of?(Hash)
9-
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
10-
%a{:href => "/#{item['path']}"} #{item['name']}
9+
- if item.has_key?('match')
10+
%li{:class => (current_page.match(item['match']) ? "active" : "")}
11+
%a{:href => "/#{item['path']}"} #{item['name']}
12+
- else
13+
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
14+
%a{:href => "/#{item['path']}"} #{item['name']}
1115
- elsif item.kind_of?(String)
1216
%li.divider
1317
%li.dropdown-header #{item}
@@ -17,8 +21,12 @@
1721
%ul.nav.nav-pills.nav-stacked.docs-nav-pills
1822
- @subnav_content.each do |item|
1923
- if item.kind_of?(Hash)
20-
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
21-
%a{:href => "/#{item['path']}"} #{item['name']}
24+
- if item.has_key?('match')
25+
%li{:class => (current_page.match(item['match']) ? "active" : "")}
26+
%a{:href => "/#{item['path']}"} #{item['name']}
27+
- else
28+
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
29+
%a{:href => "/#{item['path']}"} #{item['name']}
2230
- elsif item.kind_of?(String)
2331
%li
2432
%h4 #{item}

src/_partials/xml_nav.haml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
%li.pull-right{:class => (current_page.include?("/src/xml/examples") ? "active" : "")}
2+
%a{:href => "/xml/examples/"}
3+
%i.glyphicon.glyphicon-file
4+
Examples
5+
%li.pull-right{:class => (current_page.include?("/src/xml/reference") ? "active" : "")}
6+
%a{:href => "/xml/reference/inventory"}
7+
%i.glyphicon.glyphicon-book
8+
Reference
9+
%li.pull-right{:class => (current_page.match(/\/src\/xml\/[^\/]*$/) != nil ? "active" : "")}
10+
%a{:href => "/xml/"}
11+
%i.glyphicon.glyphicon-th-large
12+
Modules

src/api/index.haml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.container
2+
.jumbotron.jumbotron-mini
3+
%h1 PGM API Documentation
4+
%p.lead Proper API Usage
5+
%section
6+
.page-header
7+
%h1 Welcome
8+
%p Etiam porta sem malesuada magna mollis euismod. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.

src/api/reference/index.haml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.container
2+
.jumbotron.jumbotron-mini
3+
%h1 PGM API Documentation
4+
%p.lead Reference
5+
%section
6+
.page-header
7+
%h1 Risus Ornare
8+
%p Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Vestibulum id ligula porta felis euismod semper.

src/css/style.css

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ body {
99
float: left;
1010
}
1111

12-
.navbar a i.glyphicon {
12+
.navbar a i.glyphicon,
13+
.subnav a i.glyphicon {
1314
font-size: 12px;
1415
margin-bottom: 1px;
1516
}
@@ -33,9 +34,29 @@ body {
3334
box-shadow: inset 0 3px 7px rgba(0,0,0,.2), inset 0 -3px 7px rgba(0,0,0,.2);
3435
}
3536

37+
@media (min-width: 768px) {
38+
.jumbotron-mini {
39+
padding: 20px 30px;
40+
font-size: 50%;
41+
padding-bottom: 14px;
42+
}
43+
}
44+
@media (max-width: 767px) {
45+
.jumbotron-mini {
46+
padding: 24px 40px;
47+
padding-bottom: 20px;
48+
}
49+
}
50+
.jumbotron .lead {
51+
margin-bottom: 10px;
52+
}
53+
.jumbotron h1 {
54+
margin-top: 0;
55+
}
56+
3657
/* Jumbotron pattern overlay
3758
------------------------- */
38-
.jumbotron .container {
59+
.jumbotron:content {
3960
position: relative;
4061
z-index: 2;
4162
}
@@ -50,6 +71,7 @@ body {
5071
bottom: 0;
5172
left: 0;
5273
opacity: .8;
74+
z-index: 0;
5375
}
5476

5577
code {
@@ -75,12 +97,20 @@ code {
7597
float: none !important;
7698
}
7799

100+
.subnav {
101+
margin-bottom: 30px;
102+
}
103+
78104
.docs-nav-pills > li > a {
79105
position: relative;
80106
display: block;
81107
padding: 8px 14px;
82108
}
83109

110+
.well h1 {
111+
margin-top: 0;
112+
}
113+
84114
.dropdown-menu > .active > a{
85115
color: #333333;
86116
background-color: #e6e6e6;

src/index.haml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
.container
2-
.jumbotron.subhead
3-
%h1 PGM XML Documentation
4-
%p.lead Documentation on XML files that are required for each map added to the servers
52
%section
63
.page-header
74
%h1 Welcome
8-
%p These docs provide valuable information to be used when coding XML files. XML files are needed in order for any map released on the Overcast Network to function. The XML defines aspects of the game such as spawn points, kits and more.
5+
%p Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Sed posuere consectetur est at lobortis.
6+
.row
7+
.col-md-6.text-center
8+
.well
9+
%h1
10+
%i.glyphicon.glyphicon-file
11+
%h4 XML Documentation
12+
%p Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
13+
%a.btn.btn-primary.btn-lg{:href => "/xml/"} Browse the XML docs
14+
15+
16+
.col-md-6.text-center
17+
.well
18+
%h1
19+
%i.glyphicon.glyphicon-globe
20+
%h4 Web API Documentation
21+
%p Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec id elit non mi porta gravida at eget metus. Nulla vitae elit libero, a pharetra augue.
22+
%a.btn.btn-primary.btn-lg{:href => "/api/"} Browse the API docs

src/modules/classes.haml renamed to src/xml/classes.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Modules
44
%p.lead Game Settings
55
%section

src/modules/disabledamage.haml renamed to src/xml/disabledamage.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Modules
44
%p.lead Game Settings
55
%section

src/examples/eldritch.haml renamed to src/xml/examples/eldritch.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Examples
44
%p.lead XML File Examples
55
%section

src/examples/harb.haml renamed to src/xml/examples/harb.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Examples
44
%p.lead XML File Examples
55
%section

src/examples.haml renamed to src/xml/examples/index.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Examples
44
%p.lead XML File Examples
55
%section

src/examples/rfv3.haml renamed to src/xml/examples/rfv3.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Examples
44
%p.lead XML File Examples
55
%section

src/examples/snowy_wars.haml renamed to src/xml/examples/snowy_wars.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Examples
44
%p.lead XML File Examples
55
%section

src/examples/viridun.haml renamed to src/xml/examples/viridun.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Examples
44
%p.lead XML File Examples
55
%section

src/modules/filters.haml renamed to src/xml/filters.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Modules
44
%p.lead Filters & Regions
55
%section

src/modules/gamemode_blitz.haml renamed to src/xml/gamemode_blitz.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.container
2-
.jumbotron.subhead
2+
.jumbotron.jumbotron-mini
33
%h1 Modules
44
%p.lead Game Modes
55
%section

0 commit comments

Comments
 (0)