diff --git a/client/src/App.css b/client/src/App.css index 3e88ba8f..4223ef20 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -1,5 +1,8 @@ .App { text-align: center; + padding-left: 60vmin; + padding-right: 60vmin; + background-color: #282c34; } .App-logo { @@ -14,7 +17,6 @@ } .App-header { - background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; @@ -41,6 +43,8 @@ text-align: left; padding: 1em; border: 1px solid black; - - + width: 100%; +} +.Page-contents pre { + width: 100%; } diff --git a/client/src/EditPage.jsx b/client/src/EditPage.jsx index 47275634..024ac25a 100644 --- a/client/src/EditPage.jsx +++ b/client/src/EditPage.jsx @@ -4,7 +4,7 @@ import './App.css'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import { useParams, useNavigate } from 'react-router-dom'; import { useState } from 'react'; -import { apiUrl, fetchPage, postPage, deletePage } from './clientStuff.jsx'; +import { apiUrl, fetchPage, postPage, deletePage } from './apiTools.jsx'; function PageView() { const queryClient = useQueryClient(); @@ -56,43 +56,42 @@ function PageView() { navigate(`/`); } - return (
-
- logo -
-

- {pagenumber}. - -

-
- { ready ? - <> -
-
-              
- - - - : +
+ logo +
+

+ {pagenumber}. + +

+
+ { ready ? + <>
- { fetchQuery.isPending ? "Loading..." : JSON.stringify(fetchQuery.error) } +
             
- } -
+ + + + : +
+ { fetchQuery.isPending ? "Loading..." : JSON.stringify(fetchQuery.error) } +
+ } +
); } diff --git a/client/src/Landing.jsx b/client/src/Landing.jsx index b66ea330..cc3111ff 100644 --- a/client/src/Landing.jsx +++ b/client/src/Landing.jsx @@ -1,14 +1,16 @@ import logo from './logo.svg'; import './App.css'; -import { useNavigate } from 'react-router-dom' +import { useNavigate, Link } from 'react-router-dom' import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; -import { apiUrl, fetchPageList, postNewPage } from './clientStuff.jsx'; +import { apiUrl, fetchPageList, postNewPage } from './apiTools.jsx'; +import { useFixLinks } from './clientStuff.jsx'; function Landing() { const queryClient = useQueryClient(); const navigate = useNavigate(); + const noLoad = useFixLinks(); const { isPending, error, data } = useQuery({ // fetch the currrent values queryKey: ['pages'], queryFn: fetchPageList @@ -38,8 +40,8 @@ function Landing() {