Iñigo Valentin 7 anni fa
parent
commit
e110d2dc74
44 ha cambiato i file con 1091 aggiunte e 1429 eliminazioni
  1. 9 6
      application/Controller.php
  2. 35 18
      application/config/config.php
  3. 18 69
      application/entity/Cv.php
  4. 0 71
      application/entity/Cv_Category.php
  5. 0 36
      application/entity/Footer.php
  6. 7 15
      application/entity/Project.php
  7. 0 91
      application/entity/Project_Comment.php
  8. 10 8
      application/helper/text.php
  9. 46 0
      application/page/Error_Page.php
  10. 0 19
      application/page/Footer_Page.php
  11. 29 8
      application/page/Help_Page.php
  12. 5 41
      application/page/Home_Page.php
  13. 19 8
      application/page/Page.php
  14. 15 39
      application/page/Profile_Page.php
  15. 5 7
      application/page/Project_Page.php
  16. 4 7
      application/page/Projects_Page.php
  17. 0 79
      application/view/cv.php
  18. 56 0
      application/view/error.php
  19. 40 79
      application/view/help.php
  20. 55 60
      application/view/home.php
  21. 9 9
      application/view/inc/footer.php
  22. 7 6
      application/view/inc/header.php
  23. 49 20
      application/view/profile.php
  24. 64 63
      application/view/project.php
  25. 24 27
      application/view/projects.php
  26. 0 62
      application/view/rss.php
  27. 0 80
      application/view/skills.php
  28. 7 7
      public/.htaccess
  29. 38 31
      public/css/error.css
  30. 29 0
      public/css/help.css
  31. 51 17
      public/css/home.css
  32. 90 54
      public/css/profile.css
  33. 85 42
      public/css/project.css
  34. 30 24
      public/css/projects.css
  35. 149 42
      public/css/ui.css
  36. 0 91
      public/error.php
  37. 0 46
      public/img/layout/social/internet.svg
  38. 12 13
      public/img/layout/social/www.svg
  39. 0 8
      public/index.php
  40. 16 0
      public/js/help.js
  41. 3 2
      public/js/project.js
  42. 32 58
      sql/01_structure.sql
  43. 1 3
      sql/02_security.sql
  44. 42 63
      sql/03_data.sql

+ 9 - 6
application/Controller.php

@@ -26,7 +26,10 @@
         public function __construct($params){
         public function __construct($params){
 
 
             global $path;
             global $path;
-            global $root;
+            global $base_url;
+            global $static;
+            global $static_url;
+            global $base_dir;
             $page;
             $page;
 
 
             $db = start_db();
             $db = start_db();
@@ -42,10 +45,11 @@
             if (sizeof($pars) > 0 && preg_match("/^[a-zA-Z]{2}$/", $pars[0])){
             if (sizeof($pars) > 0 && preg_match("/^[a-zA-Z]{2}$/", $pars[0])){
                 $lang = $pars[0];
                 $lang = $pars[0];
                 array_splice($pars, 0, 1);
                 array_splice($pars, 0, 1);
+                // Override global to include language in URL
+                $base_url = get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang;
             }
             }
             else{
             else{
                 $lang = select_language($db);
                 $lang = select_language($db);
-                // TODO: Redirect to url with lang?
             }
             }
             foreach($pars as $p){
             foreach($pars as $p){
                 array_push($route, $p);
                 array_push($route, $p);
@@ -75,12 +79,11 @@
             }
             }
 
 
             // Load the view, or set an error code.
             // Load the view, or set an error code.
-            if (isset($page)){
-                require_once($page->view);
-            }
-            else{
+            if (!isset($page)){
                 http_response_code(404);
                 http_response_code(404);
+                $page = new Error_Page($db, $lang);
             }
             }
+            require_once($page->view);
         }
         }
     }
     }
 ?>
 ?>

+ 35 - 18
application/config/config.php

@@ -1,28 +1,45 @@
 <?php
 <?php
 
 
-    include __DIR__ . "/auth.php";
+    require_once(__DIR__ . "/auth.php");
     require_once(__DIR__ . "/../helper/net.php");
     require_once(__DIR__ . "/../helper/net.php");
 
 
-    $root = get_protocol() . $_SERVER["HTTP_HOST"] . "/";
+    /**
+     * Server base url, including protocol, without language indicator.
+     * It may be overwritten by the controller to add the language.
+     */
+    $base_url = get_protocol() . $_SERVER["HTTP_HOST"];
+    $static_url = get_protocol() . $_SERVER["HTTP_HOST"];
 
 
-    $base_dir = $_SERVER["DOCUMENT_ROOT"] . "/";
+    /**
+     * Static url, absolute, language independant.
+     */
+    $static = [
+        "layout" => $static_url . "/img/layout/",
+        "content" => $static_url . "/img/content/",
+        "fonts" => $static_url . "/fonts/",
+        "css" => $static_url . "/css/",
+        "demo" => $static_url . "/demo/",
+        "js" => $static_url . "/js/",
+        "cv" => $static_url . "/cv/"
+    ];
+
+    /**
+     * Server document root.
+     */
+    $base_dir = $_SERVER["DOCUMENT_ROOT"];
 
 
+    /**
+     * Paths within the server.
+     */
     $path = [
     $path = [
-        "img" => [
-            "content" => $root . "img/content/",
-            "layout" => $root . "img/layout/"
-        ],
-        "fonts" => $root . "fonts/",
-        "css" => $root . "css/",
-        "demo" => $root . "demo/",
-        "js" => $root . "js/",
-        "application" => "$base_dir../application/",
-        "controller" => "$base_dir../application/Controller.php",
-        "entity" => "$base_dir../application/entity/",
-        "page" => "$base_dir../application/page/",
-        "view" => "$base_dir../application/view/",
-        "helper" => "$base_dir../application/helper/",
-        "string" => "$base_dir../application/view/string/"
+        "application" => $base_dir . "/../application/",
+        "controller" => $base_dir . "/../application/Controller.php",
+        "entity" => $base_dir . "/../application/entity/",
+        "page" => $base_dir . "/../application/page/",
+        "helper" => $base_dir . "/../application/helper/",
+        "view" => $base_dir . "/../application/view/",
+        "inc" => $base_dir . "/../application/view/inc/",
+        "string" => $base_dir . "/../application/view/string/"
     ];
     ];
 
 
 ?>
 ?>

+ 18 - 69
application/entity/Cv.php

@@ -1,108 +1,57 @@
 <?php
 <?php
 
 
     require_once($path["entity"] . "Entity.php");
     require_once($path["entity"] . "Entity.php");
-    require_once($path["entity"] . "Cv_Category.php");
-    require_once($path["helper"] . "text.php");
+    require_once($path["entity"] . "Lang.php");
 
 
 
 
     /**
     /**
-     * Entry on the CV.
+     * CV file.
      *
      *
      * Represents an object from the table 'cv'.
      * Represents an object from the table 'cv'.
      */
      */
     class Cv extends Entity{
     class Cv extends Entity{
 
 
         /**
         /**
-         * Project identifier.
+         * CV file identifier.
          */
          */
         public $id;
         public $id;
 
 
         /**
         /**
-         * {@see Cv_Category} of the entry.
+         * CV {@see Lang}.
          */
          */
-        public $category;
+        public $lang;
 
 
         /**
         /**
-         * Role of the entry in the defined language.
+         * Filename.
          */
          */
-        public $role;
+        public $file;
 
 
-        /**
-         * Company or center of the entry in the defined language.
-         */
-        public $company;
-
-        /**
-         * City.
-         */
-        public $city;
-
-        /**
-         * Start date of the activity.
-         */
-        public $start;
-
-        /**
-         * End date of the activity, or null if it's a current one.
-         */
-        public $end;
-
-        /**
-         * Date precission to show ("M" for months, "Y for years").
-         */
-        public $date_precission;
-
-        /**
-         * Description of the role in the defined language.
-         */
-        public $summary;
-
-        /**
-         * Indicates wether the activity must or mustn's be displayed.
-         */
-        public $visible;
 
 
         /**
         /**
          * Constructor.
          * Constructor.
          *
          *
          * Searches the database and retrieves the information about the
          * Searches the database and retrieves the information about the
-         * entry, populating it and it's items.
+         * object, populating it.
          *
          *
          * @param MySQL_connection $db Connection to the database.
          * @param MySQL_connection $db Connection to the database.
-         * @param string $lang Lowercase, two-letter language code.
-         * @param int $id Identifier of the cv entry.
+         * @param int $id Database identifier of the language.
          */
          */
-        public function __construct($db, $lang, $id){
-            parent::__construct($db, $lang);
+        public function __construct($db, $id){
+            parent::__construct($db, null);
             $s =
             $s =
               "SELECT " .
               "SELECT " .
-              "  id, " .
-              "  category, " .
-              "  role, " .
-              "  company, " .
-              "  city, " .
-              "  start, " .
-              "  end, " .
-              "  date_precission, " .
-              "  summary, " .
-              "  visible " .
+              "  lang, " .
+              "  file " .
               "FROM cv " .
               "FROM cv " .
               "WHERE " .
               "WHERE " .
-              "  visible = 1 AND " .
-              "  id = $id ; ";
+              "  id = '$id'; ";
+            error_log($s);
             $q = mysqli_query($this->db, $s);
             $q = mysqli_query($this->db, $s);
             if (mysqli_num_rows($q) > 0){
             if (mysqli_num_rows($q) > 0){
                 $r = mysqli_fetch_array($q);
                 $r = mysqli_fetch_array($q);
-                $this->id = $r["id"];
-                $this->role = text($this, $r["role"]);
-                $this->company = $r["company"];
-                $this->city = text($this, $r["city"]);
-                $this->start = $r["start"];
-                $this->end = $r["end"];
-                $this->date_precission = $r["date_precission"];
-                $this->summary = text($this, $r["summary"]);
-                $this->visible = $r["visible"];
-                $this->category = new Cv_Category($this->db, $this->lang, $r["category"]);
+                $this->id = $id;
+                $this->lang = new Lang($this->db, $r["lang"]);
+                $this->file = $r["file"];
             }
             }
         }
         }
     }
     }

+ 0 - 71
application/entity/Cv_Category.php

@@ -1,71 +0,0 @@
-<?php
-
-    require_once($path["entity"] . "Entity.php");
-    require_once($path["helper"] . "text.php");
-
-
-    /**
-     * Category of a CV entry.
-     *
-     * Represents an object from the table 'cv_category'.
-     */
-    class Cv_Category extends Entity{
-
-        /**
-         * Identifier of the category.
-         */
-        public $id;
-
-        /**
-         * Category denomination, in the defined language.
-         */
-        public $title;
-
-        /**
-         * Category description, in the defined language.
-         */
-        public $summary;
-
-        /**
-         * Indicates wether the category must or mustn's be displayed.
-         */
-        public $visible;
-
-        /**
-         * Display order.
-         */
-        public $priority;
-
-        /**
-         * Constructor.
-         *
-         * Searches the database and retrieves the information about the
-         * category, populating it.
-         *
-         * @param MySQL_connection $db Connection to the database.
-         * @param string $lang Lowercase, two-letter language code.
-         * @param int $id Identifier of the cv category.
-         */
-        public function __construct($db, $lang, $id){
-            parent::__construct($db, $lang);
-            $s =
-              "SELECT " .
-              "  id, " .
-              "  title, " .
-              "  summary, " .
-              "  visible, " .
-              "  priority " .
-              "FROM cv_category " .
-              "WHERE id = $id ;";
-            $q = mysqli_query($this->db, $s);
-            if (mysqli_num_rows($q) > 0){
-                $r = mysqli_fetch_array($q);
-                $this->id = $r["id"];
-                $this->title = text($this, $r["title"]);
-                $this->summary = text($this, $r["summary"]);
-                $this->visible = $r["visible"];
-                $this->priority = $r["priority"];
-            }
-        }
-    }
-?>

+ 0 - 36
application/entity/Footer.php

@@ -1,36 +0,0 @@
-<?php
-
-    require_once($path["entity"] . "Lang.php");
-
-    /**
-     * Page footer.
-     *
-     * Used to display the footer in every page.
-     */
-    class Footer{
-
-        /**
-         * Array of {@see Lang} the page can be served on.
-         */
-        public $lang = [];
-
-        /**
-         * Constructor.
-         *
-         * Searches the database and populates the social and lang arrays.
-         *
-         * @param MySQL_connection $db Connection to the database.
-         * @param string $lang Lowercase, two-letter language code.
-         */
-        public function __construct($db, $lang){
-            $s_lang =
-              "SELECT code AS id " .
-              "FROM lang " .
-              "WHERE active = 1; ";
-            $q_lang = mysqli_query($db, $s_lang);
-            while($r_lang = mysqli_fetch_array($q_lang)){
-                array_push($this->lang, new Lang($db, $r_lang["id"]));
-            }
-        }
-    }
-?>

+ 7 - 15
application/entity/Project.php

@@ -4,7 +4,6 @@
     require_once($path["entity"] . "License.php");
     require_once($path["entity"] . "License.php");
     require_once($path["entity"] . "Project_Type.php");
     require_once($path["entity"] . "Project_Type.php");
     require_once($path["entity"] . "Project_Image.php");
     require_once($path["entity"] . "Project_Image.php");
-    require_once($path["entity"] . "Project_Comment.php");
     require_once($path["entity"] . "Project_Tag.php");
     require_once($path["entity"] . "Project_Tag.php");
     require_once($path["entity"] . "Project_Url.php");
     require_once($path["entity"] . "Project_Url.php");
     require_once($path["helper"] . "text.php");
     require_once($path["helper"] . "text.php");
@@ -27,6 +26,11 @@
          */
          */
         public $permalink;
         public $permalink;
 
 
+        /**
+         * Project index for sorting.
+         */
+        public $idx;
+
         /**
         /**
          * {@see Project_Type} of project.
          * {@see Project_Type} of project.
          */
          */
@@ -62,12 +66,6 @@
          */
          */
         public $image = [];
         public $image = [];
 
 
-        /**
-         * Array with the {@see Project_Comment} posted in the project, sorted
-         * from new to old.
-         */
-        public $comment = [];
-
         /**
         /**
          * Array with the {@see Project_Tag} of the project.
          * Array with the {@see Project_Tag} of the project.
          */
          */
@@ -94,6 +92,7 @@
               "SELECT " .
               "SELECT " .
               "  id, " .
               "  id, " .
               "  permalink, " .
               "  permalink, " .
+              "  idx, " .
               "  type, " .
               "  type, " .
               "  title, " .
               "  title, " .
               "  logo, " .
               "  logo, " .
@@ -112,6 +111,7 @@
                 $r = mysqli_fetch_array($q);
                 $r = mysqli_fetch_array($q);
                 $this->id = $r["id"];
                 $this->id = $r["id"];
                 $this->permalink = $r["permalink"];
                 $this->permalink = $r["permalink"];
+                $this->idx = $r["idx"];
                 $this->title = text($this, $r["title"]);
                 $this->title = text($this, $r["title"]);
                 $this->logo = $r["logo"];
                 $this->logo = $r["logo"];
                 $this->header = text($this, $r["header"]);
                 $this->header = text($this, $r["header"]);
@@ -145,14 +145,6 @@
             while($r_url = mysqli_fetch_array($q_url)){
             while($r_url = mysqli_fetch_array($q_url)){
                 array_push($this->url, new Project_Url($this->db, $this->lang, $r_url["id"]));
                 array_push($this->url, new Project_Url($this->db, $this->lang, $r_url["id"]));
             }
             }
-            $s_comment =
-              "SELECT id " .
-              "FROM project_comment " .
-              "WHERE project = " . $this->id . ";";
-            $q_comment = mysqli_query($this->db, $s_comment);
-            while($r_comment = mysqli_fetch_array($q_comment)){
-                array_push($this->comment, new Project_Comment($this->db, $r_comment["id"]));
-            }
         }
         }
     }
     }
 ?>
 ?>

+ 0 - 91
application/entity/Project_Comment.php

@@ -1,91 +0,0 @@
-<?php
-
-    require_once($path["entity"] . "Entity.php");
-
-
-    /**
-     * Project posted on a comment.
-     *
-     * Represents an object from the table 'project_comment'.
-     */
-    class Project_Comment extends Entity{
-
-        /**
-         * Comment unique identifier.
-         */
-        public $id;
-
-        /**
-         * Identifier of the project the comment is on.
-         */
-        public $project;
-
-        /**
-         * Text of the comment.
-         */
-        public $text;
-
-        /**
-         * Time the comment was published.
-         */
-        public $dtime;
-
-        /**
-         * User identifier of the poster, if it was a registered user.
-         */
-        public $user;
-
-        /**
-         * Username of the poster, if it was not a registered user.
-         */
-        public $username;
-
-        /**
-         * Lowercase, two-letter language code of the comment. Guessed at the
-         * time of posting.
-         */
-        public $lang;
-
-        /**
-         * Indicates wether the comment has been approved and can be displayed.
-         */
-        public $approved;
-
-        /**
-         * Constructor.
-         *
-         * Searches the database and retrieves the information about the
-         * comment, populating it.
-         *
-         * @param MySQL_connection $db Connection to the database.
-         * @param int $id Identifier of the comment.
-         */
-        public function __construct($db, $id){
-            parent::__construct($db, null);
-            $s =
-              "SELECT " .
-              "  id, " .
-              "  project, " .
-              "  text, " .
-              "  dtime, " .
-              "  user, " .
-              "  username, " .
-              "  lang, " .
-              "  approved " .
-              "FROM project_comment " .
-              "WHERE id = $id ;";
-            $q = mysqli_query($this->db, $s);
-            if (mysqli_num_rows($q) > 0){
-                $r = mysqli_fetch_array($q);
-                $this->id = $r["id"];
-                $this->project = $r["project"];
-                $this->text = $r["text"];
-                $this->dtime = $r["dtime"];
-                $this->user = $r["user"];
-                $this->username = $r["username"];
-                $this->lang = $r["lang"];
-                $this->approved = $r["approved"];
-            }
-        }
-    }
-?>

+ 10 - 8
application/helper/text.php

@@ -25,7 +25,6 @@
         if (isSet($_COOKIE["lang"])){
         if (isSet($_COOKIE["lang"])){
             $lang = $_COOKIE["lang"];
             $lang = $_COOKIE["lang"];
             if (in_array($lang, $available_languages)){
             if (in_array($lang, $available_languages)){
-                header("Location: " . get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang . $_SERVER["REQUEST_URI"]);
                 return $lang;
                 return $lang;
             }
             }
         }
         }
@@ -33,13 +32,11 @@
         // If no cookie, select from client browser preferences.
         // If no cookie, select from client browser preferences.
         $lang = prefered_language($available_languages, $_SERVER["HTTP_ACCEPT_LANGUAGE"]);
         $lang = prefered_language($available_languages, $_SERVER["HTTP_ACCEPT_LANGUAGE"]);
         if (in_array($lang, $available_languages)){
         if (in_array($lang, $available_languages)){
-            header("Location: " . get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang . $_SERVER["REQUEST_URI"]);
             return $lang;
             return $lang;
         }
         }
 
 
         // If no method was succesfull, default language
         // If no method was succesfull, default language
         $lang = $available_languages[0];
         $lang = $available_languages[0];
-        header("Location: " . get_protocol() . $_SERVER["HTTP_HOST"] . "/" . $lang . $_SERVER["REQUEST_URI"]);
         return $lang;
         return $lang;
     }
     }
 
 
@@ -77,8 +74,14 @@
             }
             }
 
 
         }
         }
-        arsort($langs);
-        return $langs[0];
+        if (count($langs) > 0){
+            arsort($langs);
+            //return $langs[0];
+            array_values($langs)[0];
+        }
+        else{
+            return 'en';
+        }
     }
     }
 
 
 
 
@@ -145,7 +148,6 @@
      */
      */
     function text($model, $id){
     function text($model, $id){
         global $path;
         global $path;
-error_log("SELECT text, file FROM text WHERE id = '$id' AND lang = '" . $model->lang . "';");
         $q = mysqli_query($model->db, "SELECT text, file FROM text WHERE id = '$id' AND lang = '" . $model->lang . "';");
         $q = mysqli_query($model->db, "SELECT text, file FROM text WHERE id = '$id' AND lang = '" . $model->lang . "';");
         $r = mysqli_fetch_array($q);
         $r = mysqli_fetch_array($q);
         if (strlen($r["file"]) > 0){
         if (strlen($r["file"]) > 0){
@@ -219,12 +221,12 @@ error_log("SELECT text, file FROM text WHERE id = '$id' AND lang = '" . $model->
      * @return string srcset atttribute content.
      * @return string srcset atttribute content.
      */
      */
     function srcset($file){
     function srcset($file){
-        global $path;
+        global $static;
         $srcset = "";
         $srcset = "";
         $dir = dirname($file);
         $dir = dirname($file);
         $name = basename($file);
         $name = basename($file);
         foreach (range(1, 9) as $d) {
         foreach (range(1, 9) as $d) {
-            $srcset = $srcset . $path["img"]["content"] . $dir . "/x" . $d . "00/" . $name . " " . $d . "00px, ";
+            $srcset = $srcset . $static["content"] . $dir . "/x" . $d . "00/" . $name . " " . $d . "00px, ";
         }
         }
         $srcset = rtrim($srcset, ", ");
         $srcset = rtrim($srcset, ", ");
         return $srcset;
         return $srcset;

+ 46 - 0
application/page/Error_Page.php

@@ -0,0 +1,46 @@
+<?php
+
+    require_once($path["page"] . "Page.php");
+    require_once($path["helper"] . "text.php");
+
+
+    /**
+     * Error page model.
+     */
+    class Error_Page extends Page{
+
+        public $code = "";
+        public $error_description = "";
+        public $advice = "";
+        public $solution = [];
+
+        /**
+         * Constructor.
+         *
+         * Retrieves the data and initializes the page.
+         *
+         * @param MySQL_connection $db Connection to the database.
+         * @param string $lang Lowercase, two-letter language code.
+         */
+        public function __construct($db, $lang){
+            global $path;
+            global $base_url;
+            parent::__construct($db, $lang);
+            $this->view = $path["view"] . "error.php";
+            $this->code = http_response_code();
+            if (in_array($this->code, array(400, 401, 403, 404, 500))){
+                $err = $this->code;
+            }
+            else{
+                $err = "XXX";
+            }
+            $this->error_description = text($this, "ERROR_" . $err . "_DESCRIPTION");
+            $this->advice = text($this, "ERROR_" . $err . "_SOLUTION");
+            array_push($this->solution, text($this, "ERROR_" . $err . "_SOLUTION_0"));
+            array_push($this->solution, text($this, "ERROR_" . $err . "_SOLUTION_1"));
+            array_push($this->solution, text($this, "ERROR_" . $err . "_SOLUTION_2"));
+            $this->title = text($this, "ERROR_TITLE") . " " . $this->code . " - " . text($this, "USER_NAME");
+            $this->description = text($this, "ERROR_TITLE") . " " . $this->code . " - " . text($this, "USER_NAME");
+        }
+    }
+?>

+ 0 - 19
application/page/Footer_Page.php

@@ -1,19 +0,0 @@
-<?php
-
-    require_once($path["entity"] . "Lang.php");
-
-    class Footer_Page{
-        public $lang = [];
-
-        public function __construct($db, $lang){
-            $s_lang =
-              "SELECT code AS id " .
-              "FROM lang " .
-              "WHERE active = 1; ";
-            $q_lang = mysqli_query($db, $s_lang);
-            while($r_lang = mysqli_fetch_array($q_lang)){
-                array_push($this->lang, new Lang($db, $r_lang["id"]));
-            }
-        }
-    }
-?>

+ 29 - 8
application/page/Help_Page.php

@@ -9,6 +9,25 @@
      */
      */
     class Help_Page extends Page{
     class Help_Page extends Page{
 
 
+        public $help = [
+            "info" => [
+                "title" => "",
+                "text" => "",
+            ],
+            "license" => [
+                "title" => "",
+                "text" => "",
+            ],
+            "privacy" => [
+                "title" => "",
+                "text" => "",
+            ],
+            "cookies" => [
+                "title" => "",
+                "text" => "",
+            ]
+        ];
+
         /**
         /**
          * Constructor.
          * Constructor.
          *
          *
@@ -19,19 +38,21 @@
          */
          */
         public function __construct($db, $lang){
         public function __construct($db, $lang){
             global $path;
             global $path;
-            global $root;
+            global $base_url;
             parent::__construct($db, $lang);
             parent::__construct($db, $lang);
             $this->view = $path["view"] . "help.php";
             $this->view = $path["view"] . "help.php";
 
 
-            // TODO: Get data
-
+            $this->help["info"]["title"] = text($this, "HELP_INFO_TITLE");
+            $this->help["info"]["text"] = text($this, "HELP_INFO_TEXT");
+            $this->help["license"]["title"] = text($this, "HELP_LICENSE_TITLE");
+            $this->help["license"]["text"] = text($this, "HELP_LICENSE_TEXT");
+            $this->help["privacy"]["title"] = text($this, "HELP_PRIVACY_TITLE");
+            $this->help["privacy"]["text"] = text($this, "HELP_PRIVACY_TEXT");
+            $this->help["cookies"]["title"] = text($this, "HELP_COOKIES_TITLE");
+            $this->help["cookies"]["text"] = text($this, "HELP_COOKIES_TEXT");
             $this->title = text($this, "USER_NAME");
             $this->title = text($this, "USER_NAME");
-            $this->name = text($this, "USER_NAME");
             $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
             $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
-            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->canonical = $root . $lang . "/";
-            $this->author = $root . $lang . "/";
+            $this->canonical = $base_url . "/help/";
         }
         }
     }
     }
 ?>
 ?>

+ 5 - 41
application/page/Home_Page.php

@@ -12,17 +12,6 @@
 
 
         private $max_projects = 3;
         private $max_projects = 3;
 
 
-        /**
-         * Array with profile data.
-         */
-        public $profile = [
-            "role" => "",
-            "company" => "",
-            "city" => "",
-            "days" => "",
-            "summary" => ""
-        ];
-
         /**
         /**
          * List of recent projects.
          * List of recent projects.
          */
          */
@@ -38,47 +27,22 @@
          */
          */
         public function __construct($db, $lang){
         public function __construct($db, $lang){
             global $path;
             global $path;
-            global $root;
+            global $base_url;
             parent::__construct($db, $lang);
             parent::__construct($db, $lang);
             $this->view = $path["view"] . "home.php";
             $this->view = $path["view"] . "home.php";
-            $s_profile =
-              "SELECT " .
-              "  role, " .
-              "  company, " .
-              "  city, " .
-              "  datediff(now(), start) AS days, " .
-              "  summary " .
-              "FROM cv_entry " .
-              "WHERE " .
-              "  category = 1 AND " .
-              "  visible = 1 AND " .
-              "  end IS NULL " .
-              "ORDER BY start " .
-              "DESC LIMIT 1;";
-            $q_profile = mysqli_query($this->db, $s_profile);
-            if (mysqli_num_rows($q_profile) > 0){
-                $r_profile = mysqli_fetch_array($q_profile);
-                $this->profile["role"] = text($this, $r_profile["role"]);
-                $this->profile["company"] = $r_profile["company"];
-                $this->profile["city"] = $r_profile["city"];
-                $this->profile["days"] = $r_profile["days"];
-                $this->profile["summary"] = text($this, $r_profile["summary"]);
-            }
             $s_project =
             $s_project =
               "SELECT id " .
               "SELECT id " .
               "FROM project " .
               "FROM project " .
-              "WHERE visible = 1;";
+              "WHERE visible = 1 " .
+              "ORDER BY idx DESC " .
+              "LIMIT " . $this->max_projects . ";";
             $q_project = mysqli_query($this->db, $s_project);
             $q_project = mysqli_query($this->db, $s_project);
             while($r_project = mysqli_fetch_array($q_project)){
             while($r_project = mysqli_fetch_array($q_project)){
                 array_push($this->project, new Project($this->db, $this->lang, $r_project["id"]));
                 array_push($this->project, new Project($this->db, $this->lang, $r_project["id"]));
             }
             }
             $this->title = text($this, "USER_NAME");
             $this->title = text($this, "USER_NAME");
-            $this->name = text($this, "USER_NAME");
             $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
             $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
-            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->canonical = $root . $lang . "/";
-            $this->author = $root . $lang . "/";
+            $this->canonical = $base_url . "/";
         }
         }
     }
     }
 ?>
 ?>

+ 19 - 8
application/page/Page.php

@@ -1,8 +1,5 @@
 <?php
 <?php
 
 
-    require_once($path["entity"] . "Footer.php");
-
-
     /**
     /**
      * Page superclass.
      * Page superclass.
      *
      *
@@ -27,10 +24,9 @@
         public $lang;
         public $lang;
 
 
         /**
         /**
-         * Footer.
-         * @see Footer_Page
+         * List of available {@see Lang}uages (lowercase, two-letter language code).
          */
          */
-        public $footer;
+        public $available_langs = [];
 
 
         /**
         /**
          * Title of the page, in the defined language.
          * Title of the page, in the defined language.
@@ -63,10 +59,11 @@
         public $canonical;
         public $canonical;
 
 
         /**
         /**
-         * Autjhor URL.
+         * Author URL.
          */
          */
         public $author;
         public $author;
 
 
+
         /**
         /**
          * Constructor.
          * Constructor.
          *
          *
@@ -74,9 +71,23 @@
          * @param string $lang Lowercase, two-letter language code.
          * @param string $lang Lowercase, two-letter language code.
          */
          */
         public function __construct($db, $lang){
         public function __construct($db, $lang){
+            global $static;
+            global $base_url;
             $this->db = $db;
             $this->db = $db;
             $this->lang = $lang;
             $this->lang = $lang;
-            $this->footer = new Footer($db, $lang);
+            $s_lang =
+              "SELECT code AS id " .
+              "FROM lang " .
+              "WHERE active = 1; ";
+            $q_lang = mysqli_query($db, $s_lang);
+            while($r_lang = mysqli_fetch_array($q_lang)){
+                array_push($this->available_langs, new Lang($db, $r_lang["id"]));
+            }
+            $this->favicon = $static["layout"] . "logo/logo.svg";
+            $this->icon = $static["layout"] . "logo/logo.svg";
+            $this->name = text($this, "USER_NAME");
+            $this->author = $base_url;
+            $this->name = text($this, "USER_NAME");
         }
         }
     }
     }
 ?>
 ?>

+ 15 - 39
application/page/Profile_Page.php

@@ -10,22 +10,10 @@
      */
      */
     class Profile_Page extends Page{
     class Profile_Page extends Page{
 
 
-
-        public $category = [
-          "WORK" => 0,
-          "EDUCATION" => 1,
-          "PROJECTS" => 2,
-          "OTHERS" => 3
-        ];
-
-
-        public $entry = [
-          "WORK" => [],
-          "EDUCATION" => [],
-          "PROJECTS" => [],
-          "OTHERS" => []
-        ];
-
+        /**
+         * List of available {@see CV}.
+         */
+        public $cv = [];
 
 
         /**
         /**
          * Constructor.
          * Constructor.
@@ -37,33 +25,21 @@
          */
          */
         public function __construct($db, $lang){
         public function __construct($db, $lang){
             global $path;
             global $path;
-            global $root;
+            global $base_url;
             parent::__construct($db, $lang);
             parent::__construct($db, $lang);
             $this->view = $path["view"] . "profile.php";
             $this->view = $path["view"] . "profile.php";
-            foreach ($this->category as $cat){
-                $s =
-                  "SELECT id " .
-                  "FROM cv " .
-                  "WHERE " .
-                  "  visible = 1 AND " .
-                  "  category = " . ($cat + 1) . " " .
-                  "ORDER BY " . 
-                  "  IF(end IS NULL, 9, end) DESC, " .
-                  "  start DESC; ";
-                $q = mysqli_query($this->db, $s);
-                while($r = mysqli_fetch_array($q)){
-                    $k = array_keys($this->category)[$cat];
-                    $e = new Cv($this->db, $this->lang, $r["id"]);
-                    array_push($this->entry[$k], $e);
-                }
+            $s =
+              "SELECT id " .
+              "FROM cv " .
+              "WHERE visible = 1 " .
+              "ORDER BY lang = '" . $this->lang . "' DESC;";
+            $q = mysqli_query($this->db, $s);
+            while($r = mysqli_fetch_array($q)){
+                array_push($this->cv, new Cv($this->db, $r["id"]));
             }
             }
             $this->title = text($this, "USER_NAME");
             $this->title = text($this, "USER_NAME");
-            $this->name = text($this, "USER_NAME");
-            $this->description = text($this, "USER_NAME") . " - " . text($this, "USER_TAGLINE");
-            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->canonical = $root . $lang . "/profile/";
-            $this->author = $root . $lang . "/";
+            $this->description = text($this, "SECTION_ME") . " - " . text($this, "USER_NAME");
+            $this->canonical = $base_url . "/profile/";
         }
         }
     }
     }
 ?>
 ?>

+ 5 - 7
application/page/Project_Page.php

@@ -26,22 +26,20 @@
          */
          */
         public function __construct($db, $lang, $id){
         public function __construct($db, $lang, $id){
             global $path;
             global $path;
-            global $root;
+            global $base_url;
+            global $static;
             parent:: __construct($db, $lang);
             parent:: __construct($db, $lang);
             $this->view = $path["view"] . "project.php";
             $this->view = $path["view"] . "project.php";
             $this->project = new Project($this->db, $this->lang, $id);
             $this->project = new Project($this->db, $this->lang, $id);
             $this->title = $this->project->title . " - " . text($this, "USER_NAME");
             $this->title = $this->project->title . " - " . text($this, "USER_NAME");
-            $this->name = text($this, "USER_NAME");
             $this->description = $this->project->header;
             $this->description = $this->project->header;
-            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
             if (strlen($this->project->logo) > 0){
             if (strlen($this->project->logo) > 0){
-                $this->icon = $path["img"]["content"] . "project/" . $this->project->logo;
+                $this->icon = $static["content"] . "project/" . $this->project->logo;
             }
             }
             else{
             else{
-                $this->icon = $path["img"]["layout"] . "logo/logo.svg";
+                $this->icon = $static["layout"] . "logo/logo.svg";
             }
             }
-            $this->canonical = $root . $lang . "/project/" . $this->project->permalink;
-            $this->author = $root . $lang . "/";
+            $this->canonical = $base_url . "/project/" . $this->project->permalink . "/";
         }
         }
     }
     }
 ?>
 ?>

+ 4 - 7
application/page/Projects_Page.php

@@ -26,24 +26,21 @@
          */
          */
         public function __construct($db, $lang){
         public function __construct($db, $lang){
             global $path;
             global $path;
-            global $root;
+            global $base_url;
             parent:: __construct($db, $lang);
             parent:: __construct($db, $lang);
             $this->view = $path["view"] . "projects.php";
             $this->view = $path["view"] . "projects.php";
             $s =
             $s =
               "SELECT id " .
               "SELECT id " .
               "FROM project " .
               "FROM project " .
-              "WHERE visible = 1;";
+              "WHERE visible = 1 " .
+              "ORDER BY idx;";
             $q = mysqli_query($this->db, $s);
             $q = mysqli_query($this->db, $s);
             while($r = mysqli_fetch_array($q)){
             while($r = mysqli_fetch_array($q)){
                 array_push($this->project, new Project($this->db, $this->lang, $r["id"]));
                 array_push($this->project, new Project($this->db, $this->lang, $r["id"]));
             }
             }
             $this->title = text($this, "PROJECT_TITLE") . " - " . text($this, "USER_NAME");
             $this->title = text($this, "PROJECT_TITLE") . " - " . text($this, "USER_NAME");
-            $this->name = text($this, "USER_NAME");
             $this->description = text($this, "PROJECT_DESCRIPTION");
             $this->description = text($this, "PROJECT_DESCRIPTION");
-            $this->favicon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->icon = $path["img"]["layout"] . "logo/logo.svg";
-            $this->canonical = $root . $lang . "/project/";
-            $this->author = $root . $lang . "/";
+            $this->canonical = $base_url . "/project/";
         }
         }
     }
     }
 ?>
 ?>

+ 0 - 79
application/view/cv.php

@@ -1,79 +0,0 @@
-<h3 class='section_title'><?=text($con, "PROFILE_CV", $lang);?></h3>
-<ul class='cv_download'>
-    <li>
-        <a target='_blank' href='TODO' title='<?=text($con, "USER_NAME", $lang);?> - <?=text($con, "PROFILE_CV", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_CURRENT", $lang);?></a>
-    </li>
-    <li>
-        <a href='TODO' title='<?=text($con, "PROFILE_CV_DOWNLOAD_LANG", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_OTHER", $lang);?></a>
-    </li>
-</ul>
-<?php
-$q_section = mysqli_query($con, "SELECT * FROM cv_category WHERE visible = 1 ORDER BY priority;");
-while ($r_section = mysqli_fetch_array($q_section)){
-?>
-    <div id='cv' class='cv_entry'>
-        <h4 class='cv_entry_title'><?=text($con, $r_section["title"], $lang)?></h4>
-<?php
-        if (strlen($r_section["summary"]) > 0){
-?>
-            <h5><?=text($con, $r_section["summary"], $lang)?></h5>
-<?php
-        }
-        $q_item = mysqli_query($con, "SELECT id, role, company, summary, city, start, end, year(start) AS start_y, DATE_FORMAT(start, '%m') AS start_m, year(end) AS end_y, DATE_FORMAT(end, '%m') AS end_m, date_precission FROM cv_entry WHERE category = $r_section[id] AND visible = 1 ORDER BY start DESC");
-        while ($r_item = mysqli_fetch_array($q_item)){
-            switch ($r_item["date_precission"]){
-                case "Y":
-                    if (strlen($r_item["end"]) <= 0){    // Since 2016
-                        $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_YEAR", $lang));
-                    }
-                    else{
-                        if ($r_item["start_y"] == $r_item["end_y"]){    // 2016
-                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_YEAR", $lang));
-                        }
-                        else{    // From 2015 until 2017
-                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_YEAR", $lang));
-                            $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
-                        }
-                    }
-                    break;
-                case "M":
-                    if (strlen($r_item["end"]) <= 0){    // Since March 2016
-                        $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_MONTH", $lang));
-                        $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                    }
-                    else{
-                        if ($r_item["start_y"] == $r_item["end_y"]){
-                            if ($r_item["start_m"] == $r_item["end_m"]){    // March 2016
-                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_MONTH", $lang));
-                                $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                            }
-                            else{    // From February until March 2016
-                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH_YEAR", $lang));
-                                $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                                $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
-                            }
-                        }
-                        else{
-                            // From February 2015 until March 2016
-                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH", $lang));
-                            $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
-                            $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                            $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
-                        }
-                    }
-                    break;
-            } // switch ($r_item["date_precission"])
-?>
-            <div class='role'>
-                <h4><?=text($con, $r_item["role"], $lang)?></h4>
-                <h5><?=$str_date?>. <?=$r_item["company"]?> (<?=text($con, $r_item["city"], $lang)?>)</h5>
-                <p><?=text($con, $r_item["summary"], $lang)?></p>
-            </div>
-<?php
-        } // while ($r_item = mysqli_fetch_array($q_item))
-?>
-    </div> <!-- .cv_entry -->
-<?php
-}
-?>
-

+ 56 - 0
application/view/error.php

@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html lang='<?=$lang?>'>
+    <head>
+        <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
+        <meta charset='utf-8'/>
+        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'>
+        <title><?=$page->title?></title>
+        <link rel='shortcut icon' href='<?=$static["layout"]?>/layout/logo/logo.svg'/>
+        <!-- CSS files -->
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>error.css'/>
+        <!-- Script files -->
+        <script type="text/javascript" src="<?=$static["js"]?>ui.js"></script>
+        <!-- No meta -->
+        <meta name="robots" content="noindex follow"/>
+    </head>
+    <body>
+<?php
+        include $path["inc"] . "header.php";
+?>
+        <main>
+            <section>
+                <h3><?=text($page, "ERROR_ERROR");?></h3>
+                <div id='left'>
+                    <p id='code'>
+                        <?=$page->code?>
+                    </p>
+                    <p>
+                        <span><?=text($page, "ERROR_ERROR");?></span>
+                        <span><?=text($page, "ERROR_CODE");?></span>
+                    </p>
+                </div>
+                <div id='right'>
+                    <h4>
+                        <?=$page->error_description?>
+                    </h4>
+                    <?=$page->advice?>
+                    <ul>
+                        <li>
+                            <a href='javascript: location.reload();'><?=$page->solution[0]?></a>
+                        </li>
+                        <li>
+                            <a href='javascript: history.go(-1);'><?=$page->solution[1]?></a>
+                        </li>
+                        <li>
+                            <a href='/'><?=$page->solution[2]?></a>
+                        </li>
+                    </ul>
+                </div>
+            </section>
+        </main>
+<?php
+        include $path["inc"] . "footer.php";
+?>
+    </body>
+</html>

+ 40 - 79
application/view/help.php

@@ -1,98 +1,59 @@
-<?php
-    session_start();
-    $http_host = $_SERVER["HTTP_HOST"];
-    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
-    include $doc_root . "functions.php";
-    $proto = get_protocol();
-    $con = start_db();
-    $server = $proto . $http_host;
-    $lang = select_language($con);
-    $lserver = $server . "/" . $lang;
-    $cur_section = "";
-    $cur_entry = "";
-?>
 <!DOCTYPE html>
 <!DOCTYPE html>
-<html>
+<html lang='<?=$page->lang?>'>
     <head>
     <head>
         <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
         <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
         <meta charset='utf-8'/>
         <meta charset='utf-8'/>
         <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
         <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
-        <title><?=text($con, "USER_NAME", $lang);?></title>
-        <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'/>
+        <title><?=$page->title?></title>
+        <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <!-- CSS files -->
         <!-- CSS files -->
-        <style>
-<?php
-            include $doc_root . "css/ui.css";
-            include $doc_root . "css/home.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media='(max-width : 990px)'>
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/home.css";
-?>
-        </style>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>help.css'/>
         <!-- Script files -->
         <!-- Script files -->
-        <script type='text/javascript'>
-<?php
-            include $doc_root . "script/ui.js";
-?>
-        </script>
+        <script type="text/javascript" src="<?=$static["js"]?>ui.js"></script>
+        <script type="text/javascript" src="<?=$static["js"]?>help.js"></script>
         <!-- Meta tags -->
         <!-- Meta tags -->
-        <link rel='canonical' href='<?=$lserver?>'/>
-        <link rel='author' href='<?=$lserver?>'/>
-        <link rel='publisher' href='<?=$lserver?>'/>
-        <meta name='description' content=''/>
-        <meta property='og:title' content='<?=text($con, "USER_NAME", $lang);?>'/>
-        <meta property='og:url' content='<?=$lserver?>'/>
-        <meta property='og:description' content=''/>
-        <meta property='og:image' content=''/>
-        <meta property='og:site_name' content='<?=text($con, "USER_NAME", $lang);?>'/>
+        <link rel='canonical' href='<?=$page->canonical?>'/>
+        <link rel='author' href='<?=$page->author?>'/>
+        <link rel='publisher' href='<?=$page->author?>'/>
+        <meta name='description' content='<?=$page->description?>'/>
+        <meta property='og:title' content='<?=$page->title?>'/>
+        <meta property='og:url' content='<?=$page->canonical?>'/>
+        <meta property='og:description' content='<?=$page->description?>'/>
+        <meta property='og:image' content='<?=$page->icon?>'/>
+        <meta property='og:site_name' content='<?=$page->name?>'/>
         <meta property='og:type' content='website'/>
         <meta property='og:type' content='website'/>
-        <meta property='og:locale' content='<?=$lang?>'/>
+        <meta property='og:locale' content='<?=$page->lang?>'/>
         <meta name='twitter:card' content='summary'/>
         <meta name='twitter:card' content='summary'/>
-        <meta name='twitter:title' content='<?=text($con, "USER_NAME", $lang);?>'/>
-        <meta name='twitter:description' content=''/>
-        <meta name='twitter:image' content=''/>
-        <meta name='twitter:url' content='<?=$lserver?>'/>
+        <meta name='twitter:title' content='<?=$page->title?>'/>
+        <meta name='twitter:description' content='<?=$page->description?>'/>
+        <meta name='twitter:image' content='<?=$page->icon?>'/>
+        <meta name='twitter:url' content='<?=$page->canonical?>'/>
         <meta name='robots' content='index follow'/>
         <meta name='robots' content='index follow'/>
     </head>
     </head>
     <body>
     <body>
-        <div id='body'>
-            <div id='body_row'>
-                <div id='left'>
-                    <div id='logo'>
-                        <img id='logo' src='<?=$lserver?>/img/logo/x6/inigovalentin.png' alt='<?=text($con, "USER_NAME", $lang);?>'/>
-                    </div>
-                    <div class='entry'>
-                        <img id='profile' src='<?=$lserver?>/img/profile/x6/0.png' alt='<?=text($con, "USER_NAME", $lang);?>' title='<?=text($con, "USER_NAME", $lang);?>' />
-                        <br/>
-                        <span id='tagline'><?=text($con, "USER_TAGLINE", $lang);?></span>
-                    </div> <!-- .entry -->
-                    <a class='a_button' href='<?=$lserver?>/profile/'>
-                        <span class='header_container'>
-                            <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "HEADER_ME", $lang);?>' src='<?=$lserver?>/img/icon/profile.gif'/></span>
-                            <?=text($con, "INDEX_PROFILE", $lang);?>
-                        </span>
-                    </a>
-                    <span class='link_separator desktop'></span>
-                    <a class='a_button' href='<?=$lserver?>/project/'>
-                        <span class='header_container'>
-                            <span class='header_icon_container'><img class='header_icon' alt='<?=text($con, "HEADER_PROJECTS", $lang);?>' src='<?=$lserver?>/img/icon/projects.gif'/></span>
-                            <?=text($con, "INDEX_PROJECTS", $lang);?>
-                        </span>
-                    </a>
 <?php
 <?php
-                    include $doc_root . "footer.php";
+        include $path["inc"] . "header.php";
+?>
+        <main>
+<?php
+            foreach($page->help as $key=>$help) {
 ?>
 ?>
-                </div> <!-- left -->
-                <div id='right'>
+                <section id='<?=$key?>' class='help'>
+                    <h3 class='pointer' onClick='toggleHelp("<?=$key?>");'>
+                        <img class='slider' src='<?=$static["layout"]?>control/slid_r.svg' alt='>'/>
+                        <?=$help["title"]?>
+                    </h3>
                     <p>
                     <p>
-                        <?=text($con, "USER_BIO", $lang);?>
+                        <?=$help["text"]?>
                     </p>
                     </p>
-                </div>
-            </div> <!-- #body_row -->
-        </div> <!-- #body -->
+                </section>
+<?php
+            }
+?>
+        </main>
+<?php
+        include $path["inc"] . "footer.php";
+?>
     </body>
     </body>
 </html>
 </html>

+ 55 - 60
application/view/home.php

@@ -7,10 +7,10 @@
         <title><?=$page->title?></title>
         <title><?=$page->title?></title>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <!-- CSS files -->
         <!-- CSS files -->
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>home.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>home.css'/>
         <!-- Script files -->
         <!-- Script files -->
-        <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
+        <script type="text/javascript" src="<?=$static["js"]?>ui.js"></script>
         <!-- Meta tags -->
         <!-- Meta tags -->
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='author' href='<?=$page->author?>'/>
         <link rel='author' href='<?=$page->author?>'/>
@@ -32,76 +32,71 @@
     </head>
     </head>
     <body>
     <body>
 <?php
 <?php
-        include __DIR__ . "/inc/header.php";
+        include $path["inc"] . "header.php";
 ?>
 ?>
         <main>
         <main>
-            <div id='left'>
-                <section>
-                    <h3>
-                        <?=$page->name?>
-                    </h3>
-                    <!-- TODO: Profile form model -->
-                    <article id='profile'>
-                        <img id='profile_image' srcset='<?=srcset("profile/profile.png")?>' src='<?=$path["img"]["content"]?>profile/x400/profile.png' alt='<?=text($page, "USER_NAME");?>' title='<?=text($page, "USER_NAME");?>' />
-                        <div id='profile_content'>
-                            <span id='tagline'><?=text($page, "USER_TAGLINE");?></span>
-                            <span id='bio'><?=text($page, "USER_BIO");?></span>
-                            <a class='a_button' href='<?=$root?>profile/'>
-                                <?=text($page, "INDEX_PROFILE");?>
-                            </a>
-                        </div>
-                    </article>
-                </section>
-            </div> <!-- left -->
-            <div id='right'>
-                <section>
-                    <h3>
-                        <?=text($page, "INDEX_PROJECTS");?>
-                    </h3>
+            <section id='profile'>
+                <h3>
+                    <?=$page->name?>
+                </h3>
+                <!-- TODO: Profile form model -->
+                <article>
+                    <img id='profile_image' srcset='<?=srcset("profile/profile.png")?>' src='<?=$static["content"]?>profile/x400/profile.png' alt='<?=text($page, "USER_NAME");?>' title='<?=text($page, "USER_NAME");?>' />
+                    <div id='profile_content'>
+                        <h4 id='tagline'><?=text($page, "USER_TAGLINE");?></h4>
+                        <p id='bio'><?=text($page, "USER_BIO");?></p>
+                    </div>
+                    <div class='buttons'>
+                        <a class='a_button' href='<?=$base_url?>/profile/'>
+                            <?=text($page, "INDEX_PROFILE_MORE");?>
+                        </a>
+                    </div>
+                </article>
+            </section>
+            <section id='projects'>
+                <h3>
+                    <?=text($page, "INDEX_PROJECTS");?>
+                </h3>
 <?php
 <?php
-                    foreach ($page->project as $project){
+            foreach ($page->project as $project){
 ?>
 ?>
-                        <article>
-                            <table>
-                                <tr>
+                <article class='project'>
+                    <table>
+                        <tr>
 <?php
 <?php
-                                    if (strlen($project->logo) > 0){
+                            if (strlen($project->logo) > 0){
 ?>
 ?>
-                                        <td>
-                                            <a href='<?=$root?>project/<?=$project->permalink?>'>
-                                                <img alt='<?=text($page, $project->title)?>' title='<?=text($page, $project->title)?>' srcset='<?=srcset("project/" . $project->logo)?>' src='<?=$path["img"]["content"]?>project/x200/<?=$project->logo?>'/>
-                                            </a>
-                                        </td>
+                                <td>
+                                    <a href='<?=$base_url?>/project/<?=$project->permalink?>'>
+                                        <img class='project_image' alt='<?=text($page, $project->title)?>' title='<?=text($page, $project->title)?>' srcset='<?=srcset("project/" . $project->logo)?>' src='<?=$static["content"]?>project/x200/<?=$project->logo?>'/>
+                                    </a>
+                                </td>
 <?php
 <?php
-                                    }
+                            }
 ?>
 ?>
-                                    <td>
-                                        <a href='<?=$root?>project/<?=$project->permalink?>'>
-                                            <h4 class='project_name'><?=$project->title?></h4>
-                                        </a>
-                                        <span>
-                                            <?=$project->header?>
-                                        </span>
-                                    </td>
-                                </tr>
-                            </table>
-                        </article>
+                            <td class='project_details'>
+                                <a href='<?=$base_url?>/project/<?=$project->permalink?>'>
+                                    <h4 class='project_name'><?=$project->title?></h4>
+                                </a>
+                                <span>
+                                    <?=$project->header?>
+                                </span>
+                            </td>
+                        </tr>
+                    </table>
+                </article>
 <?php
 <?php
-                    }
+                }
 ?>
 ?>
-                    <a class='a_button' href='<?=$root?>project/'>
-                        <span class='header_container'>
-                            <span class='header_icon_container'>
-                                <img class='header_icon' alt='<?=text($page, "HEADER_PROJECTS");?>' src='<?=$path["img"]["layout"]?>icon/projects.gif'/>
-                            </span>
-                            <?=text($page, "INDEX_PROJECTS");?>
-                        </span>
+                <div class='buttons'>
+                    <a class='a_button' href='<?=$base_url?>/project/'>
+                        <?=text($page, "INDEX_PROJECTS_ALL");?>
                     </a>
                     </a>
-                </section>
-            </div> <!-- #right -->
+                </div>
+            </section>
         </main>
         </main>
 <?php
 <?php
-        include __DIR__ . "/inc/footer.php";
+        include $path["inc"] . "footer.php";
 ?>
 ?>
     </body>
     </body>
 </html>
 </html>

+ 9 - 9
application/view/inc/footer.php

@@ -8,36 +8,36 @@
                     <?=text($page, "FOOTER_FOLLOW");?>
                     <?=text($page, "FOOTER_FOLLOW");?>
                 </span>
                 </span>
                 <a target='_blank' title='eMail' href='mailto:i@inigovalentin.com'>
                 <a target='_blank' title='eMail' href='mailto:i@inigovalentin.com'>
-                    <img class='footer_social_icon' src='<?=$path["img"]["layout"]?>social/email.svg' alt='eMail' title='eMail'/>
+                    <img class='footer_social_icon' src='<?=$static["layout"]?>social/email.svg' alt='eMail' title='eMail'/>
                 </a>
                 </a>
-                <a target='_blank' title='Telegram' href='https://telegram.me/@InigoValentin'>
-                    <img class='footer_social_icon' src='<?=$path["img"]["layout"]?>social/telegram.svg' alt='Telegram' title='Telegram'/>
+                <a target='_blank' title='Telegram' href='https://telegram.me/InigoValentin'>
+                    <img class='footer_social_icon' src='<?=$static["layout"]?>social/telegram.svg' alt='Telegram' title='Telegram'/>
                 </a>
                 </a>
                 <a target='_blank' title='Github' href='https://github.com/InigoValentin'>
                 <a target='_blank' title='Github' href='https://github.com/InigoValentin'>
-                    <img class='footer_social_icon' src='<?=$path["img"]["layout"]?>social/github.svg' alt='Github' title='Github'/>
+                    <img class='footer_social_icon' src='<?=$static["layout"]?>social/github.svg' alt='Github' title='Github'/>
                 </a>
                 </a>
                 <a target='_blank' title='LinkedIn' href='https://www.linkedin.com/in/ivalentin'>
                 <a target='_blank' title='LinkedIn' href='https://www.linkedin.com/in/ivalentin'>
-                    <img class='footer_social_icon' src='<?=$path["img"]["layout"]?>social/linkedin.svg' alt='LinkedIn' title='LinkedIn'/>
+                    <img class='footer_social_icon' src='<?=$static["layout"]?>social/linkedin.svg' alt='LinkedIn' title='LinkedIn'/>
                 </a>
                 </a>
             </td>
             </td>
             <td id='footer_center'>
             <td id='footer_center'>
                 <?=str_replace("#YEAR#", date("Y"), text($page, "FOOTER_COPY"));?>
                 <?=str_replace("#YEAR#", date("Y"), text($page, "FOOTER_COPY"));?>
             </td>
             </td>
             <td id='footer_right'>
             <td id='footer_right'>
-                <a id='footer_help' href='<?=$root?>help/'>
+                <a id='footer_help' href='<?=$base_url?>/help/'>
                     <?=text($page, "FOOTER_HELP");?>
                     <?=text($page, "FOOTER_HELP");?>
                 </a>
                 </a>
                 <br/><br/>
                 <br/><br/>
 <?php
 <?php
-                foreach ($page->footer->lang as $lang){
+                foreach ($page->available_langs as $lang){
                     $uri = $_SERVER["REQUEST_URI"];
                     $uri = $_SERVER["REQUEST_URI"];
                     if (substr($uri, 3, 1) == '/'){
                     if (substr($uri, 3, 1) == '/'){
                         $uri = substr($uri, 3);
                         $uri = substr($uri, 3);
                     }
                     }
-                    $dest = $root . $lang->code . $uri;
+                    $dest = $static_url . "/" . $lang->code . $uri;
 ?>
 ?>
                     <a class='lang' href='<?=$dest?>'>
                     <a class='lang' href='<?=$dest?>'>
-                        <img src='<?=$path["img"]["layout"]?>lang/<?=$lang->code?>.svg' alt='<?=$lang->name?>' title='<?=$lang->name?>'/>
+                        <img src='<?=$static["layout"]?>lang/<?=$lang->code?>.svg' alt='<?=$lang->name?>' title='<?=$lang->name?>'/>
                     </a>
                     </a>
 <?php
 <?php
                 }
                 }

+ 7 - 6
application/view/inc/header.php

@@ -1,18 +1,19 @@
+<?php global $static?>
 <header>
 <header>
     <div id='logo'>
     <div id='logo'>
         inigoValentin
         inigoValentin
     </div>
     </div>
     <nav>
     <nav>
-        <a href='<?=$root?>'>
-            <img src='<?=$path["img"]["layout"]?>icon/home.svg'/>
+        <a href='<?=$base_url?>/'>
+            <img src='<?=$static["layout"]?>icon/home.svg'/>
             <?=text($page, "SECTION_HOME")?>
             <?=text($page, "SECTION_HOME")?>
         </a>
         </a>
-        <a href='<?=$root?>profile'/>
-            <img src='<?=$path["img"]["layout"]?>icon/profile.svg'/>
+        <a href='<?=$base_url?>/profile/'/>
+            <img src='<?=$static["layout"]?>icon/profile.svg'/>
             <?=text($page, "SECTION_ME")?>
             <?=text($page, "SECTION_ME")?>
         </a>
         </a>
-        <a href='<?=$root?>project/'>
-            <img src='<?=$path["img"]["layout"]?>icon/project.svg'/>
+        <a href='<?=$base_url?>/project/'>
+            <img src='<?=$static["layout"]?>icon/project.svg'/>
             <?=text($page, "SECTION_PROJECTS")?>
             <?=text($page, "SECTION_PROJECTS")?>
         </a>
         </a>
     </nav>
     </nav>

+ 49 - 20
application/view/profile.php

@@ -7,10 +7,10 @@
         <title><?=$page->title?></title>
         <title><?=$page->title?></title>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <!-- CSS files -->
         <!-- CSS files -->
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>profile.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>profile.css'/>
         <!-- Script files -->
         <!-- Script files -->
-        <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
+        <script type="text/javascript" src="<?=$static["js"]?>ui.js"></script>
         <!-- Meta tags -->
         <!-- Meta tags -->
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='author' href='<?=$page->author?>'/>
         <link rel='author' href='<?=$page->author?>'/>
@@ -32,32 +32,61 @@
     </head>
     </head>
     <body>
     <body>
 <?php
 <?php
-        include __DIR__ . "/inc/header.php";
+        include $path["inc"] . "header.php";
 ?>
 ?>
         <main>
         <main>
-            <section>
-                <div id='left'>
-                    <div id='logo'>
-                        <img id='profile' src='<?=$path["img"]["content"]?>profile/x6/0.png' alt='<?=text($page, "USER_NAME");?>' title='<?=text($page, "USER_NAME");?>' />
-                    </div>
-                    <!-- TODO: Skills -->
-                </div> <!-- #left -->
-                <div id='right'>
+            <section id='info'>
+                <h3>
+                    <?=text($page, "USER_NAME");?>
+                </h3>
+                <img id='profile_image' srcset='<?=srcset("profile/profile.png")?>' src='<?=$static["content"]?>profile/x400/profile.png' alt='<?=text($page, "USER_NAME");?>' title='<?=text($page, "USER_NAME");?>' />
+                <div id='social'>
+                    <a target='_blank' title='eMail' href='mailto:i@inigovalentin.com'>
+                        <img class='footer_social_icon' src='<?=$static["layout"]?>social/email.svg' alt='eMail' title='eMail'/>
+                    </a>
+                    <a target='_blank' title='Telegram' href='https://telegram.me/InigoValentin'>
+                        <img class='footer_social_icon' src='<?=$static["layout"]?>social/telegram.svg' alt='Telegram' title='Telegram'/>
+                    </a>
+                    <a target='_blank' title='Github' href='https://github.com/InigoValentin'>
+                        <img class='footer_social_icon' src='<?=$static["layout"]?>social/github.svg' alt='Github' title='Github'/>
+                    </a>
+                    <a target='_blank' title='LinkedIn' href='https://www.linkedin.com/in/ivalentin'>
+                        <img class='footer_social_icon' src='<?=$static["layout"]?>social/linkedin.svg' alt='LinkedIn' title='LinkedIn'/>
+                    </a>
+                </div>
+            </section>
+            <section id='about'>
+                <h3>
+                    <?=text($page, "PROFILE_DESCRIPTION");?>
+                </h3>
+                <p>
+                    <?=text($page, "USER_TEXT");?>
+                </p>
+                <div id='cv_download'>
+                    <a class='a_button' target='_blank' href='<?=$static["cv"] . $page->cv[0]->file?>'>
+                        <?=text($page, "PROFILE_CV");?>
+                    </a>
+                    <details>
+                        <summary class='pointer'><?=text($page, "PROFILE_CV_LANG");?></summary>
+                        <ul>
 <?php
 <?php
-                    foreach($page->entry["WORK"] as $entry){
-                        // TODO: Something if its the current one.
+                            for ($i = 1; $i < count($page->cv); $i ++) {
 ?>
 ?>
-                        <div class='entry'>
-                            <h4><?=$entry->role?> - <?=$entry->company?></h4>
-                        </div>
+                                <li>
+                                    <a target='_blank' href='<?=$static["cv"] . $page->cv[$i]->file?>'>
+                                        <?=$page->cv[$i]->lang->name?>
+                                    </a>
+                                </li>
 <?php
 <?php
-                    }
+                            }
 ?>
 ?>
-                </div> <!-- #right -->
+                        </ul>
+                    </details>
+                </div>
             </section>
             </section>
         </main>
         </main>
 <?php
 <?php
-        include __DIR__ . "/inc/footer.php";
+        include $path["inc"] . "footer.php";
 ?>
 ?>
     </body>
     </body>
 </html>
 </html>

+ 64 - 63
application/view/project.php

@@ -7,11 +7,11 @@
         <title><?=$page->title?></title>
         <title><?=$page->title?></title>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <!-- CSS files -->
         <!-- CSS files -->
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>project.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>project.css'/>
         <!-- Script files -->
         <!-- Script files -->
-        <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
-        <script type="text/javascript" src="<?=$path["js"]?>project.js"></script>
+        <script type="text/javascript" src="<?=$static["js"]?>ui.js"></script>
+        <script type="text/javascript" src="<?=$static["js"]?>project.js"></script>
         <!-- Meta tags -->
         <!-- Meta tags -->
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='author' href='<?=$page->author?>'/>
         <link rel='author' href='<?=$page->author?>'/>
@@ -33,31 +33,75 @@
     </head>
     </head>
     <body>
     <body>
 <?php
 <?php
-        include __DIR__ . "/inc/header.php";
+        include $path["inc"] . "header.php";
 ?>
 ?>
         <main>
         <main>
-            <section id='info'>
+            <section>
                 <h3>
                 <h3>
                     <?=$page->project->title?>
                     <?=$page->project->title?>
                 </h3>
                 </h3>
-                <h4 id='summary'>
-                    <?=$page->project->header?>
-                </h4>
-                <p id='text'>
+                <article>
+                    <div id='info_summary'>
+                        <h4>
+                            <?=$page->project->header?>
+                        </h4>
+                        <p id='text'>
 <?php
 <?php
-                    if (strlen($page->project->logo) > 0){
+                            if (strlen($page->project->logo) > 0){
 ?>
 ?>
-                        <img id='logo' src='<?=$path["img"]["content"]?>project/<?=$page->project->logo?>' title='<?=$page->project->title?>' alt='<?=$page->project->title?>'/>
+                                <img id='logo' src='<?=$static["content"]?>project/<?=$page->project->logo?>' title='<?=$page->project->title?>' alt='<?=$page->project->title?>'/>
 <?php
 <?php
-                    }
+                            }
+?>
+                            <?=$page->project->text?>
+                        </p>
+                    </div>
+                    <div id='info_details'>
+                        <div id='tags' class='details'>
+<?php
+                            $str_tag = "";
+                            foreach($page->project->tag as $tag){
+                                $str_tag = $str_tag . $tag->tag . ", ";
+                            }
+                            $str_tag = rtrim($str_tag, ", ");
+?>
+                            <?=text($page, "PROJECT_TAGS")?>: <?=$str_tag?>
+                            <hr class='details_separator'/>
+                        </div> <!-- #tags -->
+<?php
+                        if (sizeof($page->project->url) > 0){
+?>
+                            <div id='links' class='details'>
+<?php
+                                foreach($page->project->url as $url){
+                                    if ($url->type->id != "E"){
+?>
+                                        <td>
+                                            <a target='_blank' class='link' href='<?=$url->url?>'>
+                                                <img class='link' title='<?=$url->type->title?>' alt='<?=$url->type->title?>' src='<?=$static["layout"]?>social/<?=$url->type->logo?>'/>
+                                                <?=$url->type->summary?>
+                                            </a>
+                                        </td>
+<?php
+                                    }
+                                }
+?>
+                                <hr class='details_separator'/>
+                            </div> <!-- #links -->
+<?php
+                        }
 ?>
 ?>
-                    <?=$page->project->text?>
-                </p>
+                        <div id='license' class='details'>
+                            <?=text($page, "PROJECT_LICENSE")?>:
+                            <img src='<?=$static["layout"]?>license/<?=$page->project->license->logo?>' title='<?=$page->project->license->id?>' alt='<?=$page->project->license->id?>'/>
+                        </div> <!-- #license -->
+                    </div> <!-- #info_details -->
+                </article>
 <?php
 <?php
                 foreach($page->project->url as $embed){
                 foreach($page->project->url as $embed){
                     if ($embed->type->id == "E"){
                     if ($embed->type->id == "E"){
 ?>
 ?>
-                        <iframe id='demo' src='<?=$path["demo"]?><?=$embed->url?>' onload='resizeDemo(this);'></iframe>
+                        <iframe id='demo' src='<?=$static["demo"]?><?=$embed->url?>' onload='setTimeout(function(){resizeDemo();}, 500);'></iframe>
 <?php
 <?php
                     }
                     }
                 }
                 }
@@ -72,7 +116,7 @@
                                 foreach($page->project->image as $image){
                                 foreach($page->project->image as $image){
 ?>
 ?>
                                     <td>
                                     <td>
-                                        <img title='<?=$page->project->title?>' alt='<?=$page->project->title?>' src='<?=$path["img"]["content"]?>project/<?=$image->image?>'/>
+                                        <img title='<?=$page->project->title?>' alt='<?=$page->project->title?>' src='<?=$static["content"]?>project/<?=$image->image?>'/>
                                     </td>
                                     </td>
 <?php
 <?php
                                 }
                                 }
@@ -83,53 +127,10 @@
 <?php
 <?php
                 }
                 }
 ?>
 ?>
-            </div> <!-- #info -->
-            <section id='details'>
-                <h3 class='section_title'>
-                    <?=text($page, "PROJECT_INFO")?>
-                </h3>
-                <div id='tags' class='details'>
-<?php
-                    $str_tag = "";
-                    foreach($page->project->tag as $tag){
-                        $str_tag = $str_tag . "<a class='tag' href='TODO' title='" . $tag->tag . "'>" . $tag->tag . "</a>, ";
-                    }
-                    $str_tag = rtrim($str_tag, ", ");
-?>
-                    <?=text($page, "PROJECT_TAGS")?>: <?=$str_tag?>
-                    <hr class='details_separator'/>
-                </div> <!-- #tags -->
-<?php
-                if (sizeof($page->project->url) > 0){
-?>
-                    <div id='links' class='details'>
-<?php
-                        foreach($page->project->url as $url){
-                            if ($url->type->id != "E"){
-?>
-                                <td>
-                                    <a class='link' href='<?=$url->url?>'>
-                                        <img class='link' title='<?=$url->type->title?>' alt='<?=$url->type->title?>' src='<?=$path["img"]["content"]?>url/<?=$url->type->logo?>'/>
-                                        <?=$url->type->title?>
-                                    </a>
-                                </td>
-<?php
-                            }
-                        }
-?>
-                        <hr class='details_separator'/>
-                    </div> <!-- #links -->
-<?php
-                }
-?>
-                <div id='license' class='details'>
-                    <?=text($page, "PROJECT_LICENSE")?>:
-                    <img src='<?=$path["img"]["content"]?>license/<?=$page->project->license->logo?>' title='<?=$page->project->license->id?>' alt='<?=$page->project->license->id?>'/>
-                </div> <!-- #license -->
-            </section> <!-- #details -->
-        </main> <!-- .content -->
+            </section>
+        </main>
 <?php
 <?php
-        include __DIR__ . "/inc/footer.php";
+        include $path["inc"] . "footer.php";
 ?>
 ?>
     </body>
     </body>
 </html>
 </html>

+ 24 - 27
application/view/projects.php

@@ -7,10 +7,10 @@
         <title><?=$page->title?></title>
         <title><?=$page->title?></title>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <link rel='shortcut icon' href='<?=$page->favicon?>'/>
         <!-- CSS files -->
         <!-- CSS files -->
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
-        <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>projects.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>ui.css'/>
+        <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>projects.css'/>
         <!-- Script files -->
         <!-- Script files -->
-        <script type="text/javascript" src="<?=$path["js"]?>ui.js"></script>
+        <script type="text/javascript" src="<?=$static["js"]?>ui.js"></script>
         <!-- Meta tags -->
         <!-- Meta tags -->
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='canonical' href='<?=$page->canonical?>'/>
         <link rel='author' href='<?=$page->author?>'/>
         <link rel='author' href='<?=$page->author?>'/>
@@ -32,49 +32,46 @@
     </head>
     </head>
     <body>
     <body>
 <?php
 <?php
-        include __DIR__ . "/inc/header.php";
+        include $path["inc"] . "header.php";
 ?>
 ?>
         <main>
         <main>
             <section>
             <section>
                 <h3><?=$page->title?></h3>
                 <h3><?=$page->title?></h3>
-                <!-- TODO: Search and sorting -->
-                <div id='project_list'>
 <?php
 <?php
                     foreach ($page->project as $project){
                     foreach ($page->project as $project){
 ?>
 ?>
-                        <article class='project'>
-                            <table>
-                                <tr>
+                    <article class='project'>
+                        <table>
+                            <tr>
 <?php
 <?php
                                     if (strlen($project->logo) > 0){
                                     if (strlen($project->logo) > 0){
-?>
-                                        <td>
-                                            <a href='<?=$root?>project/<?=$project->permalink?>'>
-                                                <img class='project_logo' alt='<?=$project->title?>' title='<?=$project->title?>' src='<?=$path["img"]["content"]?>project/<?=$project->logo?>'/>
-                                            </a>
-                                        </td>
-<?php
-                                    }
 ?>
 ?>
                                     <td>
                                     <td>
-                                        <a href='<?=$root?>project/<?=$project->permalink?>'>
-                                            <h4 class='project_name'><?=$project->title?></h4>
+                                        <a href='<?=$base_url?>/project/<?=$project->permalink?>'>
+                                            <img class='project_image' alt='<?=$project->title?>' title='<?=$project->title?>' src='<?=$static["content"]?>project/<?=$project->logo?>' srcset='<?=srcset("project/" . $project->logo)?>'/>
                                         </a>
                                         </a>
-                                        <span>
-                                            <?=$project->header?>
-                                        </span>
                                     </td>
                                     </td>
-                                </tr>
-                            </table>
-                        </article> <!-- .project -->
+<?php
+                                    }
+?>
+                                <td class='project_details'>
+                                    <a href='<?=$base_url?>/project/<?=$project->permalink?>'>
+                                        <h4 class='project_name'><?=$project->title?></h4>
+                                    </a>
+                                    <span>
+                                        <?=$project->header?>
+                                    </span>
+                                </td>
+                            </tr>
+                        </table>
+                    </article> <!-- .project -->
 <?php
 <?php
                     }
                     }
 ?>
 ?>
-                </div> <!-- #project_list -->
             </section>
             </section>
         </main>
         </main>
 <?php
 <?php
-        include __DIR__ . "/inc/footer.php";
+        include $path["inc"] . "footer.php";
 ?>
 ?>
     </body>
     </body>
 </html>
 </html>

+ 0 - 62
application/view/rss.php

@@ -1,62 +0,0 @@
-<?php
-    header('Content-type: application/xml');
-    session_start();
-    $http_host = $_SERVER["HTTP_HOST"];
-    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
-    include $doc_root . "functions.php";
-    $proto = get_protocol();
-    $con = start_db();
-    $server = $proto . $http_host;
-    $lang = select_language($con);
-    $lserver = $server . "/" . $lang;
-    $cur_section = "";
-    $cur_entry = "";
-    ob_clean();
-    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
-?>
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
-    <channel>
-        <title>Iñigo Valentin</title>
-        <link><?=$lserver?></link>
-        <atom:link href="<?=$lserver?>/rss.xml" rel="self" type="application/rss+xml" />
-        <description>TODO 3D art</description>
-        <category>TODO cgi</category>
-        <image>
-            <url><?=$lserver?>/img/logo/cover.png</url>
-            <title>Iñigo Valentin</title>
-            <link><?=$lserver?></link>
-            <width>140</width>
-            <height>140</height>
-        </image>
-        <language><?=$lang?></language>
-<?php
-            $res_date = mysqli_query($con, "(SELECT DATE_FORMAT(dtime, '%a, %d %b %Y %H:%i:%s +0100') AS cdate FROM project_version) UNION (SELECT DATE_FORMAT(dtime, '%a, %d %b %Y %H:%i:%s +0100') AS cdate FROM post) ORDER BY cdate DESC LIMIT 1;");
-            $row_date = mysqli_fetch_array($res_date);
-?>
-            <pubDate><?=$row_date["cdate"]?></pubDate>
-<?php
-            $res = mysqli_query($con, "SELECT id, permalink, dtime, DATE_FORMAT(dtime, '%a, %d %b %Y %H:%i:%s +0100') AS cdate, title, text, logo AS image FROM project, project_version WHERE project = project.id  ORDER BY dtime DESC;");
-            while ($row = mysqli_fetch_array($res)){
-?>
-                <item>
-                    <title><?=text($con, $row["title"], $lang)?></title>
-                    <category><?=text($con, $row["type"], $lang)?></category>
-<?php
-                    $text = html_entity_decode(text($con, $row["text"], $lang));
-?>
-                    <description>
-                        <![CDATA[
-                            <img src='<?=$lserver?>/img/project/x5/<?=$row["image"]?>' height='160' width='160' />
-                            <?=$text?>
-                        ]]>
-                    </description>
-                    <link><?=$lserver?>/project/<?=$row["permalink"]?></link>
-                    <guid><?=$lserver?>/project/<?=$row["permalink"]?></guid>
-                    <pubDate><?=$row["cdate"]?></pubDate>
-                </item>
-<?php
-            }
-            mysqli_close($con);
-?>
-    </channel>
-</rss>

+ 0 - 80
application/view/skills.php

@@ -1,80 +0,0 @@
-<section>
-    <h3><?=text($con, "PROFILE_CV", $lang);?></h3>
-    <ul class='cv_download'>
-        <li>
-            <a target='_blank' href='TODO' title='<?=text($con, "USER_NAME", $lang);?> - <?=text($con, "PROFILE_CV", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_CURRENT", $lang);?></a>
-        </li>
-        <li>
-            <a href='TODO' title='<?=text($con, "PROFILE_CV_DOWNLOAD_LANG", $lang);?>'><?=text($con, "PROFILE_DOWNLOAD_OTHER", $lang);?></a>
-        </li>
-    </ul>
-<?php
-    $q_section = mysqli_query($con, "SELECT * FROM cv_category WHERE visible = 1 ORDER BY priority;");
-    while ($r_section = mysqli_fetch_array($q_section)){
-?>
-        <article id='cv' class='cv_entry'>
-            <h4 class='cv_entry_title'><?=text($con, $r_section["title"], $lang)?></h4>
-<?php
-            if (strlen($r_section["summary"]) > 0){
-?>
-                <h5><?=text($con, $r_section["summary"], $lang)?></h5>
-<?php
-            }
-            $q_item = mysqli_query($con, "SELECT id, role, company, summary, city, start, end, year(start) AS start_y, DATE_FORMAT(start, '%m') AS start_m, year(end) AS end_y, DATE_FORMAT(end, '%m') AS end_m, date_precission FROM cv_entry WHERE category = $r_section[id] AND visible = 1 ORDER BY start DESC");
-            while ($r_item = mysqli_fetch_array($q_item)){
-                switch ($r_item["date_precission"]){
-                    case "Y":
-                        if (strlen($r_item["end"]) <= 0){    // Since 2016
-                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_YEAR", $lang));
-                        }
-                        else{
-                            if ($r_item["start_y"] == $r_item["end_y"]){    // 2016
-                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_YEAR", $lang));
-                            }
-                            else{    // From 2015 until 2017
-                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_YEAR", $lang));
-                                $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
-                            }
-                        }
-                        break;
-                    case "M":
-                        if (strlen($r_item["end"]) <= 0){    // Since March 2016
-                            $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_MONTH", $lang));
-                            $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                        }
-                        else{
-                            if ($r_item["start_y"] == $r_item["end_y"]){
-                                if ($r_item["start_m"] == $r_item["end_m"]){    // March 2016
-                                    $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_DURING_MONTH", $lang));
-                                    $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                                }
-                                else{    // From February until March 2016
-                                    $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH_YEAR", $lang));
-                                    $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                                    $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
-                                }
-                            }
-                            else{
-                                // From February 2015 until March 2016
-                                $str_date = str_replace("#YEAR_START#", $r_item["start_y"], text($con, "CV_DATE_FROM_TO_MONTH", $lang));
-                                $str_date = str_replace("#YEAR_END#", $r_item["end_y"], $str_date);
-                                $str_date = str_replace("#MONTH_START#", text($con, "MONTH_" . $r_item["start_m"], $lang), $str_date);
-                                $str_date = str_replace("#MONTH_END#", text($con, "MONTH_" . $r_item["end_m"], $lang), $str_date);
-                            }
-                        }
-                        break;
-                } // switch ($r_item["date_precission"])
-?>
-                <div class='role'>
-                    <h4><?=text($con, $r_item["role"], $lang)?></h4>
-                    <h5><?=$str_date?>. <?=$r_item["company"]?> (<?=text($con, $r_item["city"], $lang)?>)</h5>
-                    <p><?=text($con, $r_item["summary"], $lang)?></p>
-                </div>
-<?php
-            } // while ($r_item = mysqli_fetch_array($q_item))
-?>
-        </article>
-<?php
-    }
-?>
-</section> <!-- .section -->

+ 7 - 7
public/.htaccess

@@ -36,7 +36,7 @@ FallbackResource /index.php
         ExpiresByType image/gif "access plus 12 days"
         ExpiresByType image/gif "access plus 12 days"
         ExpiresByType image/png "access plus 12 days"
         ExpiresByType image/png "access plus 12 days"
         ExpiresByType video/mkv "access plus 12 days"
         ExpiresByType video/mkv "access plus 12 days"
-        #ExpiresByType text/css "access plus 6 days"
+        ExpiresByType text/css "access plus 6 days"
         ExpiresByType text/plain "access plus 6 days"
         ExpiresByType text/plain "access plus 6 days"
 </IfModule>
 </IfModule>
 
 
@@ -47,14 +47,14 @@ FallbackResource /index.php
 # Used to: control the cache times of the different files on the client.
 # Used to: control the cache times of the different files on the client.
 #
 #
 <ifModule mod_headers.c>
 <ifModule mod_headers.c>
-	<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
-		Header set Cache-Control "max-age=864000, public, must-revalidate"
+	<filesMatch "\.(ico|jpe?g|png|gif|swf|svg)$">
+		Header set Cache-Control "max-age=86400, public, must-revalidate"
+	</filesMatch>
+	<filesMatch "\.(css)$">
+		Header set Cache-Control "max-age=86400, public, must-revalidate"
 	</filesMatch>
 	</filesMatch>
-#	<filesMatch "\.(css)$">
-#		Header set Cache-Control "max-age=864000, public, must-revalidate"
-#	</filesMatch>
 	<filesMatch "\.(js)$">
 	<filesMatch "\.(js)$">
-		Header set Cache-Control "max-age=864000, private, must-revalidate"
+		Header set Cache-Control "max-age=86400, private, must-revalidate"
 	</filesMatch>
 	</filesMatch>
 	<filesMatch "\.(x?html?|php)$">
 	<filesMatch "\.(x?html?|php)$">
 		Header set Cache-Control "max-age=86400, private, must-revalidate"
 		Header set Cache-Control "max-age=86400, private, must-revalidate"

+ 38 - 31
public/css/error.css

@@ -1,43 +1,50 @@
-div.section{
-    width: 60%;
-    min-width: 20em;
-    max-width: 80em;
+section{
     margin: auto;
     margin: auto;
+    max-width: 60em;
+    border: 0.1em solid #330000;
 }
 }
 
 
-table#error_header{
-    width: 80%;
-    margin: 2em auto 2em auto;
-}
-
-table#error_header td{
-    width: 50%;
+section h3{
+    color: #ffffff;
+    background-color: #ef3939;
+    border-bottom: 0.1em solid #330000;
 }
 }
 
 
-table#error_code{
+section div#left{
     display: inline-block;
     display: inline-block;
-    margin-left: 10%;
-    border: 0.1em solid #000011;
-    border-radius: 1em;
-    padding: 0.5em 0 0.5em 0;
-    background-color: #1e9957;
-    filter: drop-shadow(0 0 0.4em #002200);
+    vertical-align: middle;
+    width: 15em;
+    height: 6em;
+    margin: 2em;
+    padding-top: 2em;
+    background-color: #ef3939;
     color: #ffffff;
     color: #ffffff;
+    font-weight: bold;
+    border: 0.3em solid #330000;
+    border-radius: 0.5em;
+    text-align: center;
+    text-shadow: 0 0 0.1em #000000;
+    box-shadow: 0 0 0.2em #ef3939;
 }
 }
-
-td#error_number{
+section div#left p{
+    display: inline-block;
+    vertical-align: middle;
+    font-weight: bold;
+    font-size: 150%;
+    margin: 0.2em;
+}
+section div#left p#code{
     font-size: 300%;
     font-size: 300%;
-    border-right: 0.063em solid #000000;
-    padding-right: 0.5em;
-    padding-left: 0.2em;
 }
 }
-td#error_tag{
-    font-size: 110%;
-    padding-left: 1.2em;
-    padding-right: 1em;
+section div#left p span{
+    display: block;
 }
 }
-div#error_message{
-    width: 80%;
-    margin: 0 10% 1em 10%;
-    margin-bottom: 4em;
+
+section div#right{
+    display: inline-block;
+    vertical-align: middle;
+    margin: 1.5em 1em 1.5em 0;
+    padding-left: 2em;
+    max-width: 35em;
+    border-left: 0.2em solid #444444
 }
 }

+ 29 - 0
public/css/help.css

@@ -0,0 +1,29 @@
+section{
+    padding: 0;
+    max-height: 2.8em;
+    overflow-y: hidden;
+    border-bottom-right-radius: 0.5em;
+    border-bottom-left-radius: 0.5em;
+    transition: all .5s ease-in-out;
+}
+section.selected{
+    max-height: 15em;
+    border-bottom-right-radius: 1.5em;
+    border-bottom-left-radius: 1.5em;
+}
+section h3{
+    margin: 0;
+}
+section h3 img.slider{
+    width: 1em;
+    height: 1em;
+    transition: all .3s ease-in-out;
+    float: left;
+    margin-left: -2em;
+}
+section.selected h3 img.slider{
+    transform: rotate(90deg);
+}
+section p{
+    margin: 1em 2em;
+}

+ 51 - 17
public/css/home.css

@@ -1,30 +1,64 @@
-/* Profile section. */
-div#left{
+section#profile{
     display: inline-block;
     display: inline-block;
     vertical-align: top;
     vertical-align: top;
-    width: 46%;
-    margin: 0;
-    padding: 1em;
+    width: 40%;
+    margin:  auto 2em auto auto;
+}
+@media screen and (max-width : 800px){
+    section#profile{
+        display: block;
+        width: 90%;
+        margin: auto;
+    }
 }
 }
-
-article#profile img#profile_image{
+section#profile article img#profile_image{
     display: inline-block;
     display: inline-block;
-    vertical-align: middle;
-    width: 200px;
-    height: 200px;
+    vertical-align: top;
+    width: 25%;
+    height: 25%;
     border: 0.2em solid #446644;
     border: 0.2em solid #446644;
     border-radius: 1em 5em;
     border-radius: 1em 5em;
 }
 }
-article#profile div#profile_content{
+section#profile article div#profile_content{
+    width: 60%;
+    padding: 0.5em 1.5em;
     display: inline-block;
     display: inline-block;
-    vertical-align: middle;
+    vertical-align: top;
 }
 }
-
-/* Projects section. */
-div#right{
+section#projects{
     display: inline-block;
     display: inline-block;
     vertical-align: top;
     vertical-align: top;
-    width: 46%;
+    width: 50%;
     margin: 0;
     margin: 0;
-    padding: 1em;
+}
+@media screen and (max-width : 800px){
+    section#projects{
+        display: block;
+        width: 90%;
+        margin: 2em auto auto auto;
+    }
+}
+section#projects article.project img.project_image{
+    padding: 0.5em;
+    width: 5em;
+    height: 5em;
+    background-color: #cccccc;
+    border: 0.1em solid #60ae29;
+    box-shadow: inset 0 0 0.5em #00220077;
+    border-radius: 1em;
+}
+@media screen and (max-width : 800px){
+	section#projects article.project img.project_image{
+	    padding: 0.9em;
+	    width: 10em;
+	    height: 10em;
+	}
+}
+section#projects article.project td.project_details{
+    vertical-align: top;
+    padding-left: 1em;
+}
+section div.buttons{
+    text-align: right;
+    padding: 0.5em 2em 0 2em;
 }
 }

+ 90 - 54
public/css/profile.css

@@ -1,74 +1,110 @@
-div#left a.profile_button{
-    display: block;
-    width: 70%;
-    margin: 1em auto 1em auto;
-    border: 0.2em solid #007700;
-    background-color: #aaffaa;
-    font-weight: bold;
+main{
+    text-align: center;
 }
 }
 
 
-div#left a.profile_button img{
+section#info{
+    text-align: left;
     display: inline-block;
     display: inline-block;
-    vertical-align: middle;
-}
-
-
-
-div#right div#profile{
-    display: table;
-}
-
-div#right div#profile div.table_row{
-    diplay: table-row;
+    vertical-align: top;
+    width: 30%;
+    margin: auto 2em auto auto;
 }
 }
-
-div#right div#profile div.table_row div.table_cell{
-    display: table-cell;
-    vertical-align: middle;
+@media screen and (max-width : 800px){
+	section#info{
+	    width: 90%;
+	    margin: auto;
+	    text-align: center;
+	}
+	section#info h3{
+	    text-align: left;
+	}
 }
 }
 
 
-div#right div#profile img{
+section#info img#profile_image{
+    display: block;
+    margin: 0.5em auto;
     max-width: 10em;
     max-width: 10em;
     max-height: 10em;
     max-height: 10em;
     border-radius: 1.2em;
     border-radius: 1.2em;
-    margin: 1em;
     border: 0.3em solid #000000;
     border: 0.3em solid #000000;
 }
 }
-
-div#right div.cv_entry{
-    margin: 0.5em;
+@media screen and (max-width : 800px){
+	section#info img#profile_image{
+	    display: inline-block;
+	    vertical-align: middle;
+	    width: 30%;
+	    max-width: 12em;
+	    max-height: 12em;
+	}
 }
 }
-
-div#right div.cv_entry h4.cv_entry_title{
-    padding-left: 1em;
-    font-weight: bold;
-    font-size: 130%;
-    border-bottom: 0.1em solid #00330077;
-    margin-bottom: 0em;
-    border-bottom-left-radius: 0.5em;
+section#info div#social{
+    text-align: center;
+    margin: auto;
 }
 }
-
-div#right div.role{
-    margin: 0em 1em 0 1em;
-    border-left: 0.1em solid #00330077;
+@media screen and (max-width : 800px){
+	section#info div#social{
+	    display: inline-block;
+	    vertical-align: middle;
+	    width: 40%;
+	    margin: auto;
+	}
+}
+section#info div#social img{
+    width: 60px;
+    height: 60px;
+    margin: 10px;
+    vertical-align: middle;
+    background-color: #ffffff;
+    border: 0.2em solid #ffffff;
+    border-radius: 0.4em;
+    box-shadow: 0 0 0.3em #003300;
+    transition: all .2s ease-in-out;
+}
+section#info div#social img:hover{
+    width: 70px;
+    height: 70px;
+    margin: 5px;
+    border-radius: 50%;
+    box-shadow: 0 0 0.5em #55aa55;
 }
 }
 
 
-div#right div.role h4{
-    border-bottom: 0.1em solid #00330077;
-    font-weight: bold;
-    font-size: 130%;
-    margin-left: 0;
-    margin-bottom: 0.2em;
-    padding: 0 1em 0 0.4em;
+section#about{
+    text-align: left;
     display: inline-block;
     display: inline-block;
+    vertical-align: top;
+    width: 50%;
 }
 }
-
-div#right div.role h5{
+@media screen and (max-width : 800px){
+	section#about{
+	    width: 90%;
+	    margin: 2em auto auto auto;
+	}
+}
+section#about p{
     font-style: italic;
     font-style: italic;
-    margin: 0.5em 1em 0.5em 1em;
+    text-indent: 1em;
+    margin: 2em 4em;
+    color: #335333;
 }
 }
-
-div#right div.role p{
-    margin: 0.5em 2em 0 2em;
-    padding-bottom: 1em;
+section#about div#cv_download{
+    text-align: center;
+}
+section#about div#cv_download a.a_button{
+    display: inline-block;
+    vertical-align: top;
+    margin: auto 3em 1.5em auto;
+}
+section#about div#cv_download details{
+    display: inline-block;
+    vertical-align: top;
+    font-style: italic;
+    margin-top: 0.5em;
+}
+section#about div#cv_download details summary{
+    color: #777777;
+    font-size: 90%;
+}
+section#about div#cv_download details ul{
+    text-align: left;
+    margin: 0.1em;
 }
 }

+ 85 - 42
public/css/project.css

@@ -1,81 +1,124 @@
-div#info{
+section{
+	text-align: center;
+}
+section h3{
+	text-align: left;
+}
+div#info_summary{
     display: inline-block;
     display: inline-block;
-    width: 60%;
+    width: 65%;
+    margin: 0;
     vertical-align: top;
     vertical-align: top;
+    padding: 1em 3em;
+    min-height: 13em;
+    text-align: left;
+}
+@media screen and (max-width : 800px){
+	div#info_summary{
+	    display: block;
+	    width: 95%;
+	    margin: 1em auto;
+	    padding: 1em 2em;
+	}
 }
 }
 
 
-div#info h4#summary{
-    margin: 2em;
+div#info_summary h4{
+    margin: 1em 2em 0 2em;
     font-style: italic;
     font-style: italic;
 }
 }
 
 
-div#info p#text{
+div#info_summary p#text{
     margin: 2em;
     margin: 2em;
 }
 }
 
 
-div#info p#text img#logo{
-    width: 6em;
-    height: 6em;
-    border: 0.1em solid #000000;
+div#info_summary p#text img#logo{
+    padding: 0.5em;
+    width: 7em;
+    height: 7em;
+    background-color: #cccccc;
+    border: 0.1em solid #60ae29;
+    box-shadow: inset 0 0 0.5em #00220077;
+    border-radius: 1em;
     float: left;
     float: left;
-    margin: 0.5em 1.5em 1.5em 0.5em;
-    border-radius: 0.5em;
-}
-
-div#info iframe#demo{
-    margin: auto;
-}
-
-div#info div#image_reel{
-    margin: 2em auto 1em auto;
-    width: 80%;
-    overflow-x: scroll;
-    border: 0.1em solid #000000;
-    background-color: #aaaaaa;
-    text-align: center;
+    margin: 0 2em 1em 0;
 }
 }
 
 
-div#info div#image_reel table tr td img{
-    max-height: 7em;
-    max-width: 7em;
-    border: 0.2em solid #777777;
-    border-radius: 0.2em;
-    background-color: #ffffff;
-    margin: 0.5em;
-}
-
-div#details{
+div#info_details{
     display: inline-block;
     display: inline-block;
-    width: 30%;
+    width: 22%;
     vertical-align: top;
     vertical-align: top;
+    margin: 0;
+    border-left: 0.1em solid #aacaaa;
+    border-right: 0.1em solid #aacaaa;
+    background: linear-gradient(to bottom, #e5f0e500 0%, #e5f0e5ff 20%, #e5f0e5ff 80%, #e5f0e500 100%);
+    padding: 1em;
+    text-align: left;
 }
 }
-
-div#details div.details{
+@media screen and (max-width : 800px){
+	div#info_details{
+		text-align: center;
+	    display: block;
+	    width: 90%;
+	    margin: 1em auto;
+	    border-top: 0.1em solid #aacaaa;
+	    border-bottom: 0.1em solid #aacaaa;
+	    border-left: 0;
+	    border-right: 0;
+	    background: linear-gradient(to right, #e5f0e500 0%, #e5f0e5ff 20%, #e5f0e5ff 80%, #e5f0e500 100%);
+	    padding: 1em;
+	}
+}
+div#info_details div.details{
     margin: 0.5em 1.5em 0.5em 1.5em;
     margin: 0.5em 1.5em 0.5em 1.5em;
 }
 }
 
 
-div#details div.details hr.details_separator{
+div#info_details div.details hr.details_separator{
     margin: 1em -0.5em 0.5em -0.5em;
     margin: 1em -0.5em 0.5em -0.5em;
 }
 }
 
 
-div#details div#tags a.tag{
+div#info_details div#tags{
     font-style: italic;
     font-style: italic;
     font-size: 90%;
     font-size: 90%;
 }
 }
 
 
-div#details div#links a.link{
+div#info_details div#links a.link{
     display: block;
     display: block;
     margin-bottom: 1em;
     margin-bottom: 1em;
+    font-size: 70%;
 }
 }
 
 
-div#details div#links a.link img.link{
+div#info_details div#links a.link img.link{
     vertical-align: middle;
     vertical-align: middle;
     width: 1.5em;
     width: 1.5em;
     height: 1.5em;
     height: 1.5em;
 }
 }
 
 
-div#details div#license img{
+div#info_details div#license img{
     max-width: 8em;
     max-width: 8em;
     max-height: 2em;
     max-height: 2em;
     vertical-align: bottom;
     vertical-align: bottom;
 }
 }
+
+iframe#demo{
+    margin: auto;
+    border: 0.2emsolid #000000;
+    border-radius: 0.5em;
+}
+
+div#image_reel{
+    margin: 2em auto 1em auto;
+    width: 80%;
+    overflow-x: scroll;
+    border: 0.1em solid #000000;
+    background-color: #aaaaaa;
+    text-align: center;
+}
+
+div#image_reel table tr td img{
+    max-height: 7em;
+    max-width: 7em;
+    border: 0.2em solid #777777;
+    border-radius: 0.2em;
+    background-color: #ffffff;
+    margin: 0.5em;
+}

+ 30 - 24
public/css/projects.css

@@ -1,45 +1,51 @@
 /* Projects page */
 /* Projects page */
-div#project_list{
-    width: 100%;
-    margin: 0;
-    padding: 0;
+section{
+    width: 90%;
+    margin: auto;
     text-align: center;
     text-align: center;
 }
 }
+section h3{
+    text-align: left;
+}
 
 
-div#project_list div.project{
+section article.project{
     position: relative;
     position: relative;
     display: inline-block;
     display: inline-block;
-    height: 7em;
-    width: 27em;
-    margin: 1em;
+    vertical-align: top;
+    width: 40%;
+    margin: 2em 3%;
     padding: 1em;
     padding: 1em;
-    border: 0.1em solid #000000;
-    border-left: 1.5em solid #000000;
     text-align: left;
     text-align: left;
-    transition: all 1s ease-in-out;
+    border-left: 0.1em solid #aacaaa;
+    border-right: 0.1em solid #aacaaa;
+    background: linear-gradient(to bottom, #e5f0e500 0%, #e5f0e5ff 20%, #e5f0e5ff 80%, #e5f0e500 100%);
 }
 }
-div#project_list div.project:hover{
-    border: 0.1em solid #00ff00;
-    border-left: 1.5em solid #00ff00;
+@media screen and (max-width : 800px){
+	section article.project{
+	    width: 90%;
+	    margin: 1em auto;
+	}
 }
 }
 
 
-div#project_list div.project table{
+section article.project table{
     width: 100%;
     width: 100%;
 }
 }
 
 
-div#project_list div.project table img.project_logo{
-    height: 4em;
-    width: 4em;
-    border: 0.1em solid #000000;
-    border-radius: 0.3em;
+section article.project table img.project_image{
+    padding: 0.5em;
+    width: 7em;
+    height: 7em;
+    background-color: #cccccc;
+    border: 0.1em solid #60ae29;
+    box-shadow: inset 0 0 0.5em #00220077;
+    border-radius: 1em;
 }
 }
 
 
-div#project_list div.project table h4.project_name{
-    margin: 0.1em;
-    text-align: center;
+div#project_list article.project table td.project_details{
+    padding-left: 1.5em;
 }
 }
 
 
-div#project_list div.project table span.project_tagline{
+div#project_list article.project table span.project_tagline{
     font-size: 80%;
     font-size: 80%;
     font-style: italic;
     font-style: italic;
 }
 }

+ 149 - 42
public/css/ui.css

@@ -12,7 +12,7 @@
 .desktop{
 .desktop{
     display: initial;
     display: initial;
 }
 }
-@media screen and (max-width : 990px){
+@media screen and (max-width : 800px){
     .desktop{
     .desktop{
         display: none;
         display: none;
     }
     }
@@ -22,7 +22,7 @@
 .mobile{
 .mobile{
     display: none;
     display: none;
 }
 }
-@media screen and (max-width : 990px){
+@media screen and (max-width : 800px){
     .mobile{
     .mobile{
         display: initial !important;
         display: initial !important;
     }
     }
@@ -38,6 +38,15 @@ body{
     padding: 0;
     padding: 0;
     margin: 0;
     margin: 0;
     background-color: #000000;
     background-color: #000000;
+    font-size: 90%;
+    min-height: 100vh;
+	flex-direction: column;
+	display: flex;
+}
+@media screen and (max-width : 800px){
+	body{
+	    font-size: 100%;
+	}
 }
 }
 
 
 /* Style for all links. */
 /* Style for all links. */
@@ -98,41 +107,65 @@ header{
 }
 }
 
 
 header div#logo{
 header div#logo{
-	color: #ffffff;
+    color: #ffffff;
     font-size: 4em;
     font-size: 4em;
     font-family: 'Latin';
     font-family: 'Latin';
 }
 }
-
+header nav{
+	width: 100%;
+}
 header nav a{
 header nav a{
-	font-size: 1.5em;
+    font-size: 1.5em;
     margin: 0.5em;
     margin: 0.5em;
     color: #ffffff;
     color: #ffffff;
     text-decoration: none;
     text-decoration: none;
     position: relative;
     position: relative;
 }
 }
 header nav a:hover{
 header nav a:hover{
-	color: #ffffff;
+    color: #ffffff;
 }
 }
 header nav a:before {
 header nav a:before {
-	content: " ";
-	position: absolute;
-	width: 100%;
-	height: 0.1em;
-	bottom: -0.1em;
-	left: 0;
-	background-color: #ffffff;
-	visibility: hidden;
-	transform: scaleX(0);
-	transition: all 0.3s ease-in-out 0s;
+    content: " ";
+    position: absolute;
+    width: 100%;
+    height: 0.1em;
+    bottom: -0.1em;
+    left: 0;
+    background-color: #ffffff;
+    visibility: hidden;
+    transform: scaleX(0);
+    transition: all 0.3s ease-in-out 0s;
 }
 }
 header nav a:hover:before {
 header nav a:hover:before {
-  	visibility: visible;
-  	transform: scaleX(1);
+    visibility: visible;
+    transform: scaleX(1);
 }
 }
 header nav a img{
 header nav a img{
-	height: 1.5em;
+    height: 1.5em;
     vertical-align: bottom;
     vertical-align: bottom;
 }
 }
+@media screen and (max-width : 800px){
+    header nav{
+        overflow: hidden;
+        white-space: nowrap;
+    }
+    header nav a{
+        display: inline-block;
+        width: 32%;
+        margin: 0;
+        padding: 0.5em 0;
+        text-align: center;
+        color: #ffffff;
+        text-decoration: none;
+        border: 0.1em solid #aaaaaa;
+        background-color: #222222;
+    }
+    header nav a img{
+        height: 1.1em;
+        vertical-align: middle;
+    }
+}
+
 
 
 /* The actual footer */
 /* The actual footer */
 footer{
 footer{
@@ -157,7 +190,7 @@ footer table#footer_table{
     width: 80%;
     width: 80%;
     table-layout: fixed;
     table-layout: fixed;
 }
 }
-@media screen and (max-width : 990px){
+@media screen and (max-width : 800px){
     footer table#footer_table{
     footer table#footer_table{
         width: 95%;
         width: 95%;
     }
     }
@@ -224,7 +257,7 @@ footer table#footer_table td#footer_right a.lang img{
 footer table#footer_table td#footer_right a.lang img:hover{
 footer table#footer_table td#footer_right a.lang img:hover{
     box-shadow: 0 0 1em #111;
     box-shadow: 0 0 1em #111;
 }
 }
-@media screen and (max-width : 990px){
+@media screen and (max-width : 800px){
     footer table#footer_table td#footer_right a.lang img{
     footer table#footer_table td#footer_right a.lang img{
         height: 1.5em;
         height: 1.5em;
         margin: 0.2em;
         margin: 0.2em;
@@ -233,38 +266,55 @@ footer table#footer_table td#footer_right a.lang img:hover{
         box-shadow: 0 0 0 #dde;
         box-shadow: 0 0 0 #dde;
     }
     }
 }
 }
-
-
 main{
 main{
     background-color: #000000;
     background-color: #000000;
     width: 100%;
     width: 100%;
+    max-width: 90em;
+    margin: 2em auto;
+    padding: 0;
+    text-align: center;
+    flex: 1;
+}
+@media screen and (max-width : 800px){
+    main{
+        width: 100%;
+        margin: 1em auto;
+    }
 }
 }
 
 
 section{
 section{
+    text-align: left;
     margin: 0.5em;
     margin: 0.5em;
     padding: 1em;
     padding: 1em;
     background-color: #f0f0f0;
     background-color: #f0f0f0;
-    border: 0.2em solid #666666;
+    border: 0.1em solid #003300;
     overflow: hidden;
     overflow: hidden;
+    border-top-left-radius: 0.5em;
+    border-top-right-radius: 0.5em;
+    border-bottom-left-radius: 1.5em;
+    border-bottom-right-radius: 1.5em;
 }
 }
-@media screen and (max-width : 990px){
+@media screen and (max-width : 800px){
     section{
     section{
         margin: 1em;
         margin: 1em;
     }
     }
 }
 }
 
 
 section h3{
 section h3{
-	font-weight: bold;
-	color: #ffffff;
-	background-color: #000000;
-	border: 0.2em solid #666666;
-	font-size: 150%;
-	padding: 0.2em 0.5em 0.2em 0.5em;
-	margin: -1em -1em 1em -1em;
+    position: relative;
+    font-weight: bold;
+    color: #ffffff;
+    background-color: #60ae29;
+    border-bottom: 0.1em solid #003300;
+    font-size: 150%;
+    padding: 0.5em 2em 0.2em 3em;
+    margin: -0.8em -1em 1em -1em;
+    font-variant: small-caps;
 }
 }
 
 
 section h3:before {
 section h3:before {
-	content: " /";
+    content: " /";
+    opacity: 0.3;
 }
 }
 
 
 /* .entry is a style only class to show content. Must be allways children os a .lighted element */
 /* .entry is a style only class to show content. Must be allways children os a .lighted element */
@@ -275,6 +325,13 @@ section article{
     margin: 0.5em;
     margin: 0.5em;
     transition: all .4s ease-in-out;
     transition: all .4s ease-in-out;
 }
 }
+section article h4{
+    font-variant: small-caps;
+    text-decoration: underline;
+    text-decoration-color: #33553377;
+    font-size: 130%;
+    margin: 0.2em auto 1em auto;
+}
 
 
 section section_list:hover{
 section section_list:hover{
     background-color: #efffef;
     background-color: #efffef;
@@ -360,14 +417,41 @@ input[type=submit]{
 
 
 /* Style forr buttons */
 /* Style forr buttons */
 input[type=button]{
 input[type=button]{
-    font-weight: bold;
+    cursor: pointer;
+    display: inline-block;
     color: #cccccc;
     color: #cccccc;
-    background-color: #555555;
-    border: 0.143em solid #bbbbbb;
+    background-color: #278c3a;
+    border: 0.143em solid #66bf38;
     border-radius: 0.429em;
     border-radius: 0.429em;
-    padding: 0.5em;
+    padding: 0.5em 0.8em;
     text-shadow: 0 0 0.75em #000000;
     text-shadow: 0 0 0.75em #000000;
-    cursor: pointer;
+    text-decoration: none;
+    font-family: 'Nunito';
+    font-weight: bold;
+    font-variant: small-caps;
+    letter-spacing: 0.07em;
+    font-size: 110%;
+    box-shadow: inset 0 0 0.2em #082400;
+    text-transform: capitalize;
+}
+@media screen and (max-width : 800px){
+	input[type=button]{
+		font-size: 120%;	
+		padding: 0.9em 1.4em;
+	}
+}
+input[type=button]::first-letter{
+    color: #eeeeee;
+}
+input[type=button]:hover{
+    color: #ffffff;
+    background-color: #34b94d;
+    box-shadow: inset 0 0 0.1em #000;
+    border: 0.2em solid #285710;
+}
+input[type=button]:hover::first-letter{
+    color: #ffffff;
+}
 }
 }
 
 
 /* Style for textboxes */
 /* Style for textboxes */
@@ -447,15 +531,38 @@ textarea.error{
 a.a_button{
 a.a_button{
     display: inline-block;
     display: inline-block;
     color: #cccccc;
     color: #cccccc;
-    background-color: #555555;
-    border: 0.143em solid #bbbbbb;
+    background-color: #278c3a;
+    border: 0.143em solid #66bf38;
     border-radius: 0.429em;
     border-radius: 0.429em;
-    padding: 0.5em;
+    padding: 0.5em 0.8em;
     text-shadow: 0 0 0.75em #000000;
     text-shadow: 0 0 0.75em #000000;
     text-decoration: none;
     text-decoration: none;
-    font: -webkit-small-control;
     font-family: 'Nunito';
     font-family: 'Nunito';
     font-weight: bold;
     font-weight: bold;
+    font-variant: small-caps;
+    letter-spacing: 0.07em;
+    font-size: 110%;
+    box-shadow: inset 0 0 0.2em #082400;
+    text-transform: capitalize;
+    transition: all .3s ease-in-out;
+}
+@media screen and (max-width : 800px){
+	a.a_button{
+		font-size: 120%;	
+		padding: 0.9em 1.4em;
+	}
+}
+a.a_button::first-letter{
+    color: #eeeeee;
+}
+a.a_button:hover{
+    color: #ffffff;
+    background-color: #34b94d;
+    box-shadow: inset 0 0 0.1em #000;
+    border: 0.2em solid #285710;
+}
+a.a_button:hover::first-letter{
+    color: #ffffff;
 }
 }
 
 
 /**********************************
 /**********************************

+ 0 - 91
public/error.php

@@ -1,91 +0,0 @@
-<?php
-    error_log("ERROR " . http_response_code());
-    return;
-    session_start();
-    $http_host = $_SERVER["HTTP_HOST"];
-    $doc_root = $_SERVER["DOCUMENT_ROOT"] . "/";
-    include $doc_root . "functions.php";
-    $proto = get_protocol();
-    $con = start_db();
-    $server = $proto . $http_host;
-    $lang = select_language($con);
-    $lserver = $server . "/" . $lang;
-    $cur_section = "error";
-    $cur_entry = http_response_code();
-    stats($con, $cur_section, $cur_entry);
-    $error = $cur_entry;
-    if (!in-array($error, array("400", "401", "403", "404", "500"))){
-        $error = "XXX";
-    }
-?>
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta content='text/html; charset=windows-1252' http-equiv='content-type'/>
-        <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'>
-        <title><?=text($con, "ERROR_TITLE", $lang);?> - <?=text($con, "USER_NAME", $lang);?></title>
-        <link rel='shortcut icon' href='<?=$lserver?>/img/logo/favicon.ico'>
-                <!-- CSS files -->
-        <style>
-<?php
-            include $doc_root . "css/ui.css";
-            include $doc_root . "css/error.css";
-?>
-        </style>
-        <!-- CSS for mobile version -->
-        <style media="(max-width : 990px)">
-<?php
-            include $doc_root . "css/m/ui.css";
-            include $doc_root . "css/m/error.css";
-?>
-        </style>
-        <meta name="robots" content="noindex follow"/>
-    </head>
-    <body>
-        <div id='body'>
-            <div id='body_row'>
-                <div id='left'>
-                    <div id='logo'>
-                        <img id='logo' src='<?=$lserver?>/img/logo/x6/inigovalentin.png' alt='<?=text($con, "USER_NAME", $lang);?>'/>
-                    </div>
-                    <table id='error_code' class='entry'>
-                        <tr>
-                            <td id='error_number'>
-                                404
-                            </td>
-                            <td id='error_tag'>
-                                <?=text($con, "ERROR_ERROR", $lang);?>
-                                <br/>
-                                <?=text($con, "ERROR_CODE", $lang);?>
-                            </td>
-                        <tr>
-                    </table>
-<?php
-                    include $doc_root . "footer.php";
-?>
-                </div> <!-- left -->
-                <div id='right'>
-                    <div id='error_message' class='entry'>
-                        <?=text($con, "ERROR_" . $error . "_DESCRIPTION", $lang);?>
-                        <br/><br/>
-                        <?=text($con, "ERROR_" . $error . "_SOLUTION", $lang);?>
-                        <ul>
-                            <li>
-                                <a href='javascript: location.reload();'><?=text($con, "ERROR_" . $error . "_SOLUTION_0", $lang);?></a>
-                            </li>
-                            <li>
-                                <a href='javascript: history.go(-1);'><?=text($con, "ERROR_" . $error . "_SOLUTION_1", $lang);?></a>
-                            </li>
-                            <li>
-                                <a href='<?=$lserver?>/'><?=text($con, "ERROR_" . $error . "_SOLUTION_2", $lang);?></a>
-                            </li>
-                        </ul>
-                    </div> <!-- #error_message -->
-                </div>
-            </div> <!-- #body_row -->
-        </div> <!-- #body -->
-    </body>
-</html>
-<?php
-    http_response_code($cur_entry);
-?>

+ 0 - 46
public/img/layout/social/internet.svg

@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 viewBox="0 0 490 490" style="enable-background:new 0 0 490 490;" xml:space="preserve">
-<g>
-	<path d="M245,490c135.31,0,245-109.689,245-245C490,109.69,380.31,0,245,0S0,109.69,0,245C0,380.311,109.69,490,245,490z
-		 M245,30.625c118.206,0,214.375,96.169,214.375,214.375c0,118.207-96.169,214.375-214.375,214.375S30.625,363.207,30.625,245
-		C30.625,126.794,126.794,30.625,245,30.625z"/>
-	<polygon points="128.297,222.899 146.077,289.622 165.188,289.622 186.871,200.378 168.732,200.378 155.034,262.72 
-		139.378,200.378 117.949,200.378 101.635,261.673 88.177,200.378 69.724,200.378 91.033,289.622 110.577,289.622 	"/>
-	<polygon points="228.262,289.622 245.982,222.899 263.762,289.622 282.873,289.622 304.556,200.378 286.417,200.378 
-		272.719,262.72 257.063,200.378 235.634,200.378 219.32,261.673 205.862,200.378 187.409,200.378 208.718,289.622 	"/>
-	<polygon points="345.947,289.622 363.667,222.899 381.447,289.622 400.558,289.622 422.241,200.378 404.102,200.378 
-		390.404,262.72 374.748,200.378 353.319,200.378 337.005,261.673 323.547,200.378 305.094,200.378 326.403,289.622 	"/>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-</svg>

+ 12 - 13
public/img/layout/social/www.svg

@@ -1,18 +1,17 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
 <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
 <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 viewBox="0 0 483.3 483.3" style="enable-background:new 0 0 483.3 483.3;" xml:space="preserve">
-<g>
-	<g>
-		<path d="M424.3,57.75H59.1c-32.6,0-59.1,26.5-59.1,59.1v249.6c0,32.6,26.5,59.1,59.1,59.1h365.1c32.6,0,59.1-26.5,59.1-59.1
-			v-249.5C483.4,84.35,456.9,57.75,424.3,57.75z M456.4,366.45c0,17.7-14.4,32.1-32.1,32.1H59.1c-17.7,0-32.1-14.4-32.1-32.1v-249.5
-			c0-17.7,14.4-32.1,32.1-32.1h365.1c17.7,0,32.1,14.4,32.1,32.1v249.5H456.4z"/>
-		<path d="M304.8,238.55l118.2-106c5.5-5,6-13.5,1-19.1c-5-5.5-13.5-6-19.1-1l-163,146.3l-31.8-28.4c-0.1-0.1-0.2-0.2-0.2-0.3
-			c-0.7-0.7-1.4-1.3-2.2-1.9L78.3,112.35c-5.6-5-14.1-4.5-19.1,1.1c-5,5.6-4.5,14.1,1.1,19.1l119.6,106.9L60.8,350.95
-			c-5.4,5.1-5.7,13.6-0.6,19.1c2.7,2.8,6.3,4.3,9.9,4.3c3.3,0,6.6-1.2,9.2-3.6l120.9-113.1l32.8,29.3c2.6,2.3,5.8,3.4,9,3.4
-			c3.2,0,6.5-1.2,9-3.5l33.7-30.2l120.2,114.2c2.6,2.5,6,3.7,9.3,3.7c3.6,0,7.1-1.4,9.8-4.2c5.1-5.4,4.9-14-0.5-19.1L304.8,238.55z"
-			/>
-	</g>
+	 viewBox="0 0 490 490" style="enable-background:new 0 0 490 490;" xml:space="preserve">
+<g>
+	<path d="M245,490c135.31,0,245-109.689,245-245C490,109.69,380.31,0,245,0S0,109.69,0,245C0,380.311,109.69,490,245,490z
+		 M245,30.625c118.206,0,214.375,96.169,214.375,214.375c0,118.207-96.169,214.375-214.375,214.375S30.625,363.207,30.625,245
+		C30.625,126.794,126.794,30.625,245,30.625z"/>
+	<polygon points="128.297,222.899 146.077,289.622 165.188,289.622 186.871,200.378 168.732,200.378 155.034,262.72 
+		139.378,200.378 117.949,200.378 101.635,261.673 88.177,200.378 69.724,200.378 91.033,289.622 110.577,289.622 	"/>
+	<polygon points="228.262,289.622 245.982,222.899 263.762,289.622 282.873,289.622 304.556,200.378 286.417,200.378 
+		272.719,262.72 257.063,200.378 235.634,200.378 219.32,261.673 205.862,200.378 187.409,200.378 208.718,289.622 	"/>
+	<polygon points="345.947,289.622 363.667,222.899 381.447,289.622 400.558,289.622 422.241,200.378 404.102,200.378 
+		390.404,262.72 374.748,200.378 353.319,200.378 337.005,261.673 323.547,200.378 305.094,200.378 326.403,289.622 	"/>
 </g>
 </g>
 <g>
 <g>
 </g>
 </g>

+ 0 - 8
public/index.php

@@ -1,15 +1,7 @@
 <?php
 <?php
-
-    //require_once("../application/config/config.php");
     include "../application/config/config.php";
     include "../application/config/config.php";
     include_once($path["controller"]);
     include_once($path["controller"]);
-
     $request = $_SERVER['REQUEST_URI'];
     $request = $_SERVER['REQUEST_URI'];
     $params = explode('/', $request);
     $params = explode('/', $request);
-    // Here you should probably gather the rest as params
-
-error_log($path["controller"]);
-
-    // Call the action
     $controller = new Controller($params);
     $controller = new Controller($params);
 ?>
 ?>

+ 16 - 0
public/js/help.js

@@ -0,0 +1,16 @@
+function toggleHelp(id){
+    var helps = document.getElementsByClassName("help");
+    for (var i = 0; i < helps.length; i++) {
+        if (helps[i].id == id){
+            if (helps[i].classList.contains("selected")){
+                helps[i].classList.remove("selected");
+            }
+            else{
+                helps[i].classList.add("selected");
+            }
+        }
+        else{
+            helps[i].classList.remove("selected");
+        }
+    }
+}

+ 3 - 2
public/js/project.js

@@ -3,8 +3,9 @@
  *
  *
  * @param obj The iframe.
  * @param obj The iframe.
  */
  */
-function resizeDemo(obj) {
-    obj.style.height = (obj.contentWindow.document.body.scrollHeight + 20) + 'px';
+function resizeDemo() {
+	var obj = document.getElementById('demo');
+    obj.style.height = (obj.contentWindow.document.body.scrollHeight + 50) + 'px';
     obj.style.width = (obj.contentWindow.document.body.scrollWidth + 20) + 'px';
     obj.style.width = (obj.contentWindow.document.body.scrollWidth + 20) + 'px';
 }
 }
 
 

+ 32 - 58
sql/01_structure.sql

@@ -22,10 +22,10 @@ CREATE TABLE text (
 CREATE INDEX i_text ON text(id, lang);
 CREATE INDEX i_text ON text(id, lang);
 
 
 CREATE TABLE share(
 CREATE TABLE share(
-    id       INT           AUTO_INCREMENT      PRIMARY KEY,
-    idx      INT           NOT NULL            UNIQUE,
-    visible  BOOLEAN       NOT NULL            DEFAULT 1,
-    title    VARCHAR(32)   NOT NULL            UNIQUE       REFERENCES text.id,
+    id       INT           AUTO_INCREMENT PRIMARY KEY,
+    idx      INT           NOT NULL UNIQUE,
+    visible  BOOLEAN       NOT NULL DEFAULT 1,
+    title    VARCHAR(32)   NOT NULL UNIQUE REFERENCES text.id,
     text     VARCHAR(32)   REFERENCES text.id,
     text     VARCHAR(32)   REFERENCES text.id,
     icon     VARCHAR(16)   NOT NULL,
     icon     VARCHAR(16)   NOT NULL,
     url      VARCHAR(256)  NOT NULL
     url      VARCHAR(256)  NOT NULL
@@ -33,90 +33,64 @@ CREATE TABLE share(
 
 
 CREATE TABLE license (
 CREATE TABLE license (
     id       VARCHAR(32)  PRIMARY KEY,
     id       VARCHAR(32)  PRIMARY KEY,
-    summary  VARCHAR(32)  NOT NULL     REFERENCES text.id,
-    legal    VARCHAR(32)  NOT NULL     REFERENCES text.id,
+    summary  VARCHAR(32)  NOT NULL REFERENCES text.id,
+    legal    VARCHAR(32)  NOT NULL REFERENCES text.id,
     logo     VARCHAR(32),
     logo     VARCHAR(32),
     icon     VARCHAR(32)
     icon     VARCHAR(32)
 );
 );
 
 
 CREATE TABLE project_type (
 CREATE TABLE project_type (
-    id       VARCHAR(1)   NOT NULL  PRIMARY KEY,
-    title    VARCHAR(32)  NOT NULL  REFERENCES text.id,
-    summary  VARCHAR(32)  NOT NULL  REFERENCES text.id
+    id       VARCHAR(1)   NOT NULL PRIMARY KEY,
+    title    VARCHAR(32)  NOT NULL REFERENCES text.id,
+    summary  VARCHAR(32)  NOT NULL REFERENCES text.id
 );
 );
 
 
 CREATE TABLE project (
 CREATE TABLE project (
-    id         INT           AUTO_INCREMENT         PRIMARY KEY,
+    id         INT           AUTO_INCREMENT PRIMARY KEY,
     permalink  VARCHAR(300)  NOT NULL,
     permalink  VARCHAR(300)  NOT NULL,
-    type       VARCHAR(1)    NOT NULL               REFERENCES project_type.id,
-    title      VARCHAR(32)   NOT NULL               REFERENCES text.id,
+    idx        INT           NOT NULL UNIQUE,
+    type       VARCHAR(1)    NOT NULL REFERENCES project_type.id,
+    title      VARCHAR(32)   NOT NULL REFERENCES text.id,
     logo       VARCHAR(32),
     logo       VARCHAR(32),
     header     VARCHAR(32)   REFERENCES text.id,
     header     VARCHAR(32)   REFERENCES text.id,
     text       VARCHAR(32)   REFERENCES text.id,
     text       VARCHAR(32)   REFERENCES text.id,
     license    VARCHAR(32)   REFERENCES license.id,
     license    VARCHAR(32)   REFERENCES license.id,
-    user       INT           NOT NULL               REFERENCES user.id,
-    visible    BOOLEAN       NOT NULL               DEFAULT 1,
-    comments   BOOLEAN       NOT NULL               DEFAULT 1
+    user       INT           NOT NULL REFERENCES user.id,
+    visible    BOOLEAN       NOT NULL DEFAULT 1
 );
 );
 
 
 CREATE TABLE project_url_type (
 CREATE TABLE project_url_type (
-    id       VARCHAR(1)   NOT NULL            PRIMARY KEY,
+    id       VARCHAR(1)   NOT NULL PRIMARY KEY,
     title    VARCHAR(32)  REFERENCES text.id,
     title    VARCHAR(32)  REFERENCES text.id,
     summary  VARCHAR(32)  REFERENCES text.id,
     summary  VARCHAR(32)  REFERENCES text.id,
     logo     VARCHAR(32)
     logo     VARCHAR(32)
 );
 );
 
 
 CREATE TABLE project_url (
 CREATE TABLE project_url (
-    id       INT            AUTO_INCREMENT  PRIMARY KEY,
-    project  INT            NOT NULL        REFERENCES project.id,
-    type     VARCHAR(1)     NOT NULL        REFERENCES project_url_type,
+    id       INT            AUTO_INCREMENT PRIMARY KEY,
+    project  INT            NOT NULL REFERENCES project.id,
+    type     VARCHAR(1)     NOT NULL REFERENCES project_url_type,
     url      VARCHAR(1024)  NOT NULL
     url      VARCHAR(1024)  NOT NULL
 );
 );
 
 
 CREATE TABLE project_image (
 CREATE TABLE project_image (
-    id       INT           AUTO_INCREMENT  PRIMARY KEY,
-    project  INT           NOT NULL        REFERENCES project.id,
+    id       INT           AUTO_INCREMENT PRIMARY KEY,
+    project  INT           NOT NULL REFERENCES project.id,
     idx      INT           NOT NULL,
     idx      INT           NOT NULL,
     image    VARCHAR(200)  NOT NULL
     image    VARCHAR(200)  NOT NULL
 );
 );
 
 
 CREATE TABLE project_tag (
 CREATE TABLE project_tag (
-    project  INT          NOT NULL  REFERENCES project.id,
-    tag      VARCHAR(32)  NOT NULL  REFERENCES text.id,
+    project  INT          NOT NULL REFERENCES project.id,
+    tag      VARCHAR(32)  NOT NULL REFERENCES text.id,
     PRIMARY KEY (project, tag)
     PRIMARY KEY (project, tag)
 );
 );
 
 
-CREATE TABLE project_comment (
-    id        INT            AUTO_INCREMENT            PRIMARY KEY,
-    project   INT            NOT NULL                  REFERENCES project(id),
-    text      VARCHAR(5000)  NOT NULL,
-    dtime     TIMESTAMP      NOT NULL                  DEFAULT now(),
-    user      INT            REFERENCES user.id,
-    username  VARCHAR(200),
-    lang      VARCHAR(10),
-    approved  BOOLEAN        NOT NULL                  DEFAULT 1,
-    visit     INT            REFERENCES stat_visit.id
-);
-
-CREATE TABLE cv_section (
-    id        INT          AUTO_INCREMENT      PRIMARY KEY,
-    title     VARCHAR(32)  REFERENCES text.id,
-    summary   VARCHAR(32)  REFERENCES text.id,
-    visible   BOOLEAN      NOT NULL            DEFAULT 1,
-    priority  INT          NOT NULL            UNIQUE
-);
-
 CREATE TABLE cv (
 CREATE TABLE cv (
-    id               INT          AUTO_INCREMENT  PRIMARY KEY,
-    category         INT          NOT NULL        REFERENCES cv_category.id,
-    role             VARCHAR(32)  NOT NULL        REFERENCES text.id,
-    company          VARCHAR(64)  NOT NULL,
-    city             VARCHAR(32)  NOT NULL        REFERENCES text.id,
-    start            DATETIME     NOT NULL,
-    end              DATETIME,
-    date_precission  VARCHAR(1)   NOT NULL        DEFAULT 'M',
-    summary          VARCHAR(32)  NOT NULL        REFERENCES text.id,
-    visible          BOOLEAN      NOT NULL        DEFAULT 1
+    id         INT           AUTO_INCREMENT PRIMARY KEY,
+    lang       VARCHAR(2)    REFERENCES lang.code,
+    file       VARCHAR(300)  NOT NULL,
+    visible    BOOLEAN       NOT NULL DEFAULT 1
 );
 );
 
 
 CREATE TABLE settings (
 CREATE TABLE settings (
@@ -126,20 +100,20 @@ CREATE TABLE settings (
 );
 );
 
 
 CREATE TABLE stat_visit (
 CREATE TABLE stat_visit (
-    id       INT           AUTO_INCREMENT  PRIMARY KEY,
+    id       INT           AUTO_INCREMENT PRIMARY KEY,
     ip       VARCHAR(50),
     ip       VARCHAR(50),
     uagent   VARCHAR(400),
     uagent   VARCHAR(400),
     os       VARCHAR(150),
     os       VARCHAR(150),
     browser  VARCHAR(150),
     browser  VARCHAR(150),
-    dtime    TIMESTAMP     NOT NULL  DEFAULT now()
+    dtime    TIMESTAMP     NOT NULL DEFAULT now()
 );
 );
 
 
 CREATE TABLE stat_view (
 CREATE TABLE stat_view (
-    id       INT           NOT NULL  AUTO_INCREMENT            PRIMARY KEY,
-    visit    INT           NOT NULL  REFERENCES stat_visit.id,
+    id       INT           NOT NULL AUTO_INCREMENT PRIMARY KEY,
+    visit    INT           NOT NULL REFERENCES stat_visit.id,
     section  VARCHAR(80)   NOT NULL,
     section  VARCHAR(80)   NOT NULL,
     entry    VARCHAR(100)  NOT NULL,
     entry    VARCHAR(100)  NOT NULL,
-    dtime    TIMESTAMP     NOT NULL  DEFAULT now()
+    dtime    TIMESTAMP     NOT NULL DEFAULT now()
 );
 );
 CREATE INDEX i_visit ON stat_view(visit, dtime);
 CREATE INDEX i_visit ON stat_view(visit, dtime);
 
 

+ 1 - 3
sql/02_security.sql

@@ -1,11 +1,10 @@
 -- Replace all instances of XXX with the external site db password (same one as in ../application/config/auth.php).
 -- Replace all instances of XXX with the external site db password (same one as in ../application/config/auth.php).
 -- Uncomment all entries.
 -- Uncomment all entries.
 
 
---GRANT SELECT ON         web.cv_section       TO 'w'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT ON         web.cv               TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.lang             TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.lang             TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.license          TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.license          TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.text             TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.text             TO 'w'@'localhost' IDENTIFIED BY 'XXX';
+--GRANT SELECT ON         web.cv               TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project          TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project          TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_type     TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_type     TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_tag      TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_tag      TO 'w'@'localhost' IDENTIFIED BY 'XXX';
@@ -13,7 +12,6 @@
 --GRANT SELECT ON         web.project_url_type TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_url_type TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_image    TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_image    TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_tag      TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.project_tag      TO 'w'@'localhost' IDENTIFIED BY 'XXX';
---GRANT SELECT, INSERT ON web.project_comment  TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.settings         TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.settings         TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.share            TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT ON         web.share            TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT, INSERT ON web.stat_view        TO 'w'@'localhost' IDENTIFIED BY 'XXX';
 --GRANT SELECT, INSERT ON web.stat_view        TO 'w'@'localhost' IDENTIFIED BY 'XXX';

+ 42 - 63
sql/03_data.sql

@@ -1,7 +1,7 @@
 -- AVAILABLE LANGUAGES
 -- AVAILABLE LANGUAGES
 INSERT INTO lang VALUES ('es', 'Castellano', '1');
 INSERT INTO lang VALUES ('es', 'Castellano', '1');
 INSERT INTO lang VALUES ('en', 'English', '1');
 INSERT INTO lang VALUES ('en', 'English', '1');
-INSERT INTO lang VALUES ('eu', 'Euskara', '1');
+INSERT INTO lang VALUES ('eu', 'Euskara', '0');
 
 
 -- DATE ELEMENTS
 -- DATE ELEMENTS
 INSERT INTO text VALUES ('MONTH_01', 'es', 'DATE', 'enero', null);
 INSERT INTO text VALUES ('MONTH_01', 'es', 'DATE', 'enero', null);
@@ -61,27 +61,6 @@ INSERT INTO text VALUES ('DAY_6', 'eu', 'DATE', 'larunbata', null);
 INSERT INTO text VALUES ('DAY_7', 'es', 'DATE', 'domingo', null);
 INSERT INTO text VALUES ('DAY_7', 'es', 'DATE', 'domingo', null);
 INSERT INTO text VALUES ('DAY_7', 'en', 'DATE', 'Sunday', null);
 INSERT INTO text VALUES ('DAY_7', 'en', 'DATE', 'Sunday', null);
 INSERT INTO text VALUES ('DAY_7', 'eu', 'DATE', 'igandea', null);
 INSERT INTO text VALUES ('DAY_7', 'eu', 'DATE', 'igandea', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_YEAR', 'es', 'DATE', 'Desde #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_YEAR', 'en', 'DATE', 'Since #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_YEAR', 'eu', 'DATE', '#YEAR_START#tik', null);
-INSERT INTO text VALUES ('CV_DATE_DURING_YEAR', 'es', 'DATE', '#YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_DURING_YEAR', 'en', 'DATE', '#YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_DURING_YEAR', 'eu', 'DATE', '#YEAR_START#n', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_YEAR', 'es', 'DATE', 'Desde #YEAR_START# hasta #YEAR_END#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_YEAR', 'en', 'DATE', 'From #YEAR_START# until #YEAR_END#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_YEAR', 'eu', 'DATE', '#YEAR_START#tik #YEAR_END#ra', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_MONTH', 'es', 'DATE', 'Desde #MONTH_START# de #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_MONTH', 'en', 'DATE', 'Since #MONTH_START# #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_MONTH', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#tik', null);
-INSERT INTO text VALUES ('CV_DATE_DURING_MONTH', 'es', 'DATE', '#MONTH_START# de #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_DURING_MONTH', 'en', 'DATE', '#MONTH_START# #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_DURING_MONTH', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#n', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH', 'es', 'DATE', 'Desde #MONTH_START# de #YEAR_START# hasta #MONTH_END# de #YEAR_END#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH', 'en', 'DATE', 'From #MONTH_START# #YEAR_START# until #MONTH_END# #YEAR_END#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#tik #YEAR_END#ko #MONTH_END#ra', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH_YEAR', 'es', 'DATE', 'Desde #MONTH_START# hasta #MONTH_END# de #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH_YEAR', 'en', 'DATE', 'From #MONTH_START# until #MONTH_END# #YEAR_START#', null);
-INSERT INTO text VALUES ('CV_DATE_FROM_TO_MONTH_YEAR', 'eu', 'DATE', '#YEAR_START#ko #MONTH_START#tik #MONTH_START#ra', null);
 
 
 -- SECTIONS
 -- SECTIONS
 INSERT INTO text VALUES ('SECTION_HOME', 'es', 'SECTION', 'Inicio', null);
 INSERT INTO text VALUES ('SECTION_HOME', 'es', 'SECTION', 'Inicio', null);
@@ -174,6 +153,18 @@ INSERT INTO text VALUES ('TAG_SWIFT',   'eu', 'TAG', 'Swift', null);
 INSERT INTO text VALUES ('TAG_WEB',     'es', 'TAG', 'Web', null);
 INSERT INTO text VALUES ('TAG_WEB',     'es', 'TAG', 'Web', null);
 INSERT INTO text VALUES ('TAG_WEB',     'en', 'TAG', 'Web', null);
 INSERT INTO text VALUES ('TAG_WEB',     'en', 'TAG', 'Web', null);
 INSERT INTO text VALUES ('TAG_WEB',     'eu', 'TAG', 'Web', null);
 INSERT INTO text VALUES ('TAG_WEB',     'eu', 'TAG', 'Web', null);
+INSERT INTO text VALUES ('TAG_CSS',     'es', 'TAG', 'CSS', null);
+INSERT INTO text VALUES ('TAG_CSS',     'en', 'TAG', 'CSS', null);
+INSERT INTO text VALUES ('TAG_CSS',     'eu', 'TAG', 'CSS', null);
+INSERT INTO text VALUES ('TAG_PHP',     'es', 'TAG', 'PHP', null);
+INSERT INTO text VALUES ('TAG_PHP',     'en', 'TAG', 'PHP', null);
+INSERT INTO text VALUES ('TAG_PHP',     'eu', 'TAG', 'PHP', null);
+INSERT INTO text VALUES ('TAG_MYSQL',   'es', 'TAG', 'MySQL', null);
+INSERT INTO text VALUES ('TAG_MYSQL',   'en', 'TAG', 'MySQL', null);
+INSERT INTO text VALUES ('TAG_MYSQL',   'eu', 'TAG', 'MySQL', null);
+INSERT INTO text VALUES ('TAG_SQLITE',  'es', 'TAG', 'SQLite', null);
+INSERT INTO text VALUES ('TAG_SQLITE',  'en', 'TAG', 'SQLite', null);
+INSERT INTO text VALUES ('TAG_SQLITE',  'eu', 'TAG', 'SQLite', null);
 
 
 
 
 
 
@@ -190,12 +181,21 @@ INSERT INTO text VALUES ('FOOTER_HELP',   'eu', 'FOOTER', 'Laguntza', null);
 
 
 
 
 -- PAGE index
 -- PAGE index
-INSERT INTO text VALUES ('INDEX_PROFILE',  'es', 'HEADER', 'Yo', null);
-INSERT INTO text VALUES ('INDEX_PROFILE',  'en', 'HEADER', 'Me', null);
-INSERT INTO text VALUES ('INDEX_PROFILE',  'eu', 'HEADER', 'Ni', null);
-INSERT INTO text VALUES ('INDEX_PROJECTS', 'es', 'HEADER', 'Proyectos', null);
-INSERT INTO text VALUES ('INDEX_PROJECTS', 'en', 'HEADER', 'Projects', null);
-INSERT INTO text VALUES ('INDEX_PROJECTS', 'eu', 'HEADER', 'Proiektuak', null);
+INSERT INTO text VALUES ('INDEX_PROFILE',      'es', 'INDEX', 'Yo', null);
+INSERT INTO text VALUES ('INDEX_PROFILE',      'en', 'INDEX', 'Me', null);
+INSERT INTO text VALUES ('INDEX_PROFILE',      'eu', 'INDEX', 'Ni', null);
+INSERT INTO text VALUES ('INDEX_PROFILE_MORE', 'es', 'INDEX', 'M&aacute;s sobre mi', null);
+INSERT INTO text VALUES ('INDEX_PROFILE_MORE', 'en', 'INDEX', 'More about me', null);
+INSERT INTO text VALUES ('INDEX_PROFILE_MORE', 'eu', 'INDEX', 'Ni', null);
+INSERT INTO text VALUES ('INDEX_PROFILE_CV',   'es', 'INDEX', 'CV', null);
+INSERT INTO text VALUES ('INDEX_PROFILE_CV',   'en', 'INDEX', 'R&eacute;sum&eacute;', null);
+INSERT INTO text VALUES ('INDEX_PROFILE_CV',   'eu', 'INDEX', 'CV', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS',     'es', 'INDEX', 'Proyectos', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS',     'en', 'INDEX', 'Projects', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS',     'eu', 'INDEX', 'Proiektuak', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS_ALL', 'es', 'INDEX', 'Ver todos', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS_ALL', 'en', 'INDEX', 'See all projects', null);
+INSERT INTO text VALUES ('INDEX_PROJECTS_ALL', 'eu', 'INDEX', 'Ver todos', null);
 
 
 
 
 -- PAGE project
 -- PAGE project
@@ -253,9 +253,15 @@ INSERT INTO text VALUES ('PROFILE_DOWNLOAD_CURRENT', 'eu', 'PROFILE', 'Euzkaraz
 INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'es', 'PROFILE', 'Descargar en otros idiomas', null);
 INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'es', 'PROFILE', 'Descargar en otros idiomas', null);
 INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'en', 'PROFILE', 'Download in other languages', null);
 INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'en', 'PROFILE', 'Download in other languages', null);
 INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'eu', 'PROFILE', 'Beste hizkuntzetan deskargatu', null);
 INSERT INTO text VALUES ('PROFILE_DOWNLOAD_OTHER',   'eu', 'PROFILE', 'Beste hizkuntzetan deskargatu', null);
-INSERT INTO text VALUES ('PROFILE_CV',               'es', 'PROFILE', 'Curriculum', null);
-INSERT INTO text VALUES ('PROFILE_CV',               'en', 'PROFILE', 'Curriculum', null);
-INSERT INTO text VALUES ('PROFILE_CV',               'eu', 'PROFILE', 'Curriculum', null);
+INSERT INTO text VALUES ('PROFILE_CV',               'es', 'PROFILE', 'CV', null);
+INSERT INTO text VALUES ('PROFILE_CV',               'en', 'PROFILE', 'R&eacute;sum&eacute;', null);
+INSERT INTO text VALUES ('PROFILE_CV',               'eu', 'PROFILE', 'R&eacute;sum&eacute;', null);
+INSERT INTO text VALUES ('PROFILE_CV_PRINTABLE',     'es', 'PROFILE', 'Ver en formato imprimible', null);
+INSERT INTO text VALUES ('PROFILE_CV_PRINTABLE',     'en', 'PROFILE', 'View printable format', null);
+INSERT INTO text VALUES ('PROFILE_CV_PRINTABLE',     'eu', 'PROFILE', 'R&eacute;sum&eacute;', null);
+INSERT INTO text VALUES ('PROFILE_CV_LANG',          'es', 'PROFILE', 'Otros idiomas', null);
+INSERT INTO text VALUES ('PROFILE_CV_LANG',          'en', 'PROFILE', 'Other languages', null);
+INSERT INTO text VALUES ('PROFILE_CV_LANG',          'eu', 'PROFILE', 'Beste hizkuntzak', null);
 INSERT INTO text VALUES ('PROFILE_SKILLS',           'es', 'PROFILE', 'Habilidades', null);
 INSERT INTO text VALUES ('PROFILE_SKILLS',           'es', 'PROFILE', 'Habilidades', null);
 INSERT INTO text VALUES ('PROFILE_SKILLS',           'en', 'PROFILE', 'Skills', null);
 INSERT INTO text VALUES ('PROFILE_SKILLS',           'en', 'PROFILE', 'Skills', null);
 INSERT INTO text VALUES ('PROFILE_SKILLS',           'eu', 'PROFILE', 'Habilitateak', null);
 INSERT INTO text VALUES ('PROFILE_SKILLS',           'eu', 'PROFILE', 'Habilitateak', null);
@@ -402,8 +408,8 @@ INSERT INTO project_type VALUES ('S', 'PROJECT_TYPE_S', 'PROJECT_TYPE_S_SUMMARY'
 INSERT INTO text VALUES ('URL_TYPE_W',         'es', 'DB_URL_TYPE', 'Ver sitio web', null);
 INSERT INTO text VALUES ('URL_TYPE_W',         'es', 'DB_URL_TYPE', 'Ver sitio web', null);
 INSERT INTO text VALUES ('URL_TYPE_W',         'en', 'DB_URL_TYPE', 'Go to web site', null);
 INSERT INTO text VALUES ('URL_TYPE_W',         'en', 'DB_URL_TYPE', 'Go to web site', null);
 INSERT INTO text VALUES ('URL_TYPE_W',         'eu', 'DB_URL_TYPE', 'Horrialdera', null);
 INSERT INTO text VALUES ('URL_TYPE_W',         'eu', 'DB_URL_TYPE', 'Horrialdera', null);
-INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver sitio wew de este proyecto en funcionamiento.', null);
-INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'en', 'DB_URL_TYPE', 'See production web site.', null);
+INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver el sitio web.', null);
+INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'en', 'DB_URL_TYPE', 'See web site.', null);
 INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'eu', 'DB_URL_TYPE', 'Horrialdera.', null);
 INSERT INTO text VALUES ('URL_TYPE_W_SUMMARY', 'eu', 'DB_URL_TYPE', 'Horrialdera.', null);
 INSERT INTO text VALUES ('URL_TYPE_P',         'es', 'DB_URL_TYPE', 'Google Play', null);
 INSERT INTO text VALUES ('URL_TYPE_P',         'es', 'DB_URL_TYPE', 'Google Play', null);
 INSERT INTO text VALUES ('URL_TYPE_P',         'en', 'DB_URL_TYPE', 'Google Play', null);
 INSERT INTO text VALUES ('URL_TYPE_P',         'en', 'DB_URL_TYPE', 'Google Play', null);
@@ -430,9 +436,9 @@ INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'es', 'DB_URL_TYPE', 'Ver', null)
 INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'en', 'DB_URL_TYPE', 'See', null);
 INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'en', 'DB_URL_TYPE', 'See', null);
 INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'eu', 'DB_URL_TYPE', 'Ikusi', null);
 INSERT INTO text VALUES ('URL_TYPE_M_SUMMARY', 'eu', 'DB_URL_TYPE', 'Ikusi', null);
 INSERT INTO project_url_type VALUES ('E', null, null, null);
 INSERT INTO project_url_type VALUES ('E', null, null, null);
-INSERT INTO project_url_type VALUES ('W', 'URL_TYPE_W', 'URL_TYPE_W_SUMMARY', 'web.svg');
-INSERT INTO project_url_type VALUES ('P', 'URL_TYPE_P', 'URL_TYPE_P_SUMMARY', 'googleplay.svg');
-INSERT INTO project_url_type VALUES ('A', 'URL_TYPE_A', 'URL_TYPE_A_SUMMARY', 'appstore.svg');
+INSERT INTO project_url_type VALUES ('W', 'URL_TYPE_W', 'URL_TYPE_W_SUMMARY', 'www.svg');
+INSERT INTO project_url_type VALUES ('P', 'URL_TYPE_P', 'URL_TYPE_P_SUMMARY', 'google_play.svg');
+INSERT INTO project_url_type VALUES ('A', 'URL_TYPE_A', 'URL_TYPE_A_SUMMARY', 'app_store.svg');
 INSERT INTO project_url_type VALUES ('G', 'URL_TYPE_G', 'URL_TYPE_G_SUMMARY', 'github.svg');
 INSERT INTO project_url_type VALUES ('G', 'URL_TYPE_G', 'URL_TYPE_G_SUMMARY', 'github.svg');
 INSERT INTO project_url_type VALUES ('M', 'URL_TYPE_M', 'URL_TYPE_M_SUMMARY', 'misc.svg');
 INSERT INTO project_url_type VALUES ('M', 'URL_TYPE_M', 'URL_TYPE_M_SUMMARY', 'misc.svg');
 
 
@@ -453,30 +459,3 @@ INSERT INTO text VALUES ('LICENSE_GPLV3',            'en', 'LICENSE', null, 'LIC
 INSERT INTO text VALUES ('LICENSE_GPLV3',            'eu', 'LICENSE', null, 'LICENSE_GPLV3__EU');
 INSERT INTO text VALUES ('LICENSE_GPLV3',            'eu', 'LICENSE', null, 'LICENSE_GPLV3__EU');
 INSERT INTO license VALUES ('CC-BY-SA', 'LICENSE_CC-BY-SA_SUMMARY', 'LICENSE_CC-BY-SA', 'CC-BY-SA.svg', 'CC-BY-SA.svg');
 INSERT INTO license VALUES ('CC-BY-SA', 'LICENSE_CC-BY-SA_SUMMARY', 'LICENSE_CC-BY-SA', 'CC-BY-SA.svg', 'CC-BY-SA.svg');
 INSERT INTO license VALUES ('GPLv3',    'LICENSE_GPLV3_SUMMARY',    'LICENSE_GPLV3',    'GPLV3.svg',    'GPLV3.svg');
 INSERT INTO license VALUES ('GPLv3',    'LICENSE_GPLV3_SUMMARY',    'LICENSE_GPLV3',    'GPLV3.svg',    'GPLV3.svg');
-
-
--- TABLE cv_section
-INSERT INTO text VALUES ('CV_SECTION_WORK',             'es', 'DB_CV', 'Experiencia', null);
-INSERT INTO text VALUES ('CV_SECTION_WORK',             'en', 'DB_CV', 'Experience', null);
-INSERT INTO text VALUES ('CV_SECTION_WORK',             'eu', 'DB_CV', 'Experiencia', null);
-INSERT INTO text VALUES ('CV_SECTION_EDUCATION',        'es', 'DB_CV', 'Formaci&oacute;n', null);
-INSERT INTO text VALUES ('CV_SECTION_EDUCATION',        'en', 'DB_CV', 'Hezkuntza', null);
-INSERT INTO text VALUES ('CV_SECTION_EDUCATION',        'eu', 'DB_CV', 'Education', null);
-INSERT INTO text VALUES ('CV_SECTION_PROJECTS',         'es', 'DB_CV', 'Otros proyectos', null);
-INSERT INTO text VALUES ('CV_SECTION_PROJECTS',         'en', 'DB_CV', 'Other projects', null);
-INSERT INTO text VALUES ('CV_SECTION_PROJECTS',         'eu', 'DB_CV', 'Beste projecktuak', null);
-INSERT INTO text VALUES ('CV_SECTION_PROJECTS_SUMMARY', 'es', 'DB_CV', 'Proyectos de software eralizados por cuenta propia', null);
-INSERT INTO text VALUES ('CV_SECTION_PROJECTS_SUMMARY', 'en', 'DB_CV', 'Proyectos de software eralizados por cuenta propia', null);
-INSERT INTO text VALUES ('CV_SECTION_PROJECTS_SUMMARY', 'eu', 'DB_CV', 'Proyectos de software eralizados por cuenta propia', null);
-INSERT INTO text VALUES ('CV_SECTION_OTHER',            'es', 'DB_CV', 'Otra experiencia laboral', null);
-INSERT INTO text VALUES ('CV_SECTION_OTHER',            'en', 'DB_CV', 'Otra experiencia laboral', null);
-INSERT INTO text VALUES ('CV_SECTION_OTHER',            'eu', 'DB_CV', 'Otra experiencia laboral', null);
-INSERT INTO text VALUES ('CV_SECTION_OTHER_SUMMARY',    'es', 'DB_CV', 'Experiencia laboral fuera del &aacute;mbito de IT', null);
-INSERT INTO text VALUES ('CV_SECTION_OTHER_SUMMARY',    'en', 'DB_CV', 'Experiencia laboral fuera del &aacute;mbito de IT', null);
-INSERT INTO text VALUES ('CV_SECTION_OTHER_SUMMARY',    'eu', 'DB_CV', 'Experiencia laboral fuera del &aacute;mbito de IT', null);
-INSERT INTO cv_section VALUES (1, 'CV_SECTION_WORK',      null,                          1 , 1);
-INSERT INTO cv_section VALUES (2, 'CV_SECTION_EDUCATION', null,                          1 , 3);
-INSERT INTO cv_section VALUES (3, 'CV_SECTION_PROJECTS', 'CV_SECTION_PROJECTS_SUMMARY', 0 , 2);
-INSERT INTO cv_section VALUES (4, 'CV_SECTION_OTHER',    'CV_SECTION_OTHER_SUMMARY',    1 , 4);
-
-