Skip to content

Commit 0777d58

Browse files
Merge pull request #1008 from C2DH/1006-dashboard-articles-details-page---change-text-align-to-right
1006 dashboard articles details page change text align to right
2 parents a332189 + 67aacf3 commit 0777d58

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/dashboard/pages/Detail.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ const Detail = ({ endpoint }) => {
114114
''
115115
)}
116116
</div>
117-
{contactFields.map(({ label, value }) => (
118-
<FieldRow key={label} label={label} value={value} />
119-
))}
117+
<div className="contact-info">
118+
{contactFields.map(({ label, value }) => (
119+
<FieldRow key={label} label={label} value={value} />
120+
))}
121+
</div>
120122
</SmallCard>
121123
<div className="card-authors">
122124
{authors.length > 0 ? (

src/dashboard/styles/pages/detail.css

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
grid-template-columns: max-content max-content;
2323
align-items: center;
2424
justify-content: space-between;
25+
gap: var(--gap-size-1);
2526
}
2627

2728
/* FieldRow css */
@@ -31,7 +32,8 @@
3132
}
3233

3334
.label {
34-
text-align: left;
35+
text-align: right;
36+
margin-right: var(--gap-size-5);
3537
min-width: 150px;
3638
font-weight: bold;
3739
}
@@ -80,24 +82,25 @@ a {
8082
opacity: 0.6;
8183
}
8284

83-
/* AUTHOR */
84-
.author-info {
85+
.contact-info {
8586
display: flex;
8687
flex-direction: column;
8788
gap: var(--gap-size-1);
8889
}
8990

90-
.author-info > .item > .label {
91-
min-width: 50px;
91+
/* AUTHOR */
92+
.author-info {
93+
display: flex;
94+
align-items: start;
95+
flex-direction: column;
96+
gap: var(--gap-size-1);
9297
}
9398

9499
.author-info > .item > .value {
95-
margin-left: var(--gap-size-0);
96-
max-width: 150px;
100+
flex-grow: 1;
97101
}
98102

99103
/* RESPONSIVE */
100-
101104
@media (min-width: 2000px) {
102105
.detail-grid {
103106
display: grid;
@@ -131,7 +134,7 @@ a {
131134
}
132135

133136
/* Tablet or small screen view */
134-
@media (max-width: 1200px) {
137+
@media (max-width: 1300px) {
135138
.detail-grid {
136139
display: grid;
137140
grid-template-areas:
@@ -160,6 +163,7 @@ a {
160163
.author-info > .item > .value {
161164
margin-left: var(--gap-size-0);
162165
max-width: 100%;
166+
padding: 0;
163167
}
164168
}
165169

@@ -169,14 +173,8 @@ a {
169173
display: flex;
170174
flex-direction: column;
171175
gap: var(--gap-size-2);
172-
grid-template-areas:
173-
'i'
174-
'l'
175-
'c'
176-
'a'
177-
'a'
178-
'u';
179176
}
177+
180178
a {
181179
text-overflow: ellipsis;
182180
overflow: hidden;

0 commit comments

Comments
 (0)