This commit is contained in:
Elinorre 2020-01-22 20:20:52 +03:00
parent 1bed723eac
commit 0380d76926
2 changed files with 19 additions and 57 deletions

View File

@ -46,7 +46,7 @@ module.exports = {
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `gatsby-starter-default`,
name: `npm-site`,
short_name: `npm`,
start_url: `/`,
display: `minimal-ui`,

View File

@ -3,73 +3,35 @@ export function onRenderBody(
{ setHeadComponents, setPostBodyComponents }
) {
setHeadComponents([
<script
key="head0"
type="text/css"
href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css"
/>,
<script
key="head1"
type="text/javascript"
src="https://cdn.plot.ly/plotly-latest.min.js"
/>,
// <script
// key="head2"
// type="text/javascript"
// src="./main.bundle.js"
// />,
<script
key="head3"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.css"
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
/>,
<script
key="head4"
type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css"
/>,
<script
key="head5"
key="head2"
type="text/javascript"
src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
stc="https://code.jquery.com/jquery-3.4.1.js"
/>,
<script
key="head6"
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"
/>,
<script
dangerouslySetInnerHTML={{
__html: `
var tooltip = false;
function toggleHelp() {
tooltip = !tooltip;
if (tooltip) {
$(function () {
$('[data-toggle="tooltip"]').tooltip('show')
})
} else {
$(function () {
$('[data-toggle="tooltip"]').tooltip('hide')
})
}
}
`
}}
/>
]);
setPostBodyComponents([
<script
key="postbody1"
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
/>,
<script
key="postbody1"
type="text/javascript"
src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js"
/>,
/>,
<script
key="activePage"
dangerouslySetInnerHTML={{
__html: `
let curActive = [' ', ' ', ' '];
if (document.location.pathname === '/about'){curActive[0] = 'active';}
if (document.location.pathname === '/projects/physics' || document.location.pathname === '/projects/education' || document.location.pathname === '/projects/math' || document.location.pathname === '/projects/software'){curActive[1] = 'active';}
if (document.location.pathname === '/partners'){curActive[2] = 'active';}
`
}}
/>
]);
setPostBodyComponents([
]);
}