File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { DOCUMENT } from '@angular/common' ;
2+ import { IMAGE_LOADER , ImageLoaderConfig } from '@angular/common' ;
13import { ApplicationConfig , provideBrowserGlobalErrorListeners } from '@angular/core' ;
24
35export const appConfig : ApplicationConfig = {
46 providers : [
57 provideBrowserGlobalErrorListeners ( ) ,
6-
7- ]
8+ {
9+ provide : IMAGE_LOADER ,
10+ useFactory : ( document : Document ) => ( config : ImageLoaderConfig ) : string => {
11+ const base = document . querySelector ( 'base' ) ?. getAttribute ( 'href' ) ?? '/' ;
12+ const baseNormalized = base . endsWith ( '/' ) ? base . slice ( 0 , - 1 ) : base ;
13+ return baseNormalized + config . src ;
14+ } ,
15+ deps : [ DOCUMENT ] ,
16+ } ,
17+ ] ,
818} ;
Original file line number Diff line number Diff line change 44@layer base {
55 [role = ' button' ],
66 button {
7- @apply inline-flex items-center justify-center gap-2 px-4 py-2 border-2 border- (--color-primary ) rounded- (--radius ) text-base font-semibold no-underline cursor-pointer transition-colors bg- (--color-primary ) text-white ;
7+ display : inline-flex ;
8+ align-items : center ;
9+ justify-content : center ;
10+ gap : 0.5rem ;
11+ padding : 0.5rem 1rem ;
12+ border : 2px solid var (--color-primary );
13+ border-radius : var (--radius );
14+ font-size : 1rem ;
15+ font-weight : 600 ;
16+ text-decoration : none ;
17+ cursor : pointer ;
18+ transition-property : color , background-color , border-color ;
19+ transition-timing-function : cubic-bezier (0.4 , 0 , 0.2 , 1 );
20+ transition-duration : 150ms ;
21+ background-color : var (--color-primary );
22+ color : #fff ;
823
924 svg {
10- @apply shrink-0 fill-current ;
25+ flex-shrink : 0 ;
26+ fill : currentColor ;
1127 }
1228
1329 & :hover {
14- @apply bg- (--color-primary-hover ) border- (--color-primary-hover ) text-white ;
30+ background-color : var (--color-primary-hover );
31+ border-color : var (--color-primary-hover );
32+ color : #fff ;
1533 }
1634 }
1735}
You can’t perform that action at this time.
0 commit comments