Personnaliser l'interface
Il est tout à fait possible de personnaliser plus avant l'interface de la page d'accueil de votre PirateBox.
La capture suivante a été réalisée avec l'extension FireShot [fr] pour Firefox. Il faut modifier le fichier /opt/piratebox/www/content/index.html
pour obtenir l'affichage suivant : j'ai placé en commentaires le chat de la PirateBox et ajouté 3 encarts qui pointent vers les 3 sous-rubriques personnalisées du répertoire Shared
. Quelques connaissances de base en langage HTML sont nécessaires pour personnaliser ce fichier (vous trouverez plein de tutos sur ce thème sur internet).
<html>
<head>
<link rel="stylesheet" href="/content/css/page_style.css">
<title>BiotechnoBox - Ressources pédagogiques</title>
<script src="/content/js/jquery.min.js"></script>
<script src="/content/js/scripts.js"></script>
<link rel="stylesheet" href="/css/jquery-ui.min.css">
<script src="/content/js/jquery-ui.min.js"></script>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
<link rel="prefetch" type="application/l10n" href="locales/locales.ini" />
<script type="text/javascript" src="/content/js/l10n.js"></script>
</head>
<body id="main-index">
<header id="header">
<div class="container">
<a href="/">
<div id="logo" scrolling="no" > </div>
</a>
<div id="menu-icon"></div>
<nav id="top-nav">
<ul>
<li><a href="/" class="current" data-l10n-id="navbarHome">Home</a></li>
<!-- <li><a href="/board/" data-l10n-id="navbarForum">Forum</a></li> -->
<li><a href="/Shared/" data-l10n-id="navbarFiles">Files</a></li>
<li><a href="#about" data-l10n-id="navbarAbout">About</a></li>
</ul>
</nav>
</div>
</header>
<section id="content">
<div class="container">
<div id="welcome">
<div id="greeting" class="card">
<h2 data-l10n-id="welcomeWelcome">Welcome</h2>
<p data-l10n-id="welcomeDescription">Now, first of all, there is nothing illegal or scary going on here. This is a social place where you can chat and share files with people around you, <strong data-l10n-id="anonymously">anonymously</strong>! This is an off-line network, specially designed and developed for file-sharing and chat services. Staying off the grid is a precaution to maintain your full anonymity. Please have fun, chat with people, and feel free to share any files you may like.</p>
<input id="thanks" class="button" type="submit" value="Thanks" data-l10n-id="welcomeThanksButton">
</div>
</div>
<!-- ajout des 3 divs suivantes par Patrice HARDOUIN -->
<div id="greeting" class="card">
<h2>Vidéos</h2>
<img height=100px src="/content/img/cinema-penguin-300px.png"/>
<p>Visionnez les dernières vidéos proposées par votre professeur</p>
<a href="../Shared/VIDEOS"><strong>> VIDÉOS <</strong></a>
</div>
<div id="greeting" class="card">
<h2>Livres</h2>
<img height=100px src="/content/img/bookworm-penguin-300px.png"/>
<p>Lisez les derniers livres mis à disposition par votre professeur</p>
<a href="../Shared/LIVRES"><strong>> LIVRES <</strong></a>
</div>
<div id="greeting" class="card">
<h2>Cours</h2>
<img height=100px src="/content/img/surgeon-penguin-300px.png"/>
<p>Consultez les derniers cours élaborés par votre professeur</p>
<a href="../Shared/COURS"><strong>> COURS <</strong></a>
</div>
<div id="sidebar">
<div id="upload" class="card">
<h2 data-l10n-id="sidebarUpload">Upload</h2>
<iframe width="100%" height="80" src='http://piratebox.lan:8080' data-l10n-id="sidebarIframeNotSupported" scrolling="no">
Your browser does not support iframes.. If you want to upload something, follow this <a href='http://piratebox.lan:8080' data-l10n-id="link">Link</a>.
</iframe>
<h3><a href="/Shared" data-l10n-id="sidebarBrowseFiles">Browse Files -></a></h3>
<div id="station"></div>
</div>
<div id="diskusagecard" class="card">
<h2 data-l10n-id="diskUsage" >Disk Usage</h2>
<div id="diskusage"></div>
<div id="refresh-diskusage">
<form method="POST" name="diskusage" id="du_form" >
<input class="button" type="submit" name="refresh" value="Refresh" data-l10n-id="refreshButton" id="du_form_button" title="Disk usage can only be refreshed every 5 minutes">
</form>
</div>
</div>
</div>
<!-- mise en commentaires par Patrice HARDOUIN -->
<!-- <div id="main">
<div id="chat" class="card">
<h2 data-l10n-id="mainChatChat">Chat</h2>
<div id="shoutbox" class="shoutbox_content"></div>
<form method="POST" name="psowrte" id="sb_form" onsubmit='getTime();'>
<div id="shoutbox-input">
<input class="nickname" type="text" name="name" value="Anonymous" placeholder="Nickname" data-l10n-id="mainChatName" >
<input class="message" type="text" name="data" placeholder="Message..." data-l10n-id="mainChatMessage" >
<input class="button" type="submit" name="submit" value="Send" id="send-button" data-l10n-id="mainChatSend" >
</div>
<div id="shoutbox-options">
<h3 data-l10n-id="mainChatTextColor">Text Color:</h3>
<label for="def" class="bg-black" data-l10n-id="mainShoutboxDefault"> <input name="color" type="radio" value="def" id="def" checked>Default</label>
<label for="blue" class="bg-blue" data-l10n-id="mainShoutboxBlue"> <input name="color" type="radio" value="blue" id="blue">Blue</label>
<label for="green" class="bg-green" data-l10n-id="mainShoutboxGreen"> <input name="color" type="radio" value="green" id="green">Green</label>
<label for="orange" class="bg-orange" data-l10n-id="mainShoutboxOrange"> <input name="color" type="radio" value="orange" id="orange">Orange</label>
<label for="red" class="bg-red" data-l10n-id="mainShoutboxRed"> <input name="color" type="radio" value="red" id="red">Red</label>
</div>
<input type="hidden" name="timestamp" id="timestamp">
<script language='JavaScript'>
function getTime(){
var date = new Date();
var timestamp = Math.round(date.getTime() / 1000);
document.getElementById('timestamp').value = timestamp;
}
</script>
</form>
</div>
</div>
</div> -->
</section>
<footer id="about">
<div class="container">
<div id="details">
<p class="to-top"><a href="#header" data-l10n-id="footerBackToTop">Back to top</a></p>
<h2 data-l10n-id="footerAbout">About PirateBox</h2>
<p data-l10n-id="footerInspired">Inspired by pirate radio and the free culture movement, PirateBox is a self-contained mobile collaboration and file sharing device. PirateBox utilizes Free, Libre and Open Source software (FLOSS) to create mobile wireless file sharing networks where users can anonymously share images, video, audio, documents, and other digital content.</p>
<p data-l10n-id="footerFilesTopSafety">PirateBox is designed to be safe and secure. No logins are required and no user data is logged. The system is purposely not connected to the Internet in order to prevent tracking and preserve user privacy.</p>
<small data-l10n-id="footerLicenceMain">PirateBox is licensed under GPLv3.</small>
</div>
</div>
</footer>
</body>
</html>
Méthode : Personnalisation des messages
Les messages sont traduits dans le fichier /opt/piratebox/www/content/locales/data.fr.properties
et il suffit de les éditer pour les adapter.
Exemple : Personnaliser les images et logos
Les logos sont présents dans le répertoire /opt/piratebox/www/content/img/
. Les tailles ont été récupérées et des images personnalisées ont été réalisées dans Inkscape [fr] puis nommées à l'identique pour éviter d'avoir à reprendre tous les scripts avec de nouveaux noms de fichiers.
Pour le fichier favicon.ico
il s'agit d'une image au format gif
de 6 pixels sur 6 et renommée avec l'extension .ico
.
Complément : Génération d'un QRcode pour http://piratebox.lan
Si vous voulez un QRCode pointant vers l'adresse http://piratebox.lan
vous pouvez récupérer celui-ci ou en créer un nouveau identique avec la commande suivante (sous GNU/Linux) :
qrencode http://piratebox.lan/ -s 10 -o qrcode_piratebox.png
. C'est très pratique pour l'imprimer et l'afficher dans la classe (pour les apprenants qui n'arrivent pas à se connecter en saisissant l'adresse).
![](../res/biotechnobox.png)