Skip to content

Commit e06600d

Browse files
author
Documenter.jl
committed
delete history
0 parents  commit e06600d

75 files changed

Lines changed: 4026 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import { defineConfig } from 'vitepress'
2+
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
3+
import mathjax3 from "markdown-it-mathjax3";
4+
import footnote from "markdown-it-footnote";
5+
import path from 'path'
6+
7+
function getBaseRepository(base: string): string {
8+
if (!base || base === '/') return '/';
9+
const parts = base.split('/').filter(Boolean);
10+
return parts.length > 0 ? `/${parts[0]}/` : '/';
11+
}
12+
13+
const baseTemp = {
14+
base: '/BioTutorials/dev/',// TODO: replace this in makedocs!
15+
}
16+
17+
const navTemp = {
18+
nav: [
19+
{ text: 'Rosalind.info', collapsed: false, items: [
20+
{ text: '🧑‍🔬 Getting Started with Rosalind.info Problems', link: '/rosalind/index' },
21+
{ text: '🧬 Problem 1: Counting DNA nucleotides', link: '/rosalind/01-dna' },
22+
{ text: '✍️ Problem 2: Transcription', link: '/rosalind/02-rna' },
23+
{ text: '😉 Problem 3 - Getting the complement', link: '/rosalind/03-revc' },
24+
{ text: '♻️ 🐇 Rabbits and Recurrence Relations', link: '/rosalind/04-fib' },
25+
{ text: '🧮 Computing GC content', link: '/rosalind/05-gc' }]
26+
}
27+
]
28+
,
29+
}
30+
31+
const nav = [
32+
...navTemp.nav,
33+
{
34+
component: 'VersionPicker'
35+
}
36+
]
37+
38+
// https://vitepress.dev/reference/site-config
39+
export default defineConfig({
40+
base: '/BioTutorials/dev/',// TODO: replace this in makedocs!
41+
title: 'BioTutorials',
42+
description: 'Documentation for BioTutorials',
43+
lastUpdated: true,
44+
cleanUrls: true,
45+
outDir: '../1', // This is required for MarkdownVitepress to work correctly...
46+
head: [
47+
48+
['script', {src: `${getBaseRepository(baseTemp.base)}versions.js`}],
49+
// ['script', {src: '/versions.js'], for custom domains, I guess if deploy_url is available.
50+
['script', {src: `${baseTemp.base}siteinfo.js`}]
51+
],
52+
53+
vite: {
54+
define: {
55+
__DEPLOY_ABSPATH__: JSON.stringify('/BioTutorials'),
56+
},
57+
resolve: {
58+
alias: {
59+
'@': path.resolve(__dirname, '../components')
60+
}
61+
},
62+
optimizeDeps: {
63+
exclude: [
64+
'@nolebase/vitepress-plugin-enhanced-readabilities/client',
65+
'vitepress',
66+
'@nolebase/ui',
67+
],
68+
},
69+
ssr: {
70+
noExternal: [
71+
// If there are other packages that need to be processed by Vite, you can add them here.
72+
'@nolebase/vitepress-plugin-enhanced-readabilities',
73+
'@nolebase/ui',
74+
],
75+
},
76+
},
77+
markdown: {
78+
math: true,
79+
config(md) {
80+
md.use(tabsMarkdownPlugin),
81+
md.use(mathjax3),
82+
md.use(footnote)
83+
},
84+
theme: {
85+
light: "github-light",
86+
dark: "github-dark"}
87+
},
88+
themeConfig: {
89+
outline: 'deep',
90+
91+
search: {
92+
provider: 'local',
93+
options: {
94+
detailedView: true
95+
}
96+
},
97+
nav,
98+
sidebar: [
99+
{ text: 'Rosalind.info', collapsed: false, items: [
100+
{ text: '🧑‍🔬 Getting Started with Rosalind.info Problems', link: '/rosalind/index' },
101+
{ text: '🧬 Problem 1: Counting DNA nucleotides', link: '/rosalind/01-dna' },
102+
{ text: '✍️ Problem 2: Transcription', link: '/rosalind/02-rna' },
103+
{ text: '😉 Problem 3 - Getting the complement', link: '/rosalind/03-revc' },
104+
{ text: '♻️ 🐇 Rabbits and Recurrence Relations', link: '/rosalind/04-fib' },
105+
{ text: '🧮 Computing GC content', link: '/rosalind/05-gc' }]
106+
}
107+
]
108+
,
109+
editLink: { pattern: "https://https://github.com/BioJulia/BioTutorials/edit/main/docs/src/:path" },
110+
socialLinks: [
111+
{ icon: 'github', link: 'https://github.com/BioJulia/BioTutorials' }
112+
],
113+
footer: {
114+
message: 'Made with <a href="https://luxdl.github.io/DocumenterVitepress.jl/dev/" target="_blank"><strong>DocumenterVitepress.jl</strong></a><br>',
115+
copyright: `© Copyright ${new Date().getUTCFullYear()}.`
116+
}
117+
}
118+
})
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.jldocstring.custom-block {
2+
border: 1px solid var(--vp-c-gray-2);
3+
color: var(--vp-c-text-1);
4+
overflow: hidden;
5+
}
6+
7+
.jldocstring.custom-block summary {
8+
font-weight: 700;
9+
cursor: pointer;
10+
user-select: none;
11+
margin: 0 0 8px;
12+
}
13+
.jldocstring.custom-block summary a {
14+
pointer-events: none;
15+
text-decoration: none;
16+
}
17+
18+
.jldocstring.custom-block .source-link {
19+
border: 1px solid var(--vp-c-gray-2);
20+
border-radius: 4px;
21+
text-decoration: none;
22+
background-color: #414040;
23+
float: right;
24+
opacity: 0;
25+
visibility: hidden;
26+
transform: translateY(-5px);
27+
transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
28+
}
29+
30+
.jldocstring.custom-block .source-link a {
31+
text-decoration: none;
32+
color: #e5e5e5;
33+
}
34+
35+
.jldocstring.custom-block .source-link a:hover {
36+
text-decoration: underline;
37+
}
38+
39+
.jldocstring.custom-block:hover .source-link {
40+
opacity: 1;
41+
visibility: visible;
42+
transform: translateY(0);
43+
}
44+
45+
@media (max-width: 768px) {
46+
.jldocstring.custom-block .source-link {
47+
opacity: 1;
48+
visibility: visible;
49+
transform: translateY(0);
50+
}
51+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// .vitepress/theme/index.ts
2+
import { h } from 'vue'
3+
import DefaultTheme from 'vitepress/theme'
4+
import type { Theme as ThemeConfig } from 'vitepress'
5+
6+
import {
7+
NolebaseEnhancedReadabilitiesMenu,
8+
NolebaseEnhancedReadabilitiesScreenMenu,
9+
} from '@nolebase/vitepress-plugin-enhanced-readabilities/client'
10+
11+
import VersionPicker from "@/VersionPicker.vue"
12+
import AuthorBadge from '@/AuthorBadge.vue'
13+
import Authors from '@/Authors.vue'
14+
15+
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
16+
17+
import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css'
18+
import './style.css' // You could setup your own, or else a default will be copied.
19+
import './docstrings.css' // You could setup your own, or else a default will be copied.
20+
21+
export const Theme: ThemeConfig = {
22+
extends: DefaultTheme,
23+
Layout() {
24+
return h(DefaultTheme.Layout, null, {
25+
'nav-bar-content-after': () => [
26+
h(NolebaseEnhancedReadabilitiesMenu), // Enhanced Readabilities menu
27+
],
28+
// A enhanced readabilities menu for narrower screens (usually smaller than iPad Mini)
29+
'nav-screen-content-after': () => h(NolebaseEnhancedReadabilitiesScreenMenu),
30+
})
31+
},
32+
enhanceApp({ app, router, siteData }) {
33+
enhanceAppWithTabs(app);
34+
app.component('VersionPicker', VersionPicker);
35+
app.component('AuthorBadge', AuthorBadge)
36+
app.component('Authors', Authors)
37+
}
38+
}
39+
export default Theme
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
/* Customize default theme styling by overriding CSS variables:
2+
https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css */
3+
/* Example */
4+
/* https://github.com/vuejs/vitepress/blob/main/template/.vitepress/theme/style.css */
5+
6+
.VPHero .clip {
7+
white-space: pre;
8+
max-width: 600px;
9+
}
10+
11+
/* Fonts */
12+
@font-face {
13+
font-family: JuliaMono-Regular;
14+
src: url("https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2");
15+
}
16+
17+
:root {
18+
/* Typography */
19+
--vp-font-family-base: "Barlow", "Inter var experimental", "Inter var",
20+
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
21+
Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
22+
23+
/* Code Snippet font */
24+
--vp-font-family-mono: JuliaMono-Regular, monospace;
25+
}
26+
27+
/* Disable contextual alternates (kind of like ligatures but different) in monospace,
28+
which turns `/>` to an up arrow and `|>` (the Julia pipe symbol) to an up arrow as well. */
29+
.mono-no-substitutions {
30+
font-family: "JuliaMono-Regular", monospace;
31+
font-feature-settings: "calt" off;
32+
}
33+
34+
.mono-no-substitutions-alt {
35+
font-family: "JuliaMono-Regular", monospace;
36+
font-variant-ligatures: none;
37+
}
38+
39+
pre, code {
40+
font-family: "JuliaMono-Regular", monospace;
41+
font-feature-settings: "calt" off;
42+
}
43+
44+
/* Colors */
45+
:root {
46+
--julia-blue: #4063D8;
47+
--julia-purple: #9558B2;
48+
--julia-red: #CB3C33;
49+
--julia-green: #389826;
50+
51+
--vp-c-brand: #0087d7;
52+
--vp-c-brand-1: #0890df;
53+
--vp-c-brand-2: #0599ef;
54+
--vp-c-brand-3: #0c9ff4;
55+
--vp-c-brand-light: #0087d7;
56+
--vp-c-brand-dark: #5fd7ff;
57+
--vp-c-brand-dimm: #212425;
58+
59+
/* Greens */
60+
--vp-dark-green: #155f3e; /* Main accent green */
61+
--vp-dark-green-dark: #2b855c;
62+
--vp-dark-green-light: #42d392;
63+
--vp-dark-green-lighter: #35eb9a;
64+
/* Complementary Colors */
65+
--vp-dark-gray: #1e1e1e;
66+
--vp-dark-gray-soft: #2a2a2a;
67+
--vp-dark-gray-mute: #242424;
68+
--vp-light-gray: #d1d5db;
69+
--vp-tip-bg: rgb(254, 254, 254);
70+
71+
/* Text Colors */
72+
--vp-dark-text: #e5e5e5; /* Primary text color */
73+
--vp-dark-subtext: #c1c1c1; /* Subtle text */
74+
--vp-source-text: #e5e5e5;
75+
/* custom tip */
76+
--vp-custom-block-tip-border: var(--vp-c-brand-light);
77+
--vp-custom-block-tip-bg: var(--vp-tip-bg);
78+
}
79+
80+
/* Component: Button */
81+
:root {
82+
--vp-button-brand-border: var(--vp-light-gray);
83+
--vp-button-brand-bg: var(--vp-c-brand-light);
84+
--vp-button-brand-hover-border: var(--vp-c-bg-alt);
85+
--vp-button-brand-hover-bg: var(--julia-blue);
86+
}
87+
88+
/* Component: Home */
89+
:root {
90+
--vp-home-hero-name-color: transparent;
91+
--vp-home-hero-name-background: -webkit-linear-gradient(
92+
120deg,
93+
#9558B2 30%,
94+
#CB3C33
95+
);
96+
97+
--vp-home-hero-image-background-image: linear-gradient(
98+
-145deg,
99+
#9558b282 30%,
100+
#3798269a 30%,
101+
#cb3d33e3
102+
);
103+
--vp-home-hero-image-filter: blur(40px);
104+
}
105+
106+
/* Hero Section */
107+
:root.dark {
108+
--vp-home-hero-name-color: transparent;
109+
--vp-home-hero-name-background: -webkit-linear-gradient(
110+
120deg,
111+
var(--julia-purple) 15%,
112+
var(--vp-dark-green-light),
113+
var(--vp-dark-green)
114+
115+
);
116+
--vp-home-hero-image-background-image: linear-gradient(
117+
-45deg,
118+
var(--vp-dark-green) 30%,
119+
var(--vp-dark-green-light),
120+
var(--vp-dark-gray) 30%
121+
);
122+
--vp-home-hero-image-filter: blur(56px);
123+
}
124+
125+
:root.dark {
126+
/* custom tip */
127+
--vp-custom-block-tip-border: var(--vp-dark-green-dark);
128+
--vp-custom-block-tip-text: var(--vp-dark-subtext);
129+
--vp-custom-block-tip-bg: var(--vp-dark-gray-mute);
130+
}
131+
132+
/**
133+
* Colors links
134+
* -------------------------------------------------------------------------- */
135+
136+
.dark {
137+
--vp-c-brand: var(--vp-dark-green-light);
138+
--vp-button-brand-border: var(--vp-dark-green-lighter);
139+
--vp-button-brand-bg: var(--vp-dark-green);
140+
--vp-c-brand-1: var(--vp-dark-green-light);
141+
--vp-c-brand-2: var(--vp-dark-green-lighter);
142+
--vp-c-brand-3: var(--vp-dark-green);
143+
}
144+
145+
@media (min-width: 640px) {
146+
:root {
147+
--vp-home-hero-image-filter: blur(56px);
148+
}
149+
}
150+
151+
@media (min-width: 960px) {
152+
:root {
153+
--vp-home-hero-image-filter: blur(72px);
154+
}
155+
}
156+
/* Component: MathJax */
157+
158+
mjx-container > svg {
159+
display: block;
160+
margin: auto;
161+
}
162+
163+
mjx-container {
164+
padding: 0.5rem 0;
165+
}
166+
167+
mjx-container {
168+
display: inline;
169+
margin: auto 2px -2px;
170+
}
171+
172+
mjx-container > svg {
173+
margin: auto;
174+
display: inline-block;
175+
}

0 commit comments

Comments
 (0)