Skip to content
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

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
915fc92
article v3 ui init
snowiewdev Jul 15, 2024
dbbfcf2
article v3 ui minor update
snowiewdev Jul 15, 2024
29b055b
eslint fix
snowiewdev Jul 15, 2024
90003dc
cleanup
snowiewdev Jul 16, 2024
e3f21af
home v2 ui init
snowiewdev Jul 17, 2024
3cf5374
added bg-gradient-red for banner
snowiewdev Jul 17, 2024
fbaf6db
text block heading font weight bolder
snowiewdev Jul 17, 2024
fdf764f
minor styles update
snowiewdev Jul 18, 2024
2296572
article-grid wip
snowiewdev Jul 19, 2024
9216d8b
article detail: sidebar link sharing function
snowiewdev Jul 19, 2024
5d2ff5a
merged for latest update
snowiewdev Jul 19, 2024
0b11333
article grid: init for support of banner + latest articles
snowiewdev Jul 19, 2024
fc82441
progress bar init
snowiewdev Jul 24, 2024
295d6fb
move progress bar to be under the nav
snowiewdev Jul 24, 2024
3f3e10d
home v2 minor ui update
snowiewdev Jul 31, 2024
f215722
article-grid: update to support select articles by links + load more …
snowiewdev Jul 31, 2024
0487314
Merge branch 'article-grid' into article-v3
snowiewdev Jul 31, 2024
05a1ab5
merged article-grid block
snowiewdev Jul 31, 2024
d88bb88
home v2: transition fix
snowiewdev Jul 31, 2024
e7b4e8b
home v2: article-grid added spinner animation on load
snowiewdev Jul 31, 2024
423f64c
article-grid: moved styles from styles.css to block
snowiewdev Aug 1, 2024
8541b04
article home v3: test for gradient circle background
snowiewdev Aug 9, 2024
c260c26
minor update on gradient hero
snowiewdev Aug 9, 2024
02e7aa1
article v3 home minor ui update
snowiewdev Aug 9, 2024
fc6b0ee
home + blog detail page ui update
snowiewdev Sep 10, 2024
8b09c0b
cleanup & update on home hero responsive gradient
snowiewdev Sep 10, 2024
d040211
switched whole banner + article grid media card to be link element & …
snowiewdev Sep 10, 2024
930fbe4
added hover style for masonry brick cards
snowiewdev Sep 10, 2024
4fd029d
new home: ui fix
snowiewdev Sep 19, 2024
0e26d15
blog detail: ui fix
snowiewdev Sep 19, 2024
f58a891
blog detail: sidebar alignment fix
snowiewdev Sep 19, 2024
1518a0f
added hide-odd-item-on-tablet class for article-grid
snowiewdev Sep 20, 2024
3338c50
blog detail polish
snowiewdev Sep 20, 2024
031a18d
cleanup
snowiewdev Sep 20, 2024
b8ad116
gradient asset update
snowiewdev Sep 20, 2024
5e08ff6
blog detail: article meta ordering fix
snowiewdev Sep 20, 2024
92905d8
added additional checking for identifying blog page
snowiewdev Sep 20, 2024
2fcaba7
cleanup
snowiewdev Sep 20, 2024
c64776c
cleanup
snowiewdev Sep 20, 2024
4145d25
minor fix
snowiewdev Sep 20, 2024
9cd95a4
refactoring + lint fix
snowiewdev Sep 23, 2024
f7e2620
revert lint update
snowiewdev Sep 23, 2024
7fbba3e
removed addContentTypeToMainClass & added hero-masonry class for maso…
snowiewdev Sep 24, 2024
5474d81
updated blogPage identifier in setup sidebar layout to be based on co…
snowiewdev Sep 24, 2024
c9a4a40
renamed isBlogPage to isArticlePage
snowiewdev Sep 24, 2024
e51ffdc
article-meta: switch to reuse milo social block
snowiewdev Sep 25, 2024
fd84980
nit fix
snowiewdev Sep 26, 2024
16624ee
article grid: updated breakpoints & removed dependencies to section s…
snowiewdev Sep 26, 2024
d1022ed
remove @import css reference to milo & use loadStyle instead
snowiewdev Sep 26, 2024
af01de3
typo fix
snowiewdev Sep 26, 2024
86823fd
moved article related functions into articles.js
snowiewdev Sep 27, 2024
d6fe348
minor update on blog styles
snowiewdev Oct 3, 2024
6dde99e
used editorial board for topic section & removed related css style & …
snowiewdev Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions blocks/article-grid/article-grid.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
@import "../banner/banner.css";

.article-grid {
position: relative;
opacity: 0;
padding-bottom: var(--spacing-l);
}

.article-grid .article-grid-result {
display: grid;
grid-template-columns: 1fr;
gap: var(--spacing-m);
padding: var(--spacing-l) 0;
opacity: 0;
transition: opacity 0.3s ease-in-out;
width: var(--grid-container-width);
margin: 0 auto;
}

/* spinner styles in style */
.article-grid .loading-container {
width: 100%;
height: 70vh;
position: relative;
}

.article-grid.loading {
opacity: 1;
}

.article-grid.ready .loading-container {
display: none;
}

.article-grid.ready .article-grid-result {
opacity: 1;
}

/* media */
.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 .media > .foreground {
width: 100%;
}

.article-grid .media > .foreground .media-row {
display: flex;
flex-direction: column;
align-items: start;
width: 100%;
gap: var(--spacing-s);
}

.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 .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;
}

/* banner */
.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: 600px) {
.article-grid .article-grid-result {
snowiewdev marked this conversation as resolved.
Show resolved Hide resolved
grid-template-columns: repeat(2, 1fr);
gap: var(--spacing-l) var(--spacing-m);
width: var(--grid-container-width);
margin-left: auto;
margin-right: auto;
}

.article-grid.hide-odd-item-on-tablet .article-grid-result > a:last-of-type:nth-child(odd) {
display: none;
}

.article-grid .media .text h2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the vendor prefixes needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp
The -webkit property is needed for the line clamp function to work, let me know if this needs to be updated further

overflow: hidden;
text-overflow: ellipsis;
min-height: 2.8rem;
}
}

@media (min-width: 900px) {
.article-grid .article-grid-result {
grid-template-columns: repeat(3, 1fr);
}

.article-grid.hide-odd-item-on-tablet .article-grid-result > a:last-of-type:nth-child(odd) {
display: flex;
}
}
Loading