Skip to content

Commit

Permalink
remove help pages
Browse files Browse the repository at this point in the history
  • Loading branch information
interrogator committed Aug 20, 2019
1 parent f6a089b commit 192e854
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 65 deletions.
19 changes: 3 additions & 16 deletions buzzword/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from dash.dependencies import Input, Output
from dash.exceptions import PreventUpdate

from .parts import explore # noqa: F401
from .parts import about, building, depgrep, guide, start
from .parts import start, explore # noqa: F401
from .parts.main import server # noqa: F401
from .parts.main import CONFIG, CORPORA, CORPUS_META, INITIAL_TABLES, app
from .parts.tabs import _make_tabs
Expand Down Expand Up @@ -78,28 +77,16 @@ def _choose_correct_page(pathname):
"""
When the URL changes, get correct page and populate page-content with it
"""
pages = dict(
about=about.layout,
guide=guide.layout,
building=building.layout,
start=start.layout,
depgrep=depgrep.layout,
)
if pathname is None:
raise PreventUpdate
pathname = pathname.lstrip("/")
if not pathname:
return start.layout
if pathname in pages:
return pages[pathname]
if pathname.startswith("explore"):
slug = pathname.rstrip("/").split("/")[-1]
# if corpus not found, redirect
if slug not in CORPORA:
return start.layout
# find corpus name by slug
pathname = ""
return _get_explore_layout(slug)
if pathname in {"", "/"}:
if not pathname:
return start.layout
else:
return "404"
Expand Down
13 changes: 0 additions & 13 deletions buzzword/parts/about.py

This file was deleted.

12 changes: 0 additions & 12 deletions buzzword/parts/building.py

This file was deleted.

12 changes: 0 additions & 12 deletions buzzword/parts/depgrep.py

This file was deleted.

12 changes: 0 additions & 12 deletions buzzword/parts/guide.py

This file was deleted.

0 comments on commit 192e854

Please sign in to comment.