Add instructions page
parent
16d70f3c6b
commit
83a80590f7
@ -0,0 +1,20 @@
|
|||||||
|
header {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#instructions {
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.instructions {
|
||||||
|
display: none;
|
||||||
|
/* Inconsistent with rest of content */
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.25em;
|
||||||
|
line-height: 1.5;
|
||||||
|
padding: 2em;
|
||||||
|
background-color: silver;
|
||||||
|
border: 2px solid black;
|
||||||
|
border-radius: 1em;
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
On mobile:
|
||||||
|
|
||||||
|
|
||||||
|
- Click the Copy button to copy the Join URL.
|
||||||
|
- Open Session, tap the plus button and choose "Join Community".
|
||||||
|
- Tap the "Enter Community URL" field, paste your URL and tap "Join".
|
||||||
|
|
||||||
|
|
||||||
|
On mobile, with this site open on your PC:
|
||||||
|
|
||||||
|
- Click the QR Code button for your chosen community on your PC.
|
||||||
|
- Open Session, tap the plus button and choose "Join Community".
|
||||||
|
- Choose "Scan QR Code" at the top and point your phone camera at the QR code.
|
@ -0,0 +1,5 @@
|
|||||||
|
Ĉe poŝtelefono:
|
||||||
|
|
||||||
|
- Klaki sur la butono "Copy" por kopii la kuniĝa ligilo.
|
||||||
|
- Malfermi Session-on, frapeti sur la plus-a butono kaj elekti "Kuniĝi komunumon".
|
||||||
|
- Frapeti sur "Entajpi komunuma liĝilo", elpoŝigi via ligilo kaj frapeti sur "Kuniĝi".
|
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
include_once "+getenv.php";
|
||||||
|
$instruction_files = glob("+instructions/*.txt");
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<?php include "+components/page-head.php" ?>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="css/instructions.css">
|
||||||
|
<style type="text/css">
|
||||||
|
<?php foreach ($instruction_files as $i => $file): ?>
|
||||||
|
#language-selection-<?=$i?>:checked ~
|
||||||
|
#instructions #instructions-<?=$i?> {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>Instructions for joining Session Communities</h1>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
Choose your language:
|
||||||
|
<?php foreach ($instruction_files as $i => $file): ?>
|
||||||
|
<br>
|
||||||
|
<input
|
||||||
|
id="language-selection-<?=$i?>"
|
||||||
|
class="language-selection"
|
||||||
|
name="language"
|
||||||
|
type="radio"
|
||||||
|
>
|
||||||
|
<label for="language-selection-<?=$i?>">
|
||||||
|
<?=
|
||||||
|
// Name of the language
|
||||||
|
// Can be later parsed from i.e. first line of file
|
||||||
|
pathinfo($file)['filename']
|
||||||
|
?>
|
||||||
|
</label>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
|
||||||
|
<article id="instructions">
|
||||||
|
<?php foreach ($instruction_files as $i => $file): ?>
|
||||||
|
<section id="instructions-<?=$i?>" class="instructions"><?php
|
||||||
|
// Sanitization as second layer of protection
|
||||||
|
// for user-submitted instruction files.
|
||||||
|
// Should not ever have to be used.
|
||||||
|
$content = trim(file_get_contents($file));
|
||||||
|
$content = htmlentities($content);
|
||||||
|
// Minimal formatting so that contributions are easier
|
||||||
|
$content = str_replace("\n-", "\n\n•", $content);
|
||||||
|
$content = str_replace("\n\n\n", "<br><br>", $content);
|
||||||
|
$content = str_replace("\n\n", "<br>", $content);
|
||||||
|
echo $content;
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
Reference in New Issue