Skip to content

Commit

Permalink
Merge pull request #145 from python-spain/remove_twitter
Browse files Browse the repository at this point in the history
Remove twitter column and add a three column layout
  • Loading branch information
alexgmin authored Mar 7, 2024
2 parents dda349b + cf1c442 commit 7f255f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 34 deletions.
4 changes: 2 additions & 2 deletions src/components/PostList.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import Post from './Post';

const PostList = ({ posts, twoColumns }) => {
const PostList = ({ posts, threeColumns }) => {
return (
<div
className={`row row-cols-1 row-cols-md-2 ${
twoColumns ? 'row-cols-lg-2' : 'row-cols-lg-3'
threeColumns ? 'row-cols-lg-3' : 'row-cols-lg-4'
}`}
>
{posts.map((post) => (
Expand Down
25 changes: 0 additions & 25 deletions src/components/Twitter.js

This file was deleted.

10 changes: 3 additions & 7 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { graphql } from 'gatsby';
import Helmet from 'react-helmet';
import SEO from '../components/SEO';
import Layout from '../components/Layout';
import Twitter from '../components/Twitter';
import PostList from '../components/PostList';
import HeroImage from '../components/HeroImage';
import FeaturesHome from '../components/FeaturesHome';
Expand Down Expand Up @@ -55,12 +54,9 @@ const Home = (props) => {

<div className='mt-8 mb-3'>
<div className='row'>
<div className='col-12 col-lg-8'>
<div className='col-12 col-lg-12'>
<h1>Últimos posts</h1>
<PostList posts={lastPosts} twoColumns />
</div>
<div className='col-12 col-lg-4'>
<Twitter />
<PostList posts={lastPosts} threeColumns />
</div>
</div>
</div>
Expand Down Expand Up @@ -115,7 +111,7 @@ export const query = graphql`
posts: allMarkdownRemark(
filter: { fileAbsolutePath: { regex: "/posts/.*/" } }
sort: { fields: [frontmatter___date], order: DESC }
limit: 2
limit: 3
) {
edges {
node {
Expand Down

0 comments on commit 7f255f7

Please sign in to comment.