Remove notes
This commit is contained in:
		@@ -7,14 +7,8 @@ import { Button, Card, Colors, Icon, Text } from "@blueprintjs/core";
 | 
			
		||||
import Link from "next/link";
 | 
			
		||||
import { useDarkMode } from "../ui/providers/dark-mode-provider";
 | 
			
		||||
import LANGUAGES from "./languages.json";
 | 
			
		||||
import { GitHubIcon } from "../ui/custom-icons";
 | 
			
		||||
import { Providers } from "../ui/providers";
 | 
			
		||||
 | 
			
		||||
const REPO_URL = "https://github.com/nilaymaj/esolang-park";
 | 
			
		||||
const WIKI_URL = REPO_URL + "/wiki";
 | 
			
		||||
const GUIDE_URL = REPO_URL + "/wiki/LP-Getting-Started";
 | 
			
		||||
const ISSUE_URL = REPO_URL + "/issues/new";
 | 
			
		||||
 | 
			
		||||
const styles = {
 | 
			
		||||
  topPanel: {
 | 
			
		||||
    position: "absolute" as "absolute",
 | 
			
		||||
@@ -64,16 +58,10 @@ const Index: NextPageWithLayout = () => {
 | 
			
		||||
      <div style={styles.topPanel}>
 | 
			
		||||
        <Button
 | 
			
		||||
          minimal
 | 
			
		||||
          title="Toggle between dark and light mode"
 | 
			
		||||
          title="Toggle light mode"
 | 
			
		||||
          icon={<Icon icon={DarkMode.isDark ? "flash" : "moon"} />}
 | 
			
		||||
          onClick={DarkMode.toggleDark}
 | 
			
		||||
        />
 | 
			
		||||
        <a href={WIKI_URL} title="Visit the project's wiki">
 | 
			
		||||
          <Button minimal icon={<Icon icon="book" />} />
 | 
			
		||||
        </a>
 | 
			
		||||
        <a href={REPO_URL} title="Visit the GitHub repository">
 | 
			
		||||
          <Button minimal icon={<Icon icon={<GitHubIcon />} />} />
 | 
			
		||||
        </a>
 | 
			
		||||
      </div>
 | 
			
		||||
      {/* Container for center content */}
 | 
			
		||||
      <div style={{ ...styles.rootContainer, backgroundColor }}>
 | 
			
		||||
@@ -86,9 +74,7 @@ const Index: NextPageWithLayout = () => {
 | 
			
		||||
            <h1>Esolang Park</h1>
 | 
			
		||||
          </Text>
 | 
			
		||||
        </div>
 | 
			
		||||
        <Text>
 | 
			
		||||
          <p>An online visual debugger for esoteric languages</p>
 | 
			
		||||
        </Text>
 | 
			
		||||
 | 
			
		||||
        {/* Language cards */}
 | 
			
		||||
        <div style={styles.langsContainer}>
 | 
			
		||||
          {LANGUAGES.map(({ display, id }) => (
 | 
			
		||||
@@ -101,14 +87,6 @@ const Index: NextPageWithLayout = () => {
 | 
			
		||||
            </Link>
 | 
			
		||||
          ))}
 | 
			
		||||
        </div>
 | 
			
		||||
        {/* "More esolangs" section */}
 | 
			
		||||
        <Text>
 | 
			
		||||
          <p>
 | 
			
		||||
            Need support for your favorite esolang? Submit an{" "}
 | 
			
		||||
            <a href={ISSUE_URL}>issue on GitHub</a> (or{" "}
 | 
			
		||||
            <a href={GUIDE_URL}>implement it yourself</a>!)
 | 
			
		||||
          </p>
 | 
			
		||||
        </Text>
 | 
			
		||||
      </div>
 | 
			
		||||
    </>
 | 
			
		||||
  );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,34 +1,10 @@
 | 
			
		||||
import * as React from "react";
 | 
			
		||||
import Image from "next/image";
 | 
			
		||||
import logoImg from "./assets/logo.png";
 | 
			
		||||
import { GitHubIcon } from "./custom-icons";
 | 
			
		||||
import { useDarkMode } from "./providers/dark-mode-provider";
 | 
			
		||||
import { Button, Card, Colors, Icon, Tag } from "@blueprintjs/core";
 | 
			
		||||
import { Button, Card, Icon, Tag } from "@blueprintjs/core";
 | 
			
		||||
import { useFeaturesGuide } from "./providers/features-guide-provider";
 | 
			
		||||
 | 
			
		||||
/** Link to the project's GitHub repository */
 | 
			
		||||
const REPO_LINK = "https://github.com/nilaymaj/esolang-park";
 | 
			
		||||
 | 
			
		||||
/** Link to the language's README.md page on GitHub */
 | 
			
		||||
const NOTES_LINK = (id: string) =>
 | 
			
		||||
  `https://github.com/nilaymaj/esolang-park/blob/main/languages/${id}/README.md`;
 | 
			
		||||
 | 
			
		||||
/** Hint text for the language notes button */
 | 
			
		||||
const LangNotesHint = (props: { show: boolean }) => {
 | 
			
		||||
  const { isDark } = useDarkMode();
 | 
			
		||||
  const color = isDark ? Colors.GRAY3 : Colors.GRAY2;
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <span
 | 
			
		||||
      className={"esolang-notes-hint " + (props.show ? "" : "hide")}
 | 
			
		||||
      style={{ color, marginRight: 10 }}
 | 
			
		||||
    >
 | 
			
		||||
      <span style={{ marginRight: 5 }}>Read the esolang notes</span>
 | 
			
		||||
      <Icon icon="arrow-right"></Icon>
 | 
			
		||||
    </span>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
type Props = {
 | 
			
		||||
  langId: string;
 | 
			
		||||
  langName: string;
 | 
			
		||||
@@ -78,30 +54,18 @@ export const Header = (props: Props) => {
 | 
			
		||||
        alignItems: "center",
 | 
			
		||||
      }}
 | 
			
		||||
    >
 | 
			
		||||
      <LangNotesHint show={showNotesHint} />
 | 
			
		||||
      <a
 | 
			
		||||
        target="_blank"
 | 
			
		||||
        href={NOTES_LINK(props.langId)}
 | 
			
		||||
        onMouseEnter={() => setShowNotesHint(false)}
 | 
			
		||||
        title="View the notes for this esolang"
 | 
			
		||||
      >
 | 
			
		||||
        <Button minimal icon={<Icon icon="document" />} />
 | 
			
		||||
      </a>
 | 
			
		||||
      <Button
 | 
			
		||||
        minimal
 | 
			
		||||
        title="View the features guide"
 | 
			
		||||
        title="View the feature guide"
 | 
			
		||||
        icon={<Icon icon="help" />}
 | 
			
		||||
        onClick={featuresGuide.show}
 | 
			
		||||
      />
 | 
			
		||||
      <Button
 | 
			
		||||
        minimal
 | 
			
		||||
        title="Toggle between dark and light mode"
 | 
			
		||||
        title="Toggle light mode"
 | 
			
		||||
        icon={<Icon icon={DarkMode.isDark ? "flash" : "moon"} />}
 | 
			
		||||
        onClick={DarkMode.toggleDark}
 | 
			
		||||
      />
 | 
			
		||||
      <a href={REPO_LINK} title="GitHub repository" target="_blank">
 | 
			
		||||
        <Button minimal icon={<Icon icon={<GitHubIcon />} />} />
 | 
			
		||||
      </a>
 | 
			
		||||
    </div>
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user