Empty -> Demo
authorJan Prachař <jan.prachar@intya.cz>
Mon, 9 Jan 2012 21:53:14 +0000 (22:53 +0100)
committerJan Prachař <jan.prachar@intya.cz>
Mon, 9 Jan 2012 21:53:14 +0000 (22:53 +0100)
app/config.ini
app/presenters/Contact.php [new file with mode: 0644]
app/presenters/Homepage.php
app/templates/@layout.phtml
app/templates/Contact.default.phtml [new file with mode: 0644]
app/templates/Homepage.default.phtml
web/css/screen-tinymce.css
web/css/screen.scss
web/images/favicon.ico [new file with mode: 0644]
web/images/header.jpg [new file with mode: 0644]
web/images/logo.png [new file with mode: 0644]

index 68e8582..5f20664 100755 (executable)
@@ -5,12 +5,12 @@ php.iconv.internal_encoding = "%encoding%"
 php.mbstring.internal_encoding = "%encoding%"\r
 \r
 ; vars\r
-variable.site = empty\r
+variable.site = Demo Eywa\r
 variable.lang = cs\r
 variable.tempDir = %appDir%/../temp\r
 variable.logDir = %appDir%/../log\r
-variable.mailFrom = info@intya.cz\r
-variable.mailReturnPath = info@intya.cz\r
+variable.mailFrom = jan.prachar@gmail.com\r
+variable.mailReturnPath = jan.prachar@gmail.com\r
 variable.facebookAppId =\r
 variable.facebookSecret =\r
 variable.allowRobots = TRUE\r
@@ -30,7 +30,7 @@ service.Nette-Loaders-RobotLoader.run = TRUE
 service.Eywa-CMS-Repository.factory = 'Eywa\CMS\Repository'\r
 \r
 service.Eywa-CMS-Repository-IStorage.factory = 'Eywa\CMS\Repository\Storage\CouchDB'\r
-service.Eywa-CMS-Repository-IStorage.option.database = empty\r
+service.Eywa-CMS-Repository-IStorage.option.database = demo\r
 \r
 service.Eywa-Application-IFileLoaderFactory.factory = 'Eywa\CMS\Application\FileLoaderFactory'\r
 \r
diff --git a/app/presenters/Contact.php b/app/presenters/Contact.php
new file mode 100644 (file)
index 0000000..9d6803c
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+namespace Eywa\CMS\Presenters;
+
+use Eywa\Forms\ContactForm;
+
+
+/**
+ * @title Kontaktní formulář
+ * @model Eywa\CMS\Model\Page
+ */
+class Contact extends Base
+{
+
+    public function actionDefault($path)
+    {
+
+    }
+
+
+
+    public function createComponentContactForm()
+    {
+        $form = new ContactForm;
+        $form->to[] = "jan.prachar@gmail.com";
+
+        return $form;
+    }
+
+}
index 90da747..1260238 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 namespace Eywa\CMS\Presenters;
 
-use Eywa\CMS\Navigation;
+use Eywa\CMS\Components\Overview;
 
 
 
@@ -12,4 +12,14 @@ use Eywa\CMS\Navigation;
 class Homepage extends Base
 {
     
+    public function createComponentJobs()
+    {
+        $jobs = new Overview;
+
+        $jobs->setPath('//www/volne-pozice');
+        $jobs->setLimit(3);
+        $jobs->setOrder('ctime', 'desc');
+
+        return $jobs;
+    }
 }
index 4cb684f..9ec4a59 100644 (file)
@@ -27,7 +27,7 @@
         </div>
 
         <div id="header">
-            <a id="logo" href="{dlink '//www'}" title="">Název</a>
+            <a id="logo" href="{dlink '//www'}" title="">EYWA CMS Demo</a>
 
             <div id="navcontainer">
                 {control navigation}
diff --git a/app/templates/Contact.default.phtml b/app/templates/Contact.default.phtml
new file mode 100644 (file)
index 0000000..c51f615
--- /dev/null
@@ -0,0 +1,35 @@
+{block #content}
+
+<div id="content">
+    <h1>{$heading}</h1>
+    <div id="editable">
+        {!$document->html}
+    </div>
+
+
+    <div class="contactForm">
+        <h2>{_'Napište nám'}</h2>
+        {control contactForm 'begin'}
+        {control contactForm 'errors'}
+
+        {if !Nette\Environment::getUser()->isLoggedIn()}
+            <p>
+                {$control['contactForm']['author_name']->label}
+                {$control['contactForm']['author_name']->control}
+            </p>
+            <p>
+                {$control['contactForm']['email']->label}
+                {$control['contactForm']['email']->control}
+            </p>
+        {/if}
+            <p>
+                {$control['contactForm']['text']->label}
+                {$control['contactForm']['text']->control}
+            </p>
+            <p>
+                {$control['contactForm']['send']->control}
+            </p>
+        {control contactForm 'end'}
+    </div>
+    <div class="clear"></div>
+</div>
index bd609db..71dad71 100644 (file)
@@ -5,4 +5,13 @@
     <div id="editable">
         {!$document->html}
     </div>
+    
+    <h2>Volné pozice</h2>
+    <ul>
+    {foreach $control['jobs']->documents as $item}
+    <li>
+        <a href="{dlink $item->path}" title="{$item->title}">{$item->name}</a>
+    </li>
+    {/foreach}
+    </ul>
 </div>
index 23fa6eb..9637b3d 100644 (file)
@@ -1,7 +1,7 @@
-body {}
+body {background:#fff;}
 
 p, ol, ul {padding-bottom: 10px;}
 ol, ul {font-size: 1.5em; margin-left: 30px; line-height: 1.5em;}
 ol>li, ul>li {list-style-type: circle;}
-ol ol, ol ul, ul ol, ul ul {padding-bottom: 0px; margin-left: 15px;}
-li li {list-style-type: square;}
\ No newline at end of file
+ol ol, ol ul, ul ol, ul ul {font-size: 1em; padding-bottom: 0px; margin-left: 15px;}
+li li {list-style-type: square;}
index 7ebe197..4dfac35 100644 (file)
@@ -6,7 +6,7 @@ $nav-height: 40px;
 \r
 * {margin: 0; padding: 0; list-style:none;}\r
 html {font-size: 62.5%;        font-family: Arial, Helvetica, sans-serif; height: 100%;}\r
-body {height: 100%;}\r
+body {height: 100%;color: #333333;background: #ccc;}\r
 \r
 \r
 /* BASIC */\r
@@ -15,12 +15,14 @@ h1 {font-size: 2.8em; font-weight: bold; padding: 0 0 10px;}
 h2 {font-size: 2.4em; padding: 10px 0; font-weight: bold;}\r
 h3 {font-size: 1.8em; padding: 10px 0; font-weight: normal;}\r
 a {\r
+    color: #9900FF;\r
     &:hover {text-decoration: none;}\r
-    img {}\r
+    img {border:2px solid #333; padding:1px;}\r
 }\r
 hr {border: none; border-top: 1px solid #333; margin: 0 0 15px;}\r
-th {}\r
-td {}\r
+th { font-size:1.2em; text-transform:uppercase; text-align:left; padding:10px; background-color:#CFBCA3}\r
+td { background-color:#E7DCCB; vertical-align: top; padding:10px;}\r
+tfoot td {font-size:1.2em; font-weight:bold; text-align:left; padding:10px; background-color:#CFBCA3;}\r
 label {display: block; float: left; width: 60px;}\r
 \r
 \r
@@ -28,16 +30,19 @@ label {display: block; float: left; width: 60px;}
 .clear {display: block; width: 100%; height: 0; font-size: 0; overflow: hidden; clear: both;}\r
 .hidden {display: none; speak: normal;}\r
 .vanish {display: none; speak: none;}\r
+.button { font-size:1.4em; background-color:#FF8000; color:#fff; padding:.2em 1em .2em 1em; text-decoration:none; }\r
+.button:hover { background-color:#000;}\r
 \r
 \r
 /* LAYOUT */\r
 #page {position: relative; width: $width; margin: 0 auto; min-height: $header-height + $nav-height;}\r
 #container {padding-top: $header-height + $nav-height;}\r
-#content {padding: 20px;}\r
-#header {position: absolute; top: 0px; left: 0px; width: $width; height: $header-height;\r
-    #logo {position: absolute; top: 0px; left: 0px; display: block;}\r
+#content {background:#fff; padding:20px;}\r
+#header {position: absolute; top: 0px; left: 0px; width: $width; height: $header-height; background: transparent url("../images/header.jpg") 0 0 no-repeat;\r
+    #logo {position: absolute; top: 0px; left: 0px; display: block; width: 375px; height: 0; padding-top: 150px;  background: transparent url("../images/logo.png") center no-repeat; overflow: hidden; font-size: 0; text-indent:-9999;}\r
 }\r
-#footer {width: $width;}\r
+#footer {width: $width; height:30px; background: #000; margin-bottom:30px;}\r
+#footer p {padding-top: 5px; color:#ccc; font-size:1.4em; margin-left:10px;}\r
 \r
 \r
 /*  CONTENT */\r
@@ -45,7 +50,7 @@ label {display: block; float: left; width: 60px;}
     p, ol, ul {padding-bottom: 10px;}\r
     ol, ul {font-size: 1.5em; margin-left: 30px; line-height: 1.5em;\r
         &>li {list-style-type: circle;}\r
-        ol, ul {padding-bottom: 0px; margin-left: 15px;\r
+        ol, ul {font-size: 1em; padding-bottom: 0px; margin-left: 15px;\r
             &>li {list-style-type: square;}\r
         }\r
     }\r
@@ -53,11 +58,12 @@ label {display: block; float: left; width: 60px;}
 \r
 \r
 /* MENU */\r
-#navcontainer {padding-top: $header-height; height: $nav-height; font-size: 1.5em;\r
-    &>ul {float: left; width: $width;\r
+#navcontainer {padding-top: $header-height; height: $nav-height;\r
+    &>ul {float: left; width: $width; background-color: #000; color: #fff; font-size:1.8em;\r
         &>li {display: inline;\r
-            &>a {float: left; text-decoration: none;}\r
-            &.current>a, &.ancestor>a, &>a:hover {text-decoration: underline;}\r
+            &>a {float: left; text-decoration: none; padding: .6em 1em .6em 1em; background-color: #000; color: #fff; margin-right:1px;}\r
+            &>a:hover {background-color: #9900FF; color: #fff;}\r
+            &.current>a, &.ancestor>a {background-color: #fff; color:#000;}\r
         }\r
     }\r
-}
\ No newline at end of file
+}\r
diff --git a/web/images/favicon.ico b/web/images/favicon.ico
new file mode 100644 (file)
index 0000000..38dd018
Binary files /dev/null and b/web/images/favicon.ico differ
diff --git a/web/images/header.jpg b/web/images/header.jpg
new file mode 100644 (file)
index 0000000..9b4d433
Binary files /dev/null and b/web/images/header.jpg differ
diff --git a/web/images/logo.png b/web/images/logo.png
new file mode 100644 (file)
index 0000000..7cc378c
Binary files /dev/null and b/web/images/logo.png differ