diff --git a/resources/views/segments/default-assets/header-circle.svg b/resources/views/segments/default-assets/header-circle.svg new file mode 100644 index 0000000..70d7951 --- /dev/null +++ b/resources/views/segments/default-assets/header-circle.svg @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/segments/footer/OtherFooter/OtherFooter.blade.php b/resources/views/segments/footer/OtherFooter/OtherFooter.blade.php index c647bee..7bc51b5 100644 --- a/resources/views/segments/footer/OtherFooter/OtherFooter.blade.php +++ b/resources/views/segments/footer/OtherFooter/OtherFooter.blade.php @@ -64,7 +64,7 @@

- {{getSetting($data->area_name.'_'.$data->part.'_title')}}{{getSetting($data->area_name.'_'.$data->part.'_titl')}} + {{getSetting($data->area_name.'_'.$data->part.'_title')}}

diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php b/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php new file mode 100644 index 0000000..a87ba8b --- /dev/null +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php @@ -0,0 +1,134 @@ +

+ +
+
+
+
+ +
+ +
+
+
+
+ +
+
+ +
+ +
+
+ +
+ + + + + diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.js b/resources/views/segments/menu/HomayonMenu/HomayonMenu.js new file mode 100644 index 0000000..87dc47b --- /dev/null +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.js @@ -0,0 +1,26 @@ +const scrollBreakpoint = window.innerHeight * 0.2; +let fixmenu = function () { + if (window.scrollY > scrollBreakpoint){ + document.querySelector('.HomayonMenu').classList.add('fix'); + document.querySelector('.HomayonMenu').querySelector('.homayon-middle').classList.remove('container'); + }else{ + document.querySelector('.HomayonMenu').classList.remove('fix') + document.querySelector('.HomayonMenu').querySelector('.homayon-middle').classList.add('container'); + } +} +window.addEventListener('scroll',fixmenu); + + +fixmenu(); +const toggleSideMenu = function (e) { + e.preventDefault(); + if (document.querySelector('.homayon-resp-menu').style.display == 'none'){ + document.querySelector('.homayon-resp-menu').style.display = 'block'; + }else{ + document.querySelector('.homayon-resp-menu').style.display = 'none'; + } +}; +document.addEventListener('DOMContentLoaded',function () { + document.querySelector('#homa-toggle-menu')?.addEventListener('click',toggleSideMenu); +}); + diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.json b/resources/views/segments/menu/HomayonMenu/HomayonMenu.json new file mode 100644 index 0000000..a8f4468 --- /dev/null +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.json @@ -0,0 +1,10 @@ +{ + "name": "HomayonMenu", + "version": "1.0", + "author": "xStack", + "email": "xshop@xstack.ir", + "license": "GPL-3.0-or-later", + "url": "https:\/\/xstack.ir", + "author_url": "https:\/\/4xmen.ir", + "packages": [] +} \ No newline at end of file diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.php b/resources/views/segments/menu/HomayonMenu/HomayonMenu.php new file mode 100644 index 0000000..0e8b09f --- /dev/null +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.php @@ -0,0 +1,74 @@ +section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_title'; + $setting->value = __("Shop"); + $setting->size = 6; + $setting->type = 'TEXT'; +// $setting->data = json_encode(['xmin' => 2, 'xmax' => 90]); + $setting->title = $part->area_name . ' ' . $part->part. ' title'; + $setting->save(); + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_menu'; + $setting->value = Menu::first()->id; + $setting->type = 'MENU'; + $setting->size = 6; + $setting->title = $part->area_name . ' ' . $part->part .' menu'; + $setting->save(); + + + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_bg'; + $setting->value = '#dddddd'; + $setting->type = 'COLOR'; + $setting->data = json_encode(['name' => 'homayon-bg']); + $setting->size = 6; + $setting->title = $part->area_name . ' ' . $part->part .' background color'; + $setting->save(); + + $setting = new Setting(); + $setting->section = 'theme'; + $setting->key = $part->area_name . '_' . $part->part.'_bg2'; + $setting->value = gfx()['primary']; + $setting->type = 'COLOR'; + $setting->data = json_encode(['name' => 'homayon-bg-menu']); + $setting->size = 6; + $setting->title = $part->area_name . ' ' . $part->part .' background color'; + $setting->save(); + + + File::copy(__DIR__.'/../../default-assets/header-circle.svg',public_path('upload/images/').$part->area_name . '.' . $part->part.'.svg'); + + + + } + public static function onRemove(Part $part = null) + { + + Setting::where('key',$part->area_name . '_' . $part->part.'_title')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_bg')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_bg2')->first()?->delete(); + Setting::where('key',$part->area_name . '_' . $part->part.'_menu')->first()?->delete(); + } + public static function onMount(Part $part = null) + { + return $part; + } +} diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.scss b/resources/views/segments/menu/HomayonMenu/HomayonMenu.scss new file mode 100644 index 0000000..e3f67ee --- /dev/null +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.scss @@ -0,0 +1,225 @@ +.HomayonMenu { + // scss + position: relative; + z-index: 999; + + transition: 400ms; + + .homayon-top { + background: var(--homayon-bg); + height: 10rem; + } + + .social { + i { + font-size: 25px; + } + } + + .homayon-middle { + margin-top: -35px; + margin-bottom: -40px; + background: #ffffff; + padding: 1.15rem; + border-radius: 75px; + + ul { + padding: 0; + margin: 0; + list-style: none; + display: flex; + + li { + padding: 0 1rem; + color: var(--xshop-primary); + width: 55px; + } + + a { + position: relative; + + .badge { + position: absolute; + top: -10px; + left: -15px; + } + } + + i { + font-size: 25px; + } + + #homa-toggle-menu { + display: none; + } + } + } + + .homayon-logo { + text-align: center; + width: 365px; + height: 325px; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 9px; + + .logo-container { + background: var(--homayon-bg); + margin: 40px auto; + border-radius: 50%; + width: 220px; + height: 220px; + display: flex; + align-items: center; + justify-content: center; + } + + img { + width: 128px; + } + } + + .homayon-bottom { + margin-top: 40px; + margin-bottom: -105px; + + nav { + padding: 0 2rem; + } + + ul { + display: flex; + justify-content: space-between; + list-style: none; + text-align: center; + overflow: hidden; + background: var(--homayon-bg-menu); + border-bottom-right-radius: 35px; + border-bottom-left-radius: 35px; + + li { + transition: 500ms; + flex: 1; + + a { + padding: .75rem; + display: block; + } + } + + .homayon-divider { + flex-grow: 3; + } + } + + a { + color: var(--xshop-diff); + position: relative; + + &:after { + transition: 700ms; + opacity: 0; + content: ' '; + background: var(--xshop-diff); + left: 1rem; + right: 1rem; + position: absolute; + top: 0; + bottom: 0; + transform: skew(35deg, 0deg); + } + + &:hover { + &:after { + content: ' '; + background: var(--xshop-diff); + opacity: .3; + left: 1rem; + right: 1rem; + position: absolute; + top: 0; + bottom: 0; + transform: skew(35deg, 0deg); + } + } + } + } + + /*-875px width*/ + @media (max-width: 875px) { + ul { + flex-direction: row-reverse; + } + #homa-toggle-menu { + display: block !important; + } + + .homayon-bottom { + display: none; + } + } + + &.fix { + position: fixed; + left: 0; + right: 0; + top: 0; + z-index: 999; + + .homayon-top { + display: none; + } + + + .homayon-middle { + margin-top: 0; + border-radius: 0; + } + + .homayon-logo { + top: -118px; + } + + .logo-container { + background: transparent; + + img { + width: 75px; + margin-top: 75px; + } + } + + + /*-875px width*/ + @media (max-width: 875px) { + .homayon-logo { + background: none !important; + img{ + width: 40px; + margin-top: 5px; + } + } + } + } + .homayon-resp-menu{ + display: none; + position: fixed; + overflow-y: auto; + background: var(--homayon-bg); + top: 73px; + width: 200px; + bottom: 0; + z-index: 77; + inset-inline-end: 0; + ul{ + padding-top: .5rem; + list-style: none; + a{ + display: block; + padding: .5rem; + } + } + } + +} diff --git a/resources/views/segments/menu/HomayonMenu/screenshot.png b/resources/views/segments/menu/HomayonMenu/screenshot.png new file mode 100644 index 0000000..670d127 Binary files /dev/null and b/resources/views/segments/menu/HomayonMenu/screenshot.png differ