From: Louis Jeckel Date: Tue, 11 Aug 2020 09:43:58 +0000 (+0200) Subject: cretae labo articles (actu labos) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=169f45ba25cf09f907c8d8140fe110f71cb5ea13;p=psq.git cretae labo articles (actu labos) --- diff --git a/app/Http/Controllers/Admin/LaboArticleController.php b/app/Http/Controllers/Admin/LaboArticleController.php new file mode 100644 index 0000000..fe2929a --- /dev/null +++ b/app/Http/Controllers/Admin/LaboArticleController.php @@ -0,0 +1,10 @@ + [ + '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, + ], + ], + ], + ]; +} diff --git a/app/Models/Slugs/LaboArticleSlug.php b/app/Models/Slugs/LaboArticleSlug.php new file mode 100644 index 0000000..6281206 --- /dev/null +++ b/app/Models/Slugs/LaboArticleSlug.php @@ -0,0 +1,10 @@ +model = $model; + } +} diff --git a/app/View/Components/PillBox.php b/app/View/Components/PillBox.php index 7b8a5a2..f17bf77 100644 --- a/app/View/Components/PillBox.php +++ b/app/View/Components/PillBox.php @@ -30,9 +30,7 @@ class PillBox extends Component $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; diff --git a/config/twill-navigation.php b/config/twill-navigation.php index 4eda29f..29e71d6 100644 --- a/config/twill-navigation.php +++ b/config/twill-navigation.php @@ -23,12 +23,17 @@ return [ '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' => [ diff --git a/database/migrations/2020_08_11_092617_create_labo_articles_tables.php b/database/migrations/2020_08_11_092617_create_labo_articles_tables.php new file mode 100644 index 0000000..a289469 --- /dev/null +++ b/database/migrations/2020_08_11_092617_create_labo_articles_tables.php @@ -0,0 +1,38 @@ +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'); + } +} diff --git a/public/css/app.css b/public/css/app.css index be4bfd6..cbd0e1e 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -11433,6 +11433,10 @@ ul.leaders span + span { 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); diff --git a/resources/sass/app.scss b/resources/sass/app.scss index cd5bbf8..1db74ab 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -11,6 +11,10 @@ @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), diff --git a/resources/views/admin/laboArticles/form.blade.php b/resources/views/admin/laboArticles/form.blade.php new file mode 100644 index 0000000..2a22637 --- /dev/null +++ b/resources/views/admin/laboArticles/form.blade.php @@ -0,0 +1,9 @@ +@extends('twill::layouts.form') + +@section('contentFields') + @formField('input', [ + 'name' => 'description', + 'label' => 'Description', + 'maxlength' => 100 + ]) +@stop diff --git a/resources/views/admin/settings/strings.blade.php b/resources/views/admin/settings/strings.blade.php index a2db18a..874cc88 100644 --- a/resources/views/admin/settings/strings.blade.php +++ b/resources/views/admin/settings/strings.blade.php @@ -6,7 +6,20 @@ '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 diff --git a/resources/views/not-registered/index.blade.php b/resources/views/not-registered/index.blade.php index 82c0f25..7eb7786 100644 --- a/resources/views/not-registered/index.blade.php +++ b/resources/views/not-registered/index.blade.php @@ -9,11 +9,23 @@
Image pas encore abonné
-
+
{!! $settings->byKey('not_registered_text') !!}
+
+
+
+ {!! $settings->byKey('not_registered_text_left') !!} +
+
+
+
+ {!! $settings->byKey('not_registered_text_right') !!} +
+
+
diff --git a/routes/admin.php b/routes/admin.php index e4cd783..7abe2c0 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -9,6 +9,7 @@ Route::prefix('content')->group(function() { Route::module('adCampaigns'); Route::module('events'); Route::module('podcasts'); + Route::module('laboArticles'); Route::module('guests'); //podcast guests });