Skip to content

Commit fec1b38

Browse files
committed
hide bottom nav on mobile
1 parent 00293f2 commit fec1b38

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

reactjsfoundations.com/public/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,24 @@
102102
width: 50px;
103103
padding: 8px;
104104
}
105+
.blog__title {
106+
text-align: center;
107+
color: #fff;
108+
background-color: #000;
109+
padding: 8px;
110+
}
111+
.blog__posts {
112+
text-align: left;
113+
border: 1px solid #999;
114+
padding: 8px;
115+
}
116+
.post__title {
117+
color: #333;
118+
}
105119

120+
.post__content {
121+
color: #333;
122+
}
106123
@media only screen and (max-width: 480px) {
107124
.container {
108125
display: block;

reactjsfoundations.com/src/WpBlog.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { QueryClient, QueryClientProvider, useQuery } from 'react-query';
22
import { useState } from 'react';
3-
import styles from './wp-blog.module.css';
43
import { useParams } from 'react-router-dom';
54

65
const queryClient = new QueryClient();
@@ -54,8 +53,8 @@ function ReactBlog(props) {
5453
return <div>Loading...</div>;
5554
}
5655
return (
57-
<div className={styles.blog__posts}>
58-
<h2 className={styles.blog__title}>{props.title}</h2>
56+
<div className="blog__posts">
57+
<h2 className="blog__title">{props.title}</h2>
5958
<div style={{ textAlign: 'center' }}>
6059
{page > 1 && <button onClick={handlePrevPage}>Newer posts</button>}{' '}
6160
{page + 1 <= totalPages && (
@@ -66,13 +65,13 @@ function ReactBlog(props) {
6665
<div key={post.id}>
6766
<h2>
6867
<section
69-
className={styles.post__title}
68+
className="post__title"
7069
dangerouslySetInnerHTML={{ __html: post.title.rendered }}
7170
/>
7271
</h2>
7372

7473
<section
75-
className={styles.post__content}
74+
className="post__content"
7675
dangerouslySetInnerHTML={{ __html: post.content.rendered }}
7776
/>
7877

reactjsfoundations.com/src/WpBlogSP.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ export default function ReactBlog(props) {
2222

2323
if (post) {
2424
return (
25-
<div className={styles.blog__posts}>
26-
<h1 className={styles.blog__title}>{post.title.rendered}</h1>
25+
<div className="blog__posts">
26+
<h1 className="blog__title">{post.title.rendered}</h1>
2727
<div key={post.id}>
2828
<section
29-
className={styles.post__content}
29+
className="post__content"
3030
dangerouslySetInnerHTML={{ __html: post.content.rendered }}
3131
/>
3232
</div>

0 commit comments

Comments
 (0)