-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated home page and blog detail page ui #46
Changes from 46 commits
915fc92
dbbfcf2
29b055b
90003dc
e3f21af
3cf5374
fbaf6db
fdf764f
2296572
9216d8b
5d2ff5a
0b11333
fc82441
295d6fb
3f3e10d
f215722
0487314
05a1ab5
d88bb88
e7b4e8b
423f64c
8541b04
c260c26
02e7aa1
fc6b0ee
8b09c0b
d040211
930fbe4
4fd029d
0e26d15
f58a891
1518a0f
3338c50
031a18d
b8ad116
5e08ff6
92905d8
2fcaba7
c64776c
4145d25
9cd95a4
f7e2620
7fbba3e
5474d81
c9a4a40
e51ffdc
fd84980
16624ee
d1022ed
af01de3
86823fd
d6fe348
6dde99e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/* use styles based on live milo libs */ | ||
@import "https://main--milo--adobecom.hlx.live/libs/blocks/section-metadata/section-metadata.css"; | ||
@import "https://main--milo--adobecom.hlx.live/libs/blocks/media/media.css"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is problematic, using The better approach would be to use libs utils and load them via JS. We don't want I would almost opt for most of this CSS living in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the flag. Followed Momiko's advice on using |
||
@import "../banner/banner.css"; | ||
|
||
.article-grid { | ||
position: relative; | ||
opacity: 0; | ||
padding-bottom: var(--spacing-l); | ||
} | ||
|
||
/* spinner styles in style */ | ||
.article-grid .loading-container { | ||
width: 100%; | ||
height: 70vh; | ||
position: relative; | ||
} | ||
|
||
.article-grid .article-grid-result { | ||
opacity: 0; | ||
transition: opacity 0.3s ease-in-out; | ||
} | ||
|
||
.article-grid.loading { | ||
opacity: 1; | ||
} | ||
|
||
.article-grid.ready .loading-container { | ||
display: none; | ||
} | ||
|
||
.article-grid.ready .article-grid-result { | ||
opacity: 1; | ||
} | ||
|
||
.article-grid .media .text .description { | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
min-height: 3.2rem; | ||
} | ||
|
||
.article-grid .media { | ||
padding: 0; | ||
} | ||
|
||
.article-grid a.media .image { | ||
border-radius: 8px; | ||
} | ||
|
||
.article-grid .media .image img { | ||
width: 100%; | ||
aspect-ratio: 16 / 9; | ||
object-fit: cover; | ||
border-radius: 8px; | ||
overflow: hidden; | ||
} | ||
|
||
.article-grid .con-button::first-letter { | ||
text-transform: capitalize; | ||
} | ||
|
||
.article-grid a.media:hover .con-button { | ||
background-color: var(--color-black); | ||
border-color: var(--color-black); | ||
color: var(--color-white); | ||
text-decoration: none; | ||
} | ||
|
||
div.article-grid .media .foreground > div.media-row { | ||
padding: 0; | ||
} | ||
|
||
.article-grid .banner { | ||
max-width: none; | ||
aspect-ratio: 1 / 1; | ||
} | ||
|
||
.article-grid .banner, | ||
.article-grid .banner .banner-contents { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
} | ||
|
||
.article-grid .banner .content-wrapper { | ||
box-sizing: border-box; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.article-grid .load-more-container { | ||
grid-column: 1 / -1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
@media (min-width: 700px) { | ||
.article-grid .article-grid-result { | ||
snowiewdev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
gap: var(--spacing-l) var(--spacing-m); | ||
} | ||
|
||
.article-grid.hide-odd-item-on-tablet .article-grid-result > a:last-of-type:nth-child(odd) { | ||
display: none; | ||
} | ||
} | ||
|
||
@media (min-width: 768px) { | ||
snowiewdev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.article-grid .media .text h2 { | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are the vendor prefixes needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp |
||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
min-height: 2.8rem; | ||
} | ||
} | ||
|
||
@media (min-width: 1070px) { | ||
snowiewdev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.article-grid.hide-odd-item-on-tablet .article-grid-result > a:last-of-type:nth-child(odd) { | ||
display: flex; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to use the loadstyle method https://github.com/search?q=repo%3Aadobecom%2Fblog%20loadstyle&type=code or as @rgclayton suggested, have this live in a more general file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! Used
loadStyle
instead of@import
, thankss