Skip to content

Commit

Permalink
bug fixes, icons, bootstrap and jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
dignajar committed May 7, 2019
1 parent 00226fd commit bf0ea93
Show file tree
Hide file tree
Showing 18 changed files with 2,704 additions and 53 deletions.
4 changes: 2 additions & 2 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
define('PATH_AUTHORS', PATH_METADATA.'authors'.DS);
define('CHARSET', 'UTF-8');

#define('DOMAIN', 'http://localhost:8000');
#define('CDN', 'http://localhost:8000/metadata/items/');
// define('DOMAIN', 'http://localhost:7000');
// define('CDN', 'http://localhost:7000/metadata/items/');

define('DOMAIN', 'https://plugins.bludit.com');
define('CDN', 'https://rawgit.com/bludit/plugins-repository/master/');
Expand Down
4 changes: 2 additions & 2 deletions css/bludit.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ a.author-social:hover {
}

.btn-primary {
background: #42a5f5;
background-color: #0078D4;
border-color: #0078D4;
}


.btn-secondary {
background: #3cb6de;
}
Expand Down
7 changes: 7 additions & 0 deletions css/bootstrap-4.3.1.min.css

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions css/line-awesome/css/line-awesome-font-awesome.min.css

Large diffs are not rendered by default.

Binary file added css/line-awesome/fonts/line-awesome.eot
Binary file not shown.
2,628 changes: 2,628 additions & 0 deletions css/line-awesome/fonts/line-awesome.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css/line-awesome/fonts/line-awesome.ttf
Binary file not shown.
Binary file added css/line-awesome/fonts/line-awesome.woff
Binary file not shown.
Binary file added css/line-awesome/fonts/line-awesome.woff2
Binary file not shown.
5 changes: 0 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ function buildItem($data, $key) {

// Check Screenshot
$data['screenshoot_url'] = CDN.'items/'.$data['key'].'/screenshot.png';
$validate = @getimagesize($data['screenshoot_url']);
if(!$validate){
$data['screenshoot_url'] = false;
}

return $data;
}

Expand Down
4 changes: 2 additions & 2 deletions html/head.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
?>

<!-- CSS files -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo DOMAIN ?>/css/bootstrap-4.3.1.min.css" rel="stylesheet">
<link href="<?php echo DOMAIN ?>/css/bludit.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="<?php echo DOMAIN ?>/css/line-awesome/css/line-awesome-font-awesome.min.css" rel="stylesheet">

<!-- Google hreflang tag -->
<?php foreach ($_hreflang as $hreflang=>$href): ?>
Expand Down
6 changes: 3 additions & 3 deletions html/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
}

if ($item['price_usd']>0) {
echo '<a class="btn btn-secondary btn-sm" href="'.$item['download_url'].'" role="button" target="_blank"><i class="fa fa-shopping-cart" aria-hidden="true"></i> '.l('Buy',false).' $'.$item['price_usd'].'</a>'.PHP_EOL;
echo '<a class="btn btn-primary btn-sm" href="'.$item['download_url'].'" role="button" target="_blank"><i class="fa fa-shopping-cart" aria-hidden="true"></i> '.l('Buy',false).' $'.$item['price_usd'].'</a>'.PHP_EOL;
} elseif ($item['price_usd']==-1) {
echo '<a class="btn btn-secondary btn-sm" href="'.$item['download_url'].'" role="button" target="_blank"><i class="fa fa-shopping-cart" aria-hidden="true"></i> '.l('Buy from',false).' $1</a>'.PHP_EOL;
echo '<a class="btn btn-primary btn-sm" href="'.$item['download_url'].'" role="button" target="_blank"><i class="fa fa-shopping-cart" aria-hidden="true"></i> '.l('Buy from',false).' $1</a>'.PHP_EOL;
} else {
echo '<a class="btn btn-secondary btn-sm" href="'.$item['permalink'].'#download" role="button"><i class="fa fa-download" aria-hidden="true"></i> '.l('Download',false).'</a>'.PHP_EOL;
echo '<a class="btn btn-primary btn-sm" href="'.$item['permalink'].'#download" role="button"><i class="fa fa-download" aria-hidden="true"></i> '.l('Download',false).'</a>'.PHP_EOL;
}
?>
</div>
Expand Down
50 changes: 24 additions & 26 deletions html/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="container mb-2">
<div class="row">
<div id="plugin-content" class="col-lg-8 col-sm-12 pt-5 pb-lg-5">
<div class="card shadow-sm">
<div class="card">
<?php if(!$_item['translated']){ ?>
<div class="card-img-top p-3 bg-danger" style="height:auto;margin-bottom:-5px;">
<a href="https://github.com/bludit/plugins-repository/tree/master/items/<?php echo $_item['key'] ?>" target="_blank" class="text-white">
Expand All @@ -12,11 +12,17 @@
</div>
<?php } ?>

<?php if(!empty($_item['screenshoot_url'])){ ?>
<img src="<?php echo $_item['screenshoot_url']; ?>" class="card-img-top" alt="<?php l("Header Image"); ?>" />
<?php } else { ?>
<div class="card-img-top"><span><?php l("Header Image"); ?></span></div>
<?php } ?>
<div id="screenshot">
<div class="card-img-top"><span><?php echo $_item['name'] ?></span></div>
</div>

<script>
document.addEventListener('DOMContentLoaded', function() {
$.get("<?php echo $_item['screenshoot_url'] ?>").done(function() {
$("#screenshot").html('<img src="<?php echo $_item['screenshoot_url'] ?>" class="card-img-top" alt="<?php echo $_item['name'] ?>">');
});
});
</script>

<div class="card-body">
<h5 class="card-title"><?php echo $_item['name'] ?></h5>
Expand All @@ -35,7 +41,7 @@
?>
</div>

<div id="plugin-links" class="row mt-4 mb-5">
<div id="plugin-links" class="row mt-4">
<div class="col-md-4 col-sm-12">
<?php if(empty($_item['demo_url'])){ ?>
<a href="<?php echo $_item['demo_url']; ?>" class="btn btn-dark" target="_blank">
Expand All @@ -45,32 +51,31 @@
</div>
<div class="col-md-8 col-sm-12 text-right">
<?php if($_item['price_usd'] > 0){ ?>
<a href="<?php echo $_item['download_url']; ?>" class="btn btn-primary" target="_blank">
<a href="<?php echo $_item['download_url']; ?>" class="btn btn-primary" target="_blank" role="button">
<i class="fa fa-shopping-cart" aria-hidden="true"></i> <?php l("Buy"); ?> $<?php echo $_item['price_usd']; ?>
</a>
<?php } else if($_item['price_usd'] == -1){ ?>
<a href="<?php echo $_item['download_url']; ?>" class="btn btn-primary" target="_blank">
<a href="<?php echo $_item['download_url']; ?>" class="btn btn-primary" target="_blank" role="button">
<i class="fa fa-shopping-cart" aria-hidden="true"></i> <?php l("Buy from"); ?> $1
</a>
<?php } else { ?>
<?php if(empty($_item['download_url_v2'])){ ?>
<a href="<?php echo $_item['download_url_v2']; ?>" class="btn btn-secondary btn-sm" target="_blank">
<i class="fa fa-download" aria-hidden="true"></i> <?php l("Download for Bludit v.2.x"); ?>
<?php if(!empty($_item['download_url_v2'])){ ?>
<a href="<?php echo $_item['download_url_v2']; ?>" class="btn btn-secondary" target="_blank" role="button">
<i class="fa fa-download" aria-hidden="true"></i> <?php l("download-for-bludit-v2"); ?>
</a>
<?php } ?>
<?php if(!empty($_item['download_url'])){ ?>
<a href="<?php echo $_item['download_url']; ?>" class="btn btn-primary" target="_blank">
<i class="fa fa-download" aria-hidden="true"></i> <?php l("Download for Bludit v.3.x"); ?>
<a href="<?php echo $_item['download_url']; ?>" class="btn btn-primary" target="_blank" role="button">
<i class="fa fa-download" aria-hidden="true"></i> <?php l("download-for-bludit-v3"); ?>
</a>
<?php } ?>
<?php } ?>
</div>
</div>

<div class="card shadow-sm mt-5 mb-5">
<div class="card mt-4 mb-4">
<div class="card-body">
<h5 class="card-title"><?php l("Author"); ?>: <b><?php echo $_item['author']['name'] ?></b></h5>
<h6 class="card-subtitle mb-3 text-muted">Developer of 5 Plugins and 5 Themes</h6>
<?php
if(!empty($_item['author']['website'])){
echo'<a class="btn btn-outline-secondary" href="'.$_item['author']['website'].'" target="_blank"><i class="fa fa-home" aria-hidden="true"></i></a>'.PHP_EOL;
Expand All @@ -96,9 +101,6 @@
if(!empty($_item['author']['flickr'])){
echo'<a class="btn btn-outline-secondary" href="'.$_item['author']['flickr'].'" target="_blank"><i class="fa fa-flickr" aria-hidden="true"></i></a>'.PHP_EOL;
}
if(!empty($_item['author']['google_plus'])){
echo'<a class="btn btn-outline-secondary" href="'.$_item['author']['google_plus'].'" target="_blank"><i class="fa fa-google-plus" aria-hidden="true"></i></a>'.PHP_EOL;
}
if(!empty($_item['author']['vk'])){
echo'<a class="btn btn-outline-secondary" href="'.$_item['author']['vk'].'" target="_blank"><i class="fa fa-vk" aria-hidden="true"></i></a>'.PHP_EOL;
}
Expand All @@ -118,20 +120,16 @@
<small class="w-50 d-inline-block font-weight-bold"><?php l("Last Update"); ?></small>
<small><?php echo timeago(strtotime($_item["release_date"] . " 00:00:00")); ?> <?php l("ago"); ?></small>
</li>
<li class="list-group-item">
<small class="w-50 d-inline-block font-weight-bold"><?php l("Compatibility"); ?></small>
<small>Bludit 3.5.0+</small>
</li>
</ul>
</div>

<?php if(!empty($_item['information_url'])){ ?>
<div class="card mt-4 mb-4">
<div class="card-body">
<h5 class="card-title"><?php l('Support') ?></h5>
<h6 class="card-subtitle mb-2 text-muted"><?php l('for-more-information-or-extra') ?></h6>
<div class="card-title"><?php l('Support') ?></div>
<div class="card-subtitle mb-2 text-muted"><?php l('for-more-information-or-extra') ?></div>

<a href="<?php echo $_item['information_url']; ?>" class="btn btn-success w-100 mt-3" target="_blank">
<a href="<?php echo $_item['information_url']; ?>" class="btn btn-primary w-100 mt-3" target="_blank">
<i class="fa fa-home" aria-hidden="true"></i> <?php l('More information') ?>
</a>
</div>
Expand Down
15 changes: 7 additions & 8 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

define('BLUDIT', true);
include('config.php');
?>
Expand All @@ -24,8 +28,8 @@
<?php include(PATH_HTML.'footer.php'); ?>

<!-- Javascript stuff -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.bundle.min.js"></script>
<script src="<?php echo DOMAIN ?>/js/jquery-3.4.1.min.js"></script>
<script src="<?php echo DOMAIN ?>/js/bootstrap.bundle-4.3.1.min.js"></script>

<script>
$(document).ready(function() {
Expand All @@ -39,10 +43,6 @@
}
});
});

$(".item-screenshot").on("error", function(){
$(this).attr("src", "<?php echo SCREENSHOT_DEFAULT ?>");
});
});
</script>

Expand All @@ -63,7 +63,6 @@
});
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/51979046" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->

</body>
</html>
</html>
7 changes: 7 additions & 0 deletions js/bootstrap.bundle-4.3.1.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions js/jquery-3.4.1.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"buy-from": "Comprar desde",
"version": "Versión",

"download-for-bludit-v2": "Download for Bludit v2.x",
"download-for-bludit-v3": "Download for Bludit v3.x",
"support": "Support",
"for-more-information-or-extra": "For more information or extra configurations, visit the developer's site.",
"download-for-bludit-v2": "Descargar para Bludit v2.x",
"download-for-bludit-v3": "Descargar para Bludit v3.x",
"support": "Soporte",
"for-more-information-or-extra": "Más información o configuraciones adicionales, visite el sitio del desarrollador.",
"this-plugin-has-not-yet-been-translated-into": "Este plugin aún no ha sido traducido al Español. Ayúdanos a traducirlo."
}
2 changes: 1 addition & 1 deletion metadata
Submodule metadata updated from f91b19 to 999156

0 comments on commit bf0ea93

Please sign in to comment.