diff options
Diffstat (limited to 'site/common')
-rw-r--r-- | site/common/css/main.css | 7 | ||||
-rw-r--r-- | site/common/css/main.css.copying | 17 | ||||
-rw-r--r-- | site/common/footer.php | 24 | ||||
-rw-r--r-- | site/common/functions.php | 77 | ||||
-rw-r--r-- | site/common/variables.php | 133 |
5 files changed, 258 insertions, 0 deletions
diff --git a/site/common/css/main.css b/site/common/css/main.css new file mode 100644 index 0000000..a5f2023 --- /dev/null +++ b/site/common/css/main.css @@ -0,0 +1,7 @@ +*,a:hover{color:#222;padding:.2% .4%;margin:.6% auto} +html{background:#eee;font:90% sans-serif} +body{max-width:55em} +div{background:#fff;border-radius:8px;box-shadow:0 0 2px} +li{display:inline} +img{width:10%;float:right} +a{color:#33a;font-size:110%}
\ No newline at end of file diff --git a/site/common/css/main.css.copying b/site/common/css/main.css.copying new file mode 100644 index 0000000..d53cdb0 --- /dev/null +++ b/site/common/css/main.css.copying @@ -0,0 +1,17 @@ +/* + Main CSS file at main.css + Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ diff --git a/site/common/footer.php b/site/common/footer.php new file mode 100644 index 0000000..3265805 --- /dev/null +++ b/site/common/footer.php @@ -0,0 +1,24 @@ +<?php +/* + Footer + Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +?> + <div> + <p> + <?php echo gettext("This page is available under <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">GNU AGPLv3 or higher</a>, from a "); ?> <a href="<?php echo $lbWebsiteGitwebAddress; ?>"><?php echo gettext("git repository"); ?></a>. + </p> + </div> diff --git a/site/common/functions.php b/site/common/functions.php new file mode 100644 index 0000000..e0cda47 --- /dev/null +++ b/site/common/functions.php @@ -0,0 +1,77 @@ +<?php +/* + Generic functions used by the rest of the site + Copyright (C) 2015 Francis Rowe <info@gluglug.org.uk> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +/* Functions */ + + /* Minified HTML output (note: needs work for <pre> tags) */ + function miniHtml($strHtml) { + return $strHtml = preg_replace( + array("/\r|\n/", "/(\s)+/s", "/\>[^\S ]+/s", "/[^\S ]+\</s"), + array("", "\\1", ">", "<"), + $strHtml + ); + } + + /* Minified CSS output */ + function miniCss($strCss) { + return preg_replace("/\r|\n/", "", $strCss); + } + + /* Generic function for showing a list of URLs */ + function mirrorList($arrayMirrors,$strNotFoundMessage,$forIndexStart,$forIndexbelow) { + + if (count($arrayMirrors)>0) { + for ($server=$forIndexStart; $server<$forIndexbelow; $server++) { +?> + <p><a href="<?php echo $arrayMirrors[$server][0]; ?>"><?php echo $arrayMirrors[$server][0]; ?></a> (<?php echo $arrayMirrors[$server][1]; ?>)</p> +<?php + } + } else { +?> + <p><?php echo $strNotFoundMessage; ?></p> +<?php + } + } + + /* List rsync mirroring instructions */ + function rsyncList($arrayRsync,$strNotFoundMessage,$forIndexStart,$forIndexBelow) { + if ( + count($arrayRsync)>0 && ($forIndexStart<=count($arrayRsync)-1) + && ($forIndexBelow<=count($arrayRsync)) && ($forIndexStart<=$forIndexBelow)) { + + for ($server=$forIndexStart; $server<$forIndexBelow; $server++) { +?> + <h2> + <?php echo $arrayRsync[$server][1]; ?> + </h2> + <p> + <b>rsync -avxP --delete --stats <?php echo $arrayRsync[$server][0]; ?> /path/to/docroot/libreboot/</b> + </p> +<?php + } + + } else { +?> + <p> + <?php echo $strNotFoundMessage; ?> + </p> +<?php + } + } +?> diff --git a/site/common/variables.php b/site/common/variables.php new file mode 100644 index 0000000..de12346 --- /dev/null +++ b/site/common/variables.php @@ -0,0 +1,133 @@ +<?php +/* + A number of variables that are used by the whole site + Copyright (C) 2015 Francis Rowe <info@gluglug.org.uk> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +?> +<?php + /* Project home page */ + $lbHomepage = "http://libreboot.org/"; + + /* Main git repositories */ + $lbFirmwareGitRepoAddress = "git://git.savannah.nongnu.org/libreboot.git"; + $lbFirmwareGitwebAddress = "http://git.savannah.gnu.org/cgit/libreboot.git"; + $lbWebsiteGitRepoAddress = "https://notabug.org/fchmmr/libreboot-website.git"; + $lbWebsiteGitwebAddress = "https://notabug.org/fchmmr/libreboot-website/commits/master"; + /* Backup git repositories */ + $lbFirmwareBackupGitRepoAddress = array( + "https://notabug.org/fchmmr/libreboot.git", + "git://git.pehjota.net/libreboot-backup/libreboot.git" + ); + $lbWebsiteBackupGitRepoAddress = array( + "git://git.pehjota.net/libreboot-backup/libreboot.org.git" + ); + + /* HTTP mirrors (for release archives) */ + $lbHttpMirror = array( + array("http://mirrors.mit.edu/libreboot/","MIT University, USA"), + array("http://www.mirrorservice.org/sites/libreboot.org/release/","University of Kent, UK"), + array("https://freedombox.org/libreboot/","freedombox.org, Switzerland"), + array("http://elmondo74.fr/libreboot/","elmondo74.fr, France"), + array("http://elgrande74.net/libreboot/","elgrande74.net, France"), + array("http://mirror.linux.ro/libreboot/","linux.ro, Romania"), + array("https://ginette.swordarmor.fr/libreboot/","swordarmor.fr, France"), + array("http://ginette.swordarmor.fr/libreboot/","swordarmor.fr, France"), + array("http://libreboot.nedson.net/","nedson.net, Canada") + ); + /* FTP mirrors (for release archives) */ + $lbFtpMirror = array( + array("ftp://ftp.mirrorservice.org/sites/libreboot.org/release/","University of Kent, UK"), + array("ftp://ftp.linux.ro/libreboot/","linux.ro, Romania") + ); + + /* rsync servers (for release archives). Put the main one first */ + $lbRsyncServer = array ( + array("rsync.libreboot.org::mirrormirror","Libreboot project, UK (main rsync mirror)"), + array("rsync://rsync.mirrorservice.org/libreboot.org/release/","University of Kent, UK (backup mirror)"), + array("rsync://ftp.linux.ro/libreboot/","linux.ro, Romania (backup mirror)") + ); + + /* Bug tracker URL */ + $lbBugTrackerAddress = "http://projects.mtjm.eu/projects/libreboot"; + + /* Links to mailing lists */ + $userMailingListAddress = "https://lists.nongnu.org/mailman/listinfo/libreboot"; + $devMailingListAddress = "https://lists.nongnu.org/mailman/listinfo/libreboot-dev"; + + /* IRC channel */ + $ircChannelName = "#libreboot (FreeNode IRC)"; + $ircChannelAddress = "https://webchat.freenode.net/?channels=libreboot"; + + /* GPG key info */ + $lbProjectGpgKeyInfo = "pub 4096R/656F212E 2014-07-04 Libreboot Releases (signing key) <releases@libreboot.org><br/>Fingerprint=C923 4BA3 200C F688 9CC0 764D 6E97 D575 656F 212E "; + $lbProjectGpgKeyID = "0x656F212E"; + + /* release list. format is: version number, then date of release */ + /* latest releases first, earlier releases are at the bottom */ + $lbRelease = array ( + array ( + array("20150518", "2015-05-18") + ), + array ( + array("20150208", "2015-02-08") + ), + array ( + array("20150126", "2015-01-26") + ), + array ( + array("20150124", "2015-01-24") + ), + array ( + array("20141015", "2014-10-15") + ), + array ( /* old name: Release 6, beta 7 */ + array("20140911", "2014-09-11") + ), + array ( /* old name: Release 6, beta 6 */ + array("20140903", "2014-09-03") + ), + array ( /* old name: Release 6, beta 5 */ + array("20140811", "2014-08-11") + ), + array ( /* old name: Release 6, beta 4 */ + array("20140729", "2014-07-29") + ), + array ( /* old name: Release 6, beta 3 */ + array("20140720", "2014-07-20") + ), + array ( /* old name: Release 6, beta 2 */ + array("20140716", "2014-07-16") + ), + array ( /* old name: Release 6, beta 1 */ + array("20140711", "2014-07-11") + ), + array ( /* old name: Release 5 */ + array("20140622", "2014-06-22") + ), + array ( /* old name: Release 4 */ + array("20140221", "2014-02-21") + ), + array ( /* old name: Release 3 */ + array("20131214", "2013-12-14") + ), + array ( /* old name: Release 2 */ + array("20131213", "2013-12-13") + ), + array ( /* old name: Release 1 */ + array("20131212", "2013-12-12") + ) + ); +?> |