Skip to content

Commit

Permalink
[docs] Use docs-page-shell (mapbox#7742)
Browse files Browse the repository at this point in the history
* Use docs-page-shell

* fix p pre nesting error

* updates docs-page-shell

* adds cushion for footer

* adds spaces

* adds margin-left to footer to clear left_nav

* rm pad4 for consistent padding around content pages

* adds z-index to page-footer to make links active
  • Loading branch information
davidtheclark authored and katydecorah committed Jan 8, 2019
1 parent de17c18 commit e27786c
Show file tree
Hide file tree
Showing 10 changed files with 1,810 additions and 4,007 deletions.
4 changes: 2 additions & 2 deletions batfish.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = () => {
stylesheets: [
`${__dirname}/docs/components/site.css`,
`${__dirname}/docs/components/prism_highlight.css`,
`${__dirname}/vendor/dotcom-page-shell/page-shell-styles.css`
`${__dirname}/vendor/docs-page-shell/page-shell-styles.css`
],
applicationWrapperPath: `${__dirname}/docs/components/application-wrapper.js`,
webpackLoaders: [
Expand All @@ -30,7 +30,7 @@ module.exports = () => {
],
inlineJs: [
{
filename: `${__dirname}/vendor/dotcom-page-shell/page-shell-script.js`
filename: `${__dirname}/vendor/docs-page-shell/page-shell-script.js`
}
],
dataSelectors: {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/page_shell.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Helmet from 'react-helmet';
import ReactPageShell from '../../vendor/dotcom-page-shell/react-page-shell.js';
import ReactPageShell from '../../vendor/docs-page-shell/react-page-shell.js';

// initialize analytics
if (typeof window !== 'undefined' && window.initializeMapboxAnalytics) {
Expand Down
12 changes: 4 additions & 8 deletions docs/components/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,15 @@ export default class extends React.Component {

render() {
return (
<section className='pad4 contain'>
<section className='contain'>
<h1 className=''>Mapbox GL JS</h1>
<div className='pad1y quiet small'>Current version:
<span className='round fill-light pad0'><a href='https://github.com/mapbox/mapbox-gl-js/releases'>mapbox-gl.js v{version}</a></span>
</div>
<div className='prose space-bottom2'>
<p className='space-bottom2 pad1y'>
Mapbox GL JS is a JavaScript library that uses WebGL to render interactive maps from
<a href='https://www.mapbox.com/help/define-vector-tiles'>vector tiles</a> and
<a href={prefixUrl('/style-spec')}>Mapbox styles</a>.
It is part of the Mapbox GL ecosystem, which includes
<a href='https://www.mapbox.com/mobile/'>Mapbox Mobile</a>,
Mapbox GL JS is a JavaScript library that uses WebGL to render interactive maps from{' '}<a href='https://www.mapbox.com/help/define-vector-tiles'>vector tiles</a> and{' '}<a href={prefixUrl('/style-spec')}>Mapbox styles</a>.
It is part of the Mapbox GL ecosystem, which includes{' '}<a href='https://www.mapbox.com/mobile/'>Mapbox Mobile</a>,
a compatible renderer written in C++ with bindings
for desktop and mobile platforms. To see what new features our team is working on,
take a look at our <a href={prefixUrl('/roadmap')}>roadmap</a>.
Expand Down Expand Up @@ -156,8 +153,7 @@ export default class extends React.Component {
Including it with a {'<link>'} in the head of the document via the Mapbox CDN is
the simplest and easiest way to provide the CSS,
but it is also bundled in the Mapbox module, meaning that if you have a bundler
that can handle CSS, you can import the CSS from
<pre><code>{`mapbox-gl/dist/mapbox-gl.css`}</code></pre>.
that can handle CSS, you can import the CSS from <code>{`mapbox-gl/dist/mapbox-gl.css`}</code>.
</p>
<p>
Note too that if the CSS isn't available by the first render, as soon as the CSS is provided,
Expand Down
11 changes: 11 additions & 0 deletions docs/components/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ a.dark-link:hover {

div.toggle-sibling:hover { opacity: 0.7; }
.line-height15 {line-height: 15px}

@media only screen and (min-width: 640px) {
#page-footer-legal-social {
margin-left: 25% !important;
}
}

#page-footer {
z-index: 1;
position: relative;
}
2 changes: 2 additions & 0 deletions vendor/docs-page-shell/page-shell-script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e27786c

Please sign in to comment.