Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Lamarts mobile app angular
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arko Dey Bhowmick
Lamarts mobile app angular
Commits
6a581a16
Commit
6a581a16
authored
Mar 24, 2025
by
Arko Dey Bhowmick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: responsivness of portal
parent
9ef4ed16
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
188 additions
and
19 deletions
+188
-19
src/app/app.component.ts
src/app/app.component.ts
+17
-1
src/app/portal/navigation/sidebar/sidebar.component.html
src/app/portal/navigation/sidebar/sidebar.component.html
+3
-0
src/app/portal/navigation/sidebar/sidebar.component.scss
src/app/portal/navigation/sidebar/sidebar.component.scss
+23
-0
src/app/portal/navigation/sidebar/sidebar.component.ts
src/app/portal/navigation/sidebar/sidebar.component.ts
+9
-9
src/app/portal/navigation/topbar/topbar.component.html
src/app/portal/navigation/topbar/topbar.component.html
+8
-1
src/app/portal/navigation/topbar/topbar.component.scss
src/app/portal/navigation/topbar/topbar.component.scss
+42
-0
src/app/portal/navigation/topbar/topbar.component.ts
src/app/portal/navigation/topbar/topbar.component.ts
+9
-3
src/app/portal/portal-dashboard/portal-dashboard.component.scss
...p/portal/portal-dashboard/portal-dashboard.component.scss
+8
-0
src/app/portal/portal/portal.component.html
src/app/portal/portal/portal.component.html
+2
-1
src/app/portal/portal/portal.component.scss
src/app/portal/portal/portal.component.scss
+42
-1
src/app/portal/portal/portal.component.ts
src/app/portal/portal/portal.component.ts
+16
-2
src/app/style-guide/service/initialize-theme.service.ts
src/app/style-guide/service/initialize-theme.service.ts
+9
-1
No files found.
src/app/app.component.ts
View file @
6a581a16
import
{
Component
,
Inject
,
OnInit
,
PLATFORM_ID
}
from
'
@angular/core
'
;
import
{
Router
,
RouterModule
,
RouterOutlet
}
from
'
@angular/router
'
;
import
{
Router
,
RouterModule
,
RouterOutlet
,
NavigationEnd
}
from
'
@angular/router
'
;
import
{
RequestMapperService
}
from
'
./mappers/request-mapper.service
'
;
import
{
InitThemeService
}
from
'
./style-guide/service/initialize-theme.service
'
;
import
{
isPlatformBrowser
}
from
'
@angular/common
'
;
import
{
filter
}
from
'
rxjs
'
;
@
Component
({
selector
:
'
app-root
'
,
...
...
@@ -15,6 +16,7 @@ export class AppComponent implements OnInit{
public
isBrowser
:
boolean
=
false
;
constructor
(
private
router
:
Router
,
private
_themeService
:
InitThemeService
,
@
Inject
(
PLATFORM_ID
)
private
_platformId
:
Object
)
{
...
...
@@ -25,5 +27,19 @@ export class AppComponent implements OnInit{
public
ngOnInit
():
void
{
this
.
router
.
events
.
pipe
(
filter
(
event
=>
event
instanceof
NavigationEnd
)
).
subscribe
((
event
:
any
)
=>
{
// console.log('Route changed:', event.url);
this
.
onRouteChange
(
event
.
url
);
});
}
public
onRouteChange
(
url
:
string
):
void
{
// Custom function to execute on route change
// console.log('Triggered function on route change!', url);
this
.
_themeService
.
updateSidebarState
(
false
);
}
}
src/app/portal/navigation/sidebar/sidebar.component.html
View file @
6a581a16
...
...
@@ -62,5 +62,8 @@
</div>
<div
class=
"theme_mode_changer"
>
<app-theme-mode-changer
/>
</div>
</div>
\ No newline at end of file
src/app/portal/navigation/sidebar/sidebar.component.scss
View file @
6a581a16
...
...
@@ -3,6 +3,7 @@
flex-direction
:
column
;
height
:
100%
;
justify-content
:
space-between
;
position
:
relative
;
}
.sidebar_navigation_container
a
{
...
...
@@ -82,3 +83,25 @@
transform
:
rotate
(
360deg
);
}
}
.theme_mode_changer
{
position
:
absolute
;
bottom
:
0
;
}
@media
only
screen
and
(
max-width
:
999px
)
and
(
min-width
:
300px
)
{
.theme_mode_changer
{
position
:
fixed
;
bottom
:
52px
;
transform
:
translateX
(
80px
);
}
.sidebar_wrapper_inner
{
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
justify-content
:
space-between
;
position
:
relative
;
z-index
:
12
;
}
}
\ No newline at end of file
src/app/portal/navigation/sidebar/sidebar.component.ts
View file @
6a581a16
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Component
,
effect
,
inject
,
OnInit
}
from
'
@angular/core
'
;
import
{
RouterModule
}
from
'
@angular/router
'
;
import
{
Menu
}
from
'
../model/sidebar/menu
'
;
import
{
Sidebar
}
from
'
../interface/sidebar
'
;
//
import { ThemeModeChangerComponent } from '../../../component-library/theme-mode-changer/theme-mode-changer.component';
import
{
ThemeModeChangerComponent
}
from
'
../../../component-library/theme-mode-changer/theme-mode-changer.component
'
;
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
InitThemeService
}
from
'
../../../style-guide/service/initialize-theme.service
'
;
// import { InitThemeService } from '../../../style-guide/service/initialize-theme.service';
@
Component
({
selector
:
'
app-sidebar
'
,
imports
:
[
CommonModule
,
RouterModule
,
//
ThemeModeChangerComponent
ThemeModeChangerComponent
],
templateUrl
:
'
./sidebar.component.html
'
,
styleUrl
:
'
./sidebar.component.scss
'
...
...
@@ -21,12 +23,10 @@ export class SidebarComponent implements OnInit {
public
isNightModeActive
:
boolean
=
false
;
public
ngOnInit
():
void
{
// console.log(this.sideBarNavigationItems)
// TODO: implements Business logics for sidebar. Role base hide show
}
trackById
(
index
:
number
,
item
:
any
):
any
{
return
item
.
id
||
index
;
// Ensure 'item.id' is unique, otherwise fall back to index
}
// trackById(index: number, item: any): any {
// return item.id || index; // Ensure 'item.id' is unique, otherwise fall back to index
// }
}
src/app/portal/navigation/topbar/topbar.component.html
View file @
6a581a16
<div
class=
"topbar_navigation_wrapper"
>
<div
class=
"topbar_logo"
>
<button
class=
"topbar_menu_button"
(click)=
"toggleSidebar()"
>
<span
class=
"material-symbols-outlined"
>
menu
</span>
</button>
<img
[ngSrc]=
"'./assets/image/logo_lamarts.png'"
width=
"200"
...
...
@@ -8,7 +15,7 @@
/>
</div>
<div
class=
"topbar_navigation"
>
<
app-theme-mode-changer
/
>
<
!-- <app-theme-mode-changer /> --
>
<div
class=
"topbar_navigation_items topbar_profile_menu"
>
<img
...
...
src/app/portal/navigation/topbar/topbar.component.scss
View file @
6a581a16
...
...
@@ -97,3 +97,45 @@
}
}
.topbar_menu_button
{
display
:
none
;
}
@media
only
screen
and
(
max-width
:
999px
)
and
(
min-width
:
300px
)
{
.topbar_logo
{
width
:
39%
;
display
:
flex
;
gap
:
10px
;
}
.topbar_menu_button
{
background-color
:
transparent
;
border
:
none
;
display
:
block
;
}
::ng-deep
body
.dark
.topbar_menu_button
{
color
:
white
;
}
.topbar_logo
img
{
max-width
:
70px
;
width
:
79%
;
}
.topbar_profile_menu
.user_profile_info
.user_name
{
font-size
:
12px
;
}
.topbar_profile_menu
.user_profile_info
.user_role
{
font-size
:
10px
;
}
.topbar_profile_menu
.user_profile_info
.user_image
{
width
:
31px
;
height
:
31px
;
}
}
src/app/portal/navigation/topbar/topbar.component.ts
View file @
6a581a16
...
...
@@ -3,13 +3,14 @@ import { Component } from '@angular/core';
import
{
LogoutService
}
from
'
../service/logout.service
'
;
import
{
GetProfileInformationService
}
from
'
../service/get-profile-information.service
'
;
import
{
UserProfile
}
from
'
../../../auth/interface/user-profile
'
;
import
{
ThemeModeChangerComponent
}
from
"
../../../component-library/theme-mode-changer/theme-mode-changer.component
"
;
import
{
InitThemeService
}
from
'
../../../style-guide/service/initialize-theme.service
'
;
// import { ThemeModeChangerComponent } from "../../../component-library/theme-mode-changer/theme-mode-changer.component";
@
Component
({
selector
:
'
app-top-bar
'
,
imports
:
[
NgOptimizedImage
,
ThemeModeChangerComponent
//
ThemeModeChangerComponent
],
templateUrl
:
'
./topbar.component.html
'
,
styleUrl
:
'
./topbar.component.scss
'
...
...
@@ -21,12 +22,17 @@ export class TopBarComponent {
public
isBrowser
:
boolean
=
false
;
constructor
(
private
_logoutService
:
LogoutService
,
private
_getProfileInformation
:
GetProfileInformationService
private
_getProfileInformation
:
GetProfileInformationService
,
private
_themeService
:
InitThemeService
,
)
{
this
.
_fetchProfileDetails
();
}
public
toggleSidebar
():
void
{
this
.
_themeService
.
updateSidebarState
(
true
);
}
public
logout
():
void
{
this
.
_logoutService
.
logout
();
}
...
...
src/app/portal/portal-dashboard/portal-dashboard.component.scss
View file @
6a581a16
...
...
@@ -42,3 +42,11 @@
}
}
}
@media
only
screen
and
(
max-width
:
999px
)
and
(
min-width
:
300px
)
{
.portal_card_colored_card
{
width
:
100%
;
margin-bottom
:
10px
;
}
}
src/app/portal/portal/portal.component.html
View file @
6a581a16
...
...
@@ -4,9 +4,10 @@
<app-top-bar
/>
</div>
<div
class=
"sidebar"
>
<div
class=
"sidebar
{{isSidebarOpen?'active':''}}
"
>
<app-sidebar
/>
</div>
<div
*ngIf=
"isSidebarOpen"
class=
"sidebar_wrapper_inner_overlay"
(click)=
"closeSidebar()"
></div>
<div
class=
"portal_renderer"
>
<div
class=
"portal_renderer_inner"
>
...
...
src/app/portal/portal/portal.component.scss
View file @
6a581a16
...
...
@@ -28,4 +28,45 @@
width
:
100%
;
background-color
:
var
(
--
secondary-bg-color
);
}
@media
only
screen
and
(
max-width
:
999px
)
and
(
min-width
:
300px
)
{
.sidebar
{
width
:
250px
;
background-color
:
var
(
--
secondary-bg-color
);
padding-left
:
20px
;
height
:
100%
;
position
:
fixed
;
left
:
-300px
;
z-index
:
2
;
transition
:
all
.5s
;
&
.active
{
left
:
-21px
;
}
}
.portal_renderer
{
width
:
100%
;
}
.portal_renderer
.portal_renderer_inner
{
width
:
94%
;
border-radius
:
10px
;
padding
:
20px
20px
;
margin
:
0
auto
;
}
}
.sidebar_wrapper_inner_overlay
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
background-color
:
#0b0b0b
94
;
top
:
0
;
left
:
0
;
z-index
:
1
;
}
}
\ No newline at end of file
src/app/portal/portal/portal.component.ts
View file @
6a581a16
import
{
Component
}
from
'
@angular/core
'
;
import
{
Component
,
effect
,
inject
}
from
'
@angular/core
'
;
import
{
RouterOutlet
}
from
'
@angular/router
'
;
import
{
SidebarComponent
}
from
'
../navigation/sidebar/sidebar.component
'
;
import
{
TopBarComponent
}
from
'
../navigation/topbar/topbar.component
'
;
import
{
MatSidenavModule
}
from
'
@angular/material/sidenav
'
;
import
{
InitThemeService
}
from
'
../../style-guide/service/initialize-theme.service
'
;
import
{
CommonModule
}
from
'
@angular/common
'
;
@
Component
({
selector
:
'
app-portal
'
,
...
...
@@ -10,11 +12,23 @@ import {MatSidenavModule} from '@angular/material/sidenav';
RouterOutlet
,
SidebarComponent
,
TopBarComponent
,
MatSidenavModule
MatSidenavModule
,
CommonModule
],
templateUrl
:
'
./portal.component.html
'
,
styleUrl
:
'
./portal.component.scss
'
})
export
class
PortalComponent
{
private
_themeService
=
inject
(
InitThemeService
);
public
isSidebarOpen
=
false
;
constructor
()
{
effect
(()
=>
this
.
isSidebarOpen
=
this
.
_themeService
.
isSidebarOpen
())
}
public
closeSidebar
():
void
{
this
.
_themeService
.
updateSidebarState
(
false
);
}
}
src/app/style-guide/service/initialize-theme.service.ts
View file @
6a581a16
import
{
isPlatformBrowser
}
from
"
@angular/common
"
;
import
{
Inject
,
Injectable
,
PLATFORM_ID
}
from
"
@angular/core
"
;
import
{
effect
,
Inject
,
Injectable
,
PLATFORM_ID
,
signal
}
from
"
@angular/core
"
;
import
{
BehaviorSubject
}
from
"
rxjs
"
;
@
Injectable
({
...
...
@@ -9,9 +9,17 @@ export class InitThemeService {
private
_isBrowser
:
boolean
=
false
;
public
isLightModeActive$
=
new
BehaviorSubject
<
boolean
>
(
false
);
public
isSidebarOpen
=
signal
<
boolean
>
(
false
);
constructor
(@
Inject
(
PLATFORM_ID
)
private
_platformId
:
Object
)
{
this
.
_isBrowser
=
isPlatformBrowser
(
this
.
_platformId
);
}
public
updateSidebarState
(
isOpen
:
boolean
):
void
{
this
.
isSidebarOpen
.
set
(
isOpen
);
}
public
init
():
void
{
if
(
!
this
.
_isBrowser
)
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment