|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @package Cowglow |
|
4
|
|
|
*/ |
|
5
|
|
|
|
|
6
|
|
|
namespace Cowglow\InstagramGallery\Application; |
|
7
|
|
|
|
|
8
|
|
|
use Cowglow\InstagramGallery\Ports\App; |
|
9
|
|
|
|
|
10
|
|
|
class BaseController |
|
11
|
|
|
{ |
|
12
|
|
|
public function __construct() |
|
13
|
|
|
{ |
|
14
|
|
|
$rootDirectory = dirname(dirname(dirname(__DIR__))).DIRECTORY_SEPARATOR; |
|
15
|
|
|
|
|
16
|
|
|
include_once $rootDirectory.'assets'.DIRECTORY_SEPARATOR.'partials'.DIRECTORY_SEPARATOR.'header.php'; |
|
17
|
|
|
|
|
18
|
|
|
$grams = array_reverse(App::getConfig('instagram')); |
|
19
|
|
|
|
|
20
|
|
|
$counter = 0; |
|
21
|
|
|
while ($counter < count($grams)) { |
|
22
|
|
|
if ($counter % 3 === 0) { |
|
23
|
|
|
echo '<div class="row">'; |
|
24
|
|
|
} |
|
25
|
|
|
$gram = $grams[$counter]; |
|
26
|
|
|
?> |
|
27
|
|
|
<div class="col-lg-4"> |
|
28
|
|
|
<blockquote |
|
29
|
|
|
class="instagram-media" |
|
30
|
|
|
data-instgrm-version="7" |
|
31
|
|
|
style=" |
|
32
|
|
|
background:#FFF; |
|
33
|
|
|
border:0; |
|
34
|
|
|
border-radius:3px; |
|
35
|
|
|
box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); |
|
36
|
|
|
margin: 1px; |
|
37
|
|
|
max-width:658px; |
|
38
|
|
|
padding:0; |
|
39
|
|
|
width:99.375%; |
|
40
|
|
|
width:-webkit-calc(100% - 2px); |
|
41
|
|
|
width:calc(100% - 2px);"> |
|
42
|
|
|
<div style="padding:8px;"> |
|
43
|
|
|
<div style=" |
|
44
|
|
|
background:#F8F8F8; |
|
45
|
|
|
line-height:0; |
|
46
|
|
|
margin-top:40px; |
|
47
|
|
|
padding:28.194444444444443% 0; |
|
48
|
|
|
text-align:center; |
|
49
|
|
|
width:100%;"> |
|
50
|
|
|
<div style=" |
|
51
|
|
|
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); |
|
52
|
|
|
display:block; |
|
53
|
|
|
height:44px; |
|
54
|
|
|
margin:0 auto -44px; |
|
55
|
|
|
position:relative; |
|
56
|
|
|
top:-22px; |
|
57
|
|
|
width:44px;"> |
|
58
|
|
|
</div> |
|
59
|
|
|
</div> |
|
60
|
|
|
<p style=" |
|
61
|
|
|
color:#c9c8cd; |
|
62
|
|
|
font-family:Arial,sans-serif; |
|
63
|
|
|
font-size:14px; |
|
64
|
|
|
line-height:17px; |
|
65
|
|
|
margin-bottom:0; |
|
66
|
|
|
margin-top:8px; |
|
67
|
|
|
overflow:hidden; |
|
68
|
|
|
padding:8px 0 7px; |
|
69
|
|
|
text-align:center; |
|
70
|
|
|
text-overflow:ellipsis; |
|
71
|
|
|
white-space:nowrap;"> |
|
72
|
|
|
<a href="https://www.instagram.com/p/<?php echo $gram; ?>" |
|
73
|
|
|
style="color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none;" |
|
74
|
|
|
target="_blank">Loading...</a> |
|
75
|
|
|
</p> |
|
76
|
|
|
</div> |
|
77
|
|
|
</blockquote> |
|
78
|
|
|
</div> |
|
79
|
|
|
<?php |
|
80
|
|
|
$counter++; |
|
81
|
|
|
if ($counter % 3 === 0) { |
|
82
|
|
|
echo '</div>'; |
|
83
|
|
|
} |
|
84
|
|
|
} |
|
85
|
|
|
include_once $rootDirectory.'assets'.DIRECTORY_SEPARATOR.'partials'.DIRECTORY_SEPARATOR.'footer.php'; |
|
86
|
|
|
} |
|
87
|
|
|
} |
|
88
|
|
|
|