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

style: add note class #3

Merged
merged 3 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 26 additions & 30 deletions .github/workflows/quarto-render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,53 @@ on:
# only trigger on main/master branches, not on tags
branches: [main, master]

name: quarto-render
name: Quarto Publish
jobs:
quarto-linux:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
# Obtain a copy of the repository on the runner
# Step 1: Check out the repository, obtain a copy of the repository on the runner
- name: Check out repository
uses: actions/checkout@v4

# Install Quarto
# Step 2: Set up Quarto with LaTeX for PDF builds
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true

# Setup pandoc (might be included with Quarto action?)
- uses: r-lib/actions/setup-pandoc@v2
# Setup R
- uses: r-lib/actions/setup-r@v2
# Step 3: Install R and its dependencies
# Handle installing R packages from DESCRIPTION file
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

# Handle installing R packages from DESCRIPTION file
- uses: r-lib/actions/setup-r-dependencies@v2
# with:
# extra-packages: any::ggplot2, local::.
- name: Install R Dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1

# Download latest version of Python
- uses: actions/setup-python@v5
# Step 4: Install Python and its dependencies
- name: "Install Python"
uses: actions/setup-python@v5
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
python-version: '3.x'
cache: 'pip'

# Install jupyter via pip if it is not part of your requirements.txt
# - name: "Install Jupyter Notebooks via Pip"
# run: |
# pip install jupyter

# Install python dependencies from requirements via pip
- name: "Install Python dependencies via Pip"
- name: "Install Python Dependencies"
run: |
pip install -r requirements.txt
pip install pyyaml jupyter nbformat
pip install -r requirements.txt

# Render the Quarto book using GitHub actions and publish
# We are using the built-in {{GITHUB_PAT}} environment variable.
- name: Publish to GitHub Pages (and render)
# Step : Render and Publish the Quarto book using GitHub actions
# Built-in {{GITHUB_PAT}} environment variable is used to authenticate with GitHub.
# Write access to the repository is required to publish to the gh-pages branch.
- name: Render and Publish to GitHub Pages
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
#path: _book

8 changes: 7 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ Depends: R (>= 4.0)
URL: https://github.com/NINAnor/NINA-ebook-template/
Imports:
rmarkdown,
reticulate
reticulate,
tidyverse,
DiagrammeR,
DiagrammeRsvg,
rsvg,
downlit,
xml2
16 changes: 16 additions & 0 deletions NINAstyle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ $table-accent-bg: rgba($primary, .4);


/*-- scss:rules --*/

/* Example of a note class
:::{.note}
**Note**: This is a note.
:::
*/
.note {
background-color: rgba($primary, .2);
border: 1px solid $primary; // Use the primary color as the border
padding: 10px 10px 2px 10px;
border-radius: 5px;
color: $body-color; // Use the body color for the text
font-family: $font-family-sans-serif;
font-size: 0.8em;
margin: 20px 0 40px 0;
}
Loading