aboutsummaryrefslogtreecommitdiffstats
path: root/_nav/README.md
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-11 12:08:06 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-11 12:08:06 +0000
commitabc8436bfdc331609342105d8c56e8bd6468e693 (patch)
tree8d0e9e6dfef0f764e36573b5d508d49dc1a3dc52 /_nav/README.md
parent2f1a0016e212b6feb9b64a141e0c2319a31f0e01 (diff)
downloadwww-abc8436bfdc331609342105d8c56e8bd6468e693.tar
www-abc8436bfdc331609342105d8c56e8bd6468e693.tar.gz
www-abc8436bfdc331609342105d8c56e8bd6468e693.tar.bz2
www-abc8436bfdc331609342105d8c56e8bd6468e693.tar.xz
www-abc8436bfdc331609342105d8c56e8bd6468e693.zip
new global nav bar service
Diffstat (limited to '_nav/README.md')
-rw-r--r--_nav/README.md80
1 files changed, 80 insertions, 0 deletions
diff --git a/_nav/README.md b/_nav/README.md
new file mode 100644
index 000000000..d7bd19b86
--- /dev/null
+++ b/_nav/README.md
@@ -0,0 +1,80 @@
+# mognase - mageia.org global navigation service
+
+This service is available so that each mageia.org Web service/site can have
+a same, consistent looking, synchronized navigation bar.
+
+You have two ways to use this service:
+
+* using a Javascript snippet;
+* using directly CSS and HTML and placing them at the right place.
+
+
+## Use a Javascript snippet (preferred, less work)
+
+Place this at the end of your HTML document:
+
+> ```<script src="//www.mageia.org/_nav/js/"></script>
+> ```
+
+It will:
+
+* load the stylesheet rules
+* detect some of your document features;
+* build a ```<div id="nav" />``` node just after the <body> of your doc;
+* call and inject the HTML.
+
+
+## Use directly HTML & CSS
+
+Get, and _cache_ those two document and insert them in your HTML.
+
+* ```//www.mageia.org/_nav/css/```
+* ```//www.mageia.org/_nav/html/?l={html[lang]}&b={body[class]}&w=1```
+
+
+## Update your documents HTML & CSS
+
+You need to change your CSS rules so that they match:
+
+> ```
+> html, body { margin: 0; padding: 0; }
+> ```
+
+If you want to see the navigation bar sections activated for your site/app,
+you need to update your documents' body[class] too, to match either:
+
+* ```map``` (global "home" element, mageia logo)
+* ```about``` (about section)
+* ```downloads``` (downloads & products section)
+* ```community``` (community tools & resources section)
+* ```support``` (support section)
+* ```contribute``` (contributors section)
+* ```you``` (identity, personal data & services)
+
+Finally, to have an integrated h1 title with the top navigation, put it just
+at the top of your HTML document:
+
+> ```<body>
+> <h1 id="mgnavt">your title</h1>```
+
+
+## Features
+
+The detected and used features are:
+
+* ```html[lang]``` is used to translate the menu in the said language,
+ when available
+* ```body[class]``` is not used yet.
+* ```head > meta[name="context"] value``` is not used yet.
+* ```document.location.href``` is used for stats purpose (logs).
+
+
+
+## Code & license
+
+* code is in [svn://svn.mageia.org/svn/web/www/trunk/_nav/](http://svn.mageia.org/web/www/trunk/_nav/)
+* written by [Romain d'Alverny](http://twitter.com/rdalverny) in April 2012
+* licensed under GNU GPL-2+.
+* patches and discussions welcome in [Mageia Web team](https://wiki.mageia.org/en/Web_team)
+
+---- \ No newline at end of file