Skip to content

Commit

Permalink
Update website dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanzab committed May 23, 2020
1 parent 40832c9 commit deffa39
Show file tree
Hide file tree
Showing 8 changed files with 2,136 additions and 1,872 deletions.
53 changes: 26 additions & 27 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ module.exports = {
themeConfig: {
// sidebarCollapsible: false,
prism: {
theme: require("prism-react-renderer/themes/palenight")
theme: require("prism-react-renderer/themes/palenight"),
},
navbar: {
title: "Pikelet",
logo: {
alt: "My Site Logo",
src: "img/logo.svg"
src: "img/logo.svg",
},
links: [
{
label: "Docs",
to: "docs/pikelet/introduction",
position: "right"
position: "right",
},
// {
// label: "Blog",
Expand All @@ -31,14 +31,14 @@ module.exports = {
{
label: "GitHub",
href: "https://github.com/pikelet-lang/pikelet",
position: "right"
position: "right",
},
{
label: "Gitter",
href: "https://gitter.im/pikelet-lang/Lobby",
position: "right"
}
]
position: "right",
},
],
},
footer: {
style: "dark",
Expand All @@ -48,42 +48,42 @@ module.exports = {
items: [
{ to: "docs/guide", label: "Guide" },
{ to: "docs/reference", label: "Reference" },
{ to: "docs/specification", label: "Specification" }
]
{ to: "docs/specification", label: "Specification" },
],
},
{
title: "Community",
items: [
{
label: "Gitter",
href: "https://gitter.im/pikelet-lang/Lobby"
href: "https://gitter.im/pikelet-lang/Lobby",
},
{
label: "Discord (Unofficial)",
href: "https://discord.gg/vQtyxjZ"
}
]
href: "https://discord.gg/vQtyxjZ",
},
],
},
{
title: "Social",
items: [
{
label: "Blog",
to: "blog"
to: "blog",
},
{
label: "GitHub",
href: "https://github.com/pikelet-lang/pikelet"
href: "https://github.com/pikelet-lang/pikelet",
},
{
label: "Twitter",
href: "https://twitter.com/pikelet-lang"
}
]
}
href: "https://twitter.com/pikelet-lang",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Brendan Zabarauskas. Built with Docusaurus.`
}
copyright: `Copyright © ${new Date().getFullYear()} Brendan Zabarauskas. Built with Docusaurus.`,
},
},
presets: [
[
Expand All @@ -93,7 +93,6 @@ module.exports = {
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
"https://github.com/pikelet-lang/pikelet/edit/master/website/",
remarkPlugins: [[require("remark-admonitions"), {}]]
},
// blog: {
// feedOptions: {
Expand All @@ -104,9 +103,9 @@ module.exports = {
// }
// },
theme: {
customCss: require.resolve("./src/css/custom.css")
}
}
]
]
customCss: require.resolve("./src/css/custom.css"),
},
},
],
],
};
9 changes: 4 additions & 5 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
"deploy": "docusaurus deploy"
},
"dependencies": {
"@docusaurus/core": "^2.0.0-alpha.40",
"@docusaurus/preset-classic": "^2.0.0-alpha.40",
"@docusaurus/core": "^2.0.0-alpha.55",
"@docusaurus/preset-classic": "^2.0.0-alpha.55",
"classnames": "^2.2.6",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"remark-admonitions": "^1.0.0"
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"browserslist": {
"production": [
Expand Down
34 changes: 19 additions & 15 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ module.exports = {
{
type: "category",
label: "Pikelet",
items: ["pikelet/introduction", "pikelet/roadmap", "pikelet/contributing"]
items: [
"pikelet/introduction",
"pikelet/roadmap",
"pikelet/contributing",
],
},
{
type: "category",
Expand All @@ -20,8 +24,8 @@ module.exports = {
"guide/getting-started",
"guide/hello-world",
"guide/data-structures",
"guide/modular-programming"
]
"guide/modular-programming",
],
},
{
type: "category",
Expand All @@ -38,12 +42,12 @@ module.exports = {
"reference/builtins",
"reference/functions",
"reference/records",
"reference/universes"
]
"reference/universes",
],
},
"reference/bibliography",
"reference/influences"
]
"reference/influences",
],
},
{
type: "category",
Expand All @@ -56,20 +60,20 @@ module.exports = {
items: [
"specification/surface/lexical-structure",
"specification/surface/grammar",
"specification/surface/elaboration"
]
"specification/surface/elaboration",
],
},
{
type: "category",
label: "Core Language",
items: [
"specification/core/operational-semantics",
"specification/core/declarative-typing",
"specification/core/bidirectional-typing"
]
"specification/core/bidirectional-typing",
],
},
"specification/inspiration"
]
}
]
"specification/inspiration",
],
},
],
};
96 changes: 0 additions & 96 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,99 +22,3 @@
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}

/* remark-admonitions
*
* From: https://github.com/elviswolcott/remark-admonitions#infima-docusaurus-v2
*/

/* Based on the styling for alerts */
.admonition {
background-color: var(--ifm-alert-background-color);
border: var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);
border-radius: var(--ifm-alert-border-radius);
box-sizing: border-box;
color: var(--ifm-alert-color);
padding: var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal);
margin-bottom: 1em;
}

.admonition h5 {
margin-top: 0;
margin-bottom: 8px;
text-transform: uppercase;
}

.admonition-icon {
display: inline-block;
vertical-align: middle;
margin-right: 0.2em;
}

.admonition-icon svg {
display: inline-block;
width: 22px;
height: 22px;
stroke-width: 0;
}

.admonition-content > :last-child {
margin-bottom: 0;
}

.admonition .admonition-icon svg {
stroke: var(--ifm-alert-color);
fill: var(--ifm-alert-color);
}

/* default for custom types */

.admonition {
--ifm-alert-background-color: var(--ifm-color-primary)
}

/* styles for native types */

.admonition-important {
color: var(--ifm-alert-color);
background-color: var(--ifm-alert-background-color);
border-color: var(--ifm-alert-background-color)
}

.admonition-tip {
--ifm-alert-background-color: var(--ifm-color-success)
}

.admonition-important, .admonition-tip {
color: var(--ifm-alert-color);
background-color: var(--ifm-alert-background-color);
border-color: var(--ifm-alert-background-color)
}

.admonition-important {
--ifm-alert-background-color:var(--ifm-color-info)
}

.admonition-warning {
--ifm-alert-background-color:var(--ifm-color-warning)
}

.admonition-note {
--ifm-alert-background-color:var(--ifm-color-secondary);
color: var(--ifm-color-gray-900);
}

.admonition-note .admonition-icon svg {
fill: var(--ifm-color-gray-900);
stroke: var(--ifm-color-gray-900);
}

.admonition-caution,.admonition-warning {
color: var(--ifm-alert-color);
background-color: var(--ifm-alert-background-color);
border-color: var(--ifm-alert-background-color)
}

.admonition-caution {
--ifm-alert-background-color:var(--ifm-color-danger)
}
8 changes: 4 additions & 4 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const features = [
Docusaurus was designed from the ground up to be easily installed and
used to get your website up and running quickly.
</>
)
),
},
{
title: <>Focus on What Matters</>,
Expand All @@ -25,7 +25,7 @@ const features = [
Docusaurus lets you focus on your docs, and we&apos;ll do the chores. Go
ahead and move your docs into the <code>docs</code> directory.
</>
)
),
},
{
title: <>Powered by React</>,
Expand All @@ -35,8 +35,8 @@ const features = [
Extend or customize your website layout by reusing React. Docusaurus can
be extended while reusing the same header and footer.
</>
)
}
),
},
];

function Feature({ imageUrl, title, description }) {
Expand Down
10 changes: 6 additions & 4 deletions website/src/theme/CodeBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const highlightLinesRangeRegex = /{([\d,-]+)}/;
export default ({ children, className: languageClassName, metastring }) => {
const {
siteConfig: {
themeConfig: { prism = {} }
}
themeConfig: { prism = {} },
},
} = useDocusaurusContext();
const [showCopied, setShowCopied] = useState(false);
const target = useRef(null);
Expand All @@ -34,15 +34,17 @@ export default ({ children, className: languageClassName, metastring }) => {

if (metastring && highlightLinesRangeRegex.test(metastring)) {
const highlightLinesRange = metastring.match(highlightLinesRangeRegex)[1];
highlightLines = rangeParser.parse(highlightLinesRange).filter(n => n > 0);
highlightLines = rangeParser
.parse(highlightLinesRange)
.filter((n) => n > 0);
}

useEffect(() => {
let clipboard;

if (button.current) {
clipboard = new Clipboard(button.current, {
target: () => target.current
target: () => target.current,
});
}

Expand Down
Loading

0 comments on commit deffa39

Please sign in to comment.