Improve view wishlist
This commit is contained in:
parent
a1d783b0b0
commit
a280ca945e
2 changed files with 59 additions and 56 deletions
|
@ -28,7 +28,7 @@ $user = new User();
|
||||||
<form class="ui form" method="post">
|
<form class="ui form" method="post">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label>URL</label>
|
<label>URL</label>
|
||||||
<input type="url" name="url" value="<?= $url ?>" />
|
<input type="url" name="url" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
@ -41,22 +41,19 @@ if (isset($_GET['wishlist'])) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if (!empty($products)) { ?>
|
<?php if (!empty($products)) { ?>
|
||||||
|
<div class="ui three column grid">
|
||||||
|
|
||||||
<?php foreach ($products as $product) { ?>
|
<?php foreach ($products as $product) { ?>
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @link https://github.com/oscarotero/Embed
|
||||||
|
*/
|
||||||
$embed = new Embed();
|
$embed = new Embed();
|
||||||
$info = $embed->get($product['url']);
|
$info = $embed->get($product['url']);
|
||||||
|
|
||||||
// https://github.com/oscarotero/Embed
|
|
||||||
echo '<pre>';
|
|
||||||
// var_dump($info->title);
|
|
||||||
// var_dump($info->description);
|
|
||||||
// var_dump($info->url);
|
|
||||||
// var_dump($info->keywords);
|
|
||||||
echo '</pre>';
|
|
||||||
?>
|
?>
|
||||||
<div class="ui link cards">
|
<div class="column">
|
||||||
|
<div class="ui fluid card">
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
<?php if ($info->image) { ?>
|
<?php if ($info->image) { ?>
|
||||||
<div class="image">
|
<div class="image">
|
||||||
<img src="<?= $info->image ?>" />
|
<img src="<?= $info->image ?>" />
|
||||||
|
@ -66,7 +63,11 @@ if (isset($_GET['wishlist'])) {
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<?php if ($info->title) { ?>
|
<?php if ($info->title) { ?>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
<?php if ($info->url) { ?>
|
||||||
|
<a href="<?= $info->url ?>" target="_blank"><?= $info->title ?></a>
|
||||||
|
<?php } else { ?>
|
||||||
<?= $info->title ?>
|
<?= $info->title ?>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
@ -96,10 +97,12 @@ if (isset($_GET['wishlist'])) {
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue