com web/doc: New homepage: include/lib_general.inc.php templates/all/www/home.tpl.php www/index.php
| From: | sobak@php.net | Date: | Thu, 20 Mar 2014 17:52:54 +0000 |
| Subject: | com web/doc: New homepage: include/lib_general.inc.php templates/all/www/home.tpl.php www/index.php | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-2318@lists.php.net to get a copy of this message | ||
Commit: 87e71fc492382a38e29471f1c1fb961140074e82
Author: Sobak <msobaczewski@gmail.com> Thu, 20 Mar 2014 18:52:54 +0100
Parents: d833d6a7dec88c327b05482f98a7e24cb1d189ae
Branches: master
Link: http://git.php.net/?p=web/doc.git;a=commitdiff;h=87e71fc492382a38e29471f1c1fb961140074e82
Log:
New homepage
Changed paths:
M include/lib_general.inc.php
D templates/all/www/home.tpl.php
M www/index.php
Diff:
diff --git a/include/lib_general.inc.php b/include/lib_general.inc.php
index f16aa31..a942d72 100644
--- a/include/lib_general.inc.php
+++ b/include/lib_general.inc.php
@@ -27,10 +27,11 @@ function get_svn_dir($project)
return $GLOBALS['PROJECTS'][$project][1] . '/';
}
-function site_header($full_screen = false)
+function site_header($has_sidebar = false)
{
$TITLE = 'Documentation Tools';
$SUBDOMAIN = 'doc';
+ $CSS = array('/styles/doc.css');
$LINKS = array(
array('href' => '/revcheck.php', 'text' =>
'Documentation Tools'),
array('href' => '/dochowto/', 'text' =>
'Documentation Howto'),
@@ -39,11 +40,11 @@ function site_header($full_screen = false)
require __DIR__ . '/../shared/templates/header.inc';
- if ($full_screen) {
- echo '<section class="fullscreen">';
+ if ($has_sidebar) {
+ echo '<section class="mainscreen">';
}
else {
- echo '<section class="mainscreen">';
+ echo '<section class="fullscreen">';
}
}
@@ -51,4 +52,37 @@ function site_footer($SECONDSCREEN = false)
{
echo '</section>';
require __DIR__ . '/../shared/templates/footer.inc';
+}
+
+function nav_languages()
+{
+ global $LANGUAGES;
+ $out = '<div class="panel">';
+ $out ..= '<p class="headline">Languages</p>';
+ $out .= '<div class="body">';
+ $out .= '<ul>';
+ foreach ($LANGUAGES as $code => $name)
+ {
+ $out .='<li><a
href="revcheck.php?lang='.$code.'">'.$name.'</a></li>';
+ }
+ $out .= '</ul></div></div>';
+ return $out;
+}
+
+function nav_tools($lang)
+{
+ global $LANGUAGES;
+ $out = '<div class="panel">';
+ $out .= '<p class="headline">Tools ('.$LANGUAGES[$lang].'
Manual)</p>';
+ $out .= '<div class="body">';
+ $out .= '<ul>';
+ $out .= '<li><a
href="revcheck.php?p=translators&lang='.$lang.'">Translators</a></li>';
+ $out .= '<li><a
href="revcheck.php?p=filesummary&lang='.$lang.'">File
summary</a></li>';
+ $out .= '<li><a
href="revcheck.php?p=files&lang='.$lang.'">Files</a></li>';
+ $out .= '<li><a
href="revcheck.php?p=misstags&lang='.$lang.'">Missing revision
numbers</a></li>';
+ $out .= '<li><a
href="revcheck.php?p=missfiles&lang='.$lang.'">Untranslated
files</a></li>';
+ $out .= '<li><a
href="revcheck.php?p=oldfiles&lang='.$lang.'">Not in EN
tree</a></li>';
+ $out .= '<li><a
href="revcheck.php?p=graph&lang='.$lang.'">Graph</a></li>';
+ $out .= '</ul></div></div>';
+ return $out;
}
\ No newline at end of file
diff --git a/templates/all/www/home.tpl.php b/templates/all/www/home.tpl.php
deleted file mode 100644
index c8ababf..0000000
--- a/templates/all/www/home.tpl.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<h2>&docweb.home.header.what-is;</h2>
-<p>
- &docweb.home.text.what-is;
-</p>
-
-<h2>&docweb.home..header.join-us;</h2>
-
-<p>
- &docweb.home.text.join-us;
-</p>
-
-<h2>&docweb.home.header.news-latest;</h2>
-
-<p>
- &docweb.home.text.news-latest;
-</p>
diff --git a/www/index.php b/www/index.php
index f39d780..df66b3a 100644
--- a/www/index.php
+++ b/www/index.php
@@ -1,11 +1,60 @@
<?php
-/* $Id$ */
-
include_once '../include/init.inc.php';
-echo site_header('docweb.common.header.welcome');
-echo DocWeb_Template::get('home.tpl.php');
+site_header(true);
+?>
+<style>.panel {
+ margin:0;
+ background:#E2E4EF;
+ border:1px solid #C4C9DF;
+ border-radius:2px;
+}
+
+.panel .headline, .panel .body, .panel > a {
+ padding:.75rem 1rem;
+ margin:0;
+}
+
+.panel .body {
+ background-color: #fff;
+ border-radius: 0 0 2px 2px;
+}
-echo site_footer();
+.panel ul {
+ margin: 0;
+ padding-left: 5px;
+}</style>
-?>
\ No newline at end of file
+<h2>What is this site?</h2>
+<p>There are different documentation
+teams operating somewhat independently on PHP.net subprojects. Only a
+few people are involved in more than one documentation project currently,
+and that limits the know-how sharing, which would otherwise be possible and
+desirable. All of the documentation teams use an early fork of the original
+PHP manual build system. These systems evolved independently, and took over
+some improvements from the others on an occasional basis (the PEAR
+documentation team uses a variant of the revcheck developed for phpdoc for
+example). This site is aimed at getting documentation efforts closer, and
+provide more tools and information for manual authors and translators.</p>
+
+<h2>Join Us!</h2>
+<p>The developers of PHP extensions all
+have access to the PHP documentation modules, although the different projects
+have different policies of accepting contributions. You are welcome to join
+our efforts! Authoring documentation for an extension is the second best thing
+to implementing the extension itself if you are interested in the
+capabilities, features and usage possibilities even in extreme conditions. We
+also have translated versions of the different manuals, and most of the
+translation teams are always in need of more helping hands. In case you are
+interested, you should contact the relevant mailing lists. The projects and
+translations have separate mailing lists.</p>
+
+<h2>Latest News!</h2>
+<p>On March 2014 site was almost totally rebuilded. Now it uses same design as
+new php.net pages. Many of tools and features has been removed, because they weren't used.
+If you think that site is lacking some of them, please contact us on
<code>php.webmaster</code>
+mailing list.</p>
+
+<?php
+$sidebar = nav_languages();
+echo site_footer($sidebar);
\ No newline at end of file