Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial Review for Tethys 4.3 #1074

Merged
merged 28 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d81a16d
Resolve docs build warnings and errors
swainn Jun 20, 2024
8c6dc0f
Remove tethys db tip from new app project tutorials
swainn Jun 20, 2024
f6c52f9
Add trailing slash to the end of /apps URLs in tutorials
swainn Jun 20, 2024
71a9e40
Fix flake issues with scaffold
swainn Jun 28, 2024
414cd27
Key concepts tutorial fixes
swainn Jun 28, 2024
13d7d9e
Fix height 100% issue for app content (e.g. fullscreen map)
swainn Jul 23, 2024
644bf36
beginner concepts updates
swainn Jul 23, 2024
bb59741
Updates to intermediate tutorial
swainn Jul 23, 2024
fb3ed84
Fix the broken heading links
swainn Jul 23, 2024
562a011
Updates to the advanced tutorial
swainn Jul 25, 2024
c684a1c
Fix scroll issue on map layout
swainn Jul 26, 2024
6192daf
Update beginner tutorial to use the MapLayout.
swainn Jul 26, 2024
ec613a0
Update intermediate tutorial with MapLayout
swainn Jul 26, 2024
a3775a5
Update advanced tutorial to use MapLayout
swainn Jul 26, 2024
fec7583
updates in geoserver and map layout tutorials
jmjohnson1578 Jul 12, 2024
4fe3926
initial documentation updates
jmjohnson1578 Jul 19, 2024
a6465e0
Pass on only the "settings already configured" RuntimeError in docs/c…
swainn Jul 30, 2024
0e1d3d4
Add screenshots to key concepts tutorial, shorten topics lists
swainn Jul 30, 2024
7dc3425
Update the persistent store service screenshot
swainn Jul 30, 2024
dbc03b6
added git lfs instructions
jakeymac Jul 30, 2024
34cb008
fixes in key concepts tutorials, updated 'last updated' dates in othe…
jakeymac Jul 30, 2024
9eb306c
updated tutorials(text + code, dates), added updated screenshots
jakeymac Aug 16, 2024
fb83fe5
missing url parameter added
jakeymac Aug 16, 2024
f03907e
Made changes suggested in pull request #1074, converetd doc files to LF
jakeymac Aug 20, 2024
773e60c
updated tethys logos in docs
jakeymac Aug 21, 2024
653b3b2
fixes for tethys logo in docs
jakeymac Aug 23, 2024
d5ed0fe
linting
jakeymac Aug 23, 2024
d1757b9
removed unused lines in css file
jakeymac Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ cd docs
conda env create -f docs_environment.yml
```

## Initialize git lfs

Use Git LFS to download the images:

```
git lfs install
git lfs pull
```

## Build Docs

Activate the conda environment and build the documentation using these commands:
Expand Down
1 change: 1 addition & 0 deletions docs/_static/css/tethys.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ section>section {
.highlight .hll {
background-color: #cfef90;
}

112 changes: 112 additions & 0 deletions docs/_templates/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{#- Template file for the header -#}

<header
class="sticky top-0 z-40 w-full border-b shadow-sm border-border supports-backdrop-blur:bg-background/60 bg-background/95 backdrop-blur">

{#- Extra block at the top of the header #}
{%- block header_before %}{% endblock header_before -%}

<div class="container flex items-center h-14">
{#- show logo and extra header links on the left side of the header -#}
{%- block header_left %}
<div class="hidden mr-4 md:flex">
{%- block header_logo %}
<a href="{{ pathto(master_doc) }}" class="flex items-center mr-6">
{%- if logo_url %}
<img height="24" width="24" class="mr-2 dark:invert" src="{{ logo_url }}" alt="Logo" />
{%- endif -%}
{%- if theme_logo_dark and not logo_url %}
<img width="220" height="30" class="mr-20 hidden dark:block" src="{{ pathto('_static/' + theme_logo_dark, 1) }}" alt="Logo" />
{%- endif -%}
{%- if theme_logo_light and not logo_url %}
<img width="220" height="30" class="mr-20 dark:hidden" src="{{ pathto('_static/' + theme_logo_light, 1) }}" alt="Logo" />
{%- endif -%}
<span class="hidden font-bold sm:inline-block text-clip whitespace-nowrap">{{ docstitle }}</span>

{% if docstitle %}
<span class="hidden font-bold sm:inline-block text-clip whitespace-nowrap">{{ docstitle }}</span>
{% endif %}

</a>
{%- endblock header_logo %}

{%- block header_main_nav %}
{%- if theme_main_nav_links|tobool -%}
<nav class="flex items-center space-x-6 text-sm font-medium">
{%- for text,url in theme_main_nav_links.items() %}
{%- set _active = "text-foreground" if pagename in url else "text-foreground/60" -%}
{%- if url.startswith("http") %}
<a href="{{ url }}" class="transition-colors hover:text-foreground/80 {{ _active }}" rel="noopener nofollow">{{
text }}</a>
{%- else %}
<a href="{{ pathto(url) }}" class="transition-colors hover:text-foreground/80 {{ _active }}">{{ text }}</a>
{%- endif %}
{%- endfor %}
</nav>
{%- endif %}
{%- endblock header_main_nav -%}
</div>
{%- endblock header_left %}

{%- block mobile_menu %}
{%- if sidebars|length >0 -%}
<button
class="inline-flex items-center justify-center h-10 px-0 py-2 mr-2 text-base font-medium transition-colors rounded-md hover:text-accent-foreground hover:bg-transparent md:hidden"
type="button" @click="showSidebar = true">
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 96 960 960" aria-hidden="true"
fill="currentColor">
<path
d="M152.587 825.087q-19.152 0-32.326-13.174t-13.174-32.326q0-19.152 13.174-32.326t32.326-13.174h440q19.152 0 32.326 13.174t13.174 32.326q0 19.152-13.174 32.326t-32.326 13.174h-440Zm0-203.587q-19.152 0-32.326-13.174T107.087 576q0-19.152 13.174-32.326t32.326-13.174h320q19.152 0 32.326 13.174T518.087 576q0 19.152-13.174 32.326T472.587 621.5h-320Zm0-203.587q-19.152 0-32.326-13.174t-13.174-32.326q0-19.152 13.174-32.326t32.326-13.174h440q19.152 0 32.326 13.174t13.174 32.326q0 19.152-13.174 32.326t-32.326 13.174h-440ZM708.913 576l112.174 112.174q12.674 12.674 12.674 31.826t-12.674 31.826Q808.413 764.5 789.261 764.5t-31.826-12.674l-144-144Q600 594.391 600 576t13.435-31.826l144-144q12.674-12.674 31.826-12.674t31.826 12.674q12.674 12.674 12.674 31.826t-12.674 31.826L708.913 576Z" />
</svg>
<span class="sr-only">Toggle navigation menu</span>
</button>
{%- endif -%}
{%- endblock mobile_menu %}

{%- block header_right %}
<div class="flex items-center justify-between flex-1 space-x-2 sm:space-x-4 md:justify-end">
{%- if docsearch or hasdoc('search') %}
<div class="flex-1 w-full md:w-auto md:flex-none">
{%- include "searchbox.html" %}
</div>
{%- endif %}

{%- block extra_header_link_icons %}
<nav class="flex items-center space-x-1">
{%- if theme_extra_header_link_icons|tobool %}
{%- for text,url in theme_extra_header_link_icons.items() %}
{%- if url is mapping %}
<a href="{{ url.link }}" title="Visit {{ text }}" rel="noopener nofollow">
<div
class="inline-flex items-center justify-center px-0 text-sm font-medium transition-colors rounded-md disabled:opacity-50 disabled:pointer-events-none hover:bg-accent hover:text-accent-foreground h-9 w-9">
{{ url.icon }}
</div>
</a>
{% endif %}
{%- endfor %}
{%- endif %}

{%- block theme_switcher %}
<button @click="darkMode = darkMode === 'light' ? 'dark' : 'light'"
class="relative inline-flex items-center justify-center px-0 text-sm font-medium transition-colors rounded-md hover:bg-accent hover:text-accent-foreground h-9 w-9"
type="button"
aria-label="Color theme switcher">
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 96 960 960" fill="currentColor"
class="absolute transition-all scale-100 rotate-0 dark:-rotate-90 dark:scale-0">
<path
d="M480 685q45.456 0 77.228-31.772Q589 621.456 589 576q0-45.456-31.772-77.228Q525.456 467 480 467q-45.456 0-77.228 31.772Q371 530.544 371 576q0 45.456 31.772 77.228Q434.544 685 480 685Zm0 91q-83 0-141.5-58.5T280 576q0-83 58.5-141.5T480 376q83 0 141.5 58.5T680 576q0 83-58.5 141.5T480 776ZM80 621.5q-19.152 0-32.326-13.174T34.5 576q0-19.152 13.174-32.326T80 530.5h80q19.152 0 32.326 13.174T205.5 576q0 19.152-13.174 32.326T160 621.5H80Zm720 0q-19.152 0-32.326-13.174T754.5 576q0-19.152 13.174-32.326T800 530.5h80q19.152 0 32.326 13.174T925.5 576q0 19.152-13.174 32.326T880 621.5h-80Zm-320-320q-19.152 0-32.326-13.174T434.5 256v-80q0-19.152 13.174-32.326T480 130.5q19.152 0 32.326 13.174T525.5 176v80q0 19.152-13.174 32.326T480 301.5Zm0 720q-19.152 0-32.326-13.17Q434.5 995.152 434.5 976v-80q0-19.152 13.174-32.326T480 850.5q19.152 0 32.326 13.174T525.5 896v80q0 19.152-13.174 32.33-13.174 13.17-32.326 13.17ZM222.174 382.065l-43-42Q165.5 327.391 166 308.239t13.174-33.065q13.435-13.674 32.587-13.674t32.065 13.674l42.239 43q12.674 13.435 12.555 31.706-.12 18.272-12.555 31.946-12.674 13.674-31.445 13.413-18.772-.261-32.446-13.174Zm494 494.761-42.239-43q-12.674-13.435-12.674-32.087t12.674-31.565Q686.609 756.5 705.38 757q18.772.5 32.446 13.174l43 41.761Q794.5 824.609 794 843.761t-13.174 33.065Q767.391 890.5 748.239 890.5t-32.065-13.674Zm-42-494.761Q660.5 369.391 661 350.62q.5-18.772 13.174-32.446l41.761-43Q728.609 261.5 747.761 262t33.065 13.174q13.674 13.435 13.674 32.587t-13.674 32.065l-43 42.239q-13.435 12.674-31.706 12.555-18.272-.12-31.946-12.555Zm-495 494.761Q165.5 863.391 165.5 844.239t13.674-32.065l43-42.239q13.435-12.674 32.087-12.674t31.565 12.674Q299.5 782.609 299 801.38q-.5 18.772-13.174 32.446l-41.761 43Q231.391 890.5 212.239 890t-33.065-13.174ZM480 576Z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 96 960 960" fill="currentColor"
class="absolute transition-all scale-0 rotate-90 dark:rotate-0 dark:scale-100">
<path
d="M480 936q-151 0-255.5-104.5T120 576q0-138 90-239.5T440 218q25-3 39 18t-1 44q-17 26-25.5 55t-8.5 61q0 90 63 153t153 63q31 0 61.5-9t54.5-25q21-14 43-1.5t19 39.5q-14 138-117.5 229T480 936Zm0-80q88 0 158-48.5T740 681q-20 5-40 8t-40 3q-123 0-209.5-86.5T364 396q0-20 3-40t8-40q-78 32-126.5 102T200 576q0 116 82 198t198 82Zm-10-270Z" />
</svg>
</button>
{%- endblock theme_switcher %}
</nav>
{%- endblock extra_header_link_icons %}
</div>
{%- endblock header_right %}
</div>
{%- block header_after %}{%- endblock header_after %}
</header>
37 changes: 20 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from django.conf import settings
from setuptools_scm import get_version
from sphinxawesome_theme import ThemeOptions, LinkIcon
from sphinxawesome_theme.postprocess import Icons

# Mock Dependencies
# NOTE: No obvious way to automatically anticipate all the sub modules without
Expand Down Expand Up @@ -123,12 +124,18 @@ def __getattr__(cls, name):
"tethys_layouts",
]

settings.configure(
INSTALLED_APPS=installed_apps,
DEBUG=True,
SECRET_KEY="QNT5VImbg7PktTYfyXZWGwfKqOe1G3CanQWfG0zsE5HZxwHdQs",
)
django.setup()
try:
settings.configure(
INSTALLED_APPS=installed_apps,
DEBUG=True,
SECRET_KEY="QNT5VImbg7PktTYfyXZWGwfKqOe1G3CanQWfG0zsE5HZxwHdQs",
)
django.setup()
except RuntimeError as e:
# Ignore error if settings are already configured
# This can occur when using sphinx-autobuild
if "settings already configured" in str(e).lower():
pass

# Sphinx extensions
extensions = [
Expand Down Expand Up @@ -257,8 +264,10 @@ def __getattr__(cls, name):
html_context = {}
html_context["READTHEDOCS"] = True

html_title = f"{project} Documentation"
html_short_title = "Tethys Docs"
# html_title = f"{project} Documentation"
html_title = ""
# html_short_title = "Tethys Docs"
html_short_title = ""
# html_logo = "images/features/tethys-logo-75.png"
html_favicon = "images/default_favicon.ico"
html_static_path = ["_static"]
Expand All @@ -281,8 +290,8 @@ def __getattr__(cls, name):
link="https://github.com/tethysplatform/tethys",
),
},
logo_dark="images/features/tethys-logo-75.png", # todo: svg logo
logo_light="images/features/tethys_logo_inverse.png", # todo: svg logo
logo_dark="images/features/tethys-on-blue.svg",
logo_light="images/features/tethys-on-white.svg",
show_breadcrumbs=False,
show_prev_next=True,
show_scrolltop=True,
Expand All @@ -292,10 +301,4 @@ def __getattr__(cls, name):
html_collapsible_definitions = True

# Link icon for header links instead of pharagraph icons that are the default
html_permalinks_icon = (
'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">'
'<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 '
"5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 "
'0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z">'
"</path></svg>"
)
html_permalinks_icon = Icons.permalinks_icon
Loading