add auto mobile version
This commit is contained in:
@@ -1,12 +1,37 @@
|
||||
<script>
|
||||
var newcurr = '<?=$newcurr?>',
|
||||
baseurl ='<?=$baseurl?>',
|
||||
nexturl = '<?=$nexturl?>',
|
||||
newcurr ='<?=$newcurr?>',
|
||||
prevurl = '<?=$prevurl?>';
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<?include ('blocks/pgtextnav.phtml')?>
|
||||
|
||||
<div id="an_text_block">
|
||||
<div id=""></div>
|
||||
|
||||
<?if (count($content) > 0):?>
|
||||
|
||||
<?foreach($content as $news):?>
|
||||
<h2 class="antitle"><?=$news['title']?></h2>
|
||||
<?if ($news['img'] !== ''):?>
|
||||
<figure class="anphoto">
|
||||
<img src="https://imgurl.argumenti.ru/news/news_id/<?=$news['img']?>" />
|
||||
<?if (in_array($news['img'], ['jpg', 'png', 'gif', 'jpeg', 'JPG'])):?>
|
||||
<img src="https://imgurl.argumenti.ru/news/news_id/<?=$news['news_id']?>.<?=$news['img']?>" />
|
||||
<?else:?>
|
||||
<img src="https://imgurl.argumenti.ru/news/news_id/<?=$news['img']?>" />
|
||||
<?endif?>
|
||||
</figure>
|
||||
<?endif?>
|
||||
<div class="antext"><?=$news['text']?></div>
|
||||
<?endforeach?>
|
||||
</div>
|
||||
<?else:?>
|
||||
<p>Данная страница недоступна в мобильной версии</p>
|
||||
<p>Перейдите на <a href="<?=$nexturl?>">следующую страницу</a></p>
|
||||
<?endif?>
|
||||
</div>
|
||||
|
||||
<?include ('blocks/pgtextnav.phtml')?>
|
||||
|
||||
|
||||
33
app/views/blocks/pgtextnav.phtml
Normal file
33
app/views/blocks/pgtextnav.phtml
Normal file
@@ -0,0 +1,33 @@
|
||||
<div id="stuff-bar">
|
||||
<div id="pagenav">
|
||||
|
||||
<?if (isset($prevurl)):?>
|
||||
<div class="firstpage">
|
||||
<a href="<?=$baseurl?>1">
|
||||
<i class="fas fa-angle-double-left"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="navpage"><a href="<?=$prevurl?>"><i class="fas fa-chevron-circle-left"></i></a></div>
|
||||
<?endif?>
|
||||
|
||||
|
||||
<div id="currpage">
|
||||
<select id="pages" onchange="changepage()">
|
||||
<?for ($i = 1; $i <= $count; $i++):?>
|
||||
<?$selected = ($page == $i) ? ' selected' : ''?>
|
||||
<option value="<?=$i?>"<?=$selected?>><?=$i?></option>
|
||||
<?endfor?>
|
||||
</select>
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</div>
|
||||
|
||||
<?if (isset($nexturl)):?>
|
||||
<div class="navpage"><a href="<?=$nexturl?>"><i class="fas fa-chevron-circle-right"></i></a></div>
|
||||
<?if (isset($endurl)):?>
|
||||
<div class="navpage"><a href="<?=$endurl?>"><i class="fas fa-angle-double-right"></i></a></div>
|
||||
<?endif?>
|
||||
<?endif?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user