web: tweaks to sample home page

- if logged in, suggest recruiting friends and running on other devices
- move project description to a separate file
    (html/project/project_description.php").
    The eliminates the need to customize index.php
This commit is contained in:
David Anderson 2018-06-06 16:32:09 -07:00
parent ad55c5efbc
commit b3eebff65d
1 changed files with 24 additions and 16 deletions

View File

@ -90,22 +90,28 @@ function left(){
', ',
tra('Continue to your home page') tra('Continue to your home page')
); );
} else { echo "<p><p>";
echo " echo sprintf('%s
<p>
XXX is a research project, based at <a href=#>YYY</a>,
that uses Internet-connected
computers to do research in XXX.
You can contribute to our research
by running a free program on your computer.
</p>
";
echo "
<ul> <ul>
<li> <a href=#>Our research</a> <li> %s
<li> <a href=#>Our team</a> <li> %s
</ul> </ul>
"; ',
tra("Want to help more?"),
tra("Install BOINC on your other computers, tablets, and phones."),
tra("Tell your friends about BOINC, and show them how to join %1.", PROJECT)
);
} else {
echo "<p>";
$pd = "../project/project_description.php";
if (file_exists($pd)) {
include($pd);
} else {
echo "No project description yet. Create a file html/project/project_description.php
that prints a short description of your project.
";
}
echo "</p>\n";
if (NO_COMPUTING) { if (NO_COMPUTING) {
echo " echo "
<a href=\"create_account_form.php\">Create an account</a> <a href=\"create_account_form.php\">Create an account</a>
@ -116,7 +122,9 @@ function left(){
$x = $project_id?"signup.php":"join.php"; $x = $project_id?"signup.php":"join.php";
echo '<center><a href="'.$x.'" class="btn btn-success"><font size=+2>'.tra('Join %1', PROJECT).'</font></a></center> echo '<center><a href="'.$x.'" class="btn btn-success"><font size=+2>'.tra('Join %1', PROJECT).'</font></a></center>
'; ';
echo "<p><p>".tra("Already joined? %1Log in%2.",
"<a href=login_form.php>", "</a>"
);
} }
} }
} }
@ -125,7 +133,7 @@ function left(){
if (!$stopped) { if (!$stopped) {
$profile = get_current_uotd(); $profile = get_current_uotd();
if ($profile) { if ($profile) {
panel('User of the Day', panel(tra('User of the Day'),
function() use ($profile) { function() use ($profile) {
show_uotd($profile); show_uotd($profile);
} }