summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2014-12-23 23:02:52 +0000
committerGreg Roach <fisharebest@gmail.com>2015-01-17 15:04:59 +0000
commit07b70ae14d34ec3d428f7482e6df3ea0b1e7ef47 (patch)
tree990e6fb7b84c3e4857579718ae7e6cc3eadcd047 /themes
parent949a371536b689d2282ab562e3c8c1bae1cfcfb8 (diff)
downloadwebtrees-07b70ae14d34ec3d428f7482e6df3ea0b1e7ef47.tar.gz
webtrees-07b70ae14d34ec3d428f7482e6df3ea0b1e7ef47.tar.bz2
webtrees-07b70ae14d34ec3d428f7482e6df3ea0b1e7ef47.zip
New theme system and admin interface
Diffstat (limited to 'themes')
-rw-r--r--themes/_administration/css-1.6.2/paper_fibers.pngbin0 -> 74094 bytes
-rw-r--r--themes/_administration/css-1.6.2/paper_fibers_@2X.pngbin0 -> 43232 bytes
-rw-r--r--themes/_administration/css-1.6.2/style.css354
-rw-r--r--themes/_administration/footer.php26
-rw-r--r--themes/_administration/header.php164
-rw-r--r--themes/_administration/theme.php30
-rw-r--r--themes/_custom/theme.php104
-rw-r--r--themes/clouds/css-1.6.2/style.css3
-rw-r--r--themes/clouds/footer.php45
-rw-r--r--themes/clouds/header.php116
-rw-r--r--themes/clouds/templates/block_main_temp.php49
-rw-r--r--themes/clouds/templates/block_small_temp.php51
-rw-r--r--themes/clouds/templates/compactbox_template.php45
-rw-r--r--themes/clouds/templates/personbox_template.php52
-rw-r--r--themes/clouds/theme.php112
-rw-r--r--themes/colors/css-1.6.2/style.css3
-rw-r--r--themes/colors/footer.php45
-rw-r--r--themes/colors/header.php126
-rw-r--r--themes/colors/templates/block_main_temp.php49
-rw-r--r--themes/colors/templates/block_small_temp.php51
-rw-r--r--themes/colors/templates/compactbox_template.php45
-rw-r--r--themes/colors/templates/personbox_template.php52
-rw-r--r--themes/colors/theme.php193
-rw-r--r--themes/fab/css-1.6.2/style.css3
-rw-r--r--themes/fab/footer.php36
-rw-r--r--themes/fab/header.php103
-rw-r--r--themes/fab/templates/block_main_temp.php35
-rw-r--r--themes/fab/templates/block_small_temp.php35
-rw-r--r--themes/fab/templates/compactbox_template.php45
-rw-r--r--themes/fab/templates/personbox_template.php52
-rw-r--r--themes/fab/theme.php90
-rw-r--r--themes/minimal/css-1.6.2/style.css3
-rw-r--r--themes/minimal/footer.php40
-rw-r--r--themes/minimal/header.php103
-rw-r--r--themes/minimal/templates/block_main_temp.php43
-rw-r--r--themes/minimal/templates/block_small_temp.php43
-rw-r--r--themes/minimal/templates/compactbox_template.php45
-rw-r--r--themes/minimal/templates/personbox_template.php52
-rw-r--r--themes/minimal/theme.php93
-rw-r--r--themes/webtrees/css-1.6.2/style.css3
-rw-r--r--themes/webtrees/footer.php46
-rw-r--r--themes/webtrees/header.php96
-rw-r--r--themes/webtrees/templates/block_main_temp.php43
-rw-r--r--themes/webtrees/templates/block_small_temp.php43
-rw-r--r--themes/webtrees/templates/compactbox_template.php45
-rw-r--r--themes/webtrees/templates/personbox_template.php52
-rw-r--r--themes/webtrees/theme.php94
-rw-r--r--themes/xenea/css-1.6.2/style.css9
-rw-r--r--themes/xenea/footer.php45
-rw-r--r--themes/xenea/header.php108
-rw-r--r--themes/xenea/templates/block_main_temp.php43
-rw-r--r--themes/xenea/templates/block_small_temp.php43
-rw-r--r--themes/xenea/templates/compactbox_template.php45
-rw-r--r--themes/xenea/templates/personbox_template.php52
-rw-r--r--themes/xenea/theme.php91
55 files changed, 151 insertions, 3243 deletions
diff --git a/themes/_administration/css-1.6.2/paper_fibers.png b/themes/_administration/css-1.6.2/paper_fibers.png
new file mode 100644
index 0000000000..2d93493f86
--- /dev/null
+++ b/themes/_administration/css-1.6.2/paper_fibers.png
Binary files differ
diff --git a/themes/_administration/css-1.6.2/paper_fibers_@2X.png b/themes/_administration/css-1.6.2/paper_fibers_@2X.png
new file mode 100644
index 0000000000..6a9fc6a6e4
--- /dev/null
+++ b/themes/_administration/css-1.6.2/paper_fibers_@2X.png
Binary files differ
diff --git a/themes/_administration/css-1.6.2/style.css b/themes/_administration/css-1.6.2/style.css
index 50a4e25869..837d96a82e 100644
--- a/themes/_administration/css-1.6.2/style.css
+++ b/themes/_administration/css-1.6.2/style.css
@@ -19,86 +19,49 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* Add a permanent scrollbar, to prevent "flickering" when hover effects lengthen page */
-html {
- overflow-y: scroll;
+/* Some menus (e.g. languages) can be longer than a page */
+.dropdown-menu {
+ max-height: 320px;
+ overflow-x: hidden;
}
-/* general styles */
-body {
- font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
- font-size: 12px;
- margin: 10px;
- min-width: 800px;
+/* Provide visual feedback for invalid and missing fields */
+[pattern]:valid,
+[required]:valid {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAONJREFUeNpi/P//PwMlgImBQjDwBrCgCzDOF2Zg+Adk/AOGDRvQfHZGoDWMxgyMDMb/Q1/NIt0F/xk8gIbNZPj7P41YL4AUGsM1//rfkuyeYMzw8z9xXgBqgNm0nuHnv0D/IH/juavmngV6oYY4F3z7y2DqY2oMpANB9MYl684yfP9Xw3Dzzw7sXgQmJGTM0MbjwdDKc0b2vt5/EM2QwunBoMyCVS1YPYYAMOwZ7FmiGLLYzjBYsSQD+QpALAjErNgMYERPyoyMjMxAih+IOYD4LxD/hOJfQLV/MaJ9NC8wAAQYAPbPfH2KJKx/AAAAAElFTkSuQmCC) no-repeat right center;
}
-input.ui-button {
- padding: 1px 3px;
+[pattern]:invalid,
+[required]:invalid {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMpJREFUeNpi/P//PwMlgImBQjAMDGBBF1jFyOgBpFqAuOYPA8MOoAI4P+z//x0YJoBiARkvYWA486+k5D+IBuJqZD66WnAMogvMA9o4F6j4R3Lyf2R6IQODMVEGTAW6CoirgfjMB2/v/yB6CgNDYQ8W14IwRiB+A7rgOwNDYLChofGcrVvPgugfDAzR/yFhwUAwDJqBNj6Ulf0PooEhV4jMx+YCRvSknAeMBWDotwgwMKRzMTCcfQW0GcQHxkbNJCyxwDiaFxgAAgwAYy67YIOQ//cAAAAASUVORK5CYII=) no-repeat right center;
}
-input,
-textarea,
-select {
- border: 1px solid grey;
- color: #000;
- font: inherit;
- padding: 0 3px;
+[dir=rtl] [pattern]:invalid,
+[dir=rtl] [required]:invalid,
+[dir=rtl] [pattern]:invalid,
+[dir=rtl] [required]:invalid {
+ background-position: left center;
}
-button,
-input[type="submit"],
-input[type="reset"],
-input[type="button"],
-input[type="file"] {
- background: url(../jquery-ui-1.11.2/images/ui-bg_fine-grain_10_f8f7f6_60x60.png) 50% 50% #f8f7f6;
- border: 1px solid #cbc7bd;
- color: #654b24;
- font-weight: 700;
- border-radius: 3px;
- margin: 0.3em;
+/* Drag-n-drop sort handles for modules, etc. */
+.sortme {
+ cursor: move;
}
-button:hover,
-input[type="submit"]:hover,
-input[type="reset"]:hover,
-input[type="button"]:hover,
-input[type="file"]:hover {
- background: url(../jquery-ui-1.11.2/images/ui-bg_fine-grain_65_654b24_60x60.png) 50% 50% #654b24;
- border: 1px solid #654b24;
- color: #fff;
- font-weight: 700;
- border-radius: 3px;
+/* http://www.subtlepatterns.com */
+body {
+ background: url(paper_fibers.png);
}
-
-fieldset {
- margin: 8px 8px 4px;
+@media (min-device-pixel-ratio: 2) {
+ body {
+ background: url(paper_fibers_@2X.png);
+ }
}
-legend {
- font-style: italic;
- font-weight: bold;
- padding: 0 5px 5px;
- vertical-align: top;
-}
+/* http://bootstrapdesigntools.com */
-img {
- border: 0;
- vertical-align: middle;
-}
-h3 {
- margin: 0;
-}
-
-h4 {
- margin: 5px 3px;
- font-weight: normal;
- font-style: italic;
-}
-td {
- vertical-align: top;
-}
.icon {
border: 0;
@@ -135,165 +98,13 @@ a.accepted {
padding-right: 15px;
}
-.parentdeath {
- border: thin solid #f00;
- padding: 1px;
-}
-
-.submenu {
- background-color: #eee;
- border: thin solid #aaa;
- padding: 3px;
-}
-
-.rela {
- opacity: 0.4;
-}
-
-/* jQuery styling over-rides */
-.ui-widget-content a {
- text-decoration: none;
-}
-
-.ui-widget-content a.current {
- color: #e17009;
- font-weight: bold;
-}
-
-.ui-widget-content a:hover,
-.DataTables_sort_wrapper:hover {
- color: #f00;
- cursor: pointer;
-}
-
-.ui-widget-header {
- padding: 5px;
-}
-
-.ui-progressbar-value {
- height: 60% !important;
- background: #d3d3d3 !important;
-}
-
-.ui-accordion .ui-accordion-content-active {
- display: block;
-}
-
-.css_right {
- float: right;
-}
-[dir=rtl] .css_right {
- float: left;
-}
[dir=rtl] input {
padding-right: 3px;
padding-left: 0;
}
-[dir=rtl] .ui-tabs .ui-tabs-nav li {
- float: right;
-}
-
-/* jEditable styling over-rides */
-.editable:hover {
- color: #f00;
- cursor: pointer;
-}
-
-/* both cursors needed for cross-browser support */
-.editable input,
-select {
- padding: 0;
-}
-
-.editable input {
- font-size: 90%;
- height: 18px !important;
-}
-
-.editable button {
- font-size: 85%;
- padding: 0;
-}
-
-/* jQuery.datatable styling over-rides */
-.odd {
- background-color: #dfd;
-}
-
-.even {
- background-color: #efe;
-}
-
-.fg-button {
- padding: 2px 6px;
-}
-
-.dataTables_paginate {
- float: left;
-}
-
-.dataTables_processing {
- float: left;
- margin-top: 5px;
- padding-left: 5px;
-}
-
-.dataTables_filter {
- float: right;
-}
-
-.dataTables_info {
- float: left;
- margin-top: 5px;
- font-weight: normal;
-}
-
-.dataTables_length {
- float: right;
-}
-
-.dataTables_length select,
-.dataTables_filter input {
- font-size: 11px;
- padding: 1px;
-}
-
-.dataTables_wrapper th {
- white-space: nowrap;
-}
-
-.dt-clear {
- clear: both;
-}
-
-[dir=rtl] .dataTables_paginate {
- float: right;
-}
-
-[dir=rtl] .dataTables_processing {
- float: right;
-}
-
-[dir=rtl] .dataTables_filter {
- float: left;
-}
-
-[dir=rtl] .dataTables_info {
- float: right;
-}
-
-[dir=rtl] .dataTables_length {
- float: left;
-}
-
-/* Drag-n-drop sorting for modules, etc. */
-.sortme {
- cursor: move;
-}
-
/* Find special characters */
.largechars {
font-family: monospace;
@@ -318,100 +129,6 @@ select {
width: 24px;
}
-/* HEADER */
-#admin_head {
- position: relative;
- height: 70px;
- margin-bottom: 10px;
- min-width: 970px;
- z-index: 1000;
-}
-
-#title {
- position: absolute;
- left: 47%;
- top: 20px;
- font-size: 18px;
- font-weight: bold;
-}
-
-#info {
- position: absolute;
- right: 10px;
- bottom: 0;
- text-align: right;
-}
-
-[dir=rtl] #info {
- right: auto;
- left: 10px;
- text-align: left;
-}
-
-#links {
- position: absolute;
- left: 10px;
- bottom: 0;
- display: inline;
- margin-bottom: 5px;
- white-space: nowrap;
-}
-
-[dir=rtl] #links {
- left: auto;
- right: 10px;
-}
-
-#links li {
- display: inline;
- position: relative;
-}
-
-#links li ul {
- display: none;
- position: absolute;
- left: 0;
- top: 1.2em;
- background: url("../jquery-ui-1.11.2/images/ui-bg_fine-grain_10_eceadf_60x60.png") repeat scroll 50% 50% #eceadf;
- border: 1px solid #d9d6c4;
- z-index: 999;
-}
-
-[dir=rtl] #links li ul {
- left: auto;
- right: 0;
-}
-
-#links li ul li {
- display: block;
- padding: 0 5px;
- text-align: left;
-}
-
-[dir=rtl] #links li ul li {
- text-align: right;
-}
-
-#links,
-#links li ul {
- list-style: none;
- margin: 0;
- padding: 1px;
-}
-
-#links li:hover > ul {
- display: block;
-}
-
-.ui-widget-content a.lang-active {
- color: #008000;
-}
-
-#links .langmenu {
- display: inline;
- padding: 0;
-}
-
/* SIDE and CONTENT panels */
#admin_menu,
#admin_content {
@@ -1282,23 +999,6 @@ table#adduser2 {
text-align: center;
}
-input:required:valid,
-textarea:required:valid {
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAONJREFUeNpi/P//PwMlgImBQjDwBrCgCzDOF2Zg+Adk/AOGDRvQfHZGoDWMxgyMDMb/Q1/NIt0F/xk8gIbNZPj7P41YL4AUGsM1//rfkuyeYMzw8z9xXgBqgNm0nuHnv0D/IH/juavmngV6oYY4F3z7y2DqY2oMpANB9MYl684yfP9Xw3Dzzw7sXgQmJGTM0MbjwdDKc0b2vt5/EM2QwunBoMyCVS1YPYYAMOwZ7FmiGLLYzjBYsSQD+QpALAjErNgMYERPyoyMjMxAih+IOYD4LxD/hOJfQLV/MaJ9NC8wAAQYAPbPfH2KJKx/AAAAAElFTkSuQmCC) no-repeat right top;
-}
-
-input:required:invalid,
-textarea:required:invalid {
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMpJREFUeNpi/P//PwMlgImBQjAMDGBBF1jFyOgBpFqAuOYPA8MOoAI4P+z//x0YJoBiARkvYWA486+k5D+IBuJqZD66WnAMogvMA9o4F6j4R3Lyf2R6IQODMVEGTAW6CoirgfjMB2/v/yB6CgNDYQ8W14IwRiB+A7rgOwNDYLChofGcrVvPgugfDAzR/yFhwUAwDJqBNj6Ulf0PooEhV4jMx+YCRvSknAeMBWDotwgwMKRzMTCcfQW0GcQHxkbNJCyxwDiaFxgAAgwAYy67YIOQ//cAAAAASUVORK5CYII=) no-repeat right top;
-}
-
-[dir=rtl] input:required:valid,
-[dir=rtl] textarea:required:valid,
-[dir=rtl] input:required:invalid,
-[dir=rtl] textarea:required:invalid {
- background-position: left top;
-}
-
/* BROADCAST MESSAGES */
/* no styles used */
diff --git a/themes/_administration/footer.php b/themes/_administration/footer.php
deleted file mode 100644
index ab4d3dc0f7..0000000000
--- a/themes/_administration/footer.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-// Footer for webtrees administration theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo '</div>'; // id="admin_content"
diff --git a/themes/_administration/header.php b/themes/_administration/header.php
deleted file mode 100644
index a7f457b873..0000000000
--- a/themes/_administration/header.php
+++ /dev/null
@@ -1,164 +0,0 @@
-<?php
-// Header for webtrees administration theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// This theme uses the jQuery “colorbox” plugin to display images
-$this
- ->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
- ->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)
- ->addInlineJavascript('activate_colorbox();')
- ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"75%", height:"75%", transition:"none", slideshowStart:"'. WT_I18N::translate('Play').'", slideshowStop:"'. WT_I18N::translate('Stop').'"})')
- ->addInlineJavascript('
- jQuery.extend(jQuery.colorbox.settings, {
- title: function() {
- var img_title = jQuery(this).data("title");
- return img_title;
- }
- });
- ');
-echo
- '<!DOCTYPE html>',
- '<html ', WT_I18N::html_markup(), '>',
- '<head>',
- '<meta charset="UTF-8">',
- '<meta http-equiv="X-UA-Compatible" content="IE=edge">',
- '<meta name="robots" content="noindex,nofollow">',
- '<title>', htmlspecialchars($title), '</title>',
- '<link rel="icon" href="', WT_CSS_URL, 'favicon.png" type="image/png">',
- '<link rel="stylesheet" href="', WT_THEME_URL, 'jquery-ui-1.11.2/jquery-ui.css" type="text/css">',
- '<link rel="stylesheet" href="', WT_CSS_URL, 'style.css" type="text/css">',
- '<!--[if IE 8]>',
- '<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>',
- '<![endif]-->';
-
-echo
- '</head>',
- '<body id="body">',
-// Header
- '<div id="admin_head" class="ui-widget-content">',
- '<i class="icon-webtrees"></i>',
- '<div id="title"><a href="admin.php">', WT_I18N::translate('Administration'), '</a></div>',
- '<div id="links">',
- '<a href="index.php">', WT_I18N::translate('My page'), '</a> | ',
- logout_link(),
- '<span> | </span>',
- '<ul class="langmenu">';
- $language_menu=WT_MenuBar::getLanguageMenu();
- if ($language_menu) {
- echo $language_menu->getMenuAsList();
- }
- echo '</ul>';
- if (WT_USER_CAN_ACCEPT && exists_pending_change()) {
- echo ' | <li><a href="#" onclick="window.open(\'edit_changes.php\',\'_blank\', chan_window_specs); return false;" style="color:red;">', WT_I18N::translate('Pending changes'), '</a></li>';
- }
- echo '</div>',
- '<div id="info">',
- WT_WEBTREES, ' ', WT_VERSION,
- '<br>',
- /* I18N: The local time on the server */
- WT_I18N::translate('Server time'), ' — ', format_timestamp(WT_SERVER_TIMESTAMP),
- '<br>',
- /* I18N: The local time on the client/browser */
- WT_I18N::translate('Client time'), ' — ', format_timestamp(WT_CLIENT_TIMESTAMP),
- '<br>',
- /* I18N: Timezone - http://en.wikipedia.org/wiki/UTC */
- WT_I18N::translate('UTC'), ' — ', format_timestamp(WT_TIMESTAMP),
- '</div>',
- '</div>',
-// Side menu
- '<div id="admin_menu" class="ui-widget-content">',
- '<ul>',
- '<li><a ', (WT_SCRIPT_NAME=='admin.php' ? 'class="current" ' : ''), 'href="admin.php">', WT_I18N::translate('Administration'), '</a></li>';
-if (Auth::isAdmin()) {
- echo
- '<li><ul>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_config.php' ? 'class="current" ' : ''), 'href="admin_site_config.php">', WT_I18N::translate('Site configuration' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_logs.php' ? 'class="current" ' : ''), 'href="admin_site_logs.php">', WT_I18N::translate('Logs' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_readme.php' ? 'class="current" ' : ''), 'href="admin_site_readme.php">', WT_I18N::translate('README documentation' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_info.php' ? 'class="current" ' : ''), 'href="admin_site_info.php">', WT_I18N::translate('PHP information' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_access.php' ? 'class="current" ' : ''), 'href="admin_site_access.php">', WT_I18N::translate('Site access rules' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_clean.php' ? 'class="current" ' : ''), 'href="admin_site_clean.php">', WT_I18N::translate('Clean up data folder'), '</a></li>',
- '</ul></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_trees_manage.php' ? 'class="current" ' : ''), 'href="admin_trees_manage.php">', WT_I18N::translate('Family trees' ), '</a></li>';
-} else {
- echo '<li>', WT_I18N::translate('Family trees'), '</li>';
-}
-echo '<li><ul>';
-//-- gedcom list
-foreach (WT_Tree::getAll() as $tree) {
- if (Auth::isManager($tree)) {
- // Add a title="" element, since long tree titles are cropped
- echo
- '<li><span><a ', (WT_SCRIPT_NAME=='admin_trees_config.php' && WT_GED_ID==$tree->tree_id ? 'class="current" ' : ''), 'href="admin_trees_config.php?ged='.$tree->tree_name_url.'" title="', WT_Filter::escapeHtml($tree->tree_title), '" dir="auto">', $tree->tree_title_html,
- '</a></span></li>';
- }
-}
-echo
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_merge.php' ? 'class="current" ' : ''), 'href="admin_site_merge.php">', WT_I18N::translate('Merge records'), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_trees_merge.php' ? 'class="current" ' : ''), 'href="admin_trees_merge.php">', WT_I18N::translate('Merge family trees'), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_other.php' ? 'class="current" ' : ''), 'href="admin_site_other.php">', WT_I18N::translate('Add unlinked records'), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_trees_places.php' ? 'class="current" ' : ''), 'href="admin_trees_places.php">', WT_I18N::translate('Update place names'), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_trees_check.php' ? 'class="current" ' : ''), 'href="admin_trees_check.php">', WT_I18N::translate('Check for errors'), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_site_change.php' ? 'class="current" ' : ''), 'href="admin_site_change.php">', WT_I18N::translate('Changes log'),'</a></li>',
- '<li><a href="index_edit.php?gedcom_id=-1" onclick="return modalDialog(\'index_edit.php?gedcom_id=-1'.'\', \'', WT_I18N::translate('Set the default blocks for new family trees'), '\');">', WT_I18N::translate('Set the default blocks'), '</a></li>',
- '</ul></li>';
-
-if (Auth::isAdmin()) {
- echo
- '<li><a ', (WT_SCRIPT_NAME=='admin_users.php' && WT_Filter::get('action')!="cleanup"&& WT_Filter::get('action')!="createform" ? 'class="current" ' : ''), 'href="admin_users.php">',
- WT_I18N::translate('Users'),
- '</a></li>',
- '<li><ul>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_users.php' && WT_Filter::get('action')=='createform' ? 'class="current" ' : ''), 'href="admin_users.php?action=createform">', WT_I18N::translate('Add a new user'), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_users_bulk.php' ? 'class="current" ' : ''), 'href="admin_users_bulk.php">', WT_I18N::translate('Send broadcast messages'), '</a>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_users.php' && WT_Filter::get('action')=='cleanup' ? 'class="current" ' : ''), 'href="admin_users.php?action=cleanup">', WT_I18N::translate('Delete inactive users'), '</a></li>',
- '<li><a href="index_edit.php?user_id=-1" onclick="return modalDialog(\'index_edit.php?user_id=-1'.'\', \'', WT_I18N::translate('Set the default blocks for new users'), '\');">', WT_I18N::translate('Set the default blocks'), '</a></li>',
- '</ul></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_media.php' ? 'class="current" ' : ''), 'href="admin_media.php">', WT_I18N::translate('Media'), '</a></li>',
- '<li><ul>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_media_upload.php' ? 'class="current" ' : ''), 'href="admin_media_upload.php">', WT_I18N::translate('Upload media files'), '</a></li>',
- '</ul></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_modules.php' ? 'class="current" ' : ''), 'href="admin_modules.php">',
- WT_I18N::translate('Modules'),
- '</a></li>',
- '<li><ul>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_module_menus.php' ? 'class="current" ' : ''), 'href="admin_module_menus.php">', WT_I18N::translate('Menus' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_module_tabs.php' ? 'class="current" ' : ''), 'href="admin_module_tabs.php">', WT_I18N::translate('Tabs' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_module_blocks.php' ? 'class="current" ' : ''), 'href="admin_module_blocks.php">', WT_I18N::translate('Blocks' ), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_module_sidebar.php' ? 'class="current" ' : ''), 'href="admin_module_sidebar.php">', WT_I18N::translate('Sidebar'), '</a></li>',
- '<li><a ', (WT_SCRIPT_NAME=='admin_module_reports.php' ? 'class="current" ' : ''), 'href="admin_module_reports.php">', WT_I18N::translate('Reports'), '</a></li>',
- '</ul></li>';
- foreach (WT_Module::getActiveModules(true) as $module) {
- if ($module instanceof WT_Module_Config) {
- echo '<li><span><a ', (WT_SCRIPT_NAME=='module.php' && WT_Filter::get('mod')==$module->getName() ? 'class="current" ' : ''), 'href="', $module->getConfigLink(), '">', $module->getTitle(), '</a></span></li>';
- }
- }
-}
-echo
- '</ul>',
- '</div>',
- '<div id="admin_content" class="ui-widget-content">',
- WT_FlashMessages::getHtmlMessages(); // Feedback from asynchronous actions;
diff --git a/themes/_administration/theme.php b/themes/_administration/theme.php
index 48e96d06c9..72440131fe 100644
--- a/themes/_administration/theme.php
+++ b/themes/_administration/theme.php
@@ -2,10 +2,7 @@
// Administration theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
+// Copyright (C) 2015 webtrees development team.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,27 +18,4 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// Theme name - this needs double quotes, as file is scanned/parsed by script
-$theme_name = "_administration";
-
-// A version number in the path prevents browser-cache problems during upgrade
-define('WT_CSS_URL', WT_THEME_URL . 'css-1.6.2/');
-
-$headerfile = WT_THEME_DIR . 'header.php';
-$footerfile = WT_THEME_DIR . 'footer.php';
-
-// Main icons
-$WT_IMAGES=array(
- // Lightbox module uses this in manage media links, and also admin_media.php for delete folder.
- 'remove' => WT_CSS_URL . 'images/delete.png',
-
- // Need different sizes before moving to CSS
- 'default_image_F' => WT_CSS_URL . 'images/silhouette_female.png',
- 'default_image_M' => WT_CSS_URL . 'images/silhouette_male.png',
- 'default_image_U' => WT_CSS_URL . 'images/silhouette_unknown.png',
-);
+return new WT\Theme\Administration();
diff --git a/themes/_custom/theme.php b/themes/_custom/theme.php
new file mode 100644
index 0000000000..d037fb14e8
--- /dev/null
+++ b/themes/_custom/theme.php
@@ -0,0 +1,104 @@
+<?php
+// webtrees: Web based Family History software
+// Copyright (C) 2015 webtrees development team.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 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 General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+/**
+ * Class CustomTheme - This is a template showing how to create a custom theme.
+ *
+ * Since theme folders beginning with an underscore are reserved for special
+ * use, you should copy this entire folder ("themes/_custom") to a new name.
+ * For example, "themes/custom". You should also rename the class.
+ *
+ * In this example, we are extending the webtrees theme, but you could
+ * also extend any of the core themes, or even the base theme. You
+ * should choose a unique class name, as users may install many custom themes.
+ *
+ * Only the first two functions are required: themeId() and themeName().
+ * The rest are just examples, and should be removed in actual themes.
+ *
+ * Many of the core classes are being moved to namespaces. For example,
+ * WT_Foo will be renamed to WT\Foo. The object API should remain the
+ * same. Avoid unecessary type-hints to allow your
+ */
+class CustomTheme extends WT\Theme\Webtrees {
+ /**
+ * Give your theme a unique identifier. Themes beginning with an underscore
+ * are reserved for internal use.
+ *
+ * {@inheritdoc}
+ */
+ public function themeId() {
+ return '_custom';
+ }
+
+ /**
+ * Give your theme a name. This is shown to the users.
+ * Use HTML entities where appropriate. e.g. “Black &amp; white”.
+ *
+ * You could use switch($this->locale) {} to provide a translated versions
+ * of the theme name.
+ *
+ * {@inheritdoc}
+ */
+ public function themeName() {
+ return 'Custom theme';
+ }
+
+ /**
+ * This is an example function which shows how to add an additional CSS file to the theme.
+ *
+ * {@inheritdoc}
+ */
+ public function stylesheets() {
+ try {
+ $css_files = parent::stylesheets();
+ // Put a version number in the URL, to prevent browsers from caching old versions.
+ $css_files[] = WT_SERVER_NAME . WT_SCRIPT_PATH . 'themes/custom/custom.css';
+ } catch (Exception $ex) {
+ // Something went wrong with our script? Use the default behaviour instead.
+ return parent::stylesheets();
+ }
+
+ return $css_files;
+ }
+
+ /**
+ * This is an example function which shows one way to remove an entry from a menu.
+ *
+ * {@inheritdoc}
+ */
+ public function menuLists() {
+ try {
+ // Start with the default "Lists" menu.
+ $menu = parent::menuLists();
+ // Remove the "notes" sub-menu.
+ $submenus = array_filter($menu->getSubmenus(), function (WT_Menu $menu) {
+ return $menu->getId() !== 'menu-list-note';
+ });
+ // Replace the sub-menus
+ $menu->setSubmenus($submenus);
+ } catch (Exception $ex) {
+ // Something went wrong with our script? Maybe the core code was updated?
+ // Use the default behaviour instead, so that our theme continues to work.
+ return parent::menuLists();
+ }
+
+ return $menu;
+ }
+}
+
+return new CustomTheme; // This script must return a theme object.
diff --git a/themes/clouds/css-1.6.2/style.css b/themes/clouds/css-1.6.2/style.css
index b1cdd511b2..ac78c90f4f 100644
--- a/themes/clouds/css-1.6.2/style.css
+++ b/themes/clouds/css-1.6.2/style.css
@@ -4285,8 +4285,7 @@ li a.link {
content: "";
}
-.lang-active,
-.theme-active {
+.secondary-menu .active {
color: #006;
font-weight: 900;
}
diff --git a/themes/clouds/footer.php b/themes/clouds/footer.php
deleted file mode 100644
index 565ddf53c9..0000000000
--- a/themes/clouds/footer.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Footer for Clouds theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView Cloudy theme
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo '</main>';
-if ($view !== 'simple') {
- echo '<footer>';
- echo contact_links();
- echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
- echo '</p>';
- if ($WT_TREE && $WT_TREE->getPreference('SHOW_STATS')) {
- echo execution_stats();
- }
- if (exists_pending_change()) {
- echo '<a href="#" onclick="window.open(\'edit_changes.php\', \'_blank\', chan_window_specs); return false;">';
- echo '<p class="error center">', WT_I18N::translate('There are pending changes for you to moderate.'), '</p>';
- echo '</a>';
- }
- echo '</footer>';
-}
diff --git a/themes/clouds/header.php b/themes/clouds/header.php
deleted file mode 100644
index 32f54f9223..0000000000
--- a/themes/clouds/header.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-// Header for clouds theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-global $WT_IMAGES;
-
-// This theme uses the jQuery “colorbox” plugin to display images
-$this
- ->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
- ->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)
- ->addInlineJavascript('activate_colorbox();')
- ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"85%", height:"85%", transition:"none", slideshowStart:"'. WT_I18N::translate('Play').'", slideshowStop:"'. WT_I18N::translate('Stop').'"})')
- ->addInlineJavascript('
- jQuery.extend(jQuery.colorbox.settings, {
- title: function() {
- var img_title = jQuery(this).data("title");
- return img_title;
- }
- });
- ');
-
-$menu_items = array(
- WT_MenuBar::getGedcomMenu(),
- WT_MenuBar::getMyPageMenu(),
- WT_MenuBar::getChartsMenu(),
- WT_MenuBar::getListsMenu(),
- WT_MenuBar::getCalendarMenu(),
- WT_MenuBar::getReportsMenu(),
- WT_MenuBar::getSearchMenu(),
-);
-foreach (WT_MenuBar::getModuleMenus() as $menu) {
- $menu_items[] = $menu;
-}
-
-?>
-<!DOCTYPE html>
-<html <?php echo WT_I18N::html_markup(); ?>>
-<head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?php echo header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL); ?>
- <title><?php echo WT_Filter::escapeHtml($title); ?></title>
- <link rel="icon" href="<?php echo WT_CSS_URL; ?>favicon.png" type="image/png">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_THEME_URL; ?>jquery-ui-1.11.2/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_CSS_URL; ?>style.css">
- <!--[if IE 8]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
- <![endif]-->
-</head>
-<body>
- <?php if ($view !== 'simple') { ?>
- <header>
- <div class="header-logo"></div>
- <form class="header-search" style="display:inline;" action="search.php" method="post" role="search">
- <input type="hidden" name="action" value="general">
- <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
- <input type="hidden" name="topsearch" value="yes">
- <input type="search" name="query" size="15" placeholder="<?php echo WT_I18N::translate('Search'); ?>">
- <input class="search-icon" type="image" src="<?php echo $WT_IMAGES['search']; ?>" alt="<?php echo WT_I18N::translate('Search'); ?>" title="<?php echo WT_I18N::translate('Search'); ?>">
- </form>
- <ul class="secondary-menu">
- <?php
- if (Auth::check()) {
- echo '<li><a href="edituser.php" class="link">', WT_Filter::escapeHtml(Auth::user()->getRealName()), '</a></li><li>', logout_link(), '</li>';
- if (WT_USER_CAN_ACCEPT && exists_pending_change()) {
- echo ' <li><a href="#" onclick="window.open(\'edit_changes.php\',\'_blank\', chan_window_specs); return false;" style="color:red;">', WT_I18N::translate('Pending changes'), '</a></li>';
- }
- } else {
- echo '<li>', login_link(),'</li>';
- }
- ?>
- <?php echo WT_MenuBar::getFavoritesMenu(); ?>
- <?php echo WT_MenuBar::getLanguageMenu(); ?>
- <?php echo WT_MenuBar::getThemeMenu(); ?>
- </ul>
- <h1><?php echo WT_TREE_TITLE; ?></h1>
- <nav>
- <ul class="primary-menu">
- <?php
- foreach (array_filter($menu_items) as $menu) {
- echo getMenuAsCustomList($menu);
- }
- ?>
- </ul>
- </nav>
- </header>
- <?php } ?>
- <?php echo WT_FlashMessages::getHtmlMessages(); ?>
- <main id="content">
diff --git a/themes/clouds/templates/block_main_temp.php b/themes/clouds/templates/block_main_temp.php
deleted file mode 100644
index dbfe4965a0..0000000000
--- a/themes/clouds/templates/block_main_temp.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-// Template for drawing the main blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <table class="blockheader">
- <tr>
- <td class="blockh1" ></td>
- <td class="blockh2" >
- <div class="blockhc"><b><?php echo $title; ?></b></div>
- </td>
- <td class="blockh3"></td>
- </tr>
- </table>
- <div class="blockcontent <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/clouds/templates/block_small_temp.php b/themes/clouds/templates/block_small_temp.php
deleted file mode 100644
index 24af18c7d8..0000000000
--- a/themes/clouds/templates/block_small_temp.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-// Template for drawing the height-restricted blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <table class="blockheader">
- <tr>
- <td class="blockh1" ></td>
- <td class="blockh2" >
- <div class="blockhc"><b><?php echo $title; ?></b></div>
- </td>
- <td class="blockh3"></td>
- </tr>
- </table>
- <div class="blockcontent <?php echo $class; ?>">
- <div class="small_inner_block">
- <?php echo $content; ?>
- </div>
- </div>
-</div>
diff --git a/themes/clouds/templates/compactbox_template.php b/themes/clouds/templates/compactbox_template.php
deleted file mode 100644
index 4a3386f801..0000000000
--- a/themes/clouds/templates/compactbox_template.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $outBoxAdd, $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '"' , $outBoxAdd, '>
- <div class="compact_view">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '" title="',strip_tags($name.$addname),'">
- <span class="namedef name',$style,'">', $shortname, '</span>
- </a>
- </div>
- <div class="inout2 details',$style,'">',
- $person->getLifeSpan(), '
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/clouds/templates/personbox_template.php b/themes/clouds/templates/personbox_template.php
deleted file mode 100644
index b1fdc7ade2..0000000000
--- a/themes/clouds/templates/personbox_template.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $genderImage, $BirthDeath, $outBoxAdd,
-// $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '" ',$outBoxAdd,'>
- <div class="noprint icons">', $icons, '</div>',
- '<div class="chart_textbox" style="max-height:', $bheight,'px;">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '">
- <span class="namedef name',$style,'">',
- $name,
- $genderImage,'
- <span class="details',$style,'">' . $LDSord . '</span>
- </span>
- </a>
- <div class="namedef name',$style,'">',$addname,'</div>
- <div class="inout2 details',$style,'">',
- $BirthDeath,
- '</div>
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/clouds/theme.php b/themes/clouds/theme.php
index 1433358e86..64d23eca49 100644
--- a/themes/clouds/theme.php
+++ b/themes/clouds/theme.php
@@ -2,11 +2,7 @@
// Clouds theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView Cloudy theme
-// Original author w.a. bastein http://genealogy.bastein.biz
-// Copyright (C) 2010 PGV Development Team.
+// Copyright (C) 2015 webtrees development team.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -22,108 +18,4 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-/**
- * Convert a menu into our theme-specific format
- *
- * @param WT_Menu $menu
- *
- * @return string
- */
-function getMenuAsCustomList(WT_Menu $menu) {
- // Create an inert menu - to use as a label
- $tmp = new WT_Menu(strip_tags($menu->getLabel()), '');
-
- // Insert the label into the submenu
- $submenus = $menu->getSubmenus();
- array_unshift($submenus, $tmp);
- $menu->setSubmenus($submenus);
-
- // Neutralise the top-level menu
- $menu->setLabel('');
- $menu->setOnclick('');
-
- return $menu->getMenuAsList();
-}
-
-// Theme name - this needs double quotes, as file is scanned/parsed by script
-$theme_name = "clouds"; /* I18N: Name of a theme. */ WT_I18N::translate('clouds');
-
-// A version number in the path prevents browser-cache problems during upgrade
-define('WT_CSS_URL', WT_THEME_URL . 'css-1.6.2/');
-
-$headerfile = WT_THEME_DIR . 'header.php';
-$footerfile = WT_THEME_DIR . 'footer.php';
-
-$WT_IMAGES=array(
- // used to draw charts
- 'dline' => WT_CSS_URL .'images/dline.png',
- 'dline2' => WT_CSS_URL .'images/dline2.png',
- 'hline' => WT_CSS_URL .'images/hline.png',
- 'spacer' => WT_CSS_URL .'images/spacer.png',
- 'vline' => WT_CSS_URL .'images/vline.png',
-
- // used in button images and javascript
- 'add' => WT_CSS_URL .'images/add.png',
- 'button_family' => WT_CSS_URL .'images/buttons/family.png',
- 'minus' => WT_CSS_URL .'images/minus.png',
- 'plus' => WT_CSS_URL .'images/plus.png',
- 'remove' => WT_CSS_URL .'images/delete.png',
- 'search' => WT_CSS_URL .'images/go.png',
-
- // need different sizes before moving to CSS
- 'default_image_F' => WT_CSS_URL .'images/silhouette_female.png',
- 'default_image_M' => WT_CSS_URL .'images/silhouette_male.png',
- 'default_image_U' => WT_CSS_URL .'images/silhouette_unknown.png',
-);
-
-// Variables for the Fan chart
-$fanChart = array(
- 'font' => WT_ROOT . 'includes/fonts/DejaVuSans.ttf',
- 'size' => 7,
- 'color' => '#000000',
- 'bgColor' => '#eeeeee',
- 'bgMColor' => '#b1cff0',
- 'bgFColor' => '#e9daf1'
-);
-
-// This section defines variables for the charts
-$bwidth = 250; // width of boxes on all person-box based charts
-$bheight = 80; // height of boxes on all person-box based chart
-$baseyoffset = 10; // position the timeline chart relative to the top of the page
-$basexoffset = 10; // position the pedigree and timeline charts relative to the left of the page
-$bxspacing = 4; // horizontal spacing between boxes on the pedigree chart
-$byspacing = 5; // vertical spacing between boxes on the pedigree chart
-$brborder = 1; // pedigree chart box right border thickness
-$linewidth = 1.5; // width of joining lines
-$shadowcolor = ''; // shadow color for joining lines
-$shadowblur = 0; // shadow blur for joining lines
-$shadowoffsetX = 0; // shadowOffsetX for joining lines
-$shadowoffsetY = 0; // shadowOffsetY for joining lines
-
-// Other settings that should not be touched
-$Dbxspacing = 5; // position vertical line between boxes in relationship chart
-$Dbyspacing = 10; // position vertical spacing between boxes in relationship chart
-$Dbwidth = 250; // horizontal spacing between boxes in all charts
-$Dbheight = 80; // horizontal spacing between boxes in all charts
-$Dindent = 15; // width to indent ancestry and descendancy charts boxes
-$Darrowwidth = 300; // not used that I can see ***
-
-// -- Dimensions for compact version of chart displays
-$cbwidth = 240;
-$cbheight = 50;
-
-// The largest possible area for charts is 300,000 pixels. As the maximum height or width is 1000 pixels
-$WT_STATS_S_CHART_X = 440;
-$WT_STATS_S_CHART_Y = 125;
-$WT_STATS_L_CHART_X = 900;
-// For map charts, the maximum size is 440 pixels wide by 220 pixels high
-$WT_STATS_MAP_X = 440;
-$WT_STATS_MAP_Y = 220;
-$WT_STATS_CHART_COLOR1 = "ffffff";
-$WT_STATS_CHART_COLOR2 = "95b8e0";
-$WT_STATS_CHART_COLOR3 = "c8e7ff";
+return new WT\Theme\Clouds;
diff --git a/themes/colors/css-1.6.2/style.css b/themes/colors/css-1.6.2/style.css
index 177740fd76..a05f556f2a 100644
--- a/themes/colors/css-1.6.2/style.css
+++ b/themes/colors/css-1.6.2/style.css
@@ -4278,8 +4278,7 @@ header {
content: "";
}
-.lang-active,
-.theme-active {
+.secondary-menu .active {
font-weight: 900;
}
diff --git a/themes/colors/footer.php b/themes/colors/footer.php
deleted file mode 100644
index bd596f2801..0000000000
--- a/themes/colors/footer.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Footer for Colors theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo '</main>';
-if ($view !== 'simple') {
- echo '<footer>';
- echo contact_links();
- echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
- echo '</p>';
- if ($WT_TREE && $WT_TREE->getPreference('SHOW_STATS')) {
- echo execution_stats();
- }
- if (exists_pending_change()) {
- echo '<a href="#" onclick="window.open(\'edit_changes.php\', \'_blank\', chan_window_specs); return false;">';
- echo '<p class="error center">', WT_I18N::translate('There are pending changes for you to moderate.'), '</p>';
- echo '</a>';
- }
- echo '</footer>';
-}
diff --git a/themes/colors/header.php b/themes/colors/header.php
deleted file mode 100644
index b145e01236..0000000000
--- a/themes/colors/header.php
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-// Header for colors theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-global $WT_IMAGES, $subColor;
-
-// This theme uses the jQuery “colorbox” plugin to display images
-$this
- ->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
- ->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)
- ->addInlineJavascript('activate_colorbox();')
- ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"85%", height:"85%", transition:"none", slideshowStart:"'. WT_I18N::translate('Play').'", slideshowStop:"'. WT_I18N::translate('Stop').'"})')
- ->addInlineJavascript('
- jQuery.extend(jQuery.colorbox.settings, {
- title: function() {
- var img_title = jQuery(this).data("title");
- return img_title;
- }
- });
- ');
-
-// Remove list from home when only 1 gedcom
-$this->addInlineJavaScript(
- 'if (jQuery("#menu-tree ul li").length == 2) jQuery("#menu-tree ul li:last-child").remove();'
-);
-
-
-
-$menu_items = array(
- WT_MenuBar::getGedcomMenu(),
- WT_MenuBar::getMyPageMenu(),
- WT_MenuBar::getChartsMenu(),
- WT_MenuBar::getListsMenu(),
- WT_MenuBar::getCalendarMenu(),
- WT_MenuBar::getReportsMenu(),
- WT_MenuBar::getSearchMenu(),
-);
-foreach (WT_MenuBar::getModuleMenus() as $menu) {
- $menu_items[] = $menu;
-}
-
-?>
-<!DOCTYPE html>
-<html <?php echo WT_I18N::html_markup(); ?>>
-<head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?php echo header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL); ?>
- <title><?php echo WT_Filter::escapeHtml($title); ?></title>
- <link rel="icon" href="<?php echo WT_CSS_URL; ?>favicon.png" type="image/png">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_THEME_URL; ?>jquery-ui-1.11.2/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_CSS_URL; ?>style.css">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_CSS_URL; ?>palette/<?php echo $subColor; ?>.css">
- <!--[if IE 8]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
- <![endif]-->
-</head>
-<body>
- <?php if ($view !== 'simple') { ?>
- <header>
- <h1><?php echo WT_TREE_TITLE; ?></h1>
- <ul class="secondary-menu" role="menubar">
- <?php
- if (Auth::check()) {
- echo '<li><a href="edituser.php" class="link">', WT_Filter::escapeHtml(Auth::user()->getRealName()), '</a></li><li>', logout_link(), '</li>';
- if (WT_USER_CAN_ACCEPT && exists_pending_change()) {
- echo ' <li><a href="#" onclick="window.open(\'edit_changes.php\', \'_blank\', chan_window_specs); return false;" style="color:red;">', WT_I18N::translate('Pending changes'), '</a></li>';
- }
- } else {
- echo '<li>', login_link(),'</li>';
- }
- ?>
- <?php echo WT_MenuBar::getFavoritesMenu(); ?>
- <?php echo WT_MenuBar::getLanguageMenu(); ?>
- <?php echo WT_MenuBar::getThemeMenu(); ?>
- <?php if (WT_MenuBar::getThemeMenu()) { echo color_theme_dropdown(); } ?>
- <li>
- <form style="display:inline;" action="search.php" method="post">
- <input type="hidden" name="action" value="general">
- <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
- <input type="hidden" name="topsearch" value="yes">
- <input type="search" name="query" size="15" placeholder="<?php echo WT_I18N::translate('Search'); ?>">
- <input class="search-icon" type="image" src="<?php echo $WT_IMAGES['search']; ?>" alt="<?php echo WT_I18N::translate('Search'); ?>" title="<?php echo WT_I18N::translate('Search'); ?>">
- </form>
- </li>
- </ul>
- <nav>
- <ul class="primary-menu" role="menubar">
- <?php
- foreach (array_filter($menu_items) as $menu) {
- echo getMenuAsCustomList($menu);
- }
- ?>
- </ul>
- </nav>
- </header>
- <?php } ?>
- <?php echo WT_FlashMessages::getHtmlMessages(); ?>
- <main id="content">
diff --git a/themes/colors/templates/block_main_temp.php b/themes/colors/templates/block_main_temp.php
deleted file mode 100644
index dbfe4965a0..0000000000
--- a/themes/colors/templates/block_main_temp.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-// Template for drawing the main blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <table class="blockheader">
- <tr>
- <td class="blockh1" ></td>
- <td class="blockh2" >
- <div class="blockhc"><b><?php echo $title; ?></b></div>
- </td>
- <td class="blockh3"></td>
- </tr>
- </table>
- <div class="blockcontent <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/colors/templates/block_small_temp.php b/themes/colors/templates/block_small_temp.php
deleted file mode 100644
index 24af18c7d8..0000000000
--- a/themes/colors/templates/block_small_temp.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-// Template for drawing the height-restricted blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <table class="blockheader">
- <tr>
- <td class="blockh1" ></td>
- <td class="blockh2" >
- <div class="blockhc"><b><?php echo $title; ?></b></div>
- </td>
- <td class="blockh3"></td>
- </tr>
- </table>
- <div class="blockcontent <?php echo $class; ?>">
- <div class="small_inner_block">
- <?php echo $content; ?>
- </div>
- </div>
-</div>
diff --git a/themes/colors/templates/compactbox_template.php b/themes/colors/templates/compactbox_template.php
deleted file mode 100644
index 4a3386f801..0000000000
--- a/themes/colors/templates/compactbox_template.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $outBoxAdd, $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '"' , $outBoxAdd, '>
- <div class="compact_view">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '" title="',strip_tags($name.$addname),'">
- <span class="namedef name',$style,'">', $shortname, '</span>
- </a>
- </div>
- <div class="inout2 details',$style,'">',
- $person->getLifeSpan(), '
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/colors/templates/personbox_template.php b/themes/colors/templates/personbox_template.php
deleted file mode 100644
index b1fdc7ade2..0000000000
--- a/themes/colors/templates/personbox_template.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $genderImage, $BirthDeath, $outBoxAdd,
-// $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '" ',$outBoxAdd,'>
- <div class="noprint icons">', $icons, '</div>',
- '<div class="chart_textbox" style="max-height:', $bheight,'px;">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '">
- <span class="namedef name',$style,'">',
- $name,
- $genderImage,'
- <span class="details',$style,'">' . $LDSord . '</span>
- </span>
- </a>
- <div class="namedef name',$style,'">',$addname,'</div>
- <div class="inout2 details',$style,'">',
- $BirthDeath,
- '</div>
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/colors/theme.php b/themes/colors/theme.php
index c6acf28e85..0cfe922b7a 100644
--- a/themes/colors/theme.php
+++ b/themes/colors/theme.php
@@ -2,10 +2,7 @@
// Colors theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
+// Copyright (C) 2015 webtrees development team.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -22,190 +19,4 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
// PNG Icons By: Alessandro Rei; License: GPL; www.deviantdark.com
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-/**
- * Convert a menu into our theme-specific format
- *
- * @param WT_Menu $menu
- *
- * @return string
- */
-function getMenuAsCustomList(WT_Menu $menu) {
- // Create an inert menu - to use as a label
- $tmp = new WT_Menu(strip_tags($menu->getLabel()), '');
-
- // Insert the label into the submenu
- $submenus = $menu->getSubmenus();
- array_unshift($submenus, $tmp);
- $menu->setSubmenus($submenus);
-
- // Neutralise the top-level menu
- $menu->setLabel('');
- $menu->setOnclick('');
-
- return $menu->getMenuAsList();
-}
-
-/**
- * Print color theme sub type change dropdown box
- *
- * @return string
- */
-function color_theme_dropdown() {
- global $COLOR_THEME_LIST, $WT_SESSION, $subColor;
- $menu = new WT_Menu(/* I18N: A colour scheme */ WT_I18N::translate('Palette'), '#', 'menu-color');
- uasort($COLOR_THEME_LIST, array('WT_I18N', 'strcasecmp'));
- foreach ($COLOR_THEME_LIST as $colorChoice => $colorName) {
- $submenu = new WT_Menu($colorName, get_query_url(array('themecolor' => $colorChoice), '&amp;'), 'menu-color-' . $colorChoice);
- if (isset($WT_SESSION->subColor)) {
- if ($WT_SESSION->subColor === $colorChoice) {
- $submenu->addClass('', '', 'theme-active');
- }
- } elseif (WT_Site::getPreference('DEFAULT_COLOR_PALETTE') === $colorChoice) { /* here when visitor changes palette from default */
- $submenu->addClass('', '', 'theme-active');
- } elseif ($subColor === 'ash') { /* here when site has different theme as default and user switches to colors */
- if ($subColor === $colorChoice) {
- $submenu->addClass('', '', 'theme-active');
- }
- }
- $menu->addSubMenu($submenu);
- }
-
- return $menu->getMenuAsList();
-}
-
-/**
- * Define the default palette to be used. Set $subColor
- * to one of the collowing values to determine the default:
- *
- */
-
-$COLOR_THEME_LIST = array(
- 'aquamarine' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Aqua Marine'),
- 'ash' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Ash'),
- 'belgianchocolate'=> /* I18N: The name of a colour-scheme */ WT_I18N::translate('Belgian Chocolate'),
- 'bluelagoon' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Blue Lagoon'),
- 'bluemarine' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Blue Marine'),
- 'coffeeandcream' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Coffee and Cream'),
- 'coldday' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Cold Day'),
- 'greenbeam' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Green Beam'),
- 'mediterranio' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Mediterranio'),
- 'mercury' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Mercury'),
- 'nocturnal' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Nocturnal'),
- 'olivia' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Olivia'),
- 'pinkplastic' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Pink Plastic'),
- 'sage' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Sage'),
- 'shinytomato' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Shiny Tomato'),
- 'tealtop' => /* I18N: The name of a colour-scheme */ WT_I18N::translate('Teal Top'),
-);
-
-// If we've selected a new palette, and we are logged in, set this value as a default.
-if (isset($_GET['themecolor']) && array_key_exists($_GET['themecolor'], $COLOR_THEME_LIST)) {
- // Request to change color
- $subColor = $_GET['themecolor'];
- Auth::user()->setPreference('themecolor', $subColor);
- if (Auth::isAdmin()) {
- WT_Site::setPreference('DEFAULT_COLOR_PALETTE', $subColor);
- }
- unset($_GET['themecolor']);
- // Rember that we have selected a value
- $WT_SESSION->subColor = $subColor;
-}
-// If we are logged in, use our preference
-$subColor = Auth::user()->getPreference('themecolor');
-// If not logged in or no preference, use one we selected earlier in the session?
-if (!$subColor) {
- $subColor = $WT_SESSION->subColor;
-}
-// We haven't selected one this session? Use the site default
-if (!$subColor) {
- $subColor = WT_Site::getPreference('DEFAULT_COLOR_PALETTE');
-}
-// Make sure our selected palette actually exists
-if (!array_key_exists($subColor, $COLOR_THEME_LIST)) {
- $subColor = 'ash';
-}
-
-// Theme name - this needs double quotes, as file is scanned/parsed by script
-$theme_name = "colors"; /* I18N: Name of a theme. */ WT_I18N::translate('colors');
-
-// A version number in the path prevents browser-cache problems during upgrade
-define('WT_CSS_URL', WT_THEME_URL . 'css-1.6.2/');
-
-$footerfile = WT_THEME_DIR . 'footer.php';
-$headerfile = WT_THEME_DIR . 'header.php';
-
-$WT_IMAGES = array(
- // used to draw charts
- 'dline' => WT_CSS_URL . 'images/dline.png',
- 'dline2' => WT_CSS_URL . 'images/dline2.png',
- 'hline' => WT_CSS_URL . 'images/hline.png',
- 'spacer' => WT_CSS_URL . 'images/spacer.png',
- 'vline' => WT_CSS_URL . 'images/vline.png',
-
- // used in button images and javascript
- 'add' => WT_CSS_URL . 'images/add.png',
- 'button_family' => WT_CSS_URL . 'images/buttons/family.png',
- 'minus' => WT_CSS_URL . 'images/minus.png',
- 'plus' => WT_CSS_URL . 'images/plus.png',
- 'remove' => WT_CSS_URL . 'images/delete.png',
- 'search' => WT_CSS_URL . 'images/go.png',
-
- // need different sizes before moving to CSS
- 'default_image_F' => WT_CSS_URL . 'images/silhouette_female.png',
- 'default_image_M' => WT_CSS_URL . 'images/silhouette_male.png',
- 'default_image_U' => WT_CSS_URL . 'images/silhouette_unknown.png',
-);
-
-//-- Variables for the Fan chart
-$fanChart = array(
- 'font' => WT_ROOT . 'includes/fonts/DejaVuSans.ttf',
- 'size' => 7,
- 'color' => '#000000',
- 'bgColor' => '#eeeeee',
- 'bgMColor' => '#b1cff0',
- 'bgFColor' => '#e9daf1'
-);
-
-// This section defines variables for the charts
-$bwidth = 250; // width of boxes on all person-box based charts
-$bheight = 80; // height of boxes on all person-box based chart
-$baseyoffset = 10; // position the timeline chart relative to the top of the page
-$basexoffset = 10; // position the pedigree and timeline charts relative to the left of the page
-$bxspacing = 4; // horizontal spacing between boxes on the pedigree chart
-$byspacing = 5; // vertical spacing between boxes on the pedigree chart
-$brborder = 1; // pedigree chart box right border thickness
-$linewidth = 1.5; // width of joining lines
-$shadowcolor = ''; // shadow color for joining lines
-$shadowblur = 0; // shadow blur for joining lines
-$shadowoffsetX = 0; // shadowOffsetX for joining lines
-$shadowoffsetY = 0; // shadowOffsetY for joining lines
-
-// Other settings that should not be touched
-$Dbxspacing = 5; // position vertical line between boxes in relationship chart
-$Dbyspacing = 10; // position vertical spacing between boxes in relationship chart
-$Dbwidth = 250; // horizontal spacing between boxes in all charts
-$Dbheight = 80; // horizontal spacing between boxes in all charts
-$Dindent = 15; // width to indent ancestry and descendancy charts boxes
-$Darrowwidth = 300; // not used that I can see ***
-
-// Dimensions for compact version of chart displays
-$cbwidth = 240;
-$cbheight = 50;
-
-// The largest possible area for charts is 300,000 pixels. As the maximum height or width is 1000 pixels
-$WT_STATS_S_CHART_X = 440;
-$WT_STATS_S_CHART_Y = 125;
-$WT_STATS_L_CHART_X = 900;
-
-// For map charts, the maximum size is 440 pixels wide by 220 pixels high
-$WT_STATS_MAP_X = 440;
-$WT_STATS_MAP_Y = 220;
-$WT_STATS_CHART_COLOR1 = 'ffffff';
-$WT_STATS_CHART_COLOR2 = '95b8e0';
-$WT_STATS_CHART_COLOR3 = 'c8e7ff';
+return new WT\Theme\Colors;
diff --git a/themes/fab/css-1.6.2/style.css b/themes/fab/css-1.6.2/style.css
index 72fcc6f045..52ceeff275 100644
--- a/themes/fab/css-1.6.2/style.css
+++ b/themes/fab/css-1.6.2/style.css
@@ -4191,8 +4191,7 @@ header h1 {
display: block;
}
-.lang-active,
-.theme-active {
+.secondary-menu .active {
font-weight: 900;
}
diff --git a/themes/fab/footer.php b/themes/fab/footer.php
deleted file mode 100644
index 27f9c81442..0000000000
--- a/themes/fab/footer.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-// Footer for FAB theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Modifications Copyright (c) 2010 Greg Roach
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo '</main>';
-if ($view!='simple') {
- echo '<footer><div class="block">', contact_links();
- if ($WT_TREE && $WT_TREE->getPreference('SHOW_STATS')) {
- echo execution_stats();
- }
- echo '</div><a style="font-size:150%; color:#888;" href="', WT_WEBTREES_URL, '" title="', WT_WEBTREES , ' - ', WT_VERSION, '">', WT_WEBTREES, '</a></footer>';
-}
diff --git a/themes/fab/header.php b/themes/fab/header.php
deleted file mode 100644
index aaf24866a1..0000000000
--- a/themes/fab/header.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-// Header for FAB theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Modifications Copyright (c) 2010 Greg Roach
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// This theme uses the jQuery “colorbox” plugin to display images
-$this
- ->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
- ->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)
- ->addInlineJavascript('activate_colorbox();')
- ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"85%", height:"85%", transition:"none", slideshowStart:"'. WT_I18N::translate('Play').'", slideshowStop:"'. WT_I18N::translate('Stop').'"})')
- ->addInlineJavascript('
- jQuery.extend(jQuery.colorbox.settings, {
- title: function() {
- var img_title = jQuery(this).data("title");
- return img_title;
- }
- });
- ');
-?>
-<!DOCTYPE html>
-<html <?php echo WT_I18N::html_markup(); ?>>
-<head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?php echo header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL); ?>
- <title><?php echo WT_Filter::escapeHtml($title); ?></title>
- <link rel="icon" href="<?php echo WT_CSS_URL; ?>favicon.png" type="image/png">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_THEME_URL; ?>jquery-ui-1.11.2/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_CSS_URL; ?>style.css">
- <!--[if IE 8]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
- <![endif]-->
-</head>
-<body>
- <?php if ($view !== 'simple') { ?>
- <header>
- <ul class="secondary-menu">
- <?php
- if (Auth::check()) {
- echo '<li><a href="edituser.php">', WT_Filter::escapeHtml(Auth::user()->getRealName()), '</a></li> <li>', logout_link(), '</li>';
- if (WT_USER_CAN_ACCEPT && exists_pending_change()) {
- echo ' <li><a href="#" onclick="window.open(\'edit_changes.php\',\'_blank\',chan_window_specs); return false;" style="color:red;">', WT_I18N::translate('Pending changes'), '</a></li>';
- }
- } else {
- echo '<li>', login_link(), '</li> ';
- }
- ?>
- <?php echo WT_MenuBar::getFavoritesMenu(); ?>
- <?php echo WT_MenuBar::getLanguageMenu(); ?>
- <?php echo WT_MenuBar::getThemeMenu(); ?>
- <li>
- <form style="display:inline;" action="search.php" method="post" role="search">
- <input type="hidden" name="action" value="general">
- <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
- <input type="hidden" name="topsearch" value="yes">
- <input type="search" name="query" size="20" placeholder="<?php echo WT_I18N::translate('Search'); ?>">
- </form>
- </li>
- </ul>
- <h1><?php echo WT_TREE_TITLE; ?></h1>
- <nav>
- <ul class="primary-menu" role="menubar">
- <?php echo WT_MenuBar::getGedcomMenu(); ?>
- <?php echo WT_MenuBar::getMyPageMenu(); ?>
- <?php echo WT_MenuBar::getChartsMenu(); ?>
- <?php echo WT_MenuBar::getListsMenu(); ?>
- <?php echo WT_MenuBar::getCalendarMenu(); ?>
- <?php echo WT_MenuBar::getReportsMenu(); ?>
- <?php echo WT_MenuBar::getSearchMenu(); ?>
- <?php echo implode('', WT_MenuBar::getModuleMenus()); ?>
- </ul>
- </nav>
- </header>
- <?php } ?>
- <?php echo WT_FlashMessages::getHtmlMessages(); ?>
- <main id="content">
diff --git a/themes/fab/templates/block_main_temp.php b/themes/fab/templates/block_main_temp.php
deleted file mode 100644
index 35a3b0a990..0000000000
--- a/themes/fab/templates/block_main_temp.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-// Template for drawing the full-height blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-?>
-<div id="<?php echo $id; ?>" class="block">
- <div class="blockheader"><?php echo $title; ?></div>
- <div class="blockcontent <?php echo $class; ?>"><?php echo $content; ?></div>
-</div>
diff --git a/themes/fab/templates/block_small_temp.php b/themes/fab/templates/block_small_temp.php
deleted file mode 100644
index 1c226b5f32..0000000000
--- a/themes/fab/templates/block_small_temp.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-// Template for drawing the height-restricted blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-?>
-<div id="<?php echo $id; ?>" class="block">
- <div class="blockheader"><?php echo $title; ?></div>
- <div class="blockcontent <?php echo $class; ?>" style="max-height:240px; overflow:auto;"><?php echo $content; ?></div>
-</div>
diff --git a/themes/fab/templates/compactbox_template.php b/themes/fab/templates/compactbox_template.php
deleted file mode 100644
index 4a3386f801..0000000000
--- a/themes/fab/templates/compactbox_template.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $outBoxAdd, $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '"' , $outBoxAdd, '>
- <div class="compact_view">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '" title="',strip_tags($name.$addname),'">
- <span class="namedef name',$style,'">', $shortname, '</span>
- </a>
- </div>
- <div class="inout2 details',$style,'">',
- $person->getLifeSpan(), '
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/fab/templates/personbox_template.php b/themes/fab/templates/personbox_template.php
deleted file mode 100644
index b1fdc7ade2..0000000000
--- a/themes/fab/templates/personbox_template.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $genderImage, $BirthDeath, $outBoxAdd,
-// $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '" ',$outBoxAdd,'>
- <div class="noprint icons">', $icons, '</div>',
- '<div class="chart_textbox" style="max-height:', $bheight,'px;">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '">
- <span class="namedef name',$style,'">',
- $name,
- $genderImage,'
- <span class="details',$style,'">' . $LDSord . '</span>
- </span>
- </a>
- <div class="namedef name',$style,'">',$addname,'</div>
- <div class="inout2 details',$style,'">',
- $BirthDeath,
- '</div>
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/fab/theme.php b/themes/fab/theme.php
index 00ec20957a..241de3828f 100644
--- a/themes/fab/theme.php
+++ b/themes/fab/theme.php
@@ -2,9 +2,7 @@
// FAB theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Based on standard theme, which is Copyright (C) 2002 to 2010 PGV Development Team.
+// Copyright (C) 2015 webtrees development team.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -20,88 +18,4 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// Theme name - this needs double quotes, as file is scanned/parsed by script
-$theme_name="F.A.B."; /* I18N: Name of a theme. */ WT_I18N::translate('F.A.B.');
-
-// A version number in the path prevents browser-cache problems during upgrade
-define('WT_CSS_URL', WT_THEME_URL . 'css-1.6.2/');
-
-$headerfile = WT_THEME_DIR.'header.php';
-$footerfile = WT_THEME_DIR.'footer.php';
-
-$WT_IMAGES = array(
- // used to draw charts
- 'dline' => WT_CSS_URL . 'images/dline.png',
- 'dline2' => WT_CSS_URL . 'images/dline2.png',
- 'hline' => WT_CSS_URL . 'images/hline.png',
- 'spacer' => WT_CSS_URL . 'images/spacer.png',
- 'vline' => WT_CSS_URL . 'images/vline.png',
-
- // used in button images and javascript
- 'add' => WT_CSS_URL . 'images/add.png',
- 'button_family' => WT_CSS_URL . 'images/buttons/family.png',
- 'minus' => WT_CSS_URL . 'images/minus.png',
- 'plus' => WT_CSS_URL . 'images/plus.png',
- 'remove' => WT_CSS_URL . 'images/remove.png',
- 'search' => WT_CSS_URL . 'images/search.png',
-
- // need different sizes before moving to CSS
- 'default_image_F' => WT_CSS_URL . 'images/silhouette_female.png',
- 'default_image_M' => WT_CSS_URL . 'images/silhouette_male.png',
- 'default_image_U' => WT_CSS_URL . 'images/silhouette_unknown.png',
-);
-
-// Fan chart
-$fanChart = array(
- 'font' => WT_ROOT . 'includes/fonts/DejaVuSans.ttf',
- 'size' => 7,
- 'color' => '#000000',
- 'bgColor' => '#eeeeee',
- 'bgMColor' => '#b1cff0',
- 'bgFColor' => '#e9daf1'
-);
-
-// variables for the pedigree chart
-$bwidth = 260; // width of boxes on pedigree chart
-$bheight = 80; // height of boxes on pedigree chart
-$baseyoffset = 10; // position the entire pedigree tree relative to the top of the page
-$basexoffset = 10; // position the entire pedigree tree relative to the left of the page
-$bxspacing = 0; // horizontal spacing between boxes on the pedigree chart
-$byspacing = 5; // vertical spacing between boxes on the pedigree chart
-$brborder = 1; // box right border thickness
-$linewidth = 1.5; // width of joining lines
-$shadowcolor = ''; // shadow color for joining lines
-$shadowblur = 0; // shadow blur for joining lines
-$shadowoffsetX = 0; // shadowOffsetX for joining lines
-$shadowoffsetY = 0; // shadowOffsetY for joining lines
-
-// Descendancy and relationship chart variables
-$Dbaseyoffset = 20; // position the entire descendancy tree relative to the top of the page
-$Dbasexoffset = 20; // position the entire descendancy tree relative to the left of the page
-$Dbxspacing = 5; // horizontal spacing between boxes
-$Dbyspacing = 10; // vertical spacing between boxes
-$Dbwidth = 290; // width of DIV layer boxes
-$Dbheight = 80; // height of DIV layer boxes
-$Dindent = 15; // width to indent descendancy boxes
-$Darrowwidth = 30; // additional width to include for the up arrows
-
-// Dimensions for compact version of chart displays
-$cbwidth = 240;
-$cbheight = 50;
-
-// The largest possible area for charts is 300,000 pixels. As the maximum height or width is 1000 pixels
-$WT_STATS_S_CHART_X = 440;
-$WT_STATS_S_CHART_Y = 125;
-$WT_STATS_L_CHART_X = 900;
-
-// For map charts, the maximum size is 440 pixels wide by 220 pixels high
-$WT_STATS_MAP_X = 440;
-$WT_STATS_MAP_Y = 220;
-$WT_STATS_CHART_COLOR1='ffffff';
-$WT_STATS_CHART_COLOR2='9ca3d4';
-$WT_STATS_CHART_COLOR3='e5e6ef';
+return new WT\Theme\Fab;
diff --git a/themes/minimal/css-1.6.2/style.css b/themes/minimal/css-1.6.2/style.css
index bcc59b800e..40c1e19d63 100644
--- a/themes/minimal/css-1.6.2/style.css
+++ b/themes/minimal/css-1.6.2/style.css
@@ -4226,8 +4226,7 @@ header nav {
display: block;
}
-.lang-active,
-.theme-active {
+.secondary-menu .active {
font-weight: 900;
}
diff --git a/themes/minimal/footer.php b/themes/minimal/footer.php
deleted file mode 100644
index 74247e1960..0000000000
--- a/themes/minimal/footer.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-// Footer for Minimal theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo '</main>';
-if ($view!='simple') {
- echo '<footer>';
- echo contact_links();
- echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" title="', WT_WEBTREES, ' ', WT_VERSION, '">webtrees</a>';
- echo '</p>';
- if ($WT_TREE && $WT_TREE->getPreference('SHOW_STATS')) {
- echo execution_stats();
- }
- echo '</footer>';
-}
diff --git a/themes/minimal/header.php b/themes/minimal/header.php
deleted file mode 100644
index c2049a48c7..0000000000
--- a/themes/minimal/header.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-// Header for Minimal theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// This theme uses the jQuery “colorbox” plugin to display images
-$this
- ->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
- ->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)
- ->addInlineJavascript('activate_colorbox();')
- ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"85%", height:"85%", transition:"none", slideshowStart:"'. WT_I18N::translate('Play').'", slideshowStop:"'. WT_I18N::translate('Stop').'"})')
- ->addInlineJavascript('
- jQuery.extend(jQuery.colorbox.settings, {
- title: function() {
- var img_title = jQuery(this).data("title");
- return img_title;
- }
- });
- ');
-?>
-<!DOCTYPE html>
-<html <?php echo WT_I18N::html_markup(); ?>>
-<head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?php echo header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL); ?>
- <title><?php echo WT_Filter::escapeHtml($title); ?></title>
- <link rel="icon" href="<?php echo WT_CSS_URL; ?>favicon.png" type="image/png">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_THEME_URL; ?>jquery-ui-1.11.2/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_CSS_URL; ?>style.css">
- <!--[if IE 8]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
- <![endif]-->
-</head>
-<body>
- <?php if ($view !== 'simple') { ?>
- <header>
- <h1><?php echo WT_TREE_TITLE; ?></h1>
- <ul class="secondary-menu">
- <?php
- if (Auth::check()) {
- echo '<li><a href="edituser.php">', WT_Filter::escapeHtml(Auth::user()->getRealName()), '</a></li> <li>', logout_link(), '</li>';
- if (WT_USER_CAN_ACCEPT && exists_pending_change()) {
- echo ' <li><a href="#" onclick="window.open(\'edit_changes.php\',\'_blank\',chan_window_specs); return false;" style="color:red;">', WT_I18N::translate('Pending changes'), '</a></li>';
- }
- } else {
- echo '<li>', login_link(), '</li> ';
- }
- ?>
- <?php echo WT_MenuBar::getFavoritesMenu(); ?>
- <?php echo WT_MenuBar::getLanguageMenu(); ?>
- <?php echo WT_MenuBar::getThemeMenu(); ?>
- <li>
- <form style="display:inline;" action="search.php" method="post">
- <input type="hidden" name="action" value="general">
- <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
- <input type="hidden" name="topsearch" value="yes">
- <input type="search" name="query" size="20" placeholder="<?php echo WT_I18N::translate('Search'); ?>">
- </form>
- </li>
- </ul>
- <nav>
- <ul class="primary-menu" role="menubar">
- <?php echo WT_MenuBar::getGedcomMenu(); ?>
- <?php echo WT_MenuBar::getMyPageMenu(); ?>
- <?php echo WT_MenuBar::getChartsMenu(); ?>
- <?php echo WT_MenuBar::getListsMenu(); ?>
- <?php echo WT_MenuBar::getCalendarMenu(); ?>
- <?php echo WT_MenuBar::getReportsMenu(); ?>
- <?php echo WT_MenuBar::getSearchMenu(); ?>
- <?php echo implode('', WT_MenuBar::getModuleMenus()); ?>
- </ul>
- </nav>
- </header>
- <?php } ?>
- <?php echo WT_FlashMessages::getHtmlMessages(); ?>
- <main id="content">
diff --git a/themes/minimal/templates/block_main_temp.php b/themes/minimal/templates/block_main_temp.php
deleted file mode 100644
index 0f0b4416e0..0000000000
--- a/themes/minimal/templates/block_main_temp.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// Template for drawing the main blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2008 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <div class="blockheader">
- <?php echo $title; ?>
- </div>
- <div class="blockcontent normal_inner_block <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/minimal/templates/block_small_temp.php b/themes/minimal/templates/block_small_temp.php
deleted file mode 100644
index 37e618400c..0000000000
--- a/themes/minimal/templates/block_small_temp.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// Template for drawing the height-restricted blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2008 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <div class="blockheader">
- <?php echo $title; ?>
- </div>
- <div class="blockcontent small_inner_block <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/minimal/templates/compactbox_template.php b/themes/minimal/templates/compactbox_template.php
deleted file mode 100644
index 4a3386f801..0000000000
--- a/themes/minimal/templates/compactbox_template.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $outBoxAdd, $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '"' , $outBoxAdd, '>
- <div class="compact_view">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '" title="',strip_tags($name.$addname),'">
- <span class="namedef name',$style,'">', $shortname, '</span>
- </a>
- </div>
- <div class="inout2 details',$style,'">',
- $person->getLifeSpan(), '
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/minimal/templates/personbox_template.php b/themes/minimal/templates/personbox_template.php
deleted file mode 100644
index b1fdc7ade2..0000000000
--- a/themes/minimal/templates/personbox_template.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $genderImage, $BirthDeath, $outBoxAdd,
-// $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '" ',$outBoxAdd,'>
- <div class="noprint icons">', $icons, '</div>',
- '<div class="chart_textbox" style="max-height:', $bheight,'px;">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '">
- <span class="namedef name',$style,'">',
- $name,
- $genderImage,'
- <span class="details',$style,'">' . $LDSord . '</span>
- </span>
- </a>
- <div class="namedef name',$style,'">',$addname,'</div>
- <div class="inout2 details',$style,'">',
- $BirthDeath,
- '</div>
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/minimal/theme.php b/themes/minimal/theme.php
index dd9f5aeafb..52b66b9b28 100644
--- a/themes/minimal/theme.php
+++ b/themes/minimal/theme.php
@@ -2,10 +2,7 @@
// Minimal theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2010 PGV Development Team.
+// Copyright (C) 2015 webtrees development team.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,90 +18,4 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// Theme name - this needs double quotes, as file is scanned/parsed by script
-$theme_name = "minimal"; /* I18N: Name of a theme. */ WT_I18N::translate('minimal');
-
-// A version number in the path prevents browser-cache problems during upgrade
-define('WT_CSS_URL', WT_THEME_URL . 'css-1.6.2/');
-
-$headerfile = WT_THEME_DIR.'header.php';
-$footerfile = WT_THEME_DIR.'footer.php';
-
-//-- variables for image names
-$WT_IMAGES = array(
- // used to draw charts
- 'dline' => WT_CSS_URL . 'images/dline.png',
- 'dline2' => WT_CSS_URL . 'images/dline2.png',
- 'hline' => WT_CSS_URL . 'images/hline.png',
- 'spacer' => WT_CSS_URL . 'images/spacer.png',
- 'vline' => WT_CSS_URL . 'images/vline.png',
-
- // used in button images and javascript
- 'add' => WT_CSS_URL . 'images/add.png',
- 'button_family' => WT_CSS_URL . 'images/buttons/family.png',
- 'minus' => WT_CSS_URL . 'images/minus.png',
- 'plus' => WT_CSS_URL . 'images/plus.png',
- 'remove' => WT_CSS_URL . 'images/remove.png',
- 'search' => WT_CSS_URL . 'images/search.png',
-
- // need different sizes before moving to CSS
- 'default_image_F' => WT_CSS_URL . 'images/silhouette_female.png',
- 'default_image_M' => WT_CSS_URL . 'images/silhouette_male.png',
- 'default_image_U' => WT_CSS_URL . 'images/silhouette_unknown.png',
-);
-
-//-- Variables for the Fan chart
-$fanChart = array(
- 'font' => WT_ROOT . 'includes/fonts/DejaVuSans.ttf',
- 'size' => 7,
- 'color' => '#000000',
- 'bgColor' => '#eeeeee',
- 'bgMColor' => '#cccccc',
- 'bgFColor' => '#dddddd'
-);
-
-// This section defines variables for the pedigree chart
-$bwidth = 250; // width of boxes on pedigree chart
-$bheight = 80; // height of boxes on pedigree chart
-$baseyoffset = 10; // position the entire pedigree tree relative to the top of the page
-$basexoffset = 10; // position the entire pedigree tree relative to the left of the page
-$bxspacing = 0; // horizontal spacing between boxes on the pedigree chart
-$byspacing = 5; // vertical spacing between boxes on the pedigree chart
-$brborder = 1; // box right border thickness
-$linewidth = 1.5; // width of joining lines
-$shadowcolor = ''; // shadow color for joining lines
-$shadowblur = 0; // shadow blur for joining lines
-$shadowoffsetX = 0; // shadowOffsetX for joining lines
-$shadowoffsetY = 0; // shadowOffsetY for joining lines
-
-// Global variables for the descendancy chart
-$Dbaseyoffset = 20; // position the entire descendancy tree relative to the top of the page
-$Dbasexoffset = 20; // position the entire descendancy tree relative to the left of the page
-$Dbxspacing = 5; // horizontal spacing between boxes
-$Dbyspacing = 10; // vertical spacing between boxes
-$Dbwidth = 260; // width of DIV layer boxes
-$Dbheight = 80; // height of DIV layer boxes
-$Dindent = 15; // width to indent descendancy boxes
-$Darrowwidth = 30; // additional width to include for the up arrows
-$Darrowwidth = 15; // additional width to include for the up arrows
-
-// Dimensions for compact version of chart displays
-$cbwidth = 240;
-$cbheight = 50;
-
-// The largest possible area for charts is 300,000 pixels. As the maximum height or width is 1000 pixels
-$WT_STATS_S_CHART_X = 440;
-$WT_STATS_S_CHART_Y = 125;
-$WT_STATS_L_CHART_X = 900;
-// For map charts, the maximum size is 440 pixels wide by 220 pixels high
-$WT_STATS_MAP_X = 440;
-$WT_STATS_MAP_Y = 220;
-
-$WT_STATS_CHART_COLOR1 = "ffffff";
-$WT_STATS_CHART_COLOR2 = "555555";
-$WT_STATS_CHART_COLOR3 = "cccccc";
+return new WT\Theme\Minimal;
diff --git a/themes/webtrees/css-1.6.2/style.css b/themes/webtrees/css-1.6.2/style.css
index 37f10d7fea..b590d3b9c2 100644
--- a/themes/webtrees/css-1.6.2/style.css
+++ b/themes/webtrees/css-1.6.2/style.css
@@ -4145,8 +4145,7 @@ header h1 {
display: block;
}
-.lang-active,
-.theme-active {
+.secondary-menu .active.theme-active {
color: #006;
font-weight: 900;
}
diff --git a/themes/webtrees/footer.php b/themes/webtrees/footer.php
deleted file mode 100644
index feaea74f89..0000000000
--- a/themes/webtrees/footer.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// Footer for webtrees theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo '</main>';
-if ($view !== 'simple') {
- echo '<footer>';
- echo contact_links();
- echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
- echo '</p>';
-
- if ($WT_TREE && $WT_TREE->getPreference('SHOW_STATS')) {
- echo execution_stats();
- }
- if (exists_pending_change()) {
- echo '<a href="#" onclick="window.open(\'edit_changes.php\', \'_blank\', chan_window_specs); return false;">';
- echo '<p class="error center">', WT_I18N::translate('There are pending changes for you to moderate.'), '</p>';
- echo '</a>';
- }
- echo '</footer>';
-}
diff --git a/themes/webtrees/header.php b/themes/webtrees/header.php
deleted file mode 100644
index eac7a2f120..0000000000
--- a/themes/webtrees/header.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-// Header for webtrees theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-global $WT_IMAGES;
-
-// This theme uses the jQuery “colorbox” plugin to display images
-$this
- ->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
- ->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)
- ->addInlineJavascript('activate_colorbox();')
- ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, { width:"85%", height:"85%", transition:"none", slideshowStart:"'. WT_I18N::translate('Play').'", slideshowStop:"'. WT_I18N::translate('Stop').'", title: function() { var img_title = jQuery(this).data("title"); return img_title; } } );');
-?>
-<!DOCTYPE html>
-<html <?php echo WT_I18N::html_markup(); ?>>
-<head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?php echo header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL); ?>
- <title><?php echo WT_Filter::escapeHtml($title); ?></title>
- <link rel="icon" href="<?php echo WT_CSS_URL; ?>favicon.png" type="image/png">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_THEME_URL; ?>jquery-ui-1.11.2/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_CSS_URL; ?>style.css">
- <!--[if IE 8]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
- <![endif]-->
-</head>
-<body>
- <?php if ($view !== 'simple') { ?>
- <header>
- <div class="header-logo"></div>
- <ul class="secondary-menu" role="menubar">
- <li>
- <?php
- if (Auth::check()) {
- echo '<a href="edituser.php">', WT_I18N::translate('Logged in as '), ' ', WT_Filter::escapeHtml(Auth::user()->getRealName()), '</a></li> <li>', logout_link();
- } else {
- echo login_link();
- }
- ?>
- </li>
- <?php echo WT_MenuBar::getFavoritesMenu(); ?>
- <?php echo WT_MenuBar::getThemeMenu(); ?>
- <?php echo WT_MenuBar::getLanguageMenu(); ?>
- </ul>
- <h1><?php echo WT_TREE_TITLE; ?></h1>
- <form class="header-search" action="search.php" method="post" role="search">
- <input type="hidden" name="action" value="general">
- <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
- <input type="hidden" name="topsearch" value="yes">
- <input type="search" name="query" size="25" placeholder="<?php echo WT_I18N::translate('Search'); ?>">
- <input type="image" class="image" src="<?php echo $WT_IMAGES['search']; ?>" alt="<?php echo WT_I18N::translate('Search'); ?>" title="<?php echo WT_I18N::translate('Search'); ?>">
- </form>
- <nav>
- <ul class="primary-menu" role="menubar">
- <?php echo WT_MenuBar::getGedcomMenu(); ?>
- <?php echo WT_MenuBar::getMyPageMenu(); ?>
- <?php echo WT_MenuBar::getChartsMenu(); ?>
- <?php echo WT_MenuBar::getListsMenu(); ?>
- <?php echo WT_MenuBar::getCalendarMenu(); ?>
- <?php echo WT_MenuBar::getReportsMenu(); ?>
- <?php echo WT_MenuBar::getSearchMenu(); ?>
- <?php echo implode('', WT_MenuBar::getModuleMenus()); ?>
- </ul>
- </nav>
- </header>
- <?php } ?>
- <?php echo WT_FlashMessages::getHtmlMessages(); ?>
- <main id="content">
diff --git a/themes/webtrees/templates/block_main_temp.php b/themes/webtrees/templates/block_main_temp.php
deleted file mode 100644
index 41dc615aa9..0000000000
--- a/themes/webtrees/templates/block_main_temp.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// Template for drawing the main blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <div class="blockheader">
- <?php echo $title; ?>
- </div>
- <div class="blockcontent normal_inner_block <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/webtrees/templates/block_small_temp.php b/themes/webtrees/templates/block_small_temp.php
deleted file mode 100644
index 8fa95335ed..0000000000
--- a/themes/webtrees/templates/block_small_temp.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// Template for drawing the height-restricted blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <div class="blockheader">
- <?php echo $title; ?>
- </div>
- <div class="blockcontent small_inner_block <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/webtrees/templates/compactbox_template.php b/themes/webtrees/templates/compactbox_template.php
deleted file mode 100644
index 4a3386f801..0000000000
--- a/themes/webtrees/templates/compactbox_template.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $outBoxAdd, $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '"' , $outBoxAdd, '>
- <div class="compact_view">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '" title="',strip_tags($name.$addname),'">
- <span class="namedef name',$style,'">', $shortname, '</span>
- </a>
- </div>
- <div class="inout2 details',$style,'">',
- $person->getLifeSpan(), '
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/webtrees/templates/personbox_template.php b/themes/webtrees/templates/personbox_template.php
deleted file mode 100644
index b1fdc7ade2..0000000000
--- a/themes/webtrees/templates/personbox_template.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $genderImage, $BirthDeath, $outBoxAdd,
-// $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '" ',$outBoxAdd,'>
- <div class="noprint icons">', $icons, '</div>',
- '<div class="chart_textbox" style="max-height:', $bheight,'px;">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '">
- <span class="namedef name',$style,'">',
- $name,
- $genderImage,'
- <span class="details',$style,'">' . $LDSord . '</span>
- </span>
- </a>
- <div class="namedef name',$style,'">',$addname,'</div>
- <div class="inout2 details',$style,'">',
- $BirthDeath,
- '</div>
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/webtrees/theme.php b/themes/webtrees/theme.php
index 28927345db..f625281c15 100644
--- a/themes/webtrees/theme.php
+++ b/themes/webtrees/theme.php
@@ -2,10 +2,7 @@
// Standard theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
+// Copyright (C) 2015 webtrees development team.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -20,92 +17,5 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-//
-// PNG Icons By:Alessandro Rei; License: GPL; http://www.kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// Theme name - this needs double quotes, as file is scanned/parsed by script
-$theme_name = "webtrees";
-
-// A version number in the path prevents browser-cache problems during upgrade
-define('WT_CSS_URL', WT_THEME_URL . 'css-1.6.2/');
-
-$headerfile = WT_THEME_DIR.'header.php';
-$footerfile = WT_THEME_DIR.'footer.php';
-
-// Legacy icons.
-$WT_IMAGES=array(
- // used to draw charts
- 'dline' => WT_CSS_URL . 'images/dline.png',
- 'dline2' => WT_CSS_URL . 'images/dline2.png',
- 'hline' => WT_CSS_URL . 'images/hline.png',
- 'spacer' => WT_CSS_URL . 'images/spacer.png',
- 'vline' => WT_CSS_URL . 'images/vline.png',
-
- // used in button images and javascript
- 'add' => WT_CSS_URL . 'images/add.png',
- 'button_family' => WT_CSS_URL . 'images/buttons/family.png',
- 'minus' => WT_CSS_URL . 'images/minus.png',
- 'plus' => WT_CSS_URL . 'images/plus.png',
- 'remove' => WT_CSS_URL . 'images/remove.png',
- 'search' => WT_CSS_URL . 'images/search.png',
-
- // need different sizes before moving to CSS
- 'default_image_M' => WT_CSS_URL . 'images/silhouette_male.png',
- 'default_image_F' => WT_CSS_URL . 'images/silhouette_female.png',
- 'default_image_U' => WT_CSS_URL . 'images/silhouette_unknown.png',
-);
-
-//-- variables for the fan chart
-$fanChart = array(
- 'font' => WT_ROOT . 'includes/fonts/DejaVuSans.ttf',
- 'size' => 7,
- 'color' => '#000000',
- 'bgColor' => '#eeeeee',
- 'bgMColor' => '#b1cff0',
- 'bgFColor' => '#e9daf1'
-);
-
-// Pedigree chart variables
-$bwidth = 250; // width of boxes on pedigree chart
-$bheight = 80; // height of boxes on pedigree chart
-$baseyoffset = 10; // position the entire pedigree tree relative to the top of the page
-$basexoffset = 10; // position the entire pedigree tree relative to the left of the page
-$bxspacing = 1; // horizontal spacing between boxes on the pedigree chart
-$byspacing = 5; // vertical spacing between boxes on the pedigree chart
-$linewidth = 1.5; // width of joining lines
-$shadowcolor = ''; // shadow color for joining lines
-$shadowblur = 0; // shadow blur for joining lines
-$shadowoffsetX = 0; // shadowOffsetX for joining lines
-$shadowoffsetY = 0; // shadowOffsetY for joining lines
-
-// Descendancy and relationship chart variables
-$Dbaseyoffset = 20; // position the entire descendancy tree relative to the top of the page
-$Dbasexoffset = 20; // position the entire descendancy tree relative to the left of the page
-$Dbxspacing = 5; // horizontal spacing between boxes
-$Dbyspacing = 10; // vertical spacing between boxes
-$Dbwidth = 260; // width of DIV layer boxes
-$Dbheight = 80; // height of DIV layer boxes
-$Dindent = 15; // width to indent descendancy boxes
-$Darrowwidth = 30; // additional width to include for the up arrows
-
-// Compact version of chart displays
-$cbwidth = 240;
-$cbheight = 50;
-
-// The largest possible area for charts is 300,000 pixels. As the maximum height or width is 1000 pixels
-$WT_STATS_S_CHART_X = 440;
-$WT_STATS_S_CHART_Y = 125;
-$WT_STATS_L_CHART_X = 900;
-
-// For map charts, the maximum size is 440 pixels wide by 220 pixels high
-$WT_STATS_MAP_X = 440;
-$WT_STATS_MAP_Y = 220;
-$WT_STATS_CHART_COLOR1 = "ffffff";
-$WT_STATS_CHART_COLOR2 = "9ca3d4";
-$WT_STATS_CHART_COLOR3 = "e5e6ef";
+return new WT\Theme\Webtrees;
diff --git a/themes/xenea/css-1.6.2/style.css b/themes/xenea/css-1.6.2/style.css
index e72bb8eea2..ba953484a4 100644
--- a/themes/xenea/css-1.6.2/style.css
+++ b/themes/xenea/css-1.6.2/style.css
@@ -4216,14 +4216,7 @@ header h1 {
display: block;
}
-.secondary-menu li li a.lang-active,
-.secondary-menu li li a.theme-active {
- color: #006;
- font-weight: 900;
-}
-
-.lang-active,
-.theme-active {
+.secondary-menu .active {
color: #006;
font-weight: 900;
}
diff --git a/themes/xenea/footer.php b/themes/xenea/footer.php
deleted file mode 100644
index 7865eb974c..0000000000
--- a/themes/xenea/footer.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Footer for Xenea theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo '</main>';
-if ($view!='simple') {
- echo '<footer>';
- echo contact_links();
- echo '<p class="logo">';
- echo '<a href="', WT_WEBTREES_URL, '" target="_blank" class="icon-webtrees" title="', WT_WEBTREES, ' ', WT_VERSION, '"></a>';
- echo '</p>';
- if ($WT_TREE && $WT_TREE->getPreference('SHOW_STATS')) {
- echo execution_stats();
- }
- if (exists_pending_change()) {
- echo '<a href="#" onclick="window.open(\'edit_changes.php\', \'_blank\', chan_window_specs); return false;">';
- echo '<p class="error center">', WT_I18N::translate('There are pending changes for you to moderate.'), '</p>';
- echo '</a>';
- }
- echo '</footer>';
-}
diff --git a/themes/xenea/header.php b/themes/xenea/header.php
deleted file mode 100644
index d4cbe341cd..0000000000
--- a/themes/xenea/header.php
+++ /dev/null
@@ -1,108 +0,0 @@
-<?php
-// Header for xenea theme
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-use WT\Auth;
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// This theme uses the jQuery “colorbox” plugin to display images
-$this
- ->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
- ->addExternalJavascript(WT_JQUERY_WHEELZOOM_URL)
- ->addInlineJavascript('activate_colorbox();')
- ->addInlineJavascript('jQuery.extend(jQuery.colorbox.settings, {width:"85%", height:"85%", transition:"none", slideshowStart:"'. WT_I18N::translate('Play').'", slideshowStop:"'. WT_I18N::translate('Stop').'"});')
- ->addInlineJavascript('
- jQuery.extend(jQuery.colorbox.settings, {
- title: function() {
- var img_title = jQuery(this).data("title");
- return img_title;
- }
- });
- ');
-?>
-<!DOCTYPE html>
-<html <?php echo WT_I18N::html_markup(); ?>>
-<head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?php echo header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL); ?>
- <title><?php echo WT_Filter::escapeHtml($title); ?></title>
- <link rel="icon" href="<?php echo WT_CSS_URL; ?>favicon.png" type="image/png">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_THEME_URL; ?>jquery-ui-1.11.2/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="<?php echo WT_CSS_URL; ?>style.css">
- <!--[if IE 8]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
- <![endif]-->
-</head>
-<body>
- <?php if ($view !== 'simple') { ?>
- <header>
- <div class="header-upper">
- <h1><?php echo WT_TREE_TITLE; ?></h1>
- <div class="header-search">
- <form action="search.php" method="post" role="search">
- <input type="hidden" name="action" value="general">
- <input type="hidden" name="ged" value="<?php echo WT_GEDCOM; ?>">
- <input type="hidden" name="topsearch" value="yes">
- <input type="search" name="query" size="12" placeholder="<?php echo WT_I18N::translate('Search'); ?>">
- <input type="submit" name="search" value="&gt;">
- </form>
- </div>
- </div>
- <div class="header-lower">
- <ul class="secondary-menu" role="menubar">
- <?php echo WT_MenuBar::getFavoritesMenu(); ?>
- <?php echo WT_MenuBar::getThemeMenu(); ?>
- <?php
- if (Auth::check()) {
- echo '<li><a href="edituser.php">', WT_Filter::escapeHtml(Auth::user()->getRealName()), '</a></li> <li>', logout_link(), '</li>';
- if (WT_USER_CAN_ACCEPT && exists_pending_change()) {
- echo ' <li><a href="#" onclick="window.open(\'edit_changes.php\', \'_blank\', chan_window_specs); return false;" style="color:red;">', WT_I18N::translate('Pending changes'), '</a></li>';
- }
- } else {
- echo '<li>', login_link(), '</li> ';
- }
- ?>
- <?php echo WT_MenuBar::getLanguageMenu(); ?>
- </ul>
- </div>
- <nav>
- <ul class="primary-menu" role="menubar">
- <?php echo WT_MenuBar::getGedcomMenu(); ?>
- <?php echo WT_MenuBar::getMyPageMenu(); ?>
- <?php echo WT_MenuBar::getChartsMenu(); ?>
- <?php echo WT_MenuBar::getListsMenu(); ?>
- <?php echo WT_MenuBar::getCalendarMenu(); ?>
- <?php echo WT_MenuBar::getReportsMenu(); ?>
- <?php echo WT_MenuBar::getSearchMenu(); ?>
- <?php echo implode('', WT_MenuBar::getModuleMenus()); ?>
- </ul>
- </nav>
- </header>
- <?php } ?>
- <?php echo WT_FlashMessages::getHtmlMessages(); ?>
- <main id="content">
diff --git a/themes/xenea/templates/block_main_temp.php b/themes/xenea/templates/block_main_temp.php
deleted file mode 100644
index 0f0b4416e0..0000000000
--- a/themes/xenea/templates/block_main_temp.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// Template for drawing the main blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2008 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <div class="blockheader">
- <?php echo $title; ?>
- </div>
- <div class="blockcontent normal_inner_block <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/xenea/templates/block_small_temp.php b/themes/xenea/templates/block_small_temp.php
deleted file mode 100644
index 37e618400c..0000000000
--- a/themes/xenea/templates/block_small_temp.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// Template for drawing the height-restricted blocks on the portal pages
-//
-// This template expects that the following variables will be set
-// $id - the DOM id for the block div
-// $title - the title of the block
-// $class - the additional class of the block
-// $content - the content of the block
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2008 to 2009 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-?>
-<div id="<?php echo $id; ?>" class="block" >
- <div class="blockheader">
- <?php echo $title; ?>
- </div>
- <div class="blockcontent small_inner_block <?php echo $class; ?>">
- <?php echo $content; ?>
- </div>
-</div>
diff --git a/themes/xenea/templates/compactbox_template.php b/themes/xenea/templates/compactbox_template.php
deleted file mode 100644
index 4a3386f801..0000000000
--- a/themes/xenea/templates/compactbox_template.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $outBoxAdd, $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '"' , $outBoxAdd, '>
- <div class="compact_view">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '" title="',strip_tags($name.$addname),'">
- <span class="namedef name',$style,'">', $shortname, '</span>
- </a>
- </div>
- <div class="inout2 details',$style,'">',
- $person->getLifeSpan(), '
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/xenea/templates/personbox_template.php b/themes/xenea/templates/personbox_template.php
deleted file mode 100644
index b1fdc7ade2..0000000000
--- a/themes/xenea/templates/personbox_template.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// Template for drawing person boxes
-// This template expects that the following variables will be set
-// $pid, $boxID, $icons, $GEDCOM, $style,
-// $name, $genderImage, $BirthDeath, $outBoxAdd,
-// $addname
-//
-// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2010 PGV Development Team. All rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-echo
-'<div data-pid="'. $pid . '" ',$outBoxAdd,'>
- <div class="noprint icons">', $icons, '</div>',
- '<div class="chart_textbox" style="max-height:', $bheight,'px;">',
- $thumbnail,
- '<a href="individual.php?pid=', $pid, '&amp;ged=', rawurlencode($GEDCOM), '">
- <span class="namedef name',$style,'">',
- $name,
- $genderImage,'
- <span class="details',$style,'">' . $LDSord . '</span>
- </span>
- </a>
- <div class="namedef name',$style,'">',$addname,'</div>
- <div class="inout2 details',$style,'">',
- $BirthDeath,
- '</div>
- </div>
- <div class="inout"></div>
-</div>';
-
diff --git a/themes/xenea/theme.php b/themes/xenea/theme.php
index e54bfcfd58..4e7fe5a4ff 100644
--- a/themes/xenea/theme.php
+++ b/themes/xenea/theme.php
@@ -2,10 +2,7 @@
// Xenea theme
//
// webtrees: Web based Family History software
-// Copyright (C) 2014 webtrees development team.
-//
-// Derived from PhpGedView
-// Copyright (C) 2002 to 2010 PGV Development Team.
+// Copyright (C) 2015 webtrees development team.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,88 +18,4 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if (!defined('WT_WEBTREES')) {
- header('HTTP/1.0 403 Forbidden');
- exit;
-}
-
-// Theme name - this needs double quotes, as file is scanned/parsed by script
-$theme_name = "xenea"; /* I18N: Name of a theme. */ WT_I18N::translate('xenea');
-
-// A version number in the path prevents browser-cache problems during upgrade
-define('WT_CSS_URL', WT_THEME_URL . 'css-1.6.2/');
-
-$headerfile = WT_THEME_DIR.'header.php';
-$footerfile = WT_THEME_DIR.'footer.php';
-
-//-- variables for image names
-$WT_IMAGES = array(
- // used to draw charts
- 'dline' => WT_CSS_URL . 'images/dline.png',
- 'dline2' => WT_CSS_URL . 'images/dline2.png',
- 'hline' => WT_CSS_URL . 'images/hline.png',
- 'spacer' => WT_CSS_URL . 'images/spacer.png',
- 'vline' => WT_CSS_URL . 'images/vline.png',
-
- // used in button images and javascript
- 'add' => WT_CSS_URL . 'images/add.png',
- 'button_family' => WT_CSS_URL . 'images/buttons/family.png',
- 'minus' => WT_CSS_URL . 'images/minus.png',
- 'plus' => WT_CSS_URL . 'images/plus.png',
- 'remove' => WT_CSS_URL . 'images/remove.png',
- 'search' => WT_CSS_URL . 'images/search.png',
-
- // need different sizes before moving to CSS
- 'default_image_F' => WT_CSS_URL . 'images/silhouette_female.png',
- 'default_image_M' => WT_CSS_URL . 'images/silhouette_male.png',
- 'default_image_U' => WT_CSS_URL . 'images/silhouette_unknown.png',
-);
-
-// Variables for the Fan chart
-$fanChart = array(
- 'font' => WT_ROOT . 'includes/fonts/DejaVuSans.ttf',
- 'size' => 7,
- 'color' => '#000000',
- 'bgColor' => '#eeeeee',
- 'bgMColor' => '#b1cff0',
- 'bgFColor' => '#e9daf1'
-);
-
-// This section defines variables for the pedigree chart
-$bwidth = 250; // width of boxes on pedigree chart
-$bheight = 80; // height of boxes on pedigree chart
-$baseyoffset = 10; // position the entire pedigree tree relative to the top of the page
-$basexoffset = 10; // position the entire pedigree tree relative to the left of the page
-$bxspacing = 1; // horizontal spacing between boxes on the pedigree chart
-$byspacing = 5; // vertical spacing between boxes on the pedigree chart
-$brborder = 1; // box right border thickness
-$linewidth = 1.5; // width of joining lines
-$shadowcolor = ''; // shadow color for joining lines
-$shadowblur = 0; // shadow blur for joining lines
-$shadowoffsetX = 0; // shadowOffsetX for joining lines
-$shadowoffsetY = 0; // shadowOffsetY for joining lines
-
-// Global variables for the descendancy chart
-$Dbaseyoffset = 20; // position the entire descendancy tree relative to the top of the page
-$Dbasexoffset = 20; // position the entire descendancy tree relative to the left of the page
-$Dbxspacing = 5; // horizontal spacing between boxes
-$Dbyspacing = 10; // vertical spacing between boxes
-$Dbwidth = 260; // width of DIV layer boxes
-$Dbheight = 80; // height of DIV layer boxes
-$Dindent = 15; // width to indent descendancy boxes
-$Darrowwidth = 30; // additional width to include for the up arrows
-
-// Dimensions for compact version of chart displays
-$cbwidth=240;
-$cbheight=50;
-
-// The largest possible area for charts is 300,000 pixels. As the maximum height or width is 1000 pixels
-$WT_STATS_S_CHART_X = 440;
-$WT_STATS_S_CHART_Y = 125;
-$WT_STATS_L_CHART_X = 900;
-// For map charts, the maximum size is 440 pixels wide by 220 pixels high
-$WT_STATS_MAP_X = 440;
-$WT_STATS_MAP_Y = 220;
-$WT_STATS_CHART_COLOR1 = "ffffff";
-$WT_STATS_CHART_COLOR2 = "84beff";
-$WT_STATS_CHART_COLOR3 = "c3dfff";
+return new WT\Theme\Xenea;