Skip to content

Commit

Permalink
Updating theme?
Browse files Browse the repository at this point in the history
  • Loading branch information
natgeo-wong committed Sep 7, 2024
1 parent 03bf444 commit 4a33754
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 19 deletions.
83 changes: 69 additions & 14 deletions docs/src/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import url(https://fonts.googleapis.com/css?family=Space+Mono:regular,italic,700,700italic);
@import url(https://fonts.googleapis.com/css?family=Space+Grotesk:regular,italic,700,700italic);

/* Customize default theme styling by overriding CSS variables:
https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/
Expand All @@ -19,27 +16,35 @@ https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/var

/* Fonts */

:root {
@font-face {
font-family: JuliaMono-Regular;
src: url("https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2");
}

:root {
/* Typography */
--vp-font-family-base: "Barlow", "Inter var experimental", "Inter var",
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

/* Code Snippet font */
--vp-font-family-mono: JuliaMono-Regular, monospace;

}

.mono {

/*
Disable contextual alternates (kind of like ligatures but different) in monospace,
which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well.
This is pretty bad for Julia folks reading even though copy+paste retains the same text.
*/
font-feature-settings: 'calt' 0;
pre {
font-family: JuliaMono-Light;
}

code {
};
code {
font-family: JuliaMono-Light;
}

;
};
}

/* Colors */
Expand Down Expand Up @@ -152,7 +157,7 @@ mjx-container {
}

mjx-container {
display: inline-block;
display: inline;
margin: auto 2px -2px;
}

Expand Down Expand Up @@ -182,7 +187,57 @@ mjx-container > svg {
}

/**
* Reducing lists padding
* Change images from light to dark theme
* -------------------------------------------------------------------------- */

ul, li { margin: 0; padding: 0; }
:root:not(.dark) .dark-only {
display: none;
}

:root:is(.dark) .light-only {
display: none;
}

/* https://bddxg.top/article/note/vitepress优化/一些细节上的优化.html#文档页面调整-加宽 */

.VPDoc.has-aside .content-container {
max-width: 100% !important;
}
.aside {
max-width: 200px !important;
padding-left: 0 !important;
}
.VPDoc {
padding-top: 15px !important;
padding-left: 5px !important;

}
/* This one does the right menu */

.VPDocOutlineItem li {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width: 200px;
}

.VPNavBar .title {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

@media (max-width: 960px) {
.VPDoc {
padding-left: 25px !important;
}
}

/* This one does the left menu */

/* .VPSidebarItem .VPLink p {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width: 200px;
} */
4 changes: 2 additions & 2 deletions docs/src/georegions/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Recall that there are three different types of `GeoRegion`s: (a) `RectRegion`s, (b) `TiltRegion`s and (c) `PolyRegion`s.

We use the functions `RectRegion()`, `TiltRegion()` and `PolyRegion` to create new `GeoRegion`s of their respective types.
!!! warn "saving GeoRegions"
!!! warning "saving GeoRegions"
As of GeoRegions.jl ≥v7, the abovementioned functions no longer automatically save GeoRegions.jl into the directory `joinpath(DEPOT_PATH[1],"files","GeoRegions")`. If you wish to automatically save new GeoRegions **as they are created** by these functions, specify the keyword argument `save = true`.

Regardless of `GeoRegion` type, the **first three inputs are always the same**, in respective order:
1. The ID (`ID`)
2. parent `GeoRegion` ID, (`pID`)
3. Name of the GeoRegion (`name`)

!!! note "`ID` and `pID`"
!!! warning "`ID` and `pID`"
When `save = true`, the GeoRegion `pID` must already have been previously defined, and the region defined by the GeoRegion `ID` must be entirely within the region defined by the GeoRegion `pID`.

## Defining a new RectRegion
Expand Down
6 changes: 3 additions & 3 deletions docs/src/georegions/predefined.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GeoRegion("GLB")

Add the `GF_` prefix to the 3-letter IDs given in Giorgi & Francisco [2000] to call GeoRegions adapted from this paper. All GeoRegions are defined as the `RectRegion` type.

!!! compat "Defined in GeoRegions > 1.1"
!!! tip "Defined in GeoRegions > 1.1"
All `GF_*` domains are defined only in versions ≥1.1

```@repl
Expand All @@ -27,7 +27,7 @@ To see the full list of predefined GeoRegions from Giorgi & Francisco [2000], go

Add the `SRX_` prefix to the 3-letter IDs given in Seneviratne et al. [2012] to call GeoRegions adapted from this paper. All GeoRegions are defined as the `PolyRegion` type, even though many of them are rectilinear.

!!! compat "Defined in GeoRegions ≧ 2"
!!! tip "Defined in GeoRegions ≧ 2"
All `SRX_*` domains are defined only in versions ≥2

```@repl
Expand All @@ -41,7 +41,7 @@ To see the full list of predefined GeoRegions from Seneviratne et al. [2012], go

Add the `AR6_` prefix to the 3-letter IDs given in Iturbide et al., [2020] to call GeoRegions adapted from this paper. All GeoRegions are defined as the `PolyRegion` type.

!!! compat "Defined in GeoRegions ≧ 2"
!!! tip "Defined in GeoRegions ≧ 2"
All `AR6_*` domains are defined only in versions ≥2

```@repl
Expand Down

0 comments on commit 4a33754

Please sign in to comment.