diff --git a/plugins/tps/about/Plugin.php b/plugins/tps/about/Plugin.php new file mode 100644 index 0000000..d1a3ced --- /dev/null +++ b/plugins/tps/about/Plugin.php @@ -0,0 +1,14 @@ + + = e(trans('backend::lang.form.create')) ?> + = e(trans('backend::lang.reorder.default_title')) ?> + + diff --git a/plugins/tps/about/controllers/about/_reorder_toolbar.htm b/plugins/tps/about/controllers/about/_reorder_toolbar.htm new file mode 100644 index 0000000..0b8ad6c --- /dev/null +++ b/plugins/tps/about/controllers/about/_reorder_toolbar.htm @@ -0,0 +1,3 @@ +
\ No newline at end of file diff --git a/plugins/tps/about/controllers/about/config_form.yaml b/plugins/tps/about/controllers/about/config_form.yaml new file mode 100644 index 0000000..6580a14 --- /dev/null +++ b/plugins/tps/about/controllers/about/config_form.yaml @@ -0,0 +1,10 @@ +name: About +form: $/tps/about/models/about/fields.yaml +modelClass: Tps\About\Models\About +defaultRedirect: tps/about/about +create: + redirect: 'tps/about/about/update/:id' + redirectClose: tps/about/about +update: + redirect: tps/about/about + redirectClose: tps/about/about diff --git a/plugins/tps/about/controllers/about/config_list.yaml b/plugins/tps/about/controllers/about/config_list.yaml new file mode 100644 index 0000000..6db5a08 --- /dev/null +++ b/plugins/tps/about/controllers/about/config_list.yaml @@ -0,0 +1,12 @@ +list: $/tps/about/models/about/columns.yaml +modelClass: Tps\About\Models\About +title: About +noRecordsMessage: 'backend::lang.list.no_records' +showSetup: true +showCheckboxes: true +recordsPerPage: 20 +toolbar: + buttons: list_toolbar + search: + prompt: 'backend::lang.list.search_prompt' +recordUrl: 'tps/about/about/update/:id' diff --git a/plugins/tps/about/controllers/about/config_reorder.yaml b/plugins/tps/about/controllers/about/config_reorder.yaml new file mode 100644 index 0000000..4a72d11 --- /dev/null +++ b/plugins/tps/about/controllers/about/config_reorder.yaml @@ -0,0 +1,4 @@ +title: About +modelClass: Tps\About\Models\About +toolbar: + buttons: reorder_toolbar diff --git a/plugins/tps/about/controllers/about/create.htm b/plugins/tps/about/controllers/about/create.htm new file mode 100644 index 0000000..f6289b1 --- /dev/null +++ b/plugins/tps/about/controllers/about/create.htm @@ -0,0 +1,46 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/about/controllers/about/index.htm b/plugins/tps/about/controllers/about/index.htm new file mode 100644 index 0000000..ea43a36 --- /dev/null +++ b/plugins/tps/about/controllers/about/index.htm @@ -0,0 +1 @@ += $this->listRender() ?> diff --git a/plugins/tps/about/controllers/about/preview.htm b/plugins/tps/about/controllers/about/preview.htm new file mode 100644 index 0000000..0f692b7 --- /dev/null +++ b/plugins/tps/about/controllers/about/preview.htm @@ -0,0 +1,22 @@ + ++ + = e(trans('backend::lang.form.return_to_list')) ?> + +
\ No newline at end of file diff --git a/plugins/tps/about/controllers/about/reorder.htm b/plugins/tps/about/controllers/about/reorder.htm new file mode 100644 index 0000000..5ca99f7 --- /dev/null +++ b/plugins/tps/about/controllers/about/reorder.htm @@ -0,0 +1,8 @@ + += e(trans('backend::lang.form.return_to_list')) ?>
+ \ No newline at end of file diff --git a/plugins/tps/about/lang/ru/lang.php b/plugins/tps/about/lang/ru/lang.php new file mode 100644 index 0000000..482755b --- /dev/null +++ b/plugins/tps/about/lang/ru/lang.php @@ -0,0 +1,6 @@ + [ + 'name' => 'About', + 'description' => '' + ] +]; \ No newline at end of file diff --git a/plugins/tps/about/models/About.php b/plugins/tps/about/models/About.php new file mode 100644 index 0000000..10709fe --- /dev/null +++ b/plugins/tps/about/models/About.php @@ -0,0 +1,41 @@ + 'Tps\Shops\Classes\Attachment', + 'image2' => 'Tps\Shops\Classes\Attachment', + ]; + + public $translatable = ['name', 'description']; +} diff --git a/plugins/tps/about/models/about/columns.yaml b/plugins/tps/about/models/about/columns.yaml new file mode 100644 index 0000000..fcd36ff --- /dev/null +++ b/plugins/tps/about/models/about/columns.yaml @@ -0,0 +1,10 @@ +columns: + id: + label: id + type: number + name: + label: name + type: text + description: + label: description + type: text diff --git a/plugins/tps/about/models/about/fields.yaml b/plugins/tps/about/models/about/fields.yaml new file mode 100644 index 0000000..874388c --- /dev/null +++ b/plugins/tps/about/models/about/fields.yaml @@ -0,0 +1,28 @@ +fields: + name: + label: Name + span: auto + type: text + description: + label: Description + size: '' + span: auto + type: textarea + image: + label: 'First Image' + mode: image + useCaption: true + thumbOptions: + mode: crop + extension: auto + span: auto + type: fileupload + image2: + label: 'Second Image' + mode: image + useCaption: true + thumbOptions: + mode: crop + extension: auto + span: auto + type: fileupload diff --git a/plugins/tps/about/plugin.yaml b/plugins/tps/about/plugin.yaml new file mode 100644 index 0000000..fe53033 --- /dev/null +++ b/plugins/tps/about/plugin.yaml @@ -0,0 +1,11 @@ +plugin: + name: 'tps.about::lang.plugin.name' + description: 'tps.about::lang.plugin.description' + author: tps + icon: oc-icon-info + homepage: '' +navigation: + main-menu-item: + label: About + url: tps/about/about + icon: icon-info diff --git a/plugins/tps/about/updates/builder_table_create_tps_about_.php b/plugins/tps/about/updates/builder_table_create_tps_about_.php new file mode 100644 index 0000000..bc070a1 --- /dev/null +++ b/plugins/tps/about/updates/builder_table_create_tps_about_.php @@ -0,0 +1,23 @@ +engine = 'InnoDB'; + $table->increments('id')->unsigned(); + $table->string('title'); + $table->text('description'); + }); + } + + public function down() + { + Schema::dropIfExists('tps_about_'); + } +} diff --git a/plugins/tps/about/updates/builder_table_update_tps_about_.php b/plugins/tps/about/updates/builder_table_update_tps_about_.php new file mode 100644 index 0000000..daa6e52 --- /dev/null +++ b/plugins/tps/about/updates/builder_table_update_tps_about_.php @@ -0,0 +1,23 @@ +integer('sort_order')->nullable(); + }); + } + + public function down() + { + Schema::table('tps_about_', function($table) + { + $table->dropColumn('sort_order'); + }); + } +} diff --git a/plugins/tps/about/updates/builder_table_update_tps_about__2.php b/plugins/tps/about/updates/builder_table_update_tps_about__2.php new file mode 100644 index 0000000..315097b --- /dev/null +++ b/plugins/tps/about/updates/builder_table_update_tps_about__2.php @@ -0,0 +1,23 @@ +renameColumn('title', 'name'); + }); + } + + public function down() + { + Schema::table('tps_about_', function($table) + { + $table->renameColumn('name', 'title'); + }); + } +} diff --git a/plugins/tps/about/updates/version.yaml b/plugins/tps/about/updates/version.yaml new file mode 100644 index 0000000..2c69883 --- /dev/null +++ b/plugins/tps/about/updates/version.yaml @@ -0,0 +1,11 @@ +1.0.1: + - 'Initialize plugin.' +1.0.2: + - 'Created table tps_about_' + - builder_table_create_tps_about_.php +1.0.3: + - 'Updated table tps_about_' + - builder_table_update_tps_about_.php +1.0.4: + - 'Updated table tps_about_' + - builder_table_update_tps_about__2.php diff --git a/plugins/tps/shops/models/TopCategory.php b/plugins/tps/shops/models/TopCategory.php index 9d291b1..fc29ae7 100755 --- a/plugins/tps/shops/models/TopCategory.php +++ b/plugins/tps/shops/models/TopCategory.php @@ -1,15 +1,17 @@ div { + height: 400px; + + &:nth-child(2) { + margin: 60px 0 0 20px; + } + } + } + + &>div { + height: 250px; + + &:nth-child(2) { + margin-top: 20px; + } + } } &-info { @@ -789,7 +806,29 @@ &-photo { width: 100%; - height: 500px; + + + &.flex { + justify-content: center; + + &>div { + height: 400px; + margin-top: 0; + width: unset; + + &:nth-child(2) { + margin: 60px 0 0 20px; + } + } + } + + &>div { + height: 250px; + + &:nth-child(2) { + margin-top: 20px; + } + } } &-info { @@ -1351,10 +1390,6 @@ padding: 40px 0; &_item { - &-photo { - height: 340px; - } - &-title { font-size: 24px; } @@ -1924,13 +1959,26 @@ padding: 40px 0; &_item { + margin-bottom: 40px; + &-title { margin-bottom: 20px; } + &-info { + margin-bottom: 20px; + } &-photo { - height: 320px; + &.flex { + &>div { + height: unset; + } + } + + &>div { + height: unset; + } } } } @@ -2146,9 +2194,7 @@ line-height: 1.8; } - &-photo { - height: 320px; - } + &-photo {} } } diff --git a/themes/berkarar/assets/css/components/3-page/about.scss b/themes/berkarar/assets/css/components/3-page/about.scss index 1fd739a..fc11b86 100755 --- a/themes/berkarar/assets/css/components/3-page/about.scss +++ b/themes/berkarar/assets/css/components/3-page/about.scss @@ -182,16 +182,40 @@ &:nth-of-type(even) { flex-direction: row-reverse; - - } &-photo { width: calc(50% - 80px); - height: 600px; + display: block; + + &.flex { + display: flex; + + &>div { + height: 600px; + width: calc(50% - 30px); + + &:nth-child(2) { + margin: 60px 0 0 30px; + } + } + } + + &>div { + display: block; + width: calc(100% - 60px); + height: 300px; + margin-top: 0; + + &:nth-child(2) { + margin: 30px 0 0 60px; + } + } img { @include ImgCon; + // height: 80%; + display: block; } } @@ -201,7 +225,7 @@ &-title { font-weight: 700; - font-size: 48px; + font-size: 38px; line-height: 59px; color: $gray; margin-bottom: 30px; @@ -209,7 +233,7 @@ &-txt { font-weight: 400; - font-size: 24px; + font-size: 20px; line-height: 35px; color: $gray; margin-bottom: 15px; diff --git a/themes/berkarar/assets/css/main.css b/themes/berkarar/assets/css/main.css index 05c3d43..1f5b944 100755 --- a/themes/berkarar/assets/css/main.css +++ b/themes/berkarar/assets/css/main.css @@ -2616,27 +2616,49 @@ input[type=date]::-webkit-calendar-picker-indicator { } .about_item-photo { width: calc(50% - 80px); + display: block; +} +.about_item-photo.flex { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} +.about_item-photo.flex > div { height: 600px; + width: calc(50% - 30px); +} +.about_item-photo.flex > div:nth-child(2) { + margin: 60px 0 0 30px; +} +.about_item-photo > div { + display: block; + width: calc(100% - 60px); + height: 300px; + margin-top: 0; +} +.about_item-photo > div:nth-child(2) { + margin: 30px 0 0 60px; } .about_item-photo img { width: 100%; height: 100%; object-fit: contain; -o-object-fit: contain; + display: block; } .about_item-info { width: calc(50% - 80px); } .about_item-title { font-weight: 700; - font-size: 48px; + font-size: 38px; line-height: 59px; color: #292929; margin-bottom: 30px; } .about_item-txt { font-weight: 400; - font-size: 24px; + font-size: 20px; line-height: 35px; color: #292929; margin-bottom: 15px; @@ -3851,7 +3873,18 @@ input[type=date]::-webkit-calendar-picker-indicator { } .about_item-photo { width: calc(50% - 25px); - height: 500px; + } + .about_item-photo.flex > div { + height: 400px; + } + .about_item-photo.flex > div:nth-child(2) { + margin: 60px 0 0 20px; + } + .about_item-photo > div { + height: 250px; + } + .about_item-photo > div:nth-child(2) { + margin-top: 20px; } .about_item-info { width: calc(50% - 25px); @@ -4123,7 +4156,25 @@ input[type=date]::-webkit-calendar-picker-indicator { } .about_item-photo { width: 100%; - height: 500px; + } + .about_item-photo.flex { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + } + .about_item-photo.flex > div { + height: 400px; + margin-top: 0; + width: unset; + } + .about_item-photo.flex > div:nth-child(2) { + margin: 60px 0 0 20px; + } + .about_item-photo > div { + height: 250px; + } + .about_item-photo > div:nth-child(2) { + margin-top: 20px; } .about_item-info { width: 100%; @@ -4519,9 +4570,6 @@ input[type=date]::-webkit-calendar-picker-indicator { .about { padding: 40px 0; } - .about_item-photo { - height: 340px; - } .about_item-title { font-size: 24px; } @@ -4896,11 +4944,20 @@ input[type=date]::-webkit-calendar-picker-indicator { .about { padding: 40px 0; } + .about_item { + margin-bottom: 40px; + } .about_item-title { margin-bottom: 20px; } - .about_item-photo { - height: 320px; + .about_item-info { + margin-bottom: 20px; + } + .about_item-photo.flex > div { + height: unset; + } + .about_item-photo > div { + height: unset; } .contact { margin-top: -70px; @@ -5014,9 +5071,6 @@ input[type=date]::-webkit-calendar-picker-indicator { font-size: 16px; line-height: 1.8; } - .about_item-photo { - height: 320px; - } .bill_item > div p { font-size: 16px; } diff --git a/themes/berkarar/customize.yaml b/themes/berkarar/customize.yaml index bff3826..020cb2b 100755 --- a/themes/berkarar/customize.yaml +++ b/themes/berkarar/customize.yaml @@ -7,25 +7,3 @@ tabs: span: left type: number default: "0" - - about_us: - tab: About us - prompt: 'Add new item' - span: auto - type: repeater - form: - fields: - title: - label: Text - span: auto - type: text - description: - label: Description - size: '' - span: auto - type: textarea - image: - label: 'Image' - mode: file - span: auto - type: mediafinder diff --git a/themes/berkarar/pages/about.htm b/themes/berkarar/pages/about.htm index 491f082..7eea29a 100755 --- a/themes/berkarar/pages/about.htm +++ b/themes/berkarar/pages/about.htm @@ -3,7 +3,12 @@ url = "/about" layout = "default" is_hidden = 0 == - +get(); + } +?> +==@@ -80,4 +90,4 @@ is_hidden = 0