--- /dev/null
+<?php
+
+namespace App\Http\Controllers\Admin;
+
+use A17\Twill\Http\Controllers\Admin\ModuleController;
+
+class LaboArticleController extends ModuleController
+{
+ protected $moduleName = 'laboArticles';
+}
--- /dev/null
+<?php
+
+namespace App\Http\Requests\Admin;
+
+use A17\Twill\Http\Requests\Admin\Request;
+
+class LaboArticleRequest extends Request
+{
+ public function rulesForCreate()
+ {
+ return [];
+ }
+
+ public function rulesForUpdate()
+ {
+ return [];
+ }
+}
--- /dev/null
+<?php
+
+namespace App\Models;
+
+use A17\Twill\Models\Behaviors\HasSlug;
+use A17\Twill\Models\Behaviors\HasMedias;
+use A17\Twill\Models\Model;
+
+class LaboArticle extends Model
+{
+ use HasSlug, HasMedias;
+
+ protected $fillable = [
+ 'published',
+ 'title',
+ 'description',
+ ];
+
+ public $slugAttributes = [
+ 'title',
+ ];
+
+ public $mediasParams = [
+ 'cover' => [
+ 'desktop' => [
+ [
+ 'name' => 'desktop',
+ 'ratio' => 16 / 9,
+ ],
+ ],
+ 'mobile' => [
+ [
+ 'name' => 'mobile',
+ 'ratio' => 1,
+ ],
+ ],
+ 'flexible' => [
+ [
+ 'name' => 'free',
+ 'ratio' => 0,
+ ],
+ [
+ 'name' => 'landscape',
+ 'ratio' => 16 / 9,
+ ],
+ [
+ 'name' => 'portrait',
+ 'ratio' => 3 / 5,
+ ],
+ ],
+ ],
+ ];
+}
--- /dev/null
+<?php
+
+namespace App\Models\Slugs;
+
+use A17\Twill\Models\Model;
+
+class LaboArticleSlug extends Model
+{
+ protected $table = "labo_article_slugs";
+}
--- /dev/null
+<?php
+
+namespace App\Repositories;
+
+use A17\Twill\Repositories\Behaviors\HandleSlugs;
+use A17\Twill\Repositories\Behaviors\HandleMedias;
+use A17\Twill\Repositories\ModuleRepository;
+use App\Models\LaboArticle;
+
+class LaboArticleRepository extends ModuleRepository
+{
+ use HandleSlugs, HandleMedias;
+
+ public function __construct(LaboArticle $model)
+ {
+ $this->model = $model;
+ }
+}
$this->title = $title;
$this->link = $link;
- } else if($pillBoxes = $repository->forSlug($slug)){
- /** @var PillBoxSpace $pillBoxSpace */
- $pillBoxSpace = $pillBoxes->first();
+ } else if($pillBoxSpace = $repository->forSlug($slug)){
$this->title = $pillBoxSpace->box_title;
$this->link = $pillBoxSpace->box_link;
'title' => 'Campagnes publicitaires',
'module' => true
],
- 'events' => [
- 'title' => 'Evénements',
+ 'laboArticles' => [
+ 'title' => 'Actu des labos',
'module' => true
],
+
+// 'events' => [
+// 'title' => 'Evénements',
+// 'module' => true
+// ],
'articles' => [
- 'title' => 'Articles',
+ 'title' => 'Humeurs',
'module' => true
],
'podcasts' => [
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+
+class CreateLaboArticlesTables extends Migration
+{
+ public function up()
+ {
+ Schema::create('labo_articles', function (Blueprint $table) {
+ // this will create an id, a "published" column, and soft delete and timestamps columns
+ createDefaultTableFields($table);
+
+ // feel free to modify the name of this column, but title is supported by default (you would need to specify the name of the column Twill should consider as your "title" column in your module controller if you change it)
+ $table->string('title', 200)->nullable();
+
+ $table->string('chapo')->nullable();
+ $table->text('content')->nullable();
+
+ // add those 2 columns to enable publication timeframe fields (you can use publish_start_date only if you don't need to provide the ability to specify an end date)
+ $table->timestamp('publish_start_date')->nullable();
+ $table->timestamp('publish_end_date')->nullable();
+ });
+
+ Schema::create('labo_article_slugs', function (Blueprint $table) {
+ createDefaultSlugsTableFields($table, 'labo_article');
+ });
+
+
+ }
+
+ public function down()
+ {
+
+ Schema::dropIfExists('labo_article_slugs');
+ Schema::dropIfExists('labo_articles');
+ }
+}
font-family: "Avenir Next Demi", sans-serif;
}
+body {
+ margin-bottom: 4rem;
+}
+
.box,
div.pill-box div {
box-shadow: 0 2px 0 rgba(90, 97, 105, 0.11), 0 4px 8px rgba(90, 97, 105, 0.12), 0 10px 10px rgba(90, 97, 105, 0.06), 0 7px 70px rgba(90, 97, 105, 0.1);
@import "pill_boxes";
@import "title_dots";
+body {
+ margin-bottom: 4rem;
+}
+
.box {
box-shadow: 0 2px 0 rgba(90, 97, 105, 0.11),
0 4px 8px rgba(90, 97, 105, 0.12),
--- /dev/null
+@extends('twill::layouts.form')
+
+@section('contentFields')
+ @formField('input', [
+ 'name' => 'description',
+ 'label' => 'Description',
+ 'maxlength' => 100
+ ])
+@stop
'name' => 'not_registered_text',
'maxlength' => 1000,
'required' => true,
- 'toolbarOptions' => [ [ 'header' => [2, 3, false] ], 'bold', 'italic', 'underline', 'strike', 'list-ordered', 'list-unordered', [ 'indent' => '-1'], [ 'indent' => '+1' ] ],
-
+ 'toolbarOptions' => [ [ 'header' => [2, 3, false] ], 'link', 'bold', 'italic', 'underline', 'strike', 'list-ordered', 'list-unordered', [ 'indent' => '-1'], [ 'indent' => '+1' ] ],
+ ])
+ @formField('wysiwyg', [
+ 'label' => 'Texte page pas encore abonné bas gauche',
+ 'name' => 'not_registered_text_left',
+ 'maxlength' => 1000,
+ 'required' => true,
+ 'toolbarOptions' => [ [ 'header' => [2, 3, false] ], 'link', 'bold', 'italic', 'underline', 'strike', 'list-ordered', 'list-unordered', [ 'indent' => '-1'], [ 'indent' => '+1' ] ],
+ ])
+ @formField('wysiwyg', [
+ 'label' => 'Texte page pas encore abonné bas droite',
+ 'name' => 'not_registered_text_right',
+ 'maxlength' => 1000,
+ 'required' => true,
+ 'toolbarOptions' => [ [ 'header' => [2, 3, false] ], 'link', 'bold', 'italic', 'underline', 'strike', 'list-ordered', 'list-unordered', [ 'indent' => '-1'], [ 'indent' => '+1' ] ],
])
@stop
<div class="col-sm-6">
<img src="{{asset('img/not-registered.jpg')}}" alt="Image pas encore abonné" class="w-100">
</div>
- <div class="col-sm-6 pt-3">
+ <div class="col-sm-6 pt-3 box">
{!! $settings->byKey('not_registered_text') !!}
</div>
</div>
+ <div class="row mt-4">
+ <div class="col-sm-6 px-2">
+ <div class="box p-3">
+ {!! $settings->byKey('not_registered_text_left') !!}
+ </div>
+ </div>
+ <div class="col-sm-6 px-2">
+ <div class="box p-3">
+ {!! $settings->byKey('not_registered_text_right') !!}
+ </div>
+ </div>
+ </div>
</div>
Route::module('adCampaigns');
Route::module('events');
Route::module('podcasts');
+ Route::module('laboArticles');
Route::module('guests'); //podcast guests
});