Skip to content

Commit 4adcfdd

Browse files
committed
Cleanup page layout
- Add help to home page - Fix up graphics used my manifest and html meta
1 parent 8960b22 commit 4adcfdd

12 files changed

+57
-10
lines changed

public/apple-touch-icon.png

1.26 KB
Loading

public/favicon.ico

1.26 KB
Binary file not shown.

public/favicon.png

1.26 KB
Loading

public/icon-192x192.png

1.44 KB
Loading

public/icon-512x512.png

2.03 KB
Loading

public/img/template-carousel.jpg

131 KB
Loading

public/img/tutorial-1.png

37.5 KB
Loading

src/App.css

+8
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,11 @@
3838
.cm-tooltip-below, .cm-tooltip {
3939
background-color: rgba(255, 254, 218, 0.95) !important;
4040
}
41+
42+
.zoom-05 {
43+
zoom: 0.5;
44+
}
45+
46+
.zoom-066 {
47+
zoom: 0.667;
48+
}

src/App.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import "react-toastify/dist/ReactToastify.css";
66
import "./App.css";
77
import {Fragment, useState} from "react";
88
import {BlogEditorPage} from "./pages/BlogEditorPage.tsx";
9-
import {NavList, Header, Title, NavMenuButton, PrimaryNav, Grid, GridContainer,} from "@trussworks/react-uswds";
9+
import {Header, PrimaryNav, Grid, GridContainer, Title,} from "@trussworks/react-uswds";
1010
import {HomePage} from "./pages/HomePage.tsx";
1111
import {AboutPage} from "./pages/AboutPage.tsx";
1212

@@ -33,6 +33,8 @@ function App() {
3333
return (
3434
<Fragment>
3535
<Header basic>
36+
<div className={"float-left position-absolute top-1 left-105 text-bold"}>
37+
Website Content Editor</div>
3638
<div className="usa-nav-container">
3739
<PrimaryNav
3840
aria-label="Primary navigation"
@@ -55,7 +57,6 @@ function App() {
5557
id="main-content"
5658
role={"main"}
5759
>
58-
<h1>Website Content Editor</h1>
5960
{PAGES_MAP[page]}
6061
</main>
6162
</Grid>

src/pages/AboutPage.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {Fragment} from "react";
2+
import {Link} from "@trussworks/react-uswds";
23

34
export const AboutPage = () => {
45
return (<Fragment>
@@ -7,7 +8,8 @@ export const AboutPage = () => {
78
<div className="grid-row tablet:flex-row-reverse">
89
<div
910
className="tablet:grid-col-8 desktop:grid-col-12 margin-bottom-9 tablet:padding-right-4 site-c-project-content usa-prose">
10-
[Who knows if this is useful. Maybe link to the github]
11+
See github repo for more information:
12+
<Link target={"_blank"} className={"usa-link--external"} href="https://github.com/usds/website-content-editor">https://github.com/usds/website-content-editor</Link>
1113
</div>
1214
</div>
1315
</div>

src/pages/HomePage.tsx

+42-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,50 @@ import {Fragment} from "react";
33
export const HomePage = () => {
44
return (<Fragment>
55
<p className="usa-intro">
6-
The page heading communicates the main focus of the page. Make
7-
your page heading descriptive and keep it succinct.
8-
</p>
9-
<h2 id="section-heading-h2">Section heading (h2)</h2>
6+
This site is static only and <strong>all data</strong> is saved into your local browser.
7+
</p>
8+
<p>
9+
Build website posts with fewer mistakes. The intuitive rich text editor lets you see exactly
10+
how your page will look as you create it. Save your work anytime by downloading a zip file
11+
containing your edits and all associated images.
12+
</p>
1013

11-
<p>
14+
<p><strong>Click <i>Blog Edit</i> in the top nav to begin.</strong></p>
15+
<h2 id="section-heading-2">Basic features</h2>
1216

13-
</p>
17+
<img src={"./img/tutorial-1.png"} alt={"screenshot of rich editor toolbar"} className={"zoom-066"}/>
18+
<p>
19+
Besides the typical rich text editor buttons, there are some specialized buttons that are
20+
the most handy.
21+
</p>
22+
<ul>
23+
<li>Crabby will display the page meta information (aka "Frontmatter yaml header" in technobabel) as guided form,
24+
to help
25+
you avoid common mistakes.
26+
</li>
27+
<li>Inserting images will display them in the page and save them when you Download the results.
28+
For best results, correctly size images outside before uploading and use .jpg for faster rendering.
29+
</li>
30+
<li>The buttons on the right toggle between Markdown and Rich Text views.</li>
31+
</ul>
32+
33+
<p>
34+
Once you are satisfied with your edits, download the markdown and all related images.
35+
They are saved locally as a zip file. The file and folder names are all correctly reflected in the markdown.
36+
37+
</p>
38+
39+
<p>
40+
All you have to do is move (aka drag and drop) the files/folders into thee correct location in the Finder.
41+
The edits will show up in Github Desktop ready to be git committed into a branch.<br/><br/>
42+
[Graphic/video showing drag-and-drop in Finder then Github Desktop Commit]
43+
</p>
44+
<h2 id="section-heading-3">Tips and tricks</h2>
45+
<ul>
46+
<li>Paste in rich text directly into the editor and let it reformat it as markdown. It can include images.</li>
47+
<li>Open an existing post’s markdown file.</li>
48+
<li>Paste in existing MD into the Markdown editor view including the yaml header.</li>
49+
</ul>
1450

1551
</Fragment>
1652
);

src/types/commontypes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const STARTER_BLOG_FRONTMATTER_FIELDS: BlogFrontMatterFields = {
8383
carousel_title: "New news and blog page",
8484
carousel_summary: `This is a blank news-and-blog page template. Click the crab icon to edit metadata.
8585
Enter new content below this header preview`,
86-
carousel_image: "https://usds.github.io/website-content-editor/icon-512x512.png",
86+
carousel_image: "https://usds.github.io/website-content-editor/img/template-carousel.jpg",
8787
carousel_image_alt_text: "Test image",
8888
carousel_show: "false",
8989
tags: [],

0 commit comments

Comments
 (0)