protected $image;
protected $title;
+ protected $_types = ['link' => 'json'];
+
public static function getSchema($schema) {
$table = parent::getSchema($schema);
$table->addColumn('title', 'string', array('length' => 128));
*/\r
public function news() {\r
$allnews = CCGM_Model_News::factory()->order('date DESC')->find();\r
-\r
-\r
$res = '';\r
\r
foreach ($allnews as $news) {\r
$res = $this->imageProcess($n->getImage(), '', 200, 200);\r
$c = $this->dateTime($n->getDate(), CubeIT_Date::DAY . '/' . CubeIT_Date::MONTH . '/' . CubeIT_Date::YEAR);\r
$c .= $this->htmlElement($n->getTitle(), 'h2');\r
+ $c .= '<div class="acc">';\r
$c .= $this->markupDotclear($n->getContent());\r
+ $c .= $this->linkCMS($n->getLink());\r
+ $c .= '</div>';\r
$c .= $this->link('Lire la suite', '#', ['class' => 'more']);\r
$c .= $this->link('Réduire', '#', ['class' => 'less']);\r
$res .= $this->htmlElement($c, 'div', ['class' => 'c']);\r
\r
$(this.element).on('click', '.more', function () {\r
var c = $(this).closest('.c');\r
- var d = $(c).find('.dotclear');\r
+ var d = $(c).find('.acc');\r
d.css({maxHeight: 999});\r
$(this).hide();\r
$(c).find('.less').show();\r
\r
$(this.element).on('click', '.less', function () {\r
var c = $(this).closest('.c');\r
- var d = $(c).find('.dotclear');\r
+ var d = $(c).find('.acc');\r
d.css({maxHeight: 72});\r
$(this).hide();\r
$(c).find('.more').show();\r
border-bottom: 1px solid #dad9d9;\r
padding-bottom: 48px;\r
margin-bottom: 48px;\r
- &:last-child{\r
+ &:last-child {\r
border-bottom: none;\r
margin-bottom: 0;\r
}\r
font-size: 26px;\r
}\r
\r
- .dotclear {\r
- line-height: 24px;\r
+ .acc {\r
max-height: 72px;\r
overflow: hidden;\r
transition: max-height 450ms;\r
margin-bottom: 30px;\r
- p:last-child{\r
+ > a {\r
+ display: inline-block;\r
+ text-align: center;\r
+ box-sizing: border-box;\r
+ white-space: nowrap;\r
+ background-color: #0ea6db;\r
+ font-weight: 300;\r
+ font-style: italic;\r
+ line-height: 29px;\r
+ border-radius: 3px;\r
+ color: #fff;\r
+ padding: 0 13px 1px 10px;\r
+ margin: 20px 0 20px 1px;\r
+ }\r
+ }\r
+\r
+ .dotclear {\r
+ line-height: 24px;\r
+ p:last-child {\r
margin-bottom: 0;\r
}\r
}\r
font-weight: 500;\r
font-size: 16px;\r
display: block;\r
- &:after{\r
- content:"";\r
+ &:after {\r
+ content: "";\r
display: inline-block;\r
margin-left: 10px;\r
width: 15px;\r
}\r
}\r
\r
- .less{\r
+ .less {\r
display: none;\r
- &:after{\r
+ &:after {\r
transform: rotate(270deg);\r
}\r
}\r