Skip to content

Commit

Permalink
Show date posted on smaller viewports
Browse files Browse the repository at this point in the history
  • Loading branch information
flighty committed Oct 28, 2024
1 parent f1fd1f2 commit 5effd8e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Header = () => {
}
{
data.allMarkdownRemark.nodes.map(node => (
<li>
<li key={node.id}>
<Link to={`/${node.frontmatter.slug}`} activeClassName="fly-nav-active">{node.frontmatter.title}</Link>
</li>
))
Expand Down
12 changes: 7 additions & 5 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ const Blog = ({data}) => {
<Layout>
{
data.allMarkdownRemark.nodes.map(node => (
<div className="fly-flex fly-flex-space-between fly-margin-bottom" key={node.id}>
<div>
<Link to={`/${node.frontmatter.slug}`} className="fly-text-lead">{node.frontmatter.title}</Link>
<p className="fly-margin-none-top">{node.frontmatter.description}</p>
<div className="fly-margin-large-bottom" key={node.id}>
<div className="fly-flex fly-flex-space-between fly-margin-bottom fly-flex-break-mobile">
<div>
<Link to={`/${node.frontmatter.slug}`} className="fly-text-lead">{node.frontmatter.title}</Link>
<p className="fly-margin-none">{node.frontmatter.description}</p>
</div>
<p className="fly-margin-none fly-text-muted">{node.frontmatter.date}</p>
</div>
<p className="fly-margin-none-top fly-mobile-only">{node.frontmatter.date}</p>
</div>
))
}
Expand Down
19 changes: 11 additions & 8 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ h1{
flex-wrap: wrap;
}

@media only screen and (max-width: 768px){

.fly-flex-break-mobile{
flex-direction: column;
}
}

/* height */

.fly-full-height{
Expand Down Expand Up @@ -193,6 +200,10 @@ h1{
margin-top: 1.5rem;
}

.fly-margin-large-bottom{
margin-bottom: 1.5rem;
}

/* grid */

.fly-grid{
Expand All @@ -217,16 +228,8 @@ h1{
width: 100%;
}

.fly-mobile-only{
display: none;
}

@media only screen and (min-width: 768px){

.fly-mobile-only{
display: initial;
}

.fly-width-expand-small{
width: initial;
}
Expand Down

0 comments on commit 5effd8e

Please sign in to comment.