Skip to content

Commit

Permalink
Big update, Docker, CICD, css, banner, standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasCote committed Dec 5, 2023
1 parent d015d69 commit f52cc0d
Show file tree
Hide file tree
Showing 147 changed files with 709 additions and 40,042 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-docs-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Cloud Docs CI/CD

on:
push:
paths:
- cisl-docs/**

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
# Step 1 is to checkout the github repo
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python dependencies
run: |
sudo apt-get install python3-pip
pip install ghp-import
pip install jupyter-book
pip install sphinx_pythia_theme
PATH="${PATH}:${HOME}/.local/bin"
- name: Build book HTML
run: |
jupyter-book build docs/.
- name: Push _build/html to gh-pages
run: |
sudo chown -R $(whoami):$(whoami) .
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
git remote set-url origin "https://$GITHUB_ACTOR:${{ secrets.NC_GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY"
ls -lrt
ghp-import -n -p -f docs/_build/html
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Use the Apache HTTP server image
FROM httpd:2.4

# Copy HTML files created by `jupyter-book build .` in to directory apache serves out of
COPY cisl-docs/_build/html/. /usr/local/apache2/htdocs/
6 changes: 6 additions & 0 deletions cisl-theme/_config.yml → cisl-docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ sphinx:
external: true
- name: Contact Us
url: https://www2.cisl.ucar.edu/form/contact
page_layouts:
banner: page-banner.html
standalone: page-standalone.html
html_sidebars:
banner: []
standalone: []
File renamed without changes
File renamed without changes
Binary file added cisl-docs/_static/jbook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cisl-docs/_static/pycon-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added cisl-docs/_static/pythia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
221 changes: 149 additions & 72 deletions cisl-theme/_static/style.css → cisl-docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,131 @@
@import url('https://fonts.googleapis.com/css?family=Poppins:400,600,700');

/* Main Content */
/* BODY */

body {
font-family: 'Poppins', Arial, sans-serif !important;
font-size: 1rem;
background-image: url("NCAR-Waves.png");
background-position: right top;
background-repeat: no-repeat;
background-color: #dbe2e9;
}

/* HEADERS */

h1 {
text-align: center;
font-size: 3rem !important;
font-weight: 700;
}

h2 {
text-align: center;
font-size: 2.25rem !important;
font-weight: 600;
}

h3 {
font-size: 1.5rem !important;
font-weight: 700;
color: #007fa3 !important;
}

/* Regular Main Content */

#main-content {
background-color: #ffffff !important;
}

/* Code Blocks */

code, .rst-content tt, .rst-content code {
overflow: scroll;
background-color: #e9ecef;
display: inline;
padding: 4px 0px;
padding-left: 8px;
padding-right: 8px;
border-radius: 4px;
white-space: nowrap;
}

.pre {
overflow: scroll;
background-color: #e9ecef;
color: #222222;
display: inline;
padding: 4px 0px;
border-radius: 4px;
white-space: normal;
}

.clipboard {
position: relative;
display: block;
float: right;
}

.btn-clipboard {
position: relative;
top: 16px;
right: 10px;
z-index: 10;
border-radius: 8px;
display: block;
padding: .25rem .5rem;
cursor: pointer;
}

.caption-text {
color: #A8C700;
font-size: 16px;
margin-left: -8px;
}

/* Tables */

tr:nth-child(even) {
background-color: #C3D7EE;
}

tr td {
border-right: 1px solid #dee2e6;
}

th {
background-color: #53565A;
border-right: 1px solid #ffffff;
}

th p {
color: #ffffff !important;
}

/* Banner Page */

main.banner-main div.sectionwrapper-2:nth-child(even) {
background-color: transparent;
}

main.banner-main div#main-content {
background-image: url("NCAR-Waves.png") !important;
background-position: right top;
background-repeat: no-repeat;
background-color: #dbe2e9 !important;
}

/* Standalone Page */

main.standalone-main #main-content {
background-image: url("NCAR-Waves.png") !important;
background-position: right top;
background-repeat: no-repeat;
background-color: #dbe2e9 !important;
}

/* Right Side table of contents*/
/* Done */

.bd-toc {
background-color: #323133 !important;
Expand All @@ -10,6 +134,7 @@
#bd-toc-nav {
background-color: #323133 !important;
}

.onthispage i, .tocsection {
color: #ffffff !important;
font-size: 14px;
Expand All @@ -23,7 +148,7 @@
font-weight: 600 !important;
}

/* Add a blue color to navbar links on hover */
/* Add a blue color to TOC links on hover */
.toc-entry a:hover {
color: #007fa3 !important;
}
Expand All @@ -33,7 +158,6 @@
}

/* The navbar */
/* DONE */
/* The top level navbar */
#navbar-main {
background-color: #ffffff !important;
Expand Down Expand Up @@ -66,6 +190,16 @@
color: #007fa3 !important;
}

.dropdown {
padding-top: 8px;
height: 42.4px
}

.navbar-collapse {
text-align: left;
flex-basis: 100%;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
display: none;
Expand Down Expand Up @@ -99,8 +233,19 @@
display: block;
}

/* Navbar and TOC toggle buttons */

.navbar-toggler {
background-color: #dbe2e9;
}

#navbar-toggler {
color: #ffffff;
background-color: #dbe2e9;
}

/* Footer Information */
/* WORKING */

.footer-info {
background-color: #332f21 !important;
display:block;
Expand Down Expand Up @@ -148,71 +293,3 @@ footer center {
.text-center {
text-align:center;
}

/* BODY */
/* WORKING */

body {
font-family: 'Poppins', Arial, sans-serif !important;
font-size: 1rem;
background-image: url("NCAR-Waves.png");
background-position: right top;
background-repeat: no-repeat;
background-color: #dbe2e9;
}

/* HEADERS */
/* WORKING */

h1 {
text-align: center;
font-size: 3rem !important;
text-transform: uppercase;
font-weight: 700;
}

h2 {
text-align: center;
font-size: 2.25rem !important;
text-transform: uppercase;
font-weight: 600;
}

h3 {
font-size: 1.5rem !important;
font-weight: 700;
text-transform: uppercase;
color: #007fa3 !important;
}

code, .rst-content tt, .rst-content code {
overflow: scroll;
background-color: #e9ecef;
display: inline;
padding: 4px 8px;
border-radius: 4px;
white-space: nowrap;
}

.clipboard {
position: relative;
display: block;
float: right;
}

.btn-clipboard {
position: relative;
top: 16px;
right: 10px;
z-index: 10;
border-radius: 8px;
display: block;
padding: .25rem .5rem;
cursor: pointer;
}

.caption-text {
color: #A8C700;
font-size: 16px;
margin-left: -8px;
}
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions cisl-docs/_templates/navbar-menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<ul id="navbar-main-elements" class="navbar-nav">
{% for navbar_link in theme_navbar_links %}
{% if "dropdown" in navbar_link and navbar_link.dropdown %}
<div class="dropdown">
{% if "external" in navbar_link and navbar_link.external %}
{% set external = '<i class="fas fa-external-link-alt"></i>' %}
{% else %}
{% set external = '' %}
{% endif %}
<li class="nav-item">
<button class="dropbtn">
{{ _(navbar_link.name) }} <i class="fa fa-chevron-down" style="color: #000000;"></i>
</button>
</li>
<div class="dropdown-content">
{% for dropdown_link in navbar_link.dropdown_links %}
<a class="dropdown-link" href="{{ spt_pathto(dropdown_link.url) }}">
{{ _(dropdown_link.name) }}
</a><br>
{% endfor %}
</div>
</div>
{% else %}
{% if "external" in navbar_link and navbar_link.external %}
{% set external = '<i class="fas fa-external-link-alt"></i>' %}
{% else %}
{% set external = '' %}
{% endif %}
<li class="nav-item">
<a class="nav-link nav-internal" href="{{ spt_pathto(navbar_link.url) }}">{{ _(navbar_link.name) }}{{ external }}</a>
</li>
{% endif %}
{% endfor %}
{% for external_link in theme_external_links %}
<li class="nav-item">
<a class="nav-link nav-external" href="{{ external_link.url }}">{{ _(external_link.name) }}<i class="fas fa-external-link-alt"></i></a>
</li>
{% endfor %}
</ul>
3 changes: 3 additions & 0 deletions cisl-theme/_toc.yml → cisl-docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
format: jb-book
root: index
parts:
- chapters:
- file: banner
- file: standalone
- chapters:
- file: examples/main
- caption: Examples
Expand Down
Loading

0 comments on commit f52cc0d

Please sign in to comment.