File tree Expand file tree Collapse file tree 4 files changed +37
-13
lines changed Expand file tree Collapse file tree 4 files changed +37
-13
lines changed Original file line number Diff line number Diff line change 8989
9090 <!-- Paginator and Repositories -->
9191 < mat-card-content >
92- < mat-paginator #paginator
92+ < mat-paginator
93+ #paginator
9394 [length] ="projects.totalElements "
9495 [pageSize] ="pageSize "
9596 [pageSizeOptions] ="pageSizeOptions "
Original file line number Diff line number Diff line change 11.repository-card {
22 width : 370px ;
3- height : 160 px ;
3+ height : 170 px ;
44 margin : 20px ;
55 -moz-border-radius : 30px ;
66 -webkit-border-radius : 30px ;
1414.repository-card : hover {
1515 transform : scale (1.1 );
1616}
17+
18+ mat-card-header {
19+ padding-right : 3em ;
20+ }
21+
22+ # show-dialog {
23+ bottom : 1.5em ;
24+ right : 1.5em ;
25+ position : absolute;
26+ background-color : # 80c6ff ;
27+ }
Original file line number Diff line number Diff line change 11< mat-card class ="repository-card ">
22 < mat-card-header >
33 < mat-card-title style ="text-align: left ">
4- {{ project.name }}
4+ {{ truncateName() }}
55 </ mat-card-title >
66 < mat-card-subtitle style ="text-align: left ">
77 {{ project.nameSpace }}
88 </ mat-card-subtitle >
99 </ mat-card-header >
1010 < mat-card-content style ="padding-left: 16px ">
11- < p >
12- {{ truncateDescription() }}
13- </ p >
14- < p >
15- < a [href] ="project.url " target ="_blank "> Link zum Repository</ a >
16- </ p >
11+ {{ truncateDescription() }}
1712 </ mat-card-content >
18- < mat-card-actions style ="bottom: 16%; right: 8%; position: absolute ">
19- < button
20- mat-raised-button
21- style ="background-color: #80c6ff "
13+ < mat-card-actions >
14+ < a
15+ mat-button
16+ [href] ="project.url "
17+ target ="_blank "
18+ style ="top: 1em; right: 1em; position: absolute "
19+ >
20+ < mat-icon > code</ mat-icon >
21+ </ a >
22+ < button id ="show-dialog "
23+ mat-flat-button
2224 (click) ="openDetailsDialog() "
2325 >
2426 Anzeigen
Original file line number Diff line number Diff line change @@ -34,4 +34,14 @@ export class RepositoryComponent {
3434 return this . project . description . substring ( 0 , 100 ) + '...' ;
3535 }
3636 }
37+
38+ truncateName ( ) {
39+ if ( this . project . name == '' ) {
40+ return 'Kein Name Vorhanden'
41+ } else if ( this . project . name . length <= 40 ) {
42+ return this . project . name ;
43+ } else {
44+ return this . project . name . substring ( 0 , 40 ) + '...'
45+ }
46+ }
3747}
You can’t perform that action at this time.
0 commit comments