/[web]/nav/README.md
ViewVC logotype

Annotation of /nav/README.md

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1096 - (hide annotations) (download)
Tue May 15 17:27:45 2012 UTC (11 years, 11 months ago) by rda
File size: 2345 byte(s)
first import; adapted copy of www/_nav/
1 rda 1096 # mognase - mageia.org global navigation service
2    
3     This service is available so that each mageia.org Web service/site can have
4     a same, consistent looking, synchronized navigation bar.
5    
6     You have two ways to use this service:
7    
8     * using a Javascript snippet;
9     * using directly CSS and HTML and placing them at the right place.
10    
11    
12     ## Use a Javascript snippet (preferred, less work)
13    
14     Place this at the end of your HTML document:
15    
16     > ```<script src="//nav.mageia.org/js/"></script>
17     > ```
18    
19     It will:
20    
21     * load the stylesheet rules
22     * detect some of your document features;
23     * build a ```<div id="nav" />``` node just after the ```<body>``` of your doc;
24     * call and inject the HTML.
25    
26    
27     ## Use directly HTML & CSS
28    
29     Get, and _cache_ those two document and insert them in your HTML.
30    
31     * ```//nav.mageia.org/css/```
32     * ```//nav.mageia.org/html/?l={html[lang]}&b={body[class]}&w=1```
33    
34     and:
35    
36     * publish CSS in your documents.
37     * put HTML in ```<div id="nav" />``` just after the ```<body>```
38     of your doc
39    
40     ## Update your documents HTML & CSS
41    
42     You need to change your CSS rules so that they match:
43    
44     > ```
45     > html, body { margin: 0; padding: 0; }
46     > ```
47    
48     If you want to see the navigation bar sections activated for your site/app,
49     you need to update your documents' body[class] too, to match either:
50    
51     * ```map``` (global "home" element, mageia logo)
52     * ```about``` (about section)
53     * ```downloads``` (downloads & products section)
54     * ```community``` (community tools & resources section)
55     * ```support``` (support section)
56     * ```contribute``` (contributors section)
57     * ```you``` (identity, personal data & services)
58    
59     Finally, to have an integrated h1 title with the top navigation, put it just
60     at the top of your HTML document:
61    
62     > ```<body>
63     > <h1 id="mgnavt">your title</h1>```
64    
65    
66     ## Features
67    
68     The detected and used features are:
69    
70     * ```html[lang]``` is used to translate the menu in the said language,
71     when available
72     * ```body[class]``` is not used yet.
73     * ```head > meta[name="context"] value``` is not used yet.
74     * ```document.location.href``` is used for stats purpose (logs).
75    
76    
77    
78     ## Code & license
79    
80     * code is in [svn://svn.mageia.org/svn/web/nav/](http://svn.mageia.org/web/nav/)
81     * written by [Romain d'Alverny](http://twitter.com/rdalverny) in April 2012
82     * licensed under GNU GPL-3+.
83     * patches and discussions welcome in [Mageia Web team](https://wiki.mageia.org/en/Web_team)
84    
85     ----

  ViewVC Help
Powered by ViewVC 1.1.30