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

Addpage #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 17 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,30 @@
}
}

.joinBtn {
width: 10em;
height: 5ex;
background-color: orange;
border: 2px solid black;
border-radius: 10px;
font-weight: bold;
cursor: pointer;
}

.joinBtn:hover {
width: 15em;
height: 8ex;
background-color: bisque;
}

.App-header {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
color: none;
}

@keyframes App-logo-spin {
Expand Down
45 changes: 36 additions & 9 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,48 @@
import logo from './logo.svg';
import './App.css';
import logo from "./logo.svg";
import "./App.css";
import { useState } from "react";

function App() {
let [countlive, setCount] = useState(0);
let [countbad, setCountb] = useState(0);
return (
<div className="App">
<header className="App-header bg-wed">
<img src={logo} className="App-logo" alt="logo" />
<p className="text-wed-dark">
Welcome to <code>WED</code> Community.
<header className="App-header bg-cookie text-3xl">
<img
src={
"https://www.japan-ex.net/resources/upload/products/SN00012_b.jpg"
}
className="App-logo"
alt="logo"
/>
<p className="text-chocolate text-3xl">
里に <code></code> にようこそ
</p>
<a
className="text-wed-dark underline"
href="https://wed.company/"
className="text-chocolate underline"
href="https://www.meiji.co.jp/products/brand/kinotake/"
target="_blank"
rel="noopener noreferrer"
>
Learn WED
移住する
</a>
<p
onClick={() => {
setCount(countlive + 1);
}}
>
<boton class="joinBtn">🏠{countlive}</boton>
</p>
<p
onClick={() => {
setCountb(countbad + 1);
}}
>
<boton class="joinBtn">👎{countbad}</boton>
</p>

<a href="/newpage" className="text-pastel-red underline">
コミュニティページ
</a>
</header>
</div>
Expand Down
11 changes: 11 additions & 0 deletions src/NewPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function NewPage() {
return (
<div className="NewPage">
<h1>コミュニティページ</h1>
<a>10月のイベントについて</a>
</div>
);
}
export default NewPage;
16 changes: 9 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import NewPage from "./NewPage";

const root = ReactDOM.createRoot(document.getElementById('root'));
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<BrowserRouter>
<Routes>
<Route path="/" element={<App />} />
<Route path="/newpage" element={<NewPage />} />
</Routes>
</BrowserRouter>
</React.StrictMode>
Expand Down
2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module.exports = {
colors: {
wed: '#D2D2C6',
'wed-dark': '#6D695D',
'cookie' :'#f5deb3',
'chocolate': '#8b4513'
},
extend: {
},
Expand Down