Poprawa stylów CSS oraz dodanie sekcji autora w szablonie artykułu

This commit is contained in:
2025-03-11 17:51:25 +01:00
parent 660aacf91b
commit 060d5d3162
5 changed files with 267 additions and 14 deletions

View File

@@ -1,4 +1,8 @@
<? global $lang, $lang_id;?>
<?
$text = $this -> article['language']['text'];
$text = \front\factory\Articles::generateHeadersIds( $text );
?>
<div class="article article-<?= $this -> article['id'];?>">
<?
if ( $main_img = $this -> article['language']['main_image'] ):
@@ -54,13 +58,22 @@
echo '</div>';
endif;
?>
<? if ( $this -> article['language']['table_of_contents'] ):?>
<div class="table-of-contents">
<div class="title">
<?= \S::lang( 'spis-tresci' );?>
<? if ( $this -> article['show_table_of_contents'] ):?>
<? if ( $this -> article['language']['table_of_contents'] ):?>
<div class="table-of-contents">
<div class="title">
<?= \S::lang( 'spis-tresci' );?>
</div>
<?= $this -> article['language']['table_of_contents'];?>
</div>
<?= $this -> article['language']['table_of_contents'];?>
</div>
<? else:?>
<div class="table-of-contents">
<div class="title">
<?= \S::lang( 'spis-tresci' );?>
</div>
<?= \front\factory\Articles::generateTableOfContents( $text );?>
</div>
<? endif;?>
<? endif;?>
<? if ( $this -> article['repeat_entry'] ):?>
<div class="entry">
@@ -69,7 +82,6 @@
<? endif;?>
<div class="text">
<?
$text = $this -> article['language']['text'];
/* artykuł wewnątrz innego artykułu */
preg_match_all( '/ARTYKUL:[0-9]*/', $this -> article['language']['text'], $articles_list );
@@ -180,6 +192,23 @@
echo $tpl -> render( 'articles/article-files' );
endif;
?>
<?
if ( $this -> article['id_author'] ):
$author = \front\factory\Authors::get_single_author( $this -> article['id_author'] );
endif;
?>
<div class="author">
<div class="row">
<div class="col-md-2">
<? if ( $author['image'] ):?><img src="<?= $author['image'];?>" alt="<?= $author['author'];?>"><? endif;?>
</div>
<div class="col-md-10">
<?= $author['languages'][ $lang_id ]['description'];?>
</div>
</div>
</div>
<?
?>
</div>
<link class="footer" href="/libraries/fancyBox/jquery.fancybox.css" rel="stylesheet" type="text/css">
<link class="footer" href="/libraries/fancyBox/helpers/jquery.fancybox-buttons.css" rel="stylesheet" type="text/css">