Skip to content

Commit cb89624

Browse files
committed
Added code tabsets
1 parent e71cb71 commit cb89624

File tree

2 files changed

+52
-5
lines changed

2 files changed

+52
-5
lines changed

content/tests/styling.qmd

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ format:
2525
code-copy: true
2626
code-fold: true
2727
code-summary: "Show the code"
28+
code-overflow: wrap
2829
profile: local
2930
toc: true
3031
toc-depth: 3
@@ -736,7 +737,46 @@ session <- initGRASS(gisBase = "/usr/lib/grass84", # where grass binaries live,
736737

737738
```
738739

739-
### Raw Content
740+
## Tabsets
741+
742+
::: {.panel-tabset}
743+
## R
744+
745+
``` {.r}
746+
execGRASS(
747+
"r.slope.aspect",
748+
parameters = list(
749+
elevation = "elevation",
750+
slope = "slope",
751+
aspect="aspect"
752+
)
753+
)
754+
```
755+
756+
## Python
757+
758+
``` {.python}
759+
gs.run_command(
760+
"r.slope.aspect",
761+
elevation = "elevation",
762+
slope = "slope",
763+
aspect="aspect"
764+
)
765+
```
766+
767+
:::
768+
769+
```md
770+
::: {.panel-tabset}
771+
772+
Your panel content here
773+
774+
:::
775+
```
776+
777+
For more information about tabsets refer to the Quarto Docs [here](https://quarto.org/docs/output-formats/html-basics.html#tabsets)
778+
779+
## Raw Content
740780

741781
```{=html}
742782
<iframe src="https://grass.osgeo.org/" width="500" height="400"></iframe>

theme.scss

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,20 @@ $gs-dark-color: $gs-grey-dark-color;
114114

115115
/* Images */
116116
$gs-images-base-path: 'images';
117+
$gs-images-logos-small-path: $gs-images-base-path + '/logos/small';
117118
$gs-svg-logos-base-path: $gs-images-base-path + '/logos/large';
118119
$gs-icons-base-path: $gs-images-base-path + '/icons';
119120

120121

121122
/* Icons */
122-
$gs-grass-logo-white-simple: url('images/logos/small/[email protected]');
123+
$gs-grass-logo-white-simple: url($gs-images-logos-small-path + '/[email protected]');
123124
$gs-grass-logo-simple-svg: url($gs-svg-logos-base-path + '/grass-green-no-text.svg');
124125
$gs-grass-icon: url($gs-icons-base-path + '/grass-icon.svg');
125126

126127
// Description: This file defines Bootstrap theme variables by mapping them
127128
// to custom color variables. These variables are used to
128129
// customize the appearance of the Bootstrap framework.
130+
// Bootstrap Variables: https: //github.com/twbs/bootstrap/blob/main/scss/_variables.scss
129131
// Variables:
130132
// - $primary: Primary theme color, mapped to $gs-primary-color.
131133
// - $secondary: Secondary theme color, mapped to $gs-secondary-color.
@@ -146,6 +148,9 @@ $danger: $gs-danger-color;
146148
$light: $gs-grey-light-color;
147149
$dark: $gs-grey-dark-color;
148150

151+
// Control the color of the active tab in a tabset
152+
$nav-tabs-link-active-color: $gs-secondary-alt-color;
153+
149154
// ---------------------------------------------------------------------------
150155
// Quarto Variables
151156
// ---------------------------------------------------------------------------
@@ -351,6 +356,8 @@ h4, h5, h6 {
351356
}
352357

353358
/* Code Styles
359+
If we want more control the next step would be to create a custom theme
360+
for the syntax highlighter using skylighting https: //github.com/jgm/skylighting
354361
-----------------------------------------------------------------------------*/
355362
code {
356363
span {
@@ -370,15 +377,15 @@ code {
370377
}
371378
// Color of titles in markdown code blocks
372379
.fu {
373-
color: $code-string-color;
380+
color: $gs-secondary-alt-color;
374381
}
375382
// Color of pipes in markdown code blocks
376383
.pp {
377384
color: $code-keyword-color;
378385
}
379-
// Color of blockquotes in markdown code blocks
386+
// Color of blockquotes in markdown code blocks and parameter names in R code blocks
380387
.at {
381-
color: $gs-secondary-dark-color;
388+
color: $gs-secondary-color;
382389
}
383390
}
384391
}

0 commit comments

Comments
 (0)