File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
app/reader/_components/main-page/posts-list Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 55 class ="shadow-lg bg-white p-4 sm:p-6 sm:px-14 rounded-[32px] sm:rounded-[64px] overflow-x-scroll hide-scrollbar whitespace-nowrap scroll-smooth "
66 >
77 < div class ="inline-flex space-x-4 gap-x-0 md:gap-x-6 ">
8- @for (tag of tags(); track tag.name ) {
8+ @for (tag of tags(); track tag.id ) {
99 < div class ="flex flex-col items-center min-w-24 group ">
1010 < div
1111 [ngStyle] ="{ 'background-color': tag.color } "
Original file line number Diff line number Diff line change @@ -35,17 +35,17 @@ import { TagsStore } from '../../../../shared/stores/tags.store';
3535} )
3636export class PostsListComponent implements OnInit {
3737 scroll = viewChild < ElementRef < HTMLElement > > ( 'scrollContainer' ) ;
38- scrollProgress : WritableSignal < number > = signal ( 0 ) ;
38+
3939 postStore = inject ( PostsStore ) ;
4040 tagsStore = inject ( TagsStore ) ;
4141
42+ scrollProgress : WritableSignal < number > = signal ( 0 ) ;
4243 posts = this . postStore . posts ;
4344 tags = this . tagsStore . tags ;
44-
45- initialScroll = 2 ;
45+ initialTagScrollProgressBarForMobile = 2 ;
4646
4747 constructor ( ) {
48- this . initializeScrolling ( ) ;
48+ this . initializeScrollingForMobileView ( ) ;
4949 }
5050
5151 ngOnInit ( ) {
@@ -68,8 +68,8 @@ export class PostsListComponent implements OnInit {
6868 setTimeout ( ( ) => { } , 0 ) ;
6969 }
7070
71- private initializeScrolling ( ) : void {
72- this . scrollProgress . set ( this . initialScroll ) ;
71+ private initializeScrollingForMobileView ( ) : void {
72+ this . scrollProgress . set ( this . initialTagScrollProgressBarForMobile ) ;
7373 afterNextRender ( ( ) => {
7474 this . scroll ( ) ?. nativeElement . addEventListener (
7575 'scroll' ,
Original file line number Diff line number Diff line change 1- @use ' tailwindcss/utilities' ;
21@import " ../node_modules/quill/dist/quill.core.css" ;
32@import " ../node_modules/quill/dist/quill.snow.css" ;
43@import ' highlight.js/styles/atom-one-dark.css' ;
8180 @apply bg-gray-300 text-gray-500 cursor-not-allowed ;
8281}
8382
83+ /* Import TailwindCSS */
84+ @import ' tailwindcss/utilities' ;
8485
8586/* Additional styles for the card component */
8687.post-card {
You can’t perform that action at this time.
0 commit comments