diff options
author | Manuel Hiebel <leuhmanu@mageia.org> | 2017-07-05 11:23:55 +0200 |
---|---|---|
committer | Manuel Hiebel <leuhmanu@mageia.org> | 2017-07-05 11:23:55 +0200 |
commit | 16b6d6859544258bea750103e235bd7e216ecfc1 (patch) | |
tree | db87e1cbd06a40cf8612f0a1b895f2ba1ef47fff /en/doc | |
parent | 4d698ae14ddd4801897cf2ccf4e929deee81a944 (diff) | |
download | www-16b6d6859544258bea750103e235bd7e216ecfc1.tar www-16b6d6859544258bea750103e235bd7e216ecfc1.tar.gz www-16b6d6859544258bea750103e235bd7e216ecfc1.tar.bz2 www-16b6d6859544258bea750103e235bd7e216ecfc1.tar.xz www-16b6d6859544258bea750103e235bd7e216ecfc1.zip |
Adapt to bootstrap
+replace custom .css with common header
+use class of bootstrap instead of inline style
+clean inline css
Diffstat (limited to 'en/doc')
-rw-r--r-- | en/doc/archive.php | 28 | ||||
-rw-r--r-- | en/doc/doc.php | 18 | ||||
-rw-r--r-- | en/doc/index.php | 49 |
3 files changed, 37 insertions, 58 deletions
diff --git a/en/doc/archive.php b/en/doc/archive.php index 2c40a9db9..9c5e062eb 100644 --- a/en/doc/archive.php +++ b/en/doc/archive.php @@ -12,10 +12,12 @@ require 'doc.php'; <title><?php _g('Mageia Documentation\'s Archive')?></title> <meta name="description" content="<?php _g('Documentation for previous releases of Mageia distribution and its tools.')?>"> <meta name="keywords" content="<?php _g('doc,documentation,help,guide,installer,installation,mageia,linux')?>"> - <link rel="stylesheet" href="/g/style/all.css" type="text/css"> - <link rel="stylesheet" type="text/css" href="/g/style/common_footer.css"> + <?php echo common_header(); ?> <?php include '../../analytics.php'; ?> -</head> +<style> + tbody { display: none; } +</style> +</head <body class="doc"> <?php echo $hsnav; ?> <h1 id="mgnavt"><?php _g('Mageia Documentation\'s Archive')?></h1> @@ -29,32 +31,38 @@ require 'doc.php'; <?php _g('Documentation built using the <a href="%s">Calenco tool from NeoDoc</a>.', 'http://www.neodoc.biz/', 'p')?> <hr> <h3>Mageia 4</h3> - <div style="float: left; margin: 1em; width: 24em;"> - <p style="margin-left: 2em;"><?php doc_list(_r('Installer'), 'installer', 4); - ?></p> + <div class="row"> + <div class="col"> + <?php doc_list(_r('Installer'), 'installer', 4); + ?> </div> - <div style="float: right; margin: 1em; width: 24em;"> + <div class="col"> <p style="margin-left: 2em;"><?php doc_list(_r('Control Center'), 'control_center', 4); ?></p> </div> + </div><!--row--> <hr style="clear: both;"> <h3>Mageia 3</h3> - <div style="float: left; margin: 1em; width: 24em;"> + <div class="row"> + <div class="col"> <p style="margin-left: 2em;"><?php doc_list(_r('Installer'), 'installer', 3); ?></p> </div> - <div style="float: right; margin: 1em; width: 24em;"> + <div class="col"> <p style="margin-left: 2em;"><?php doc_list(_r('Control Center'), 'control_center', 3); ?></p> </div> + </div><!--row--> <hr style="clear: both;"> <h3>Mageia 2</h3> - <div style="float: left; margin: 2em;"> + <div class="row"> + <div class="col"> <p><?php doc_list(_r('Installer'), 'installer', 2); ?></p> + </div><!--row--> </div> </div> </div> diff --git a/en/doc/doc.php b/en/doc/doc.php index 46d54ad2c..488e31d96 100644 --- a/en/doc/doc.php +++ b/en/doc/doc.php @@ -77,7 +77,7 @@ function doc_list($documentation_name, $type, $version) $your_language_present = FALSE; $other_languages_present = FALSE; $note_printed = FALSE; - $table = PHP_EOL . '<table class="dlt2 dlinfo" style="font-size: 10pt;">' . PHP_EOL; + $table = PHP_EOL . '<table class="table table-sm">' . PHP_EOL; foreach ($documentation[$type][$version] as $lng) { // hopefully temporary exception for pt-br as convention for lang-abbrev in /langs.inc.php is different as link in doc.mageia.org @@ -101,8 +101,8 @@ function doc_list($documentation_name, $type, $version) $your_language = sprintf(_r('Online manual for %s available in %s') . '<br/>', '<span style="font-weight:bold">' . $documentation_name . '</span>', $lang_doc_link); } else { - $your_language = sprintf(_r('Online manual for %s available in %s') . '<br/> <span style="font-size: 07pt;">('. - _r('also as file:') . ' %s)</span>', + $your_language = sprintf(_r('Online manual for %s available in %s') . '<br/> <small class="text-mutted">('. + _r('also as file:') . ' %s)</small>', '<span style="font-weight:bold">' . $documentation_name . '</span>', $lang_doc_link, $pdf_epub_links); } @@ -117,7 +117,7 @@ function doc_list($documentation_name, $type, $version) } else { $note = ''; } - $others[] = sprintf('%s <span style="font-size: 07pt;">(%s%s)</span>', + $others[] = sprintf('%s <small class="text-muted">(%s%s)</small>', $lang_doc_link, $note, $pdf_epub_links, $lang_doc_link); } } @@ -125,10 +125,10 @@ function doc_list($documentation_name, $type, $version) if ($your_language_present) { $text_your_language = '<span style="font-weight:bold">' . _r('Documentation in your language:') . '</span><br/>'; if ($other_languages_present) { - $text_others = '<span style="font-weight:bold">' . _r('Other languages:') . '<a href="#flex-item" onclick="toggle_visibility(\'table-'.$name.'\');"> ↘ </a></span>'; + $text_others = '<a class="btn btn-outline-primary" data-toggle="collapse" href="#table-'.$name.'" role="button" aria-expanded="false" aria-controls="table-'.$name.'">' . _r('Other languages:') . ' ↘ </a>'; } - $table .= sprintf("\t<caption>%s</caption>" . PHP_EOL . - "\t<thead><tr><th>%s</th></tr></thead>" . PHP_EOL . + $table .= sprintf("\t<caption class=\"caption-top\">%s</caption>" . PHP_EOL . + "\t<thead><tr><th class=\"border-0\">%s</th></tr></thead>" . PHP_EOL . '<tbody id="table-%s">' . PHP_EOL , $your_language, $text_others, $name); } else { @@ -143,8 +143,8 @@ function doc_list($documentation_name, $type, $version) } } $text_your_language = _r('Please help <a href="../community/">us</a> translate it in your language.') . '<br/>'; - $table .= sprintf("\t<caption>%s<br/>" . PHP_EOL . - "\t%s<span style=\"font-weight:bold\"><a href=\"#flex-item\" onclick=\"toggle_visibility('table-$name');\"> ↘ </a></span></caption>" . PHP_EOL . '%s' . + $table .= sprintf("\t<caption class=\"caption-top\">%s<br/>" . PHP_EOL . + "\t%s<a class=\"btn btn-outline-primary\" data-toggle=\"collapse\" href=\"#table-$name\" role=\"button\" aria-expanded=\"false\" aria-controls=\"table-$name\"> ↘ </a></caption>" . PHP_EOL . '%s' . "\t<tbody id=table-%s>" . PHP_EOL , '<span style="font-weight:bold">' . $documentation_name . '</span>', $text_your_language, $language_present_before, $name); } diff --git a/en/doc/index.php b/en/doc/index.php index 81d58d620..f321dd9d8 100644 --- a/en/doc/index.php +++ b/en/doc/index.php @@ -11,42 +11,22 @@ require 'doc.php'; <html lang="<?php echo $locale; ?>" dir="ltr"> <head> <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php _g('Mageia Documentation')?></title> <meta name="description" content="<?php _g('Documentation for Mageia distribution and its tools.')?>"> <meta name="keywords" content="<?php _g('doc,documentation,help,guide,installer,installation,mageia,linux')?>"> - <link rel="stylesheet" href="/g/style/all.css" type="text/css"> - <link rel="stylesheet" type="text/css" href="/g/style/common_footer.css"> + <?php echo common_header(); ?> <?php include '../../analytics.php'; ?> - <style> - .flex-container { - display: flex; - flex-wrap:wrap; - } - .flex-item { - flex: 1 150px; - margin: 1em; width: 24em; - } - .dlt2 thead th, .dlt2 th.h { - color: #aaa; - font-size: 100%; - } - @media (max-width: 768px) { - #doc6 { width:100%; } - tbody { display: none; } - } - @media (min-width: 768px) { - tbody { display: none; } - } + <style> + tbody { display: none; } </style> </head> <body class="doc"> <?php echo $hsnav; ?> <h1 id="mgnavt"><?php _g('Mageia Documentation')?></h1> - <div id="doc6" class="yui-t7" style="margin-bottom: 0px; max-width: 950px;"> + <div id="doc" class="yui-t7"> <div id="bd" role="main"> <div class="yui-g"> - <div class="para donate" style="padding-top: 2em;"> + <div class="para donate"> <h2><?php _g('Find your documentation')?></h2> <p><?php _g('Select the manual, the release of Mageia and the language you want to see.')?><br/> <?php _g('Documentation of old versions are available in the <a href="archive.php">archive page</a>.')?></p> @@ -55,30 +35,21 @@ require 'doc.php'; <?php _g('Documentation built using the <a href="%s">Calenco tool from NeoDoc</a>.', 'http://www.neodoc.biz/', 'p')?> <hr> <h3>Mageia 5</h3> - <div class="flex-container"> - <div class="flex-item"> + <div class="row"> + <div class="col"> <?php doc_list(_r('Installer'), 'installer', 5); ?> </div> - <div class="flex-item"> + <div class="col"> <?php doc_list(_r('Control Center'), 'control_center', 5); ?> </div> - <div class="flex-item"> + <div class="col"> <?php doc_list(_r('Installation from LIVE medium'), 'draklive', 5); ?> </div> - </div><!--flex-container--> + </div><!--row--> </div> </div> </div> </div> <?php echo common_footer($locale); ?> -<script type="text/javascript"> -function toggle_visibility(id) { - var e = document.getElementById(id); - if(e.style.display == 'table-row-group') - e.style.display = 'none'; - else - e.style.display = 'table-row-group'; -} -</script> </body> </html> |