Skip to content

Commit 803e1ae

Browse files
committed
Minor cleanup on home and support pages
1 parent 8c8e7bb commit 803e1ae

File tree

3 files changed

+55
-14
lines changed

3 files changed

+55
-14
lines changed

TODO.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
- [ ] posting
44
- [ ] [analytics](https://nextjs.org/docs/app/building-your-application/optimizing/analytics)
55
- [ ] options report (across all backends)
6-
- [ ] Options cleanup + picker widget
76
- [ ] Support for `?testurl=` query string parameter
87

98
## Move to Regex.zone
@@ -36,12 +35,14 @@
3635
- [ ] [Elm](https://package.elm-lang.org/packages/elm/regex/latest/)
3736
- [ ] Julia
3837
- [ ] Haskell (done, but hosting isn't working)
38+
- [ ] AWK
3939
- [ ] D
4040
- [ ] GNU grep
4141
- [ ] [Zig](https://github.com/tiehuis/zig-regex)
4242
- [ ] direct to engines: PCRE, RE2, [ICU](https://unicode-org.github.io/icu/userguide/strings/regexp.html), [hyperscan](https://github.com/intel/hyperscan)/[vectorscan](https://github.com/VectorCamp/vectorscan), Yarr...
4343
- [ ] [Janet](https://janet-lang.org/) ~lisp
4444
- [ ] [marianobarrios/dregex](https://github.com/marianobarrios/dregex) - Java alternative
45+
- [ ] Mozilla's [list of JavaScript implementations](https://developer.mozilla.org/en-US/docs/Web/JavaScript/JavaScript_technologies_overview#javascript_implementations), each of which should support Regex.
4546

4647
Patterns that are not regular expressions:
4748
- [ ] [wildcards](https://crates.io/crates/wildcard) - lots of flavors

src/app/page.tsx

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,55 @@ export default function Home() {
2525
Pick which programming language you are using:
2626
</div>
2727
</div>
28-
<div className="row">
28+
<div className="row mt-3">
2929
<div className="col d-flex flex-wrap justify-content-center">
3030
{buttons}
3131
</div>
3232
</div>
33-
<h2 className="mt-3">One last thing</h2>
3433

34+
<hr />
35+
36+
<div className="d-flex justify-content-center align-items-start">
37+
<div className="card m-3 d-inline-block" style={{ "width": "18rem" }}>
38+
<h5 className="card-header border-bottom p-3 bg-body-tertiary">Sharing</h5>
39+
<div className="card-body pt-1">
40+
Share codes are an easy way to share regexes. If you have a share code, enter it here:
41+
<div className="pt-2 d-flex justify-content-center">
42+
<form action="/share/index.html" className="form-inline" method="post">
43+
<div className="input-group">
44+
<input type="text" className="form-control" name="share" placeholder="Share code" />
45+
<button type="submit" className="btn btn-primary">Go</button>
46+
</div>
47+
</form>
48+
</div>
49+
</div>
50+
</div>
51+
52+
<div className="card m-3 d-inline-block" style={{ "width": "18rem" }}>
53+
<h5 className="card-header xborder-bottom p-3 bg-body-tertiary">Status</h5>
54+
<div className="card-body pt-1">
55+
A badly formed regular expression can run forever, making it very useful for denial of services attacks. Some of the engines/hosts are susceptible to these.
56+
<div className="pt-2 d-flex justify-content-center">
57+
<a className="btn btn-outline-secondary" href="/status.html" rel="nofollow">Engine Status</a>
58+
</div>
59+
</div>
60+
</div>
61+
62+
<div className="card m-3 d-inline-block" style={{ "width": "18rem" }}>
63+
<h5 className="card-header xborder-bottom p-3 bg-body-tertiary">Regex Zone</h5>
64+
<div className="card-body pt-1">
65+
The <a href="https://www.regex.zone/">Regex Zone</a> is a place to share regular expressions, and learn from others. It is a community of regex enthusiasts.
66+
<div className="pt-2 d-flex justify-content-center">
67+
<a className="btn btn-primary" href="https://www.regex.zone/" rel="nofollow">Visit the Regex Zone</a>
68+
</div>
69+
</div>
70+
</div>
71+
72+
</div >
73+
74+
<hr />
75+
76+
<h2 className="mt-3">One last thing</h2>
3577
<div className="card my-3 bg-light">
3678
<div className="card-body">
3779
Some people, when confronted with a problem, think &ldquo;I know, I’ll use regular expressions.&rdquo; Now they have two problems.<br />

src/app/support/index.html/page.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@ export default function Page() {
1717
<hr />
1818
{getEngines().map((engine, index) => (
1919
<div className="card m-3 d-inline-block" key={`key${index}`} style={{ "width": "18rem" }}>
20-
<div className="card-body p-0 border-top">
21-
<ul className="list-group list-group-flush">
22-
<li className="list-group-item fw-bold" key={`key${index}_title`}>
23-
<img src={engine.logo_icon} className="me-2" alt={`${engine.short_name} logo`} style={{ "width": "2.0rem" }} />
24-
{engine.short_name}
25-
</li>
26-
<li className="list-group-item" key={`key${index}_help`}><a href={engine.help_url}>{engine.help_label}</a></li>
27-
{engine.links && Object.keys(engine.links).map((key, linkindex) => (
28-
<li className="list-group-item" key={`key${index}_${linkindex}`}><a href={engine.links[key]}>{key}</a></li>
29-
))}
30-
</ul>
20+
<div className="card-header bg-body-tertiary d-flex align-items-center">
21+
<img src={engine.logo_icon} className="me-3" alt={`${engine.short_name} logo`} style={{ "width": "2.0rem" }} />
22+
{engine.short_name}
3123
</div>
24+
<ul className="list-group list-group-flush">
25+
<li className="list-group-item" key={`key${index}_help`}><a href={engine.help_url}>{engine.help_label}</a></li>
26+
{engine.links && Object.keys(engine.links).map((key, linkindex) => (
27+
<li className="list-group-item" key={`key${index}_${linkindex}`}><a href={engine.links[key]}>{key}</a></li>
28+
))}
29+
</ul>
3230
</div>
3331
))}
3432
</>

0 commit comments

Comments
 (0)