diff --git a/.sources/PSD - Projects.psd b/.sources/PSD - Projects.psd index 504c9e3..77fcc33 100644 Binary files a/.sources/PSD - Projects.psd and b/.sources/PSD - Projects.psd differ diff --git a/.sources/config.ini b/.sources/config.ini.dist similarity index 81% rename from .sources/config.ini rename to .sources/config.ini.dist index 0a1ca35..2753d5f 100644 --- a/.sources/config.ini +++ b/.sources/config.ini.dist @@ -1,5 +1,5 @@ ;Project : The project name -;Created on : 2016/10/16 +;Created at : 2016/10/16 ;Author : Breith Barbot [infos_base] @@ -10,7 +10,7 @@ title = "" description = "" ;URLDEV = "http://dev.website.com" -URLDEV = "http://localhost/www/Project-manager-XAMPP-Web" +URLDEV = "" ;URLPROD = "http://website.com" URLPROD = "" diff --git a/README.md b/README.md index b16d10d..675609f 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ Page d'accueil listant tout vos projets XAMPP / Web ![Project-manager XAMPP / Web](.sources/Project-manager_XAMPP_Web.png "Project-manager XAMPP / Web") Ce projet utilise : -* [Bootstrap](http://getbootstrap.com/) -* [Modernizr](https://modernizr.com/) -* [jQuery](http://jquery.com/) -* [Screen](https://github.com/microweber/screen/) +* [Bootstrap](http://getbootstrap.com) +* [Modernizr](https://modernizr.com) +* [jQuery](http://jquery.com) +* [Screen](https://github.com/microweber/screen)
@@ -21,24 +21,25 @@ Ce projet utilise : 4. Un fichier de configuration `/www/YOUR_PROJECT/.sources/config.ini` peut être construit pour chaque projet (FACULTATIF). - ;Project : The project name - ;Created on : YYYY/MM/DD - ;Author : Author name - - [infos_base] - title = "The project name" - - description = "Project description..." - - URLDEV = "http://dev.website.com" - - URLPROD = "http://website.com" - - URLDB = "http://localhost/phpmyadmin/index.php?db=dbname" - - thumbnail = "http://website.com/about" - -5. Pour ajouter une image personnalisée à chaque projet, il faut créer une image (en 400px x 250px) et la placer dans le dossier `/www/YOUR_PROJECT/.sources/` et la nommer `picture.png` au format **.png** (FACULTATIF). + + ;Project : The project name + ;Created at : YYYY/MM/DD + ;Author : Author name + + [infos_base] + title = "The project name" + + description = "Project description..." + + URLDEV = "http://dev.website.com" + + URLPROD = "http://website.com" + + URLDB = "http://localhost/phpmyadmin/index.php?db=dbname" + + thumbnail = "http://website.com/about" + +5. Pour ajouter une image personnalisée à chaque projet, il faut créer une image (en 400px x 250px) et la placer dans le dossier `/www/YOUR_PROJECT/.sources/` et la nommer `picture.jpg` au format **.jpg** (FACULTATIF).
@@ -56,7 +57,7 @@ Project-manager XAMPP / Web 2.1 MIT License -Copyright (c) 2016 Breith Barbot | [Breithbarbot.name](https://breithbarbot.name/) +Copyright (c) 2016 Breith Barbot | [Breithbarbot.name](https://breithbarbot.name) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/assets/img/default.jpg b/assets/img/default.jpg new file mode 100644 index 0000000..8e710c3 Binary files /dev/null and b/assets/img/default.jpg differ diff --git a/assets/img/default.png b/assets/img/default.png deleted file mode 100644 index f7dfdf8..0000000 Binary files a/assets/img/default.png and /dev/null differ diff --git a/index.php b/index.php index 95f2174..fef60c0 100644 --- a/index.php +++ b/index.php @@ -25,15 +25,10 @@ function generateThumbail($url, $fileLocation) { $screenCapture = new \Screen\Capture($url); -// $screenCapture->setWidth(1920); -// $screenCapture->setHeight(1080); - - $screenCapture->setClipWidth(400); - $screenCapture->setClipHeight(250); - - $screenCapture->setBackgroundColor('#565659'); - $screenCapture->setImageType('png'); - + $screenCapture->setWidth(1920); + $screenCapture->setHeight(1200); + $screenCapture->setClipWidth(1920); + $screenCapture->setClipHeight(1200); $screenCapture->save($fileLocation); return $screenCapture->getImageLocation(); @@ -56,7 +51,7 @@ function generateThumbail($url, $fileLocation) // $html .= (!($i % 4)) ? '
' : ''; - $picture = (is_file($name_main_folder.$fichier."/.sources/picture.png")) ? $name_main_folder.$fichier."/.sources/picture.png" : "assets/img/default.png"; + $picture = (is_file($name_main_folder.$fichier."/.sources/picture.jpg")) ? $name_main_folder.$fichier."/.sources/picture.jpg" : "assets/img/default.jpg"; $urldev = $urlprod = $description = $urldb = ""; if (is_file($name_main_folder.$fichier."/.sources/config.ini")) { @@ -67,11 +62,11 @@ function generateThumbail($url, $fileLocation) $urldb = (!empty($ini_array['infos_base']['URLDB'])) ? $ini_array['infos_base']['URLDB'] : ""; $description = (!empty($ini_array['infos_base']['description'])) ? $ini_array['infos_base']['description'] : ""; // Thumbnail - if (isset($ini_array['infos_base']['thumbnail']) && !is_file($name_main_folder.$fichier."/.sources/picture.png")) { + if (isset($ini_array['infos_base']['thumbnail']) && !is_file($name_main_folder.$fichier."/.sources/picture.jpg")) { if (!empty($ini_array['infos_base']['thumbnail']) && @get_headers($ini_array['infos_base']['thumbnail'], 1)) { - $picture = generateThumbail($ini_array['infos_base']['thumbnail'], $name_main_folder.$fichier."/.sources/picture.png"); + $picture = generateThumbail($ini_array['infos_base']['thumbnail'], $name_main_folder.$fichier."/.sources/picture.jpg"); } else { - $picture = generateThumbail((!empty($urlprod) ? $urlprod : $urldev), $name_main_folder.$fichier."/.sources/picture.png"); + $picture = generateThumbail((!empty($urlprod) ? $urlprod : $urldev), $name_main_folder.$fichier."/.sources/picture.jpg"); } } } else { @@ -103,7 +98,7 @@ function generateThumbail($url, $fileLocation) $html .= '
'.$title.'
'; if (!empty($description)) { $points = (strlen(trim($description)) > 39) ? '...' : ''; - $html .= '
'.substr(trim($description), 0, 39).$points.'
'; + $html .= '
'.trim(substr($description, 0, 39)).$points.'
'; } $html .= '
'; $html .= ''; diff --git a/www/demo/.sources/picture.jpg b/www/demo/.sources/picture.jpg new file mode 100644 index 0000000..f45599f Binary files /dev/null and b/www/demo/.sources/picture.jpg differ diff --git a/www/demo/.sources/picture.png b/www/demo/.sources/picture.png deleted file mode 100644 index 27a9c42..0000000 Binary files a/www/demo/.sources/picture.png and /dev/null differ