small asthetic changes

pull/508/head
LabyrinthLion 4 years ago
parent a187997e14
commit 99639ec9d3

@ -4,3 +4,7 @@ body,
height: 100%; height: 100%;
background-color: #fafbff; background-color: #fafbff;
} }
.task-list-item {
list-style-type: none;
}

@ -2,7 +2,7 @@
// evergreen-ui docs: https://evergreen.segment.com/ // evergreen-ui docs: https://evergreen.segment.com/
import './App.css'; import './App.css';
import { Tablist, Tab, Pane, Link } from 'evergreen-ui'; import { Tablist, Tab, Pane, Link, AddIcon } from 'evergreen-ui';
import React from 'react'; import React from 'react';
import Home from './Home'; import Home from './Home';
import Projects from './Projects'; import Projects from './Projects';
@ -39,7 +39,22 @@ export default function App() {
{tab} {tab}
</Tab> </Tab>
))} ))}
<Link href="https://github.com/florinpop17/app-ideas/"> <Link
marginY="auto"
marginRight="0.5rem"
style={{ color: '#000000' }}
title="New Idea Guidelines"
href="https://github.com/florinpop17/app-ideas/blob/master/CONTRIBUTING.md"
>
<AddIcon
style={{ width: '1.3rem', height: '1.3rem' }}
/>
</Link>
<Link
marginLeft="0.5rem"
title="GitHub"
href="https://github.com/florinpop17/app-ideas/"
>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
width="1.75rem" width="1.75rem"

@ -23,6 +23,23 @@ const unescapeHTML = (str) =>
}[tag] || tag) }[tag] || tag)
); );
const task_list = (str) => {
var a = document.createElement('div');
a.innerHTML = str;
var b = new XPathEvaluator();
var c = b.evaluate('.//input[@type="checkbox"]/parent::li', a);
var d = c.iterateNext();
var ds = [];
while (d) {
ds.push(d);
d = c.iterateNext();
}
for (var e of ds) {
e.classList.add('task-list-item');
}
return a.innerHTML;
};
export default function Projects({ tier }) { export default function Projects({ tier }) {
const [isShown, setIsShown] = useState(false); const [isShown, setIsShown] = useState(false);
const [content, setContent] = useState(undefined); const [content, setContent] = useState(undefined);
@ -79,13 +96,13 @@ export default function Projects({ tier }) {
setContent(undefined); setContent(undefined);
setIsShown(true); setIsShown(true);
fetch( fetch(
`./Projects/${row[3].trim()}/${row[1].trim()}.md` `/app-ideas/Projects/${row[3].trim()}/${row[1].trim()}.md`
).then(async (res) => { ).then(async (res) => {
setContent( setContent(
<div <div
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: marked( __html: task_list(
await res.text() marked(await res.text())
), ),
}} }}
></div> ></div>

Loading…
Cancel
Save