From c98515883097467896a3f46b755c8cb892fe8961 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Tue, 29 Oct 2013 18:42:08 +0100 Subject: Import initial avec une arbrescence éclatée MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README | 32 ++++ TODO | 4 + code/admin/add.php | 55 +++++++ code/admin/admin.css | 15 ++ code/admin/admin.js | 123 ++++++++++++++ code/admin/ajax.php | 63 ++++++++ code/admin/auth.php | 53 ++++++ code/admin/editor-bind-code.html | 71 ++++++++ code/admin/index.php | 111 +++++++++++++ code/admin/render.php | 59 +++++++ code/admin/utils.php | 179 +++++++++++++++++++++ code/index.php | 9 ++ dist/build_all.sh | 2 + dist/debian/TODO | 0 dist/out/.builds-goes-here | 1 + dist/scripts/po2mo.sh | 9 ++ libs/microajax/microajax.minified.js | 1 + libs/treeview/treeview.css | 121 ++++++++++++++ libs/treeview/treeview_icons.png | Bin 0 -> 762 bytes locale/en_US.po | 110 +++++++++++++ locale/fr_FR.po | 110 +++++++++++++ samplefiles/content/en/start/div-content.html | 27 ++++ samplefiles/content/en/start/div-teaser.html | 3 + samplefiles/content/en/start/props.ini | 5 + samplefiles/content/fr/accueil/div-content.html | 27 ++++ samplefiles/content/fr/accueil/div-teaser.html | 3 + samplefiles/content/fr/accueil/props.ini | 5 + samplefiles/content/site_conf.ini | 3 + samplefiles/templates/aloha/images/background.png | Bin 0 -> 251 bytes .../aloha/images/external-link-ltr-icon.png | Bin 0 -> 279 bytes samplefiles/templates/aloha/layout-article.php | 15 ++ samplefiles/templates/aloha/screen.css | 79 +++++++++ samplefiles/templates/default/layout-article.php | 12 ++ samplefiles/templates/default/screen.css | 0 34 files changed, 1307 insertions(+) create mode 100644 README create mode 100644 TODO create mode 100644 code/admin/add.php create mode 100644 code/admin/admin.css create mode 100644 code/admin/admin.js create mode 100644 code/admin/ajax.php create mode 100644 code/admin/auth.php create mode 100644 code/admin/editor-bind-code.html create mode 100644 code/admin/index.php create mode 100644 code/admin/render.php create mode 100644 code/admin/utils.php create mode 100644 code/index.php create mode 100755 dist/build_all.sh create mode 100644 dist/debian/TODO create mode 100644 dist/out/.builds-goes-here create mode 100755 dist/scripts/po2mo.sh create mode 100644 libs/microajax/microajax.minified.js create mode 100644 libs/treeview/treeview.css create mode 100644 libs/treeview/treeview_icons.png create mode 100644 locale/en_US.po create mode 100644 locale/fr_FR.po create mode 100644 samplefiles/content/en/start/div-content.html create mode 100644 samplefiles/content/en/start/div-teaser.html create mode 100644 samplefiles/content/en/start/props.ini create mode 100644 samplefiles/content/fr/accueil/div-content.html create mode 100644 samplefiles/content/fr/accueil/div-teaser.html create mode 100644 samplefiles/content/fr/accueil/props.ini create mode 100644 samplefiles/content/site_conf.ini create mode 100644 samplefiles/templates/aloha/images/background.png create mode 100644 samplefiles/templates/aloha/images/external-link-ltr-icon.png create mode 100644 samplefiles/templates/aloha/layout-article.php create mode 100644 samplefiles/templates/aloha/screen.css create mode 100644 samplefiles/templates/default/layout-article.php create mode 100644 samplefiles/templates/default/screen.css diff --git a/README b/README new file mode 100644 index 0000000..fdedf5b --- /dev/null +++ b/README @@ -0,0 +1,32 @@ + +Open-Source or public-domain components reused in this project + * TreeView (http://acidmartin.wordpress.com/tag/html5-treeview/) + * MicroAJAX (http://code.google.com/p/microajax/) + * Aloha Editor + * PlUpload + + +MicroAJAX Copyright Notice : + +/* +Copyright (c) 2008 Stefan Lange-Hegermann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + diff --git a/TODO b/TODO new file mode 100644 index 0000000..cbaeb35 --- /dev/null +++ b/TODO @@ -0,0 +1,4 @@ + +S'intéresser à http://pico.dev7studios.com/docs.html + +Ecrire un writer pour sauver les modifs faites avec aloha diff --git a/code/admin/add.php b/code/admin/add.php new file mode 100644 index 0000000..c839e0a --- /dev/null +++ b/code/admin/add.php @@ -0,0 +1,55 @@ + + + + + + + + +<?=($kind=='media')?_('Add media'):_('Add page')?> + + +
+ +
+ +
+ +
+
+ +
+ + +
+ + + + + + + +
+ +
+ + diff --git a/code/admin/admin.css b/code/admin/admin.css new file mode 100644 index 0000000..f01a35d --- /dev/null +++ b/code/admin/admin.css @@ -0,0 +1,15 @@ +fieldset { + display:inline-block; + vertical-align: top; + margin: 0.5em; + width:45%; +} +fieldset>label { + display:inline-block; + text-align:right; + width: 12em; +} +.tree_add { + display:block; + float:right; +} diff --git a/code/admin/admin.js b/code/admin/admin.js new file mode 100644 index 0000000..3d0125d --- /dev/null +++ b/code/admin/admin.js @@ -0,0 +1,123 @@ +// Helpers +function gEBId(id) { return document.getElementById(id) }; + +function microAjaxJSON(query,callback) { + microAjax(query,function (res) { + var parsed_json; + try { + parsed_json = JSON.parse(res); + } catch(err) { + alert(res); + return; + } + callback(parsed_json); + }); +} + +// Admin simple actions +function select_fold(path) { + gEBId("fold_path").value=path; +} + +// Admin AJAX actions +function load_page_props(path) { + gEBId("page_path").value=path; + var url = "ajax.php?action=load_page_props&path=" + encodeURIComponent(path); + microAjaxJSON(url, function (parsed_json) { + gEBId("page_title").value = parsed_json.page_title; + gEBId("page_description").value = parsed_json.page_description; + gEBId("page_keywords").value = parsed_json.page_keywords; + }); +} + +function load_media_props(path) { + gEBId("media_path").value=path; + var url = "ajax.php?action=load_media_props&path=" + encodeURIComponent(path); + microAjaxJSON(url, function (parsed_json) { + gEBId("media_title").value = parsed_json.media_title; + gEBId("media_description").value = parsed_json.media_description; + //gEBId("media_keywords").value = parsed_json.media_keywords; + }); +} + +function save_page_props() { + var path = gEBId("page_path").value; + var page_title = gEBId("page_title").value; + var page_description = gEBId("page_description").value; + var page_keywords = gEBId("page_keywords").value; + + //TODO : check against regex + + var url = "ajax.php?action=save_page_props" + + "&path=" + encodeURIComponent(path) + + "&page_title=" + encodeURIComponent(page_title) + + "&page_description=" + encodeURIComponent(page_description) + + "&page_keywords=" + encodeURIComponent(page_keywords); + + microAjaxJSON(url, function (parsed_json) { + if ( parsed_json.result != "OK" ) { + alert("Error\nResult: " + parsed_json.result + "\nRequest: " + url); + return; + } + //TODO : says to user that the work is done + }); +} + +function save_media_props() { + var path = gEBId("media_path").value; + var title = gEBId("media_title").value; + var description = gEBId("media_description").value; + //var keywords = gEBId("media_keywords").value; + + //TODO : check against regex + + var url = "ajax.php?action=save_media_props" + + "&path=" + encodeURIComponent(path) + + "&title=" + encodeURIComponent(title) + + "&description=" + encodeURIComponent(description); + // + "&keywords=" + encodeURIComponent(keywords); + + microAjaxJSON(url, function (parsed_json) { + if ( parsed_json.result != "OK" ) { + alert("Error\nResult: " + parsed_json.result + "\nRequest: " + url); + return; + } + //TODO : says to user that the work is done + }); +} + +function save_site_props() { + //TODO +} + +// Admin other actions (with page change or refresh) +function go_add_form(kind) { + document.location = 'add.php?kind=' + encodeURIComponent(kind); +} + +function go_add(kind,type) { + var path = gEBId("fold_path").value; + var name = gEBId("fold_add_name").value; + // TODO : check name and path against regex + var url = 'add.php?kind=' + encodeURIComponent(kind) + + '&action=add_' + encodeURIComponent(type) + + '&path=' + encodeURIComponent(path) + + '&name=' + encodeURIComponent(name); + document.location = url; +} + +function go_edit_page() { + var path = gEBId("page_path").value; + document.location = 'render.php?action=edit&page=' + encodeURIComponent(path); +} + +function go_delete_page() { + var path = gEBId("page_path").value; + //TODO : confirmation, ajax query, if OK, confirm then refresh +} + +function go_delete_media() { + var path = gEBId("page_path").value; + //TODO : confirmation, ajax query, if OK, confirm then refresh +} + diff --git a/code/admin/ajax.php b/code/admin/ajax.php new file mode 100644 index 0000000..0893843 --- /dev/null +++ b/code/admin/ajax.php @@ -0,0 +1,63 @@ + 'test title', + 'media_description' => 'test descr', + 'media_keywords' => 'test, keyword', + ); + } + + function save_page_props($path) { + //TODO : Should validate props here also... + $props=load_page_props($path); + + foreach ( array('page_title', 'page_description', 'page_keywords') as $k ) { + if ( array_key_exists($k,$_GET) ) $props[$k]=$_GET[$k]; + } + + $ini_path="content/$path/props.ini"; + return write_ini_file($props, $ini_path, false); + } + + function save_media_props($path) { + return FALSE; + } + + // URL params clean-up + $action=sanitize($_GET, 'action', '/[^a-z_]+/', 'none'); /* Could be : load_page_props, load_media_props... */ + $path=sanitize($_GET, 'path', '/[^a-z0-9\/]+/', ''); // Never put \. in this regex + + switch($action) { + case 'load_page_props': + $res = load_page_props($path); + break; + case 'load_media_props': + $res = load_media_props($path); + break; + case 'save_page_props': + if ( save_page_props($path) ) { + $res=array('result' => 'OK'); + } else { + $res=array('result' => 'FAILED'); + } + break; + case 'save_media_props': + if ( save_media_props($path) ) { + $res=array('result' => 'OK'); + } else { + $res=array('result' => 'FAILED'); + } + break; + default: + $res = array('result' => 'ERROR', 'error'=>'invalid action'); + break; + } + echo json_encode($res); +?> diff --git a/code/admin/auth.php b/code/admin/auth.php new file mode 100644 index 0000000..f4afee0 --- /dev/null +++ b/code/admin/auth.php @@ -0,0 +1,53 @@ + 0) ) { + header('Location: ' . $_SESSION['auth_return']); + } + echo "Authenticated\n"; + exit(); + } else { + $auth_fail=TRUE; + } + } +?> + + + + +Authentification + + +
+
+ Authentification + + + + + + + + + + + + +
+ + +
+
+
+ + diff --git a/code/admin/editor-bind-code.html b/code/admin/editor-bind-code.html new file mode 100644 index 0000000..d6a9825 --- /dev/null +++ b/code/admin/editor-bind-code.html @@ -0,0 +1,71 @@ + + + + + + + + + diff --git a/code/admin/index.php b/code/admin/index.php new file mode 100644 index 0000000..ddb95b3 --- /dev/null +++ b/code/admin/index.php @@ -0,0 +1,111 @@ + + + + + + + + + +<?=_('Admin')?> + + +
+ +
+ + +
+' . print_r($page_tree,true) . '' . "\n"; + php_array_to_tree($page_tree, '', 'load_page_props', '', 'pagedir-0'); +?> +
+
+ +
+ + +
+ + + + + +

+ + +
+ + +
+ + +
+ + +
+
+ +
+ + +
+' . print_r($media_tree,true) . '' . "\n"; + php_array_to_tree($media_tree, '', 'load_media_props', '', 'mediadir-0'); +?> +
+
+ +
+ + +
+ + + + + +

+ + +
+ + +
+ + +
+
+ +
+ + +
+ + +
+ + +
+
+ +
+ + diff --git a/code/admin/render.php b/code/admin/render.php new file mode 100644 index 0000000..9d4175e --- /dev/null +++ b/code/admin/render.php @@ -0,0 +1,59 @@ + + + + + +<?=$page_props['page_title']?> + + +screen.css"> + + + + + +'ok', 'size' => $size)); + } + } +?> diff --git a/code/admin/utils.php b/code/admin/utils.php new file mode 100644 index 0000000..f02146a --- /dev/null +++ b/code/admin/utils.php @@ -0,0 +1,179 @@ + $v ) { + if ( array_key_exists($k, $array_entry_props) + && array_key_exists('replace_chars_re', $array_entry_props[$k]) + && array_key_exists('default_value', $array_entry_props[$k]) + ) { + $array_ini[$k] = sanitize($array_ini, $k, + $array_entry_props[$k]['replace_chars_re'], + $array_entry_props[$k]['default_value'] ); + } else { + unset($array_ini[$k]); + } + } + // Set default value for all missing ini entries (if default value exists) + foreach ( $array_entry_props as $k => $v ) { + if ( !array_key_exists($k, $array_ini) && array_key_exists('default_value', $array_entry_props[$k]) ) { + $array_ini[$k] = $array_entry_props[$k]['default_value']; + } + } + } + return $array_ini; + } + + function load_ini_site_conf($ini_path) { + $sanitize_site_conf = array( + 'site_admin_lang' => array( 'replace_chars_re' => '/[^a-zA-Z\/\_-]+/', 'default_value' => 'C' ), + 'site_default_page' => array( 'replace_chars_re' => '/[^a-z0-9\/]+/', 'default_value' => 'en/index' ), + ); + return sanitize_ini($ini_path, $sanitize_site_conf); + } + + function load_ini_page_props($page) { + $sanitize_page_props = array( + //FIXME : title regex : all but html special chars ? + 'page_title' => array( 'replace_chars_re' => '/[^\w !_,.-]+/', 'default_value' => '(missing title in props.ini)' ), + 'page_template' => array( 'replace_chars_re' => '/[^a-z0-9]+/', 'default_value' => 'default' ), + 'page_layout' => array( 'replace_chars_re' => '/[^a-z0-9]+/', 'default_value' => 'article' ), + 'page_description' => array( 'replace_chars_re' => '/[^\w !_,.-]+/', 'default_value' => '(missing description in props.ini)' ), + 'page_keywords' => array( 'replace_chars_re' => '/[^\w !_,.-]+/', 'default_value' => '(missing keywords in props.ini)' ), + ); + $ini_path="content/$page/props.ini"; + return sanitize_ini($ini_path, $sanitize_page_props); + } + + function l10n_init($lang) { + setlocale(LC_MESSAGES, "$lang.utf8"); + $base = bindtextdomain('editablesite', './locale'); + $domain = textdomain('editablesite'); + bind_textdomain_codeset('editablesite', 'UTF-8'); + //echo "
l10n file is '$base/$lang.utf8/LC_MESSAGES/$domain.mo'
\n"; + } + + function need_auth() { + session_start(); + if ( ! array_key_exists('auth_user', $_SESSION) || $_SESSION['auth_user'] !== TRUE ) { + $_SESSION['auth_return'] = $_SERVER['REQUEST_URI']; + header('Location: auth.php'); + exit(); + } + } + + function is_ress($kind, $path) { + switch ($kind) { + case 'page': return is_file($path.'/props.ini'); + case 'media': return substr($path, -4)=='.jpg' && is_file($path); + default : return FALSE; + } + } + + function strcmp_tree($a,$b) { + if (is_array($a) || is_array($b) ) return 0; + return strnatcasecmp($a,$b); + } + + function find_all($path, $kind) { + $result=array(); + if ( $handle = opendir($path) ) { + while (FALSE !== ($entry = readdir($handle))) { + if ( array_search($entry, array('.','..')) !== FALSE ) continue; + $childpath=$path.'/'.$entry; + if ( is_ress($kind, $childpath) ) $result[] = $entry; + else if ( is_dir($childpath) ) $result[$entry]=find_all($childpath,$kind); + } + closedir($handle); + } + uasort($result, 'strcmp_tree'); + return $result; + } + + function php_array_to_tree($page_tree, $node_cb, $leaf_cb='', $path='', $itemid="item-0") { + if ( ! is_array($page_tree) ) return; + echo "\n"; + } + + function safe_put_file($path, $content) { + //FIXME : if exists, then mktemp, put in it then rm and mv. Right preservation problems ? + if ($handle = fopen($path, 'w')) { + $res = fwrite($handle, $content); + fclose($handle); + } + } + + function _write_ini_file_r(&$content, $assoc_arr, $has_sections) + { + foreach ($assoc_arr as $key => $val) { + if (is_array($val)) { + if($has_sections) { + $content .= "[$key]\n"; + _write_ini_file_r($content, $val, false); + } else { + foreach($val as $iKey => $iVal) { + if (is_int($iKey)) + $content .= $key ."[] = $iVal\n"; + else + $content .= $key ."[$iKey] = $iVal\n"; + } + } + } else { + if ( preg_match('/^\w+$/',$val)===1 ) + $content .= "$key = $val\n"; + else + $content .= "$key = \"" . str_replace('"', '\"', $val) . "\"\n"; + } + } + } + + function write_ini_file($assoc_arr, $path, $has_sections) { + $res=FALSE; + $content = ''; + _write_ini_file_r($content, $assoc_arr, $has_sections); + if (is_string($content) && strlen($content) > 0) { + safe_put_file($path, $content); + } + + return $res; + } + diff --git a/code/index.php b/code/index.php new file mode 100644 index 0000000..b07f778 --- /dev/null +++ b/code/index.php @@ -0,0 +1,9 @@ +\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" +"X-Poedit-Basepath: /var/www/EditableSite\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: admin\n" + +#: admin/index.php:57 +msgid "Admin" +msgstr "Admin" + +#: admin/index.php:63 +msgid "Page Tree" +msgstr "Page Tree" + +#: admin/index.php:72 +msgid "Selected page" +msgstr "Selected page" + +#: admin/index.php:73 +msgid "Page path" +msgstr "Page path" + +#: admin/index.php:74 +msgid "(choose a page in the tree)" +msgstr "(choose a page in the tree)" + +#: admin/index.php:76 +#: admin/index.php:109 +msgid "Actions" +msgstr "Actions" + +#: admin/index.php:77 +msgid "Edit page" +msgstr "Edit page" + +#: admin/index.php:78 +msgid "Delete page" +msgstr "Delete page" + +#: admin/index.php:82 +msgid "Page title" +msgstr "Page title" + +#: admin/index.php:85 +msgid "Page description" +msgstr "Page description" + +#: admin/index.php:88 +msgid "Page keywords" +msgstr "Page keywords" + +#: admin/index.php:92 +#: admin/index.php:125 +#: admin/index.php:137 +msgid "Save properties" +msgstr "Save properties" + +#: admin/index.php:96 +msgid "Media Tree" +msgstr "Media Tree" + +#: admin/index.php:105 +msgid "Selected Media" +msgstr "Selected Media" + +#: admin/index.php:106 +msgid "Media path" +msgstr "Media path" + +#: admin/index.php:107 +msgid "(choose a media in the tree)" +msgstr "(choose a media in the tree)" + +#: admin/index.php:111 +msgid "Delete media" +msgstr "Delete media" + +#: admin/index.php:115 +msgid "Media title" +msgstr "Media title" + +#: admin/index.php:118 +msgid "Media description" +msgstr "Media description" + +#: admin/index.php:129 +msgid "Site properties" +msgstr "Site properties" + +#: admin/index.php:130 +msgid "Admin lang" +msgstr "Admin lang" + +#: admin/index.php:133 +msgid "Default page" +msgstr "Default page" + diff --git a/locale/fr_FR.po b/locale/fr_FR.po new file mode 100644 index 0000000..665eb43 --- /dev/null +++ b/locale/fr_FR.po @@ -0,0 +1,110 @@ +msgid "" +msgstr "" +"Project-Id-Version: EditableSite\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-28 18:15+0100\n" +"PO-Revision-Date: 2013-10-28 20:11+0100\n" +"Last-Translator: Ludovic Pouzenc \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" +"X-Poedit-Basepath: /var/www/EditableSite\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: admin\n" + +#: admin/index.php:57 +msgid "Admin" +msgstr "Admin" + +#: admin/index.php:63 +msgid "Page Tree" +msgstr "Arborescence des pages" + +#: admin/index.php:72 +msgid "Selected page" +msgstr "Page sélectionnée" + +#: admin/index.php:73 +msgid "Page path" +msgstr "Chemin de la page" + +#: admin/index.php:74 +msgid "(choose a page in the tree)" +msgstr "(choisir une page de l'arbre)" + +#: admin/index.php:76 +#: admin/index.php:109 +msgid "Actions" +msgstr "Actions" + +#: admin/index.php:77 +msgid "Edit page" +msgstr "Éditer" + +#: admin/index.php:78 +msgid "Delete page" +msgstr "Supprimer" + +#: admin/index.php:82 +msgid "Page title" +msgstr "Titre" + +#: admin/index.php:85 +msgid "Page description" +msgstr "Description" + +#: admin/index.php:88 +msgid "Page keywords" +msgstr "Mots-clés" + +#: admin/index.php:92 +#: admin/index.php:125 +#: admin/index.php:137 +msgid "Save properties" +msgstr "Sauver les propriétés" + +#: admin/index.php:96 +msgid "Media Tree" +msgstr "Arborescence des médias" + +#: admin/index.php:105 +msgid "Selected Media" +msgstr "Média sélectionné" + +#: admin/index.php:106 +msgid "Media path" +msgstr "Chemin du media" + +#: admin/index.php:107 +msgid "(choose a media in the tree)" +msgstr "(choisir un media de l'arbre)" + +#: admin/index.php:111 +msgid "Delete media" +msgstr "Supprimer" + +#: admin/index.php:115 +msgid "Media title" +msgstr "Titre" + +#: admin/index.php:118 +msgid "Media description" +msgstr "Description" + +#: admin/index.php:129 +msgid "Site properties" +msgstr "Propriétés du site" + +#: admin/index.php:130 +msgid "Admin lang" +msgstr "Langue outil admin" + +#: admin/index.php:133 +msgid "Default page" +msgstr "Page par défaut" + diff --git a/samplefiles/content/en/start/div-content.html b/samplefiles/content/en/start/div-content.html new file mode 100644 index 0000000..2aea644 --- /dev/null +++ b/samplefiles/content/en/start/div-content.html @@ -0,0 +1,27 @@ +

Etymology

+

The word aloha derives from the Proto-Polynesian root *qalofa. It has cognates in other Polynesian languages, such as Samoan alofa +and Māori aroha, also meaning "love."

+ + + + +
with a caption.
Thisis
atable.
+

A folk etymology claims that it derives from a compound of the Hawaiian words alo meaning "presence", "front", "face", or "share"; and +ha, meaning "breath of life" or "essence of life." Although alo does indeed mean "presence" etc., the word for breath is spelled with a macron +or kahakō over the a (hā) whereas the word aloha does not have a long a.

+

Usage

+

Before contact with the West, the words used for greeting were welina and anoai. Today, "aloha kakahiaka" is the phrase for "good +morning." "Aloha ʻauinalā" means "good afternoon" and "aloha ahiahi" means "good evening." "Aloha kākou" is a common form of "welcome to all."

+

In modern Hawaiʻi, numerous businesses have aloha in their names, with more than 3 pages of listings in the Oʻahu phone book alone.

+

Trends

+

Recent trends are popularizing the term elsewhere in the United States. Popular entertainer, Broadway star and Hollywood actress Bette +Midler, born in Honolulu, uses the greeting frequently in national appearances. The word was also used frequently in the hit television drama +Hawaii Five-O. In the influential 1982 film comedy Fast Times at Ridgemont High, the eccentric teacher Mr. Hand makes use of the greeting. The +Aloha Spirit is a major concept in Lilo and Stitch, a very popular Disney series of movies and TV shows, set in Hawaiʻi. The drama series Lost, +shot in Hawaiʻi, has a thank you note at the end of the credits saying "We thank the people of Hawaiʻi and their Aloha Spirit". Aloha is a term +also used in the Nickelodeon program Rocket Power.

+ diff --git a/samplefiles/content/en/start/div-teaser.html b/samplefiles/content/en/start/div-teaser.html new file mode 100644 index 0000000..414f783 --- /dev/null +++ b/samplefiles/content/en/start/div-teaser.html @@ -0,0 +1,3 @@ +

Aloha in the Hawaiian language means affection, love, peace, compassion and mercy. Since the middle of the 19th century, it also +has come to be used as an English greeting to say goodbye and hello. Currently, it is mostly used in the sense of hello; however, +it is used as the above.

diff --git a/samplefiles/content/en/start/props.ini b/samplefiles/content/en/start/props.ini new file mode 100644 index 0000000..63546c0 --- /dev/null +++ b/samplefiles/content/en/start/props.ini @@ -0,0 +1,5 @@ +page_template = default +page_layout = article +page_title = "Aloha, World!" +page_description = "Hello world for the mini site creator tool" +page_keywords = "Hello, world" diff --git a/samplefiles/content/fr/accueil/div-content.html b/samplefiles/content/fr/accueil/div-content.html new file mode 100644 index 0000000..2aea644 --- /dev/null +++ b/samplefiles/content/fr/accueil/div-content.html @@ -0,0 +1,27 @@ +

Etymology

+

The word aloha derives from the Proto-Polynesian root *qalofa. It has cognates in other Polynesian languages, such as Samoan alofa +and Māori aroha, also meaning "love."

+ + + + +
with a caption.
Thisis
atable.
+

A folk etymology claims that it derives from a compound of the Hawaiian words alo meaning "presence", "front", "face", or "share"; and +ha, meaning "breath of life" or "essence of life." Although alo does indeed mean "presence" etc., the word for breath is spelled with a macron +or kahakō over the a (hā) whereas the word aloha does not have a long a.

+

Usage

+

Before contact with the West, the words used for greeting were welina and anoai. Today, "aloha kakahiaka" is the phrase for "good +morning." "Aloha ʻauinalā" means "good afternoon" and "aloha ahiahi" means "good evening." "Aloha kākou" is a common form of "welcome to all."

+

In modern Hawaiʻi, numerous businesses have aloha in their names, with more than 3 pages of listings in the Oʻahu phone book alone.

+

Trends

+

Recent trends are popularizing the term elsewhere in the United States. Popular entertainer, Broadway star and Hollywood actress Bette +Midler, born in Honolulu, uses the greeting frequently in national appearances. The word was also used frequently in the hit television drama +Hawaii Five-O. In the influential 1982 film comedy Fast Times at Ridgemont High, the eccentric teacher Mr. Hand makes use of the greeting. The +Aloha Spirit is a major concept in Lilo and Stitch, a very popular Disney series of movies and TV shows, set in Hawaiʻi. The drama series Lost, +shot in Hawaiʻi, has a thank you note at the end of the credits saying "We thank the people of Hawaiʻi and their Aloha Spirit". Aloha is a term +also used in the Nickelodeon program Rocket Power.

+ diff --git a/samplefiles/content/fr/accueil/div-teaser.html b/samplefiles/content/fr/accueil/div-teaser.html new file mode 100644 index 0000000..414f783 --- /dev/null +++ b/samplefiles/content/fr/accueil/div-teaser.html @@ -0,0 +1,3 @@ +

Aloha in the Hawaiian language means affection, love, peace, compassion and mercy. Since the middle of the 19th century, it also +has come to be used as an English greeting to say goodbye and hello. Currently, it is mostly used in the sense of hello; however, +it is used as the above.

diff --git a/samplefiles/content/fr/accueil/props.ini b/samplefiles/content/fr/accueil/props.ini new file mode 100644 index 0000000..c833c34 --- /dev/null +++ b/samplefiles/content/fr/accueil/props.ini @@ -0,0 +1,5 @@ +page_template = default +page_layout = article +page_title = "Démonstration Aloha" +page_description = "Cette page reprends la démonstration de l'éditeur Aloha" +page_keywords = "Hello, world, démo" diff --git a/samplefiles/content/site_conf.ini b/samplefiles/content/site_conf.ini new file mode 100644 index 0000000..69ad74a --- /dev/null +++ b/samplefiles/content/site_conf.ini @@ -0,0 +1,3 @@ +site_admin_lang = "fr_FR" +;site_admin_lang = "en_US" +site_default_page = "fr/accueil" diff --git a/samplefiles/templates/aloha/images/background.png b/samplefiles/templates/aloha/images/background.png new file mode 100644 index 0000000..64ece57 Binary files /dev/null and b/samplefiles/templates/aloha/images/background.png differ diff --git a/samplefiles/templates/aloha/images/external-link-ltr-icon.png b/samplefiles/templates/aloha/images/external-link-ltr-icon.png new file mode 100644 index 0000000..4b710b0 Binary files /dev/null and b/samplefiles/templates/aloha/images/external-link-ltr-icon.png differ diff --git a/samplefiles/templates/aloha/layout-article.php b/samplefiles/templates/aloha/layout-article.php new file mode 100644 index 0000000..86a65a7 --- /dev/null +++ b/samplefiles/templates/aloha/layout-article.php @@ -0,0 +1,15 @@ +
+ +

+
+ +
+ +
+ +
+ +
+ +
+
diff --git a/samplefiles/templates/aloha/screen.css b/samplefiles/templates/aloha/screen.css new file mode 100644 index 0000000..cec5b0a --- /dev/null +++ b/samplefiles/templates/aloha/screen.css @@ -0,0 +1,79 @@ +body { + font-family: sans-serif; +} + +body { + background-image: url("images/background.png"); +} + +#bodyContent { + font-size:0.8em; +} + +h1, h2, h3, h4, h5, h6 { + font-family: sans-serif; + color: #1c94c4; + border-bottom:1px solid #AAAAAA; + padding-bottom:0.17em; + padding-top:0.5em; +} + +h1 { font-size: 188%; } +h2 { font-size: 150%; } +h3 { font-size: 132%; } +h4 { font-size: 116%; } +h5 { font-size: 100%; } +h6 { font-size: 80%; } + +#main { + width: 50%; + position: absolute; + top: 10%; + left: 25%; + padding: 30px; + background-color: white; + border-radius: 10px; + color: #444444; + -moz-border-radius: 10px; + box-shadow: 5px 5px rgba(0,0,0,0.3); + -webkit-box-shadow: 5px 5px rgba(0,0,0,0.3); + -moz-box-shadow: 5px 5px rgba(0,0,0,0.3); +} + +a.aloha { + background: url(images/external-link-ltr-icon.png) no-repeat 100% 50%; + padding: 0px 13px 0px 0px; +} + +/* Abbreviation styling */ +abbr, acronym +{ + border-bottom: .1em dotted; + cursor: help; +} + +/* A basic table styling */ +table +{ + padding: 0; + margin: 0; + border-collapse: collapse; + border: 1px solid #333; + color: #000; +} + +table caption +{ + caption-side: bottom; + font-size: 0.8em; + font-style: italic; + text-align: right; + padding: 0.5em 0; +} + +table th, table td +{ + border: 1px solid #666; + padding: 0.5em; + text-align: left; +} \ No newline at end of file diff --git a/samplefiles/templates/default/layout-article.php b/samplefiles/templates/default/layout-article.php new file mode 100644 index 0000000..36e6e6c --- /dev/null +++ b/samplefiles/templates/default/layout-article.php @@ -0,0 +1,12 @@ +
+

+
+
+ +
+ +
+ +
+
+
diff --git a/samplefiles/templates/default/screen.css b/samplefiles/templates/default/screen.css new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3