]> gitweb.fluxo.info Git - lorea/saravea_theme.git/commitdiff
Added landing page.
authorSem <sembrestels@riseup.net>
Wed, 15 Aug 2012 00:16:34 +0000 (02:16 +0200)
committerSem <sembrestels@riseup.net>
Wed, 15 Aug 2012 00:16:34 +0000 (02:16 +0200)
_graphics/n1.png [new file with mode: 0644]
index.php [new file with mode: 0644]
languages/ca.php [new file with mode: 0644]
languages/en.php [new file with mode: 0644]
languages/es.php [new file with mode: 0644]
start.php
views/default/css/elements/typography.php
views/default/n1_theme/css.php [new file with mode: 0644]
views/default/n1_theme/landing.php [new file with mode: 0644]

diff --git a/_graphics/n1.png b/_graphics/n1.png
new file mode 100644 (file)
index 0000000..5007358
Binary files /dev/null and b/_graphics/n1.png differ
diff --git a/index.php b/index.php
new file mode 100644 (file)
index 0000000..2371b9a
--- /dev/null
+++ b/index.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Elgg index page for web-based applications
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+if (elgg_is_logged_in()) {
+       forward('activity');
+}
+
+$content = elgg_view('n1_theme/landing');
+$content .= elgg_view_title(elgg_echo('content:latest'));
+$content .= elgg_list_river();
+
+$login_box = elgg_view('core/account/login_box');
+
+$params = array(
+               'content' => $content,
+               'sidebar' => $login_box
+);
+$body = elgg_view_layout('one_sidebar', $params);
+echo elgg_view_page(null, $body);
diff --git a/languages/ca.php b/languages/ca.php
new file mode 100644 (file)
index 0000000..d175b2c
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+$catalan = array(
+
+       'n1_theme:landing:title' => '¡Xarxes socials del poble i per al poble!',
+       'n1_theme:landing:subtitle' => 'Perquè "les eines de l\'amo mai desmontaràn la casa de l\'amo"',
+
+);
+
+add_translation("ca", $catalan);
diff --git a/languages/en.php b/languages/en.php
new file mode 100644 (file)
index 0000000..df3ff2d
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+$english = array(
+
+       'n1_theme:landing:title' => '¡Social networks of people and for the people!',
+       'n1_theme:landing:subtitle' => 'Because "the master\'s tools will never dismantle the master\'s house"',
+
+);
+
+add_translation("en", $english);
diff --git a/languages/es.php b/languages/es.php
new file mode 100644 (file)
index 0000000..fd23fb6
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+
+$spanish = array(
+
+       'n1_theme:landing:title' => '¡Redes sociales del pueblo y para el pueblo!',
+       'n1_theme:landing:subtitle' => 'Porque "las herramientas del amo nunca desmontarán la casa del amo"',
+
+);
+
+add_translation("es", $spanish);
index 7346702ba4512e9e181fec5726449963bd8fff8b..1a49da463917ac71da005ec0ea27e488aa053e5c 100644 (file)
--- a/start.php
+++ b/start.php
@@ -7,8 +7,16 @@ function n1_theme_init() {
        $item =  new ElggMenuItem('site_logo', elgg_get_site_entity()->name, elgg_get_site_url());\r
        elgg_register_menu_item('topbar', $item);\r
        elgg_register_plugin_hook_handler('register', 'menu:topbar', 'n1_theme_topbar_menu');\r
+       \r
+       elgg_register_plugin_hook_handler('index', 'system', 'n1_theme_front_page');\r
+       elgg_extend_view('css', 'n1_theme/css');\r
 }\r
 \r
 function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){\r
        //var_dump($returnvalue);exit();\r
 }\r
+\r
+function n1_theme_front_page($hook, $type, $returnvalue, $params) {\r
+       include(elgg_get_plugins_path() . 'n1_theme/index.php');\r
+       return true;\r
+}\r
index 38198bbf5b0a39829ccdf363be264ef626d4c6c3..0da353f7fe323bcb183ed9bc176a0e7cd34423ad 100644 (file)
@@ -76,7 +76,6 @@ blockquote {
 }
 
 h1, h2, h3, h4, h5, h6 {
-       font-weight: bold;
        color: #333;
 }
 
diff --git a/views/default/n1_theme/css.php b/views/default/n1_theme/css.php
new file mode 100644 (file)
index 0000000..3f27d96
--- /dev/null
@@ -0,0 +1,24 @@
+#n1-landing {
+       height: 250px;
+       background-image: url('<?php echo elgg_get_site_url(); ?>mod/n1_theme/_graphics/n1.png');
+       background-repeat: no-repeat;
+       display: table;
+       margin: 30px 0 50px 0;
+}
+
+#n1-landing-inner {
+       display: table-cell;
+       vertical-align: middle;
+       padding-left: 220px;
+
+}
+
+#n1-landing-title {
+       font-size: 1.7em;
+       font-weight: bold;
+}
+
+#n1-landing-subtitle {
+       font-size: 1.4em;
+       color: #666;
+}
diff --git a/views/default/n1_theme/landing.php b/views/default/n1_theme/landing.php
new file mode 100644 (file)
index 0000000..83132a9
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+$title = elgg_echo('n1_theme:landing:title');
+$subtitle = elgg_echo('n1_theme:landing:subtitle');
+
+echo <<<HTML
+<div id="n1-landing">
+<div id="n1-landing-inner">
+<p id="n1-landing-title">$title</p>
+<p id="n1-landing-subtitle">$subtitle</p>
+</div>
+</div>
+HTML;