[doc] website for install+presentation of AlternC

This commit is contained in:
Benjamin Sonntag 2015-05-13 11:48:23 +02:00
parent a8fcbcaacb
commit 6f328fa188
14 changed files with 584 additions and 119 deletions

1
doc/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.html

View File

@ -1,6 +1,15 @@
all: install.php
all: install_fr.html install_en.html home_fr.html home_en.html
install.php: install_fr.md
github-markup install_fr.md >install.php
install_fr.html: install_fr.md
github-markup install_fr.md >install_fr.html
install_en.html: install_en.md
github-markup install_en.md >install_en.html
home_fr.html: home_fr.md
github-markup home_fr.md >home_fr.html
home_en.html: home_en.md
github-markup home_en.md >home_en.html

12
doc/home_en.md Normal file
View File

@ -0,0 +1,12 @@
AlternC Hosting Control Panel
=============================
AlternC is a hosting control panel, a software suite which makes web and mail server management easier.
To [install AlternC on your Debian GNU/Linux stable distribution, see our documentation](install).
You may want to [test it on our demonstration server](http://demo.alternc.org/)
If you want to participate, [we have a developer website](http://alternc.org).

12
doc/home_fr.md Normal file
View File

@ -0,0 +1,12 @@
AlternC, Logiciel de gestion de serveur
=======================================
AlternC est une suite logicielle permettant de gérer facilement un serveur web et mail.
Pour [installer AlternC sur votre distribution Debian GNU/Linux stable, lisez notre documentation](install).
Vous pouvez tester AlternC [sur notre serveur de démonstration](http://demo.alternc.org/)
Si vous souhaitez participer à son développement, [nous avons un site dédié aux développeurs](http://alternc.org).

17
doc/install_en.md Normal file
View File

@ -0,0 +1,17 @@
Pre-installation
================
AlternC works well with current or previous stable version of Linux Debian distribution. We are using `apt-get` to install the required softwares.
To install AlternC, you'll need:
* a SSH access to the server.
* administrator rights (`sudo -s` or `su`)
* ensure that `#includedir /etc/sudoers.d` is present in `/etc/sudoers` with the command `visudo`.
ACL
---

7
doc/www/.htaccess Normal file
View File

@ -0,0 +1,7 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) router.php [L]

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,12 @@
<a class="back-to-top" href="#top">
Back to top
</a>
<?php foreach($otherlang as $l) { ?>
<a class="back-to-top" href="<?php echo str_replace("/".$lang."/","/".$l."/",$_SERVER["REQUEST_URI"]); ?>">
<?php echo $l; ?>
</a>
<?php } ?>
</div>
</div>
@ -24,45 +29,52 @@
<div class="container">
<div class="bs-docs-social">
<ul class="bs-docs-social-buttons">
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twbs&amp;repo=bootstrap&amp;type=watch&amp;count=true" width="100" height="20" title="Star on GitHub"></iframe>
</li>
<li>
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twbs&amp;repo=bootstrap&amp;type=fork&amp;count=true" width="102" height="20" title="Fork on GitHub"></iframe>
<li class="follow-btn">
<a href="/" class="twitter-follow-button">Site d'AlternC</a>
</li>
<li class="follow-btn">
<a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a>
<a href="http://demo.alternc.org" class="twitter-follow-button"><?php
switch ($lang) {
case "fr":
echo "Serveur de Démonstration";
break;
case "en":
default:
echo "Demonstration Server";
break;
}
?></a>
</li>
<li class="tweet-btn">
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://getbootstrap.com/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Bootstrap">Tweet</a>
<li class="follow-btn">
<a href="https://twitter.com/AlternC_en" class="twitter-follow-button"><?php
switch ($lang) {
case "fr":
echo "@AlternC_en sur Twitter";
break;
case "en":
default:
echo "@AlternC_en on Twitter";
break;
}
?></a>
</li>
<li class="follow-btn">
<a href="https://github.com/alternc/" class="twitter-follow-button"><?php
switch ($lang) {
case "fr":
echo "Code source sur Github";
break;
case "en":
default:
echo "Source code on Github";
break;
}
?></a>
</li>
</ul>
</div>
</div>
<p>Designed and built with all the love in the world by <a href="https://twitter.com/mdo" target="_blank">@mdo</a> and <a href="https://twitter.com/fat" target="_blank">@fat</a>.</p>
<p>Maintained by the <a href="https://github.com/orgs/twbs/people">core team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</p>
<p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
<ul class="bs-docs-footer-links muted">
<li>Currently v3.3.1</li>
<li>&middot;</li>
<li><a href="https://github.com/twbs/bootstrap">GitHub</a></li>
<li>&middot;</li>
<li><a href="../getting-started/#examples">Examples</a></li>
<li>&middot;</li>
<li><a href="../2.3.2/">v2.3.2 docs</a></li>
<li>&middot;</li>
<li><a href="../about/">About</a></li>
<li>&middot;</li>
<li><a href="http://expo.getbootstrap.com">Expo</a></li>
<li>&middot;</li>
<li><a href="http://blog.getbootstrap.com">Blog</a></li>
<li>&middot;</li>
<li><a href="https://github.com/twbs/bootstrap/issues">Issues</a></li>
<li>&middot;</li>
<li><a href="https://github.com/twbs/bootstrap/releases">Releases</a></li>
</ul>
</div>
</footer>
<!-- Bootstrap core JavaScript

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="<?php echo $lang; ?>">
<head>
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
@ -9,16 +9,14 @@
<meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, bootstrap, front-end, frontend, web development">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<title>
Components &middot; Bootstrap
</title>
<title>AlternC<?php if ($title) { echo " - ".$title; } ?></title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/docs.min.css">
<!--[if lt IE 9]><script src="assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="assets/js/ie-emulation-modes-warning.js"></script>
@ -35,62 +33,16 @@
</head>
<body>
<style type="text/css">
#bandeauzero {
width:100%; height:44px;
}
#bandeaulautre {
position: fixed; left: 0; width:100%; min-height:32px; background:#eee; border-bottom: 1px solid #ccc; font-family: sans-serif;
font-size: 14px !important; color:black; padding-top: 4px; margin-bottom: 6px; z-index: 100;
}
#bandeaulautre .home {
float:left; text-align:left; display:block; padding:0px 0px 0px 12px;
}
#bandeaulautre .links {
float:right; text-align:right; display:block; padding:0px 6px 0px 0px;
}
#bandeaulautre a,
#bandeaulautre a:link,
#bandeaulautre a:active,
#bandeaulautre a:visited {
color: black; text-decoration:none; margin: 0 8px;
}
#bandeaulautre a:hover {
color:#F4520A;
}
#bandeaulautre img {
margin: 0; padding: 0 8px; vertical-align: middle;
}
</style>
<div id="bandeaulautre">
<span class="home">
<a href="http://www.alternc.com"> <img src="alternc.png">
AlternC panel d'hébergement</a>
<a href="http://www.alternc.com/install">Installation & Mise à jour</a>
<a href="http://www.aide-alternc.org/">Documentation</a>
<a href="http://www.alternc.org/">Site des développeurs</a>
</span>
<span class="links">
<a href="http://demo.alternc.org">Démonstration</multi></a>
<a href="http://www.alternc.net/">Service DNS</a>
<a href="irc://irc.freenode.net/#alternc">Chat IRC</a>
<a href="https://www.github.com/alternc">Code source</a>
<img src="compass.png">
</span>
</div>
<div id="bandeauzero">
</div>
<!-- Docs page layout -->
<div class="bs-docs-header" id="content">
<div class="container">
<h1>Components</h1>
<p>Over a dozen reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more.</p>
<div style="float: left; padding-right: 30px">
<a href="/"><img src="logo.png" alt="AlternC" /></a>
</div>
<h1><a href="/">AlternC</a></h1>
<p>Suite logicielle de gestion de serveur web & mail</p>
<?php if ($title) { echo "<p>".$title."</p>"; } ?>
</div>
</div>

View File

@ -1,9 +1,19 @@
<?php
header("Content-Type: text/html; charset=UTF-8");
switch ($lang) {
case "fr":
$title="";
break;
case "en":
default:
$title="";
break;
}
require_once("head.php");
$f=fopen("../install.php","rb");
$f=fopen("../home_".$lang.".html","rb");
$headings=array();
$cur=array(); $id=""; $name="";
while ($s=fgets($f,1024)) {

49
doc/www/install.php Normal file
View File

@ -0,0 +1,49 @@
<?php
header("Content-Type: text/html; charset=UTF-8");
switch ($lang) {
case "fr":
$title="Documentation d'installation";
break;
case "en":
default:
$title="Install Documentation";
break;
}
require_once("head.php");
$f=fopen("../install_".$lang.".html","rb");
$headings=array();
$cur=array(); $id=""; $name="";
while ($s=fgets($f,1024)) {
echo $s;
if (preg_match('#<h1 id="([^"]*)">([^<]*)</h1>#',$s,$mat)) {
if ($id) $headings[]=array("id"=>$id, "name"=>$name, "cur"=>$cur);
$id=$mat[1]; $name=$mat[2];
$cur=array();
}
if (preg_match('#<h2 id="([^"]*)">([^<]*)</h2>#',$s,$mat)) {
$cur[]=array("id"=>$mat[1], "name"=>$mat[2]);
}
}
if ($id) $headings[]=array("id"=>$id, "name"=>$name, "cur"=>$cur);
ob_start();
foreach($headings as $v) {
?>
<li>
<a href="#<?php echo $v["id"]; ?>"><?php echo $v["name"]; ?></a>
<?php if (count($v["cur"])) { ?>
<ul class="nav">
<?php foreach($v["cur"] as $vv) { ?>
<li><a href="#<?php echo $vv["id"]; ?>"><?php echo $vv["name"]; ?></a></li>
<?php } ?>
</ul>
<?php } ?>
</li>
<?php
}
$index=ob_get_clean();
require_once("foot.php");

BIN
doc/www/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -1,23 +0,0 @@
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
<ul class="nav navbar-nav">
<li>
<a href="../getting-started/">Getting started</a>
</li>
<li>
<a href="../css/">CSS</a>
</li>
<li class="active">
<a href="../components/">Components</a>
</li>
<li>
<a href="../javascript/">JavaScript</a>
</li>
<li>
<a href="../customize/">Customize</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="http://expo.getbootstrap.com" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Expo');">Expo</a></li>
<li><a href="http://blog.getbootstrap.com" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Blog');">Blog</a></li>
</ul>
</nav>

48
doc/www/router.php Normal file
View File

@ -0,0 +1,48 @@
<?php
// List here the supported languages :
$otherlang=array(
"fr" => "Français",
"en" => "English"
);
$uri=trim($_SERVER["REQUEST_URI"],"/");
// auto lang redirect:
if (!$uri) {
$lang="en";
if (isset($_SERVER["ACCEPT_LANGUAGE"])) {
$l=substr($_SERVER["ACCEPT_LANGUAGE"],0,2);
if (isset($otherlang[$l])) {
$lang=$l;
}
}
header("Location: /".$lang);
exit();
}
list($lang,$uri)=explode("/",$uri,2);
if (!isset($otherlang[$lang])) {
header("HTTP/1.0 404 Not Found");
echo "<h1>Lang not supported</h1>";
exit();
}
unset($otherlang[$lang]);
// Now we spit the proper page:
switch ($uri) {
case "install":
require_once("install.php");
exit();
case "":
require_once("home.php");
exit();
default:
header("HTTP/1.0 404 Not Found");
echo "<h1>Page not found</h1>";
exit();
}