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

Commit

Permalink
Move a-lot of stuff around, add more navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
McSpider committed Nov 17, 2013
1 parent 1bffa7e commit 29be11a
Show file tree
Hide file tree
Showing 52 changed files with 197 additions and 104 deletions.
35 changes: 20 additions & 15 deletions src/_layouts/default.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!!! 5
%html
%head
%title PGM XML Documentation
%title PGM Documentation
%meta{:"http-equiv" => "Content-Type", :content => "text/html;charset=utf-8"}
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0"}
- @rand = SecureRandom.hex(13)
Expand All @@ -21,30 +21,35 @@
.navbar-header
%a.navbar-brand{:href => "/"}
%img{:src => "https://oc.tc/assets/logo.png"}
PGM XML Documentation
PGM Documentation
%button.navbar-toggle{:type => "button", :"data-toggle" => "collapse", :"data-target" => ".navbar-main-collapse"}
%span.sr-only Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
%nav.collapse.navbar-collapse.navbar-main-collapse
%ul.nav.navbar-nav.navbar-right
%li{:class => (current_page.include?("index") ? "active" : "")}
%li{:class => (current_page.include?("/src/index") ? "active" : "")}
%a{:href => "/"}
%i.glyphicon.glyphicon-home
Home
%li{:class => (current_page.include?("modules") ? "active" : "")}
%a{:href => "/modules/main"}
%i.glyphicon.glyphicon-th-large
Modules
%li{:class => (current_page.include?("reference") ? "active" : "")}
%a{:href => "/reference/inventory"}
%i.glyphicon.glyphicon-book
Reference
%li{:class => (current_page.include?("examples") ? "active" : "")}
%a{:href => "/examples"}
Overview
%li{:class => (current_page.include?("/src/xml") ? "active" : "")}
%a{:href => "/xml/"}
%i.glyphicon.glyphicon-file
Examples
XML Docs
%li{:class => (current_page.include?("/src/api") ? "active" : "")}
%a{:href => "/api/"}
%i.glyphicon.glyphicon-globe
API Docs
- if current_page.include?("/xml/")
.container
%ul.nav.nav-tabs.subnav
= partial('xml_nav')
- elsif current_page.include?("/api/")
.container
%ul.nav.nav-tabs.subnav
= partial('api_nav')
= yield
.container
%hr
Expand Down
8 changes: 8 additions & 0 deletions src/_partials/api_nav.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%li.pull-right{:class => (current_page.include?("/src/api/reference") ? "active" : "")}
%a{:href => "/api/reference/"}
%i.glyphicon.glyphicon-book
Reference
%li.pull-right{:class => (current_page.match(/\/src\/api\/[^\/]*$/) != nil ? "active" : "")}
%a{:href => "/api/"}
%i.glyphicon.glyphicon-transfer
Usage
10 changes: 5 additions & 5 deletions src/_partials/examples_sidebar.haml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
- @nav_title = "Map XML Examples"
- @subnav_content = [\
- {"path" => "examples/snowy_wars", "name" => "Snowy Wars"},\
- {"path" => "examples/viridun", "name" => "Viridun"},\
- {"path" => "examples/harb", "name" => "Harb"},\
- {"path" => "examples/rfv3", "name" => "Race For Victory 3"},\
- {"path" => "examples/eldritch", "name" => "GS: Eldritch"}]
- {"path" => "xml/examples/snowy_wars", "name" => "Snowy Wars"},\
- {"path" => "xml/examples/viridun", "name" => "Viridun"},\
- {"path" => "xml/examples/harb", "name" => "Harb"},\
- {"path" => "xml/examples/rfv3", "name" => "Race For Victory 3"},\
- {"path" => "xml/examples/eldritch", "name" => "GS: Eldritch"}]

= partial('sidebar')
58 changes: 29 additions & 29 deletions src/_partials/modules_sidebar.haml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
- @nav_title = "XML Modules"
- @subnav_content = [\
- {"path" => "modules/main", "name" => "Main Map Element"},\
- {"path" => "modules/includes", "name" => "XML File Includes"},\
- {"path" => "modules/tutorial", "name" => "Map Tutorial"},\
- {"path" => "xml/", "name" => "Main Map Element", "match" => /xml\/index\.[^\/]*$/},\
- {"path" => "xml/includes", "name" => "XML File Includes"},\
- {"path" => "xml/tutorial", "name" => "Map Tutorial"},\
- "Game Modes",\
- {"path" => "modules/gamemode_ctw", "name" => "Capture the Wool"},\
- {"path" => "modules/gamemode_dtm", "name" => "Destroy the Monument"},\
- {"path" => "modules/gamemode_blitz", "name" => "Blitz"},\
- {"path" => "modules/gamemode_dtc", "name" => "Destroy the Core"},\
- {"path" => "modules/gamemode_tdm", "name" => "Team Death-match"},\
- {"path" => "modules/gamemode_other", "name" => "Other Game Modes"},\
- {"path" => "xml/gamemode_ctw", "name" => "Capture the Wool"},\
- {"path" => "xml/gamemode_dtm", "name" => "Destroy the Monument"},\
- {"path" => "xml/gamemode_blitz", "name" => "Blitz"},\
- {"path" => "xml/gamemode_dtc", "name" => "Destroy the Core"},\
- {"path" => "xml/gamemode_tdm", "name" => "Team Death-match"},\
- {"path" => "xml/gamemode_other", "name" => "Other Game Modes"},\
- "Game Settings",\
- {"path" => "modules/teams", "name" => "Teams"},\
- {"path" => "modules/rules", "name" => "Rules"},\
- {"path" => "modules/kits", "name" => "Kits"},\
- {"path" => "modules/classes", "name" => "Classes"},\
- {"path" => "modules/items", "name" => "Items & Armor"},\
- {"path" => "modules/potions", "name" => "Potion Effects"},\
- {"path" => "modules/repair_remove", "name" => "Repair & Remove"},\
- {"path" => "modules/disabledamage", "name" => "Disable Damage"},\
- {"path" => "modules/projectiles", "name" => "Projectiles"},\
- {"path" => "modules/tnt", "name" => "TNT"},\
- {"path" => "modules/mobs", "name" => "Mob Spawning"},\
- {"path" => "modules/killreward", "name" => "Kill Reward"},\
- {"path" => "modules/other_settings", "name" => "Other Settings"},\
- {"path" => "xml/teams", "name" => "Teams"},\
- {"path" => "xml/rules", "name" => "Rules"},\
- {"path" => "xml/kits", "name" => "Kits"},\
- {"path" => "xml/classes", "name" => "Classes"},\
- {"path" => "xml/items", "name" => "Items & Armor"},\
- {"path" => "xml/potions", "name" => "Potion Effects"},\
- {"path" => "xml/repair_remove", "name" => "Repair & Remove"},\
- {"path" => "xml/disabledamage", "name" => "Disable Damage"},\
- {"path" => "xml/projectiles", "name" => "Projectiles"},\
- {"path" => "xml/tnt", "name" => "TNT"},\
- {"path" => "xml/mobs", "name" => "Mob Spawning"},\
- {"path" => "xml/killreward", "name" => "Kill Reward"},\
- {"path" => "xml/other_settings", "name" => "Other Settings"},\
- "Filters & Regions",\
- {"path" => "modules/filters", "name" => "Filters"},\
- {"path" => "modules/regions", "name" => "Regions"},\
- {"path" => "modules/spawns", "name" => "Spawns"},\
- {"path" => "modules/playable_region", "name" => "Playable Region"},\
- {"path" => "modules/lanes", "name" => "Lanes"},\
- {"path" => "modules/portals", "name" => "Portals"},\
- {"path" => "modules/score_boxes", "name" => "Score Boxes"}]
- {"path" => "xml/filters", "name" => "Filters"},\
- {"path" => "xml/regions", "name" => "Regions"},\
- {"path" => "xml/spawns", "name" => "Spawns"},\
- {"path" => "xml/playable_region", "name" => "Playable Region"},\
- {"path" => "xml/lanes", "name" => "Lanes"},\
- {"path" => "xml/portals", "name" => "Portals"},\
- {"path" => "xml/score_boxes", "name" => "Score Boxes"}]

= partial('sidebar')
8 changes: 4 additions & 4 deletions src/_partials/reference_sidebar.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- @nav_title = "General Reference"
- @subnav_content = [\
- {"path" => "reference/inventory", "name" => "Inventory"},\
- {"path" => "reference/formatting", "name" => "Formatting & Colors"},\
- {"path" => "reference/enchantments", "name" => "Enchantments"},\
- {"path" => "reference/potion_effects", "name" => "Potions"}]
- {"path" => "xml/reference/inventory", "name" => "Inventory"},\
- {"path" => "xml/reference/formatting", "name" => "Formatting & Colors"},\
- {"path" => "xml/reference/enchantments", "name" => "Enchantments"},\
- {"path" => "xml/reference/potion_effects", "name" => "Potions"}]

= partial('sidebar')
16 changes: 12 additions & 4 deletions src/_partials/sidebar.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
%ul.dropdown-menu.subnav-dropdown{:role => "menu", :"style" => "width: 100%;"}
- @subnav_content.each do |item|
- if item.kind_of?(Hash)
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
%a{:href => "/#{item['path']}"} #{item['name']}
- if item.has_key?('match')
%li{:class => (current_page.match(item['match']) ? "active" : "")}
%a{:href => "/#{item['path']}"} #{item['name']}
- else
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
%a{:href => "/#{item['path']}"} #{item['name']}
- elsif item.kind_of?(String)
%li.divider
%li.dropdown-header #{item}
Expand All @@ -17,8 +21,12 @@
%ul.nav.nav-pills.nav-stacked.docs-nav-pills
- @subnav_content.each do |item|
- if item.kind_of?(Hash)
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
%a{:href => "/#{item['path']}"} #{item['name']}
- if item.has_key?('match')
%li{:class => (current_page.match(item['match']) ? "active" : "")}
%a{:href => "/#{item['path']}"} #{item['name']}
- else
%li{:class => (current_page.include?("#{item['path']}") ? "active" : "")}
%a{:href => "/#{item['path']}"} #{item['name']}
- elsif item.kind_of?(String)
%li
%h4 #{item}
12 changes: 12 additions & 0 deletions src/_partials/xml_nav.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
%li.pull-right{:class => (current_page.include?("/src/xml/examples") ? "active" : "")}
%a{:href => "/xml/examples/"}
%i.glyphicon.glyphicon-file
Examples
%li.pull-right{:class => (current_page.include?("/src/xml/reference") ? "active" : "")}
%a{:href => "/xml/reference/inventory"}
%i.glyphicon.glyphicon-book
Reference
%li.pull-right{:class => (current_page.match(/\/src\/xml\/[^\/]*$/) != nil ? "active" : "")}
%a{:href => "/xml/"}
%i.glyphicon.glyphicon-th-large
Modules

This comment has been minimized.

Copy link
@tonybruess

tonybruess Nov 17, 2013

Member

where dem new lines at ;(

8 changes: 8 additions & 0 deletions src/api/index.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.container
.jumbotron.jumbotron-mini
%h1 PGM API Documentation
%p.lead Proper API Usage
%section
.page-header
%h1 Welcome
%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.
8 changes: 8 additions & 0 deletions src/api/reference/index.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.container
.jumbotron.jumbotron-mini
%h1 PGM API Documentation
%p.lead Reference
%section
.page-header
%h1 Risus Ornare
%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.
34 changes: 32 additions & 2 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ body {
float: left;
}

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

@media (min-width: 768px) {
.jumbotron-mini {
padding: 20px 30px;
font-size: 50%;
padding-bottom: 14px;
}
}
@media (max-width: 767px) {
.jumbotron-mini {
padding: 24px 40px;
padding-bottom: 20px;
}
}
.jumbotron .lead {
margin-bottom: 10px;
}
.jumbotron h1 {
margin-top: 0;
}

/* Jumbotron pattern overlay
------------------------- */
.jumbotron .container {
.jumbotron:content {
position: relative;
z-index: 2;
}
Expand All @@ -50,6 +71,7 @@ body {
bottom: 0;
left: 0;
opacity: .8;
z-index: 0;
}

code {
Expand All @@ -75,12 +97,20 @@ code {
float: none !important;
}

.subnav {
margin-bottom: 30px;
}

.docs-nav-pills > li > a {
position: relative;
display: block;
padding: 8px 14px;
}

.well h1 {
margin-top: 0;
}

.dropdown-menu > .active > a{
color: #333333;
background-color: #e6e6e6;
Expand Down
22 changes: 18 additions & 4 deletions src/index.haml
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
.container
.jumbotron.subhead
%h1 PGM XML Documentation
%p.lead Documentation on XML files that are required for each map added to the servers
%section
.page-header
%h1 Welcome
%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.
%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.
.row
.col-md-6.text-center
.well
%h1
%i.glyphicon.glyphicon-file
%h4 XML Documentation
%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.
%a.btn.btn-primary.btn-lg{:href => "/xml/"} Browse the XML docs


.col-md-6.text-center
.well
%h1
%i.glyphicon.glyphicon-globe
%h4 Web API Documentation
%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.
%a.btn.btn-primary.btn-lg{:href => "/api/"} Browse the API docs
2 changes: 1 addition & 1 deletion src/modules/classes.haml → src/xml/classes.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Modules
%p.lead Game Settings
%section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Modules
%p.lead Game Settings
%section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Examples
%p.lead XML File Examples
%section
Expand Down
2 changes: 1 addition & 1 deletion src/examples/harb.haml → src/xml/examples/harb.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Examples
%p.lead XML File Examples
%section
Expand Down
2 changes: 1 addition & 1 deletion src/examples.haml → src/xml/examples/index.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Examples
%p.lead XML File Examples
%section
Expand Down
2 changes: 1 addition & 1 deletion src/examples/rfv3.haml → src/xml/examples/rfv3.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Examples
%p.lead XML File Examples
%section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Examples
%p.lead XML File Examples
%section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Examples
%p.lead XML File Examples
%section
Expand Down
2 changes: 1 addition & 1 deletion src/modules/filters.haml → src/xml/filters.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Modules
%p.lead Filters & Regions
%section
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.container
.jumbotron.subhead
.jumbotron.jumbotron-mini
%h1 Modules
%p.lead Game Modes
%section
Expand Down
Loading

0 comments on commit 29be11a

Please sign in to comment.