Skip to content

Commit

Permalink
remove console.logs, and add images for new courses (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north authored Oct 2, 2023
1 parent d740bfe commit 446cb9e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 14 deletions.
12 changes: 6 additions & 6 deletions packages/website/content/courses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ courses:
visibleInTopNav: false
visibleInCourseIndex: false
visibleInCoursePage: true
squareImage: /ts-fundamentals-v3.png
facebookImage: /fb-ts-fundamentals-v3.png
twitterImage: /tw-ts-fundamentals-v3.png
squareImage: /ts-fundamentals-v4.png
facebookImage: /fb-ts-fundamentals-v4.png
twitterImage: /tw-ts-fundamentals-v4.png
femCourseUrl: https://frontendmasters.com/courses/typescript-v4/
femCoursePublished: false
femWorkshopUrl: https://frontendmasters.com/workshops/typescript-v4/
Expand Down Expand Up @@ -83,9 +83,9 @@ courses:
type-checked code bases that are shockingly easy to refactor and maintain.
- name: "Intermediate TypeScript"
id: intermediate-v2
squareImage: /intermediate-ts.png
facebookImage: /fb-intermediate-ts.png
twitterImage: /tw-intermediate-ts.png
squareImage: /intermediate-ts-v2.png
facebookImage: /fb-intermediate-ts-v2.png
twitterImage: /tw-intermediate-ts-v2.png
femCourseUrl: https://frontendmasters.com/courses/intermediate-typescript-v2/
femCoursePublished: false
femWorkshopUrl: https://frontendmasters.com/workshops/intermediate-typescript-v2/
Expand Down
3 changes: 1 addition & 2 deletions packages/website/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports.createPages = async ({ graphql, actions }) => {
);
const { courses } = ymlDoc;
courses.forEach((element) => {
console.log(`Creating page: ${JSON.stringify(element)}`);
console.log(`Creating page: ${element.id}`);
createPage({
path: `/course/${element.id}`,
component: require.resolve('./src/templates/course-page.tsx'),
Expand Down Expand Up @@ -134,7 +134,6 @@ exports.createPages = async ({ graphql, actions }) => {
* @type {import('gatsby').GatsbyNode<any, any>['onCreateNode']}
*/
exports.onCreateNode = ({ node, actions, getNode }) => {
// console.log(`Node created of type "${node.internal.type}"`);

const { createNodeField } = actions;

Expand Down
2 changes: 0 additions & 2 deletions packages/website/src/components/course-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ interface ICourseLayoutProps {

const CourseLayout: React.FunctionComponent<ICourseLayoutProps> = ({
courses,
courseGroups,
children,
padTop
}) => {
console.log({ courses, courseGroups })
const header = (
<ul className={padTop ? "course-tabs pad-top" : "course-tabs"}>
{courses.filter(c => c.visibleInTopNav).map((c) => (
Expand Down
1 change: 0 additions & 1 deletion packages/website/src/templates/blog-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const BlogPostTemplate: React.FunctionComponent<IBlogPostTemplateProps> = ({
useEffect(setupTwoslashHovers, []);

const postHtml = makeHTMLAdjustments(post.html);
console.log(post);
const course = data.site.siteMetadata.courses.find(
(c) => c.id === post.frontmatter.course,
);
Expand Down
4 changes: 2 additions & 2 deletions packages/website/src/templates/course-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ const CoursePageTemplate: React.FunctionComponent<
ICourseTemplateProps
> = ({ pageContext: course, data }): JSX.Element => {
if (!course) throw new Error('no course');
console.log({ course })

const { courses, courseGroups } = data.site.siteMetadata;
const posts = data.allMarkdownRemark.edges;
let urlBanner: JSX.Element | null = null;
const { femCoursePublished, femCourseUrl, femWorkshopPublished, femWorkshopUrl } = course;
console.log({ femCourseUrl });

if (femCourseUrl) {
if (femCoursePublished) {
urlBanner = (
Expand Down
1 change: 0 additions & 1 deletion packages/website/src/utils/setup-two-slash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const getRootRect = (element: HTMLElement): DOMRect => {
const setupTwoslashHovers = (): void => {
// prettier-ignore
const twoslashes = document.querySelectorAll('.shiki.twoslash')
console.log(twoslashes);
// Gets triggered on the spans inside the codeblocks
const hover = (event: Event) => {
const hovered = event.target as HTMLElement;
Expand Down
Binary file added packages/website/static/enterprise-ts-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/website/static/intermediate-ts-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/website/static/ts-fundamentals-v4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 446cb9e

Please sign in to comment.