From b8c259f9e791b295aa7c3c83033bd1d8377f3407 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 6 Apr 2019 15:49:51 -0700 Subject: [PATCH] Adding expanding navbar, some docs --- README.md | 9 ++++-- API.md => docs/API.md | 0 goals.md => docs/goals.md | 1 + ranking.md => docs/ranking.md | 0 install.sh | 5 +++ ui/src/components/navbar.tsx | 16 +++++++--- ui/src/index.tsx | 58 +++++++++++++++++++++++++++++++++++ ui/src/main.css | 11 +++++++ 8 files changed, 93 insertions(+), 7 deletions(-) rename API.md => docs/API.md (100%) rename goals.md => docs/goals.md (97%) rename ranking.md => docs/ranking.md (100%) create mode 100755 install.sh diff --git a/README.md b/README.md index ebfe72e1..e2e3543c 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,10 @@ cd lemmy and goto http://localhost:8080 ## Documentation -- [ActivityPub API.md](API.md) -- [Goals](goals.md) -- [Ranking Algorithm](ranking.md) +- [ActivityPub API.md](docs/API.md) +- [Goals](docs/goals.md) +- [Ranking Algorithm](docs/ranking.md) +## Credits + +Icons made by [Freepik](https://www.freepik.com/) licensed by [CC 3.0](http://creativecommons.org/licenses/by/3.0/) diff --git a/API.md b/docs/API.md similarity index 100% rename from API.md rename to docs/API.md diff --git a/goals.md b/docs/goals.md similarity index 97% rename from goals.md rename to docs/goals.md index 37c4e5df..e569b1f7 100644 --- a/goals.md +++ b/docs/goals.md @@ -33,4 +33,5 @@ - [Hierarchical tree building javascript](https://stackoverflow.com/a/40732240/1655478) - [Hot sorting discussion](https://meta.stackexchange.com/questions/11602/what-formula-should-be-used-to-determine-hot-questions) [2](https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9) - [Classification types.](https://www.reddit.com/r/ModeratorDuck/wiki/subreddit_classification) +- [Temp Icon](https://www.flaticon.com/free-icon/mouse_194242) diff --git a/ranking.md b/docs/ranking.md similarity index 100% rename from ranking.md rename to docs/ranking.md diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..ac5f5103 --- /dev/null +++ b/install.sh @@ -0,0 +1,5 @@ +cd ui +yarn +yarn build +cd ../server +cargo run diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index d766bf07..2032d49b 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -7,7 +7,7 @@ export class Navbar extends Component { constructor(props, context) { super(props, context); - this.state = {isLoggedIn: UserService.Instance.loggedIn}; + this.state = {isLoggedIn: UserService.Instance.loggedIn, expanded: false}; // Subscribe to user changes UserService.Instance.sub.subscribe(user => { @@ -27,11 +27,14 @@ export class Navbar extends Component { navbar() { return (