Skip to content

Commit 3c4fbe5

Browse files
committed
fix(): refine show cases
1 parent 3b9651a commit 3c4fbe5

File tree

3 files changed

+51
-31
lines changed

3 files changed

+51
-31
lines changed
12.5 KB
Loading

bricks/ai-portal/src/show-cases/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import "@next-core/theme";
55
import { initializeI18n } from "@next-core/i18n";
66
import type { Link, LinkProps } from "@next-bricks/basic/link";
77
import { get } from "lodash";
8-
import { K, NS, locales, t } from "./i18n.js";
9-
import styleText from "./styles.shadow.css";
108
import classNames from "classnames";
119
import { getBasePath } from "@next-core/runtime";
10+
import { K, NS, locales, t } from "./i18n.js";
11+
import styleText from "./styles.shadow.css";
1212

1313
initializeI18n(NS, locales);
1414

@@ -109,7 +109,11 @@ function ShowCasesComponent({ list, taskUrlTemplate }: ShowCasesProps) {
109109
}}
110110
/>
111111
) : (
112-
<span>{item.summary}</span>
112+
<span className="summary-1">
113+
<span className="summary-2">
114+
<span>{item.summary}</span>
115+
</span>
116+
</span>
113117
)}
114118
</span>
115119
<span className="title">

bricks/ai-portal/src/show-cases/styles.shadow.css

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,14 @@
5252
.cases {
5353
display: grid;
5454
width: 100%;
55-
grid-template-columns: repeat(auto-fill, minmax(284px, 1fr));
56-
gap: 20px;
55+
grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
56+
gap: 24px;
5757
margin-top: 2em;
5858
}
5959

6060
.link {
61-
background: rgba(255, 255, 255, 0.9);
62-
box-shadow:
63-
0px 1px 2px rgba(46, 41, 51, 0.08),
64-
0px 2px 4px rgba(71, 63, 79, 0.08);
61+
background: #fefefe;
62+
border: 1px solid #e8e9ec;
6563
border-radius: 12px;
6664
overflow: hidden;
6765
display: block;
@@ -71,19 +69,18 @@
7169
display: flex;
7270
gap: 0;
7371
flex-direction: column;
74-
height: 200px;
72+
height: 218px;
7573
}
7674

7775
.title {
78-
font-size: 16px;
79-
line-height: 24px;
8076
width: 100%;
81-
height: 80px;
82-
padding: 16px 15px 15px;
77+
height: 76px;
78+
padding: 16px 16px 15px;
8379
color: #262626;
84-
border: 1px solid rgba(35, 33, 41, 0.05);
85-
border-top: 0;
86-
border-radius: 0 0 12px 12px;
80+
border-top: 1px solid #e8e9ec;
81+
font-weight: 500;
82+
font-size: 15px;
83+
line-height: 22px;
8784

8885
span {
8986
display: -webkit-box;
@@ -96,23 +93,14 @@
9693

9794
.placeholder {
9895
width: 100%;
99-
background: #f8f8f8;
100-
border: 1px solid rgba(35, 33, 41, 0.05);
101-
border-radius: 12px 12px 0 0;
102-
height: 120px;
96+
height: 142px;
97+
background: linear-gradient(308deg, #dee9fc 0%, #fcfbfd 100%, #fbf9fe 100%);
98+
overflow: hidden;
10399
}
104100

105101
.summary {
106102
color: rgba(0, 0, 0, 0.65);
107-
padding: 15px;
108-
109-
span {
110-
display: -webkit-box;
111-
-webkit-line-clamp: 4;
112-
line-clamp: 4;
113-
-webkit-box-orient: vertical;
114-
overflow: hidden;
115-
}
103+
padding: 27px 0 0 24px;
116104
}
117105

118106
.thumbnail span {
@@ -125,9 +113,37 @@
125113
}
126114

127115
.link:hover {
128-
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
116+
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.06);
129117

130118
.title {
131119
color: var(--elevo-color-brand);
132120
}
133121
}
122+
123+
.summary-1 {
124+
display: block;
125+
background-image: url("./images/[email protected]");
126+
background-size: 237px 115px;
127+
background-repeat: no-repeat;
128+
background-position: 0 0;
129+
padding: 10px 0 0 10px;
130+
}
131+
132+
.summary-2 {
133+
display: block;
134+
background: linear-gradient(90deg, #ffffff 0%, #e4ecfc 100%);
135+
padding: 12px 15px 5px 15px;
136+
border-top-left-radius: 12px;
137+
138+
span {
139+
display: -webkit-box;
140+
-webkit-line-clamp: 4;
141+
line-clamp: 4;
142+
-webkit-box-orient: vertical;
143+
overflow: hidden;
144+
font-size: 15px;
145+
color: #525971;
146+
line-height: 22px;
147+
height: 88px;
148+
}
149+
}

0 commit comments

Comments
 (0)