forked from ZwiiCMS-Team/ZwiiCMS
news
This commit is contained in:
parent
f74fd63295
commit
57b2055e5c
@ -90,23 +90,6 @@ img[align='right'] {
|
|||||||
Signature dans les articles blog et news
|
Signature dans les articles blog et news
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#blogPicture {
|
|
||||||
text-align: center;
|
|
||||||
margin-right: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#blogTitle {
|
|
||||||
background-color: #ECEFF1;
|
|
||||||
padding: 3px;
|
|
||||||
margin-left: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#blogDate {
|
|
||||||
font-size:0.8em;
|
|
||||||
font-style: italic;
|
|
||||||
color: grey;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signature {
|
.signature {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
@ -37,7 +37,7 @@ class blog extends common {
|
|||||||
|
|
||||||
public static $users = [];
|
public static $users = [];
|
||||||
|
|
||||||
const BLOG_VERSION = '1.1';
|
const BLOG_VERSION = '1.2';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Édition
|
* Édition
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
#blogArticleCommentShow {
|
#blogArticleCommentShow {
|
||||||
cursor: text;
|
cursor: text;
|
||||||
@ -11,11 +12,16 @@
|
|||||||
#blogArticleOr {
|
#blogArticleOr {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
/* Modif CroqueWeb */
|
.blogDate {
|
||||||
|
font-size:0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
color: grey;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
#blogArticlePicture {
|
#blogArticlePicture {
|
||||||
height:150px;
|
height:150px;
|
||||||
max-width: 100%;}
|
max-width: 100%;}
|
||||||
}
|
}
|
||||||
/* fin modif croqueweb */
|
|
||||||
|
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
<!--
|
<!--
|
||||||
code d'origine
|
code d'origine
|
||||||
<div id="blogArticlePicture" style="background-image:url('<?php echo helper::baseUrl(false) . 'site/file/source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']); ?>');"></div>
|
|
||||||
-->
|
-->
|
||||||
|
<div class="blogDate">
|
||||||
|
<i class="far fa-calendar-alt"></i>
|
||||||
|
<?php echo utf8_encode(strftime('- %d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
||||||
|
à <?php echo utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {
|
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {
|
||||||
echo '<div><img src="'.helper::baseUrl(false) . 'site/file/source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']).'"></div>';
|
echo '<div id="blogArticlePicture" style="background-image:url(' . helper::baseUrl(false) . 'site/file/source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . ');"></div>';
|
||||||
}
|
} ?>
|
||||||
?>
|
|
||||||
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>
|
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>
|
||||||
<!-- <h4 class="textAlignRight"> -->
|
<!-- <h4 class="textAlignRight"> -->
|
||||||
<p class="signature">
|
<p class="signature">
|
||||||
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']), 'firstname']); ?>
|
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']), 'firstname']); ?>
|
||||||
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']), 'lastname']); ?>
|
<?php echo $this->getData(['user', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'userId']), 'lastname']); ?>
|
||||||
<?php echo utf8_encode(strftime('- %d %B %Y', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
|
||||||
à <?php echo utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn']))); ?>
|
|
||||||
<!-- </h4> -->
|
<!-- </h4> -->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -1,18 +1,34 @@
|
|||||||
.blogPicture {
|
.blogPicture {
|
||||||
float: left;
|
float: center;
|
||||||
margin: 10px 20px 0 0;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
.blogPicture:hover {
|
.blogPicture:hover {
|
||||||
opacity: .7;
|
opacity: .7;
|
||||||
}
|
}
|
||||||
.block:after {
|
.row:after {
|
||||||
content: " ";
|
content: " ";
|
||||||
display: table;
|
display: table;
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
.blogComment {
|
.blogComment {
|
||||||
|
padding-right: 10px;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
.blogTitle {
|
||||||
|
background-color: #ECEFF1;
|
||||||
|
padding: 5px;
|
||||||
|
margin-left: -10px;
|
||||||
|
}
|
||||||
|
.blogContent {
|
||||||
|
float: left;
|
||||||
|
margin-left: -10px;
|
||||||
|
}
|
||||||
|
.blogDate {
|
||||||
|
font-size:0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
color: grey;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.blogContent {
|
.blogContent {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php foreach($module::$articles as $articleId => $article): ?>
|
<?php foreach($module::$articles as $articleId => $article): ?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3" id="blogPicture" >
|
<div class="col3">
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>" class="blogPicture">
|
||||||
<img src="<?php echo helper::baseUrl(false) . 'site/file/thumb/' . $article['picture']; ?>">
|
<img src="<?php echo helper::baseUrl(false) . 'site/file/thumb/' . $article['picture']; ?>">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col9">
|
<div class="col9">
|
||||||
<h1 id="blogTitle">
|
<h1 class="blogTitle">
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
|
||||||
<?php echo $article['title']; ?>
|
<?php echo $article['title']; ?>
|
||||||
</a>
|
</a>
|
||||||
@ -20,16 +20,14 @@
|
|||||||
</a>
|
</a>
|
||||||
<?php echo template::ico('comment', 'left'); ?>
|
<?php echo template::ico('comment', 'left'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="blogDate">
|
<div class="blogDate">
|
||||||
<i class="far fa-calendar-alt"></i>
|
<i class="far fa-calendar-alt"></i>
|
||||||
<?php echo utf8_encode(strftime('%d %B %Y', $article['publishedOn'])); ?>
|
<?php echo utf8_encode(strftime('%d %B %Y', $article['publishedOn'])); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="blogContent">
|
<p class="blogContent">
|
||||||
<?php echo helper::subword(strip_tags($article['content']), 0, 300); ?>...
|
<?php echo helper::subword(strip_tags($article['content']), 0, 300); ?>...
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
|
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -32,7 +32,7 @@ class news extends common {
|
|||||||
false => 'Brouillon',
|
false => 'Brouillon',
|
||||||
true => 'Publié'
|
true => 'Publié'
|
||||||
];
|
];
|
||||||
const NEWS_VERSION = '1.1';
|
const NEWS_VERSION = '1.2';
|
||||||
|
|
||||||
public static $users = [];
|
public static $users = [];
|
||||||
|
|
||||||
|
23
module/news/view/index/index.css
Normal file
23
module/news/view/index/index.css
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
.newsTitle {
|
||||||
|
background-color: #ECEFF1;
|
||||||
|
padding:5px;
|
||||||
|
}
|
||||||
|
.newsContent {
|
||||||
|
clear: left;
|
||||||
|
margin-left: 10px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.newsDate {
|
||||||
|
font-size:0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
color: grey;
|
||||||
|
margin-left:10px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.newsSignature {
|
||||||
|
margin-right:10px;
|
||||||
|
float:right;
|
||||||
|
font-size:0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
color: grey;
|
||||||
|
}
|
@ -2,18 +2,21 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col12">
|
<div class="col12">
|
||||||
<?php foreach($module::$news as $newsId => $news): ?>
|
<?php foreach($module::$news as $newsId => $news): ?>
|
||||||
<div class="block">
|
<h1 class="newsTitle">
|
||||||
<h4>
|
<?php echo $news['title']; ?>
|
||||||
Le <?php echo utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
|
</h1>
|
||||||
à <?php echo utf8_encode(strftime('%H:%M', $news['publishedOn'])); ?>
|
<div class="newsDate">
|
||||||
</h4>
|
<i class="far fa-calendar-alt"></i>
|
||||||
<h2><?php echo $news['title']; ?></h2>
|
<?php echo utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
|
||||||
<?php echo $news['content']; ?>
|
|
||||||
<p class="signature">
|
|
||||||
<?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
|
|
||||||
</p>
|
|
||||||
<div class="clearBoth"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="newsSignature">
|
||||||
|
<?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
|
||||||
|
</div>
|
||||||
|
<div class="newsContent">
|
||||||
|
<?php echo $news['content']; ?>
|
||||||
|
</div>
|
||||||
|
<div class="clearBoth"></div>
|
||||||
|
<hr />
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user