diff --git a/addons/default/visiosoft/profile-module/resources/assets/css/profile-nav.scss b/addons/default/visiosoft/profile-module/resources/assets/css/profile-nav.scss new file mode 100644 index 000000000..aee4b71ff --- /dev/null +++ b/addons/default/visiosoft/profile-module/resources/assets/css/profile-nav.scss @@ -0,0 +1,86 @@ +.profile-nav-toggler { + color: rgba(0,0,0,.5); + border: 1px solid rgba(0,0,0,.1); + padding: .25rem .75rem; + font-size: 1.25rem; + line-height: 1; + background-color: transparent; + border-radius: .25rem; +} + +.profile-navigation { + padding: 1.5rem .25rem; + height: 100%; + position: fixed; + top: 0; + left: 0; + overflow-y: auto; + z-index: 9999; + -webkit-transform: translateX(-100%); + -ms-transform: translateX(-100%); + transform: translateX(-100%); + -webkit-transition: 300ms ease; + transition: 300ms ease; + @media only screen and (min-width: 768px) { + padding: 1.5rem 2.25rem; + height: initial; + position: initial; + -webkit-transform: initial; + -ms-transform: initial; + transform: initial; + } + + &.reveal { + -webkit-transform: translateX(0%); + -ms-transform: translateX(0%); + transform: translateX(0%); + -webkit-transition: 300ms ease; + transition: 300ms ease; + } + + a { + display: flex; + align-items: center; + margin-bottom: 1.25rem; + + &.active, &:hover { + cursor: pointer; + + p { + color: #707070; + font-weight: 500; + } + } + + &:first-child { + p { + font-weight: 500; + color: #707070; + } + } + + img { + margin-right: .75rem; + width: 1.5rem; + height: 1.5rem; + } + + p { + color: #A1A1A1; + margin-bottom: 0; + } + } +} + +.overlay { + position: fixed; + display: none; + top: 0; + left: 0; + right: 0; + bottom: 0; + cursor: pointer; + background: #000; + opacity: .2; + z-index: 1; +} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss b/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss index cf8f444de..9ccc05938 100644 --- a/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss +++ b/addons/default/visiosoft/profile-module/resources/assets/css/profile.scss @@ -2,91 +2,4 @@ background-color: #343a40 !important; border-color: #343a40 #343a40 #343a40; color: white!important; -} - -.profile-nav-toggler { - color: rgba(0,0,0,.5); - border: 1px solid rgba(0,0,0,.1); - padding: .25rem .75rem; - font-size: 1.25rem; - line-height: 1; - background-color: transparent; - border-radius: .25rem; -} - -.profile-navigation { - padding: 1.5rem .25rem; - height: 100%; - position: fixed; - top: 0; - left: 0; - overflow-y: auto; - z-index: 9999; - -webkit-transform: translateX(-100%); - -ms-transform: translateX(-100%); - transform: translateX(-100%); - -webkit-transition: 300ms ease; - transition: 300ms ease; - @media only screen and (min-width: 768px) { - padding: 1.5rem 2.25rem; - height: initial; - position: initial; - -webkit-transform: initial; - -ms-transform: initial; - transform: initial; - } - - &.reveal { - -webkit-transform: translateX(0%); - -ms-transform: translateX(0%); - transform: translateX(0%); - -webkit-transition: 300ms ease; - transition: 300ms ease; - } - - a { - display: flex; - align-items: center; - margin-bottom: 1.25rem; - - &.active, &:hover { - cursor: pointer; - - p { - color: #707070; - font-weight: 500; - } - } - - &:first-child { - p { - font-weight: 500; - color: #707070; - } - } - - img { - margin-right: .75rem; - width: 1.5rem; - height: 1.5rem; - } - - p { - color: #A1A1A1; - margin-bottom: 0; - } - } -} - -.overlay { - position: fixed; - display: none; - top: 0; - left: 0; - right: 0; - bottom: 0; - cursor: pointer; - background: #000; - opacity: .2; - z-index: 1; } \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/address/create.twig b/addons/default/visiosoft/profile-module/resources/views/address/create.twig index 587478940..b7d4acabb 100644 --- a/addons/default/visiosoft/profile-module/resources/views/address/create.twig +++ b/addons/default/visiosoft/profile-module/resources/views/address/create.twig @@ -1,15 +1,8 @@ {% extends "theme::layouts/default" %} -{% block styles %} - {{ asset_style("visiosoft.module.profile::assets/css/profile.scss") }} -{% endblock %} - {% block content %} -
- - {% include "visiosoft.module.profile::profile/partials/navigation" %} - -
+ {% embed 'visiosoft.module.profile::profile/index' %} + {% block detail %}

{{ trans('visiosoft.module.profile::field.create_address.name') }}

@@ -82,10 +75,8 @@
- -
-
- {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/country.js") }} - {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/address.js") }} - + {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/country.js") }} + {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/address.js") }} + {% endblock %} + {% endembed %} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/address/edit.twig b/addons/default/visiosoft/profile-module/resources/views/address/edit.twig index f0bd273a9..947a255ba 100644 --- a/addons/default/visiosoft/profile-module/resources/views/address/edit.twig +++ b/addons/default/visiosoft/profile-module/resources/views/address/edit.twig @@ -1,15 +1,8 @@ {% extends "theme::layouts/default" %} -{% block styles %} - {{ asset_style("visiosoft.module.profile::assets/css/profile.scss") }} -{% endblock %} - {% block content %} -
- - {% include "visiosoft.module.profile::profile/partials/navigation" %} - -
+ {% embed 'visiosoft.module.profile::profile/index' %} + {% block detail %}

{{ trans('visiosoft.module.profile::field.edit_address.name') }}

@@ -82,9 +75,8 @@
- -
-
- {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/country.js") }} - {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/address.js") }} + {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/country.js") }} + {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/address.js") }} + {% endblock %} + {% endembed %} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/address/list.twig b/addons/default/visiosoft/profile-module/resources/views/address/list.twig index 2e5b212b6..810140973 100644 --- a/addons/default/visiosoft/profile-module/resources/views/address/list.twig +++ b/addons/default/visiosoft/profile-module/resources/views/address/list.twig @@ -1,15 +1,8 @@ {% extends "theme::layouts/default" %} -{% block styles %} - {{ asset_style("visiosoft.module.profile::assets/css/profile.scss") }} -{% endblock %} - {% block content %} -
- - {% include "visiosoft.module.profile::profile/partials/navigation" %} - -
+ {% embed 'visiosoft.module.profile::profile/index' %} + {% block detail %} @@ -51,6 +44,6 @@ {% endfor %}
-
-
+ {% endblock %} + {% endembed %} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig b/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig index 94a39f68b..47db3fa85 100644 --- a/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig +++ b/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig @@ -1,15 +1,8 @@ {% extends "theme::layouts/default" %} -{% block styles %} - {{ asset_style("visiosoft.module.profile::assets/css/profile.scss") }} -{% endblock %} - {% block content %} -
- - {% include "visiosoft.module.profile::profile/partials/navigation" %} - -
+ {% embed 'visiosoft.module.profile::profile/index' %} + {% block detail %}

{{ trans('visiosoft.module.advs::field.my_ads.name') }}

@@ -67,16 +60,16 @@
-
- - - {{ asset_add('scripts.js','visiosoft.module.profile::assets/js/ads.js') }} + + {{ asset_add('scripts.js','visiosoft.module.profile::assets/js/ads.js') }} + {% endblock %} + {% endembed %} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig b/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig index d7e944632..e0344d2e5 100644 --- a/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig +++ b/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig @@ -1,23 +1,15 @@ {% extends "theme::layouts/default" %} -{% block styles %} - {{ asset_style("visiosoft.module.profile::assets/css/profile.scss") }} -{% endblock %} - {% block content %} + {% embed 'visiosoft.module.profile::profile/index' %} + {% block detail %} + {% set profile_photo = user.file %} + {% if profile_photo %} + {% set profile_photo = file(profile_photo.id).url %} + {% else %} + {% set profile_photo = img('visiosoft.module.profile::images/profile-default.png').url %} + {% endif %} - {% set profile_photo = user.file %} - {% if profile_photo %} - {% set profile_photo = file(profile_photo.id).url %} - {% else %} - {% set profile_photo = img('visiosoft.module.profile::images/profile-default.png').url %} - {% endif %} - -
- - {% include "visiosoft.module.profile::profile/partials/navigation" %} - -
@@ -175,8 +167,8 @@
-
+ {% endblock %} + {% endembed %} - {{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/profile.js") }} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/index.twig b/addons/default/visiosoft/profile-module/resources/views/profile/index.twig new file mode 100644 index 000000000..5abcd41f0 --- /dev/null +++ b/addons/default/visiosoft/profile-module/resources/views/profile/index.twig @@ -0,0 +1,15 @@ +{% block styles %} + {{ asset_style("visiosoft.module.profile::assets/css/profile-nav.scss") }} +{% endblock %} + +
+ + {% include "visiosoft.module.profile::profile/partials/navigation" %} + +
+ + {% block detail %}{% endblock %} + +
+ +
\ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig b/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig index cdd48617b..e9833916c 100644 --- a/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig +++ b/addons/default/visiosoft/profile-module/resources/views/profile/partials/navigation.twig @@ -3,7 +3,7 @@ -