This commit is contained in:
fredtempez 2019-02-22 22:38:06 +01:00
parent f74fd63295
commit 57b2055e5c
9 changed files with 81 additions and 48 deletions

View File

@ -90,23 +90,6 @@ img[align='right'] {
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 {
font-size: 0.8em;
font-style: italic;

View File

@ -37,7 +37,7 @@ class blog extends common {
public static $users = [];
const BLOG_VERSION = '1.1';
const BLOG_VERSION = '1.2';
/**
* Édition

View File

@ -4,6 +4,7 @@
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
margin-top: 15px;
}
#blogArticleCommentShow {
cursor: text;
@ -11,11 +12,16 @@
#blogArticleOr {
padding: 10px;
}
/* Modif CroqueWeb */
.blogDate {
font-size:0.8em;
font-style: italic;
color: grey;
margin-left: 10px;
}
@media (max-width: 767px) {
#blogArticlePicture {
height:150px;
max-width: 100%;}
}
/* fin modif croqueweb */

View File

@ -1,18 +1,22 @@
<!--
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>
-->
<?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>';
}
?>
<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) {
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']); ?>
<!-- <h4 class="textAlignRight"> -->
<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']), '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> -->
</p>

View File

@ -1,18 +1,34 @@
.blogPicture {
float: left;
margin: 10px 20px 0 0;
float: center;
margin-left: 10px;
}
.blogPicture:hover {
opacity: .7;
}
.block:after {
.row:after {
content: " ";
display: table;
clear: both;
}
.blogComment {
padding-right: 10px;
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) {
.blogContent {
display: none;

View File

@ -3,13 +3,13 @@
<div class="col12">
<?php foreach($module::$articles as $articleId => $article): ?>
<div class="row">
<div class="col3" id="blogPicture" >
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
<div class="col3">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>" class="blogPicture">
<img src="<?php echo helper::baseUrl(false) . 'site/file/thumb/' . $article['picture']; ?>">
</a>
</div>
<div class="col9">
<h1 id="blogTitle">
<h1 class="blogTitle">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
<?php echo $article['title']; ?>
</a>
@ -20,16 +20,14 @@
</a>
<?php echo template::ico('comment', 'left'); ?>
</div>
<div id="blogDate">
<div class="blogDate">
<i class="far fa-calendar-alt"></i>
<?php echo utf8_encode(strftime('%d %B %Y', $article['publishedOn'])); ?>
</div>
<p class="blogContent">
<?php echo helper::subword(strip_tags($article['content']), 0, 300); ?>...
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
</p>
</div>
</div>
<hr />

View File

@ -32,7 +32,7 @@ class news extends common {
false => 'Brouillon',
true => 'Publié'
];
const NEWS_VERSION = '1.1';
const NEWS_VERSION = '1.2';
public static $users = [];

View 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;
}

View File

@ -2,18 +2,21 @@
<div class="row">
<div class="col12">
<?php foreach($module::$news as $newsId => $news): ?>
<div class="block">
<h4>
Le <?php echo utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
à <?php echo utf8_encode(strftime('%H:%M', $news['publishedOn'])); ?>
</h4>
<h2><?php echo $news['title']; ?></h2>
<?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>
<h1 class="newsTitle">
<?php echo $news['title']; ?>
</h1>
<div class="newsDate">
<i class="far fa-calendar-alt"></i>
<?php echo utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
</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; ?>
</div>
</div>