diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b0437cd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +metadata/* +.DS_Store diff --git a/config.php b/config.php new file mode 100644 index 0000000..8323e02 --- /dev/null +++ b/config.php @@ -0,0 +1,135 @@ +getExtension()=='json') { + $json = file_get_contents($file); + $data = json_decode($json, true); + $item = buildItem($data, pathinfo($file, PATHINFO_FILENAME)); + array_push($tmp, $item); + } + } + // Sort by date + usort($tmp, "sortByDate"); + return $tmp; +} + +function getItem($filename) { + $metadataFile = PATH_METADATA.$filename.DS.'metadata.json'; + + if (!file_exists($metadataFile)) { + return false; + } + + $json = file_get_contents($metadataFile); + $data = json_decode($json, true); + $item = buildItem($data, $filename); + + return $item; +} + +function sortByDate($a, $b) { + if ($a['release_date'] == $b['release_date']) { + return 0; + } + return ($a['release_date'] > $b['release_date']) ? -1 : 1; +} + +function sanitize($string) { + $string = str_replace(' ', '-', $string); + return preg_replace('/[^A-Za-z0-9\-]/', '', $string); +} + +// Language passed via $_GET['l'] +$currentLanguage = 'en'; +$acceptedLanguages = array('en', 'de', 'es'); +if (isset($_GET['l'])) { + if (in_array($_GET['l'], $acceptedLanguages)) { + $currentLanguage = $_GET['l']; + } +} + +$json = file_get_contents(PATH_ROOT.'languages'.DS.$currentLanguage.'.json'); +$languageArray = json_decode($json, true); + +// Top bar links +if ($currentLanguage !== "en") { + $_topbar = array( + 'documentation'=>'https://docs.bludit.com/'.$currentLanguage.'/', + 'themes'=>'https://themes.bludit.com/'.$currentLanguage.'/', + 'plugins'=>'https://plugins.bludit.com/'.$currentLanguage.'/', + 'pro'=>'https://pro.bludit.com/'.$currentLanguage.'/', + 'website'=>DOMAIN.'/'.$currentLanguage.'/' + ); +} else { + $_topbar = array( + 'documentation'=>'https://docs.bludit.com', + 'themes'=>'https://themes.bludit.com', + 'plugins'=>'https://plugins.bludit.com', + 'pro'=>'https://pro.bludit.com', + 'website'=>DOMAIN + ); +} + +// Items and Item passed via $_GET['item'] +$_items = false; +$_item = false; +$_whereAmI = 'home'; + +if (!empty($_GET['item'])) { + $itemName = sanitize($_GET['item']); + $_item = getItem($itemName); + $_whereAmI = 'item'; + if ($_item===false) { + header("HTTP/1.0 404 Not Found"); + exit; + } +} else { + $_items = getItems(); + $_whereAmI = 'home'; +} diff --git a/css/bludit.css b/css/bludit.css new file mode 100755 index 0000000..db5e9a7 --- /dev/null +++ b/css/bludit.css @@ -0,0 +1,67 @@ +body { + padding-top: 54px; + font-family: 'Open Sans', sans-serif; + background: #f1f1f1; +} + +@media (min-width: 992px) { + body { + padding-top: 56px; + } +} + +a { + color: #333; +} + +.item { + margin-bottom: 80px; + padding-right: 45px; + padding-left: 45px; +} + +.card-title { + font-weight: normal; + text-transform: uppercase; +} + +.card-subtitle { + font-size: 0.9em; + color: #888; +} + +.nav-link { + font-size: 0.8em; + text-transform: uppercase; +} + +footer { + font-size: 0.8em; +} + +ul.features { + font-size: 0.9em; +} + +ul.features > li { + margin-bottom: 10px; +} + +a.author-social { + font-size: 1.5em; + color: #888; + margin-right: 5px; +} + +a.author-social:hover { + color: #555; +} + +.btn { + padding: 5px 13px; + background: linear-gradient(to bottom,#90a4ae 0,#78909c 100%); +} + +.btn-primary { + background: linear-gradient(to bottom,#42a5f5 0,#2196f3 100%); +} \ No newline at end of file diff --git a/img/bludit-logo.svg b/img/bludit-logo.svg new file mode 100644 index 0000000..183e0ff --- /dev/null +++ b/img/bludit-logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/favicon.png b/img/favicon.png new file mode 100644 index 0000000..833dc42 Binary files /dev/null and b/img/favicon.png differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..6dbf97b --- /dev/null +++ b/index.php @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/languages/de.json b/languages/de.json new file mode 100644 index 0000000..b88205e --- /dev/null +++ b/languages/de.json @@ -0,0 +1,26 @@ +{ + "head-title": "Plugins | Bludit", + "head-description": "Erweitere die Funktionalität von Bludit mit einmaligen Plugins. HTML-Editoren, CSS-Anpassung, RSS-Feed, Sitemap, Open Graph, Twitter Cards und mehr.", + "little-description-paragraph1": "Erweitere die Funktionalität von Bludit mit einmaligen Plugins", + "add-new-plugin": "Add New Plugin", + + "demo": "Demo", + "documentation": "Dokumentation", + "themes": "Themes", + "plugins": "Plugins", + "donations": "Spenden", + "donate": "Spenden", + "download": "Download", + "search": "Suche", + "live-demo": "Live Demo", + "free-download": "Free Download", + "more-information": "More information", + "made-by": "Made by", + "support-forum": "Support Forum", + "support-chat": "Support Chat", + "description": "Description", + "features": "Features", + "last-update": "Last update", + "author": "Author", + "buy": "Buy" +} \ No newline at end of file diff --git a/languages/en.json b/languages/en.json new file mode 100644 index 0000000..e2ce178 --- /dev/null +++ b/languages/en.json @@ -0,0 +1,26 @@ +{ + "head-title": "Plugins | Bludit", + "head-description": "Extend Bludit functionality with amazing plugins. Social networks, HTML Editors, Customize CSS, RSS Feed, Sitemap, Open Graph, Twitter Cards, and more.", + "little-description-paragraph1": "Extend Bludit functionality with amazing plugins", + "add-new-plugin": "Add New Plugin", + + "demo": "Demo", + "documentation": "Documentation", + "themes": "Themes", + "plugins": "Plugins", + "donations": "Donaciones", + "donate": "Donate", + "download": "Download", + "search": "Search", + "live-demo": "Live Demo", + "free-download": "Free Download", + "more-information": "More information", + "made-by": "Made by", + "support-forum": "Support Forum", + "support-chat": "Support Chat", + "description": "Description", + "features": "Features", + "last-update": "Last update", + "author": "Author", + "buy": "Buy" +} \ No newline at end of file diff --git a/languages/es.json b/languages/es.json new file mode 100644 index 0000000..9750b45 --- /dev/null +++ b/languages/es.json @@ -0,0 +1,26 @@ +{ + "head-title": "Plugins | Bludit", + "head-description": "Amplíe la funcionalidad de Bludit con increíbles plugins. Redes sociales, editores HTML, RSS Feed, Sitemap, Open Graph, Twitter Cards, y mucho más.", + "little-description-paragraph1": "Amplíe las funcionalidades de Bludit con increíbles plugins", + "add-new-plugin": "Add New Plugin", + + "demo": "Demo", + "documentation": "Documentation", + "themes": "Themes", + "plugins": "Plugins", + "donations": "Donaciones", + "donate": "Donate", + "download": "Download", + "search": "Search", + "live-demo": "Live Demo", + "free-download": "Free Download", + "more-information": "More information", + "made-by": "Made by", + "support-forum": "Support Forum", + "support-chat": "Support Chat", + "description": "Description", + "features": "Features", + "last-update": "Last update", + "author": "Author", + "buy": "Buy" +} \ No newline at end of file diff --git a/metadata b/metadata new file mode 160000 index 0000000..330541f --- /dev/null +++ b/metadata @@ -0,0 +1 @@ +Subproject commit 330541f82f15306904edd7330bea147b791b9494 diff --git a/php/footer.php b/php/footer.php new file mode 100644 index 0000000..31f322a --- /dev/null +++ b/php/footer.php @@ -0,0 +1,33 @@ + + \ No newline at end of file diff --git a/php/head.php b/php/head.php new file mode 100644 index 0000000..53fc432 --- /dev/null +++ b/php/head.php @@ -0,0 +1,80 @@ + + + + + + + + '.$_item['name'].' - '.l('head title', false).''.PHP_EOL; + echo ''.PHP_EOL; + } else { + echo ''.l('head title', false).''.PHP_EOL; + echo ''.PHP_EOL; + } + ?> + + + + + + + + '.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + } else { + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + } + ?> + + + + + + + '.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + } else { + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + echo ''.PHP_EOL; + } + ?> + + + + + + + + + + '.PHP_EOL; + } + ?> + + + + + + diff --git a/php/home.php b/php/home.php new file mode 100644 index 0000000..c051e55 --- /dev/null +++ b/php/home.php @@ -0,0 +1,38 @@ + + +
+ + +

+ +
+ + + +
+
+ +
+

+
+

+ '.l('Live Demo',false).''.PHP_EOL; + } + + if ($item['price_usd']>0) { + echo ' '.l('Buy',false).' $'.$item['price_usd'].''.PHP_EOL; + } else { + echo ' '.l('Free Download',false).''.PHP_EOL; + } + ?> +
+
+
+ + + +
+ +
\ No newline at end of file diff --git a/php/item.php b/php/item.php new file mode 100644 index 0000000..7bd5812 --- /dev/null +++ b/php/item.php @@ -0,0 +1,92 @@ + +
+
+ +
+ +

+ +

+ +
+ Responsive image +
+ +
+

+

+
+ +
+

+
    + '.$feature.''; + } + } + ?> +
+
+ +
+

+ +
+ +
+

+ '.PHP_EOL; + } + if (!empty($_item['author_twitter'])) { + echo''.PHP_EOL; + } + if (!empty($_item['author_github'])) { + echo''.PHP_EOL; + } + if (!empty($_item['author_youtube'])) { + echo''.PHP_EOL; + } + if (!empty($_item['author_reddit'])) { + echo''.PHP_EOL; + } + if (!empty($_item['author_pinterest'])) { + echo''.PHP_EOL; + } + if (!empty($_item['author_flickr'])) { + echo''.PHP_EOL; + } + if (!empty($_item['author_google_plus'])) { + echo''.PHP_EOL; + } + if (!empty($_item['author_vk'])) { + echo''.PHP_EOL; + } + + ?> +
+ +
+ '.l('Live Demo',false).''.PHP_EOL; + } + + if ($_item['price_usd']>0) { + echo ' '.l('Buy',false).' $'.$_item['price_usd'].''.PHP_EOL; + } else { + echo ' '.l('Free Download',false).''.PHP_EOL; + } + + if (!empty($_item['information_url'])) { + echo ' '.l('More information',false).''.PHP_EOL; + } + ?> +
+ +
+
+
\ No newline at end of file diff --git a/php/topnavbar.php b/php/topnavbar.php new file mode 100644 index 0000000..825d668 --- /dev/null +++ b/php/topnavbar.php @@ -0,0 +1,21 @@ + + \ No newline at end of file