Refactor page components

pull/1331/head
Kamran Ahmed 3 years ago
parent d5b091a5ed
commit f03472127c
  1. 0
      components/guide/guide-grid-item.tsx
  2. 0
      components/roadmap/home-roadmap-item.tsx
  3. 0
      components/roadmap/roadmap-grid-item.tsx
  4. 0
      components/watch/video-grid-item.tsx
  5. 2
      package.json
  6. 18
      pages/[roadmap].tsx
  7. 2
      pages/guides/index.tsx
  8. 2
      pages/index.tsx
  9. 16
      pages/roadmaps.tsx
  10. 2
      pages/watch/index.tsx
  11. 4
      scripts/build.sh

@ -4,7 +4,7 @@
"private": true, "private": true,
"license": "BSD-4-Clause", "license": "BSD-4-Clause",
"scripts": { "scripts": {
"dev": "NODE_ENV=dev next", "dev": "next",
"serve:out": "serve out", "serve:out": "serve out",
"build": "./scripts/build.sh", "build": "./scripts/build.sh",
"deploy": "NODE_DEBUG=gh-pages gh-pages -d out -t", "deploy": "NODE_DEBUG=gh-pages gh-pages -d out -t",

@ -1,13 +1,13 @@
import { Box, Button, Container, Link, Stack } from '@chakra-ui/react'; import { Box, Button, Container, Link, Stack } from '@chakra-ui/react';
import { DownloadIcon, EmailIcon } from '@chakra-ui/icons'; import { DownloadIcon, EmailIcon } from '@chakra-ui/icons';
import { GlobalHeader } from '../../components/global-header'; import { GlobalHeader } from '../components/global-header';
import { OpensourceBanner } from '../../components/opensource-banner'; import { OpensourceBanner } from '../components/opensource-banner';
import { UpdatesBanner } from '../../components/updates-banner'; import { UpdatesBanner } from '../components/updates-banner';
import { Footer } from '../../components/footer'; import { Footer } from '../components/footer';
import { PageHeader } from '../../components/page-header'; import { PageHeader } from '../components/page-header';
import { getAllRoadmaps, getRoadmapById, RoadmapType } from '../../lib/roadmap'; import { getAllRoadmaps, getRoadmapById, RoadmapType } from '../lib/roadmap';
import MdRenderer from '../../components/md-renderer'; import MdRenderer from '../components/md-renderer';
import Helmet from '../../components/helmet'; import Helmet from '../components/helmet';
type RoadmapProps = { type RoadmapProps = {
roadmap: RoadmapType; roadmap: RoadmapType;
@ -36,7 +36,7 @@ function TextualRoadmap(props: RoadmapProps) {
// Remove trailing slashes // Remove trailing slashes
const normalizedPath = roadmap.contentPath.replace(/^\//, ''); const normalizedPath = roadmap.contentPath.replace(/^\//, '');
const RoadmapContent = require(`../../content/${normalizedPath}`).default; const RoadmapContent = require(`../content/${normalizedPath}`).default;
return ( return (
<Container maxW={'container.md'} position='relative'> <Container maxW={'container.md'} position='relative'>

@ -5,7 +5,7 @@ import { LinksListItem } from '../../components/links-list-item';
import { OpensourceBanner } from '../../components/opensource-banner'; import { OpensourceBanner } from '../../components/opensource-banner';
import { UpdatesBanner } from '../../components/updates-banner'; import { UpdatesBanner } from '../../components/updates-banner';
import { Footer } from '../../components/footer'; import { Footer } from '../../components/footer';
import { GuideGridItem } from './components/guide-grid-item'; import { GuideGridItem } from '../../components/guide/guide-grid-item';
import { PageHeader } from '../../components/page-header'; import { PageHeader } from '../../components/page-header';
import { getAllGuides, GuideType } from '../../lib/guide'; import { getAllGuides, GuideType } from '../../lib/guide';
import Helmet from '../../components/helmet'; import Helmet from '../../components/helmet';

@ -7,7 +7,7 @@ import { DimmedMore } from '../components/dimmed-more';
import { LinksListItem } from '../components/links-list-item'; import { LinksListItem } from '../components/links-list-item';
import { VideoIcon } from '../icons/video-icon'; import { VideoIcon } from '../icons/video-icon';
import { LinksList } from '../components/links-list'; import { LinksList } from '../components/links-list';
import { HomeRoadmapItem } from './roadmaps/components/home-roadmap-item'; import { HomeRoadmapItem } from '../components/roadmap/home-roadmap-item';
import { getFeaturedRoadmaps, RoadmapType } from '../lib/roadmap'; import { getFeaturedRoadmaps, RoadmapType } from '../lib/roadmap';
import { getAllGuides, GuideType } from '../lib/guide'; import { getAllGuides, GuideType } from '../lib/guide';
import { getAllVideos, VideoType } from '../lib/video'; import { getAllVideos, VideoType } from '../lib/video';

@ -1,12 +1,12 @@
import { Box, Container, SimpleGrid } from '@chakra-ui/react'; import { Box, Container, SimpleGrid } from '@chakra-ui/react';
import { GlobalHeader } from '../../components/global-header'; import { GlobalHeader } from '../components/global-header';
import { OpensourceBanner } from '../../components/opensource-banner'; import { OpensourceBanner } from '../components/opensource-banner';
import { UpdatesBanner } from '../../components/updates-banner'; import { UpdatesBanner } from '../components/updates-banner';
import { Footer } from '../../components/footer'; import { Footer } from '../components/footer';
import { PageHeader } from '../../components/page-header'; import { PageHeader } from '../components/page-header';
import { RoadmapGridItem } from './components/roadmap-grid-item'; import { RoadmapGridItem } from '../components/roadmap/roadmap-grid-item';
import { getAllRoadmaps, RoadmapType } from '../../lib/roadmap'; import { getAllRoadmaps, RoadmapType } from '../lib/roadmap';
import Helmet from '../../components/helmet'; import Helmet from '../components/helmet';
type RoadmapsProps = { type RoadmapsProps = {
roadmaps: RoadmapType[]; roadmaps: RoadmapType[];

@ -3,7 +3,7 @@ import { GlobalHeader } from '../../components/global-header';
import { OpensourceBanner } from '../../components/opensource-banner'; import { OpensourceBanner } from '../../components/opensource-banner';
import { UpdatesBanner } from '../../components/updates-banner'; import { UpdatesBanner } from '../../components/updates-banner';
import { Footer } from '../../components/footer'; import { Footer } from '../../components/footer';
import { VideoGridItem } from './components/video-grid-item'; import { VideoGridItem } from '../../components/watch/video-grid-item';
import { PageHeader } from '../../components/page-header'; import { PageHeader } from '../../components/page-header';
import { getAllVideos, VideoType } from '../../lib/video'; import { getAllVideos, VideoType } from '../../lib/video';
import Helmet from '../../components/helmet'; import Helmet from '../../components/helmet';

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
NODE_ENV=prod next build next build
NODE_ENV=prod next export next export
echo 'roadmap.sh' > out/CNAME echo 'roadmap.sh' > out/CNAME
touch out/.nojekyll touch out/.nojekyll

Loading…
Cancel
Save