3)",
Unclassified: "Unclassified",
-}
+};
export default function ReduceToRowReact({
url,
@@ -75,15 +77,15 @@ export default function ReduceToRowReact({
async function reduceRequest() {
setReducedInstance(
chosenReductionType && problemInstance
- ? (await requestReducedInstanceFromPath(url, chosenReductionType, problemInstance)) ?? ""
- : ""
+ ? ((await requestReducedInstanceFromPath(url, chosenReductionType, problemInstance)) ?? "")
+ : "",
);
}
async function handleDownload() {
- const blob = new Blob([reducedInstance], { type: 'text/plain' });
+ const blob = new Blob([reducedInstance], { type: "text/plain" });
const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
+ const link = document.createElement("a");
link.href = url;
link.download = "query";
@@ -101,7 +103,7 @@ export default function ReduceToRowReact({
selected={chosenReduceTo}
onSelect={setChosenReduceTo}
optionsHighlight={reduceToOptions}
- options={[...problemNameMap.keys()].filter(x => x !== problemName)} // Cannot reduce to current problem
+ options={[...problemNameMap.keys()].filter((x) => x !== problemName)} // Cannot reduce to current problem
optionsMap={problemNameMap}
disabled={!problemName}
disabledMessage={"No reduction method available. Please choose a reduce-to."}
@@ -116,24 +118,26 @@ export default function ReduceToRowReact({
toolTip={
chosenReduceTo
? {
- header: reduceToInfo.problemName ?? "",
- formalDef: reduceToInfo.formalDefinition ?? "",
- // description only
- info: reduceToInfo.problemDefinition ?? "",
- classification: [
- { label: "Complexity class", value: reduceToInfo.complexityClass || "Unclassified" },
- ],
- // show source
- source: reduceToInfo.source,
- credit:
- Array.isArray(reduceToInfo.contributors) &&
- reduceToInfo.contributors.length
- ? reduceToInfo.contributors.join(", ")
- : "",
- // hyperlink
- componentLink: reduceToInfo.problemLink || "",
- sourceLink: reduceToInfo.sourceLink || "",
- }
+ header: reduceToInfo.problemName ?? "",
+ formalDef: reduceToInfo.formalDefinition ?? "",
+ // description only
+ info: reduceToInfo.problemDefinition ?? "",
+ classification: [
+ {
+ label: "Complexity class",
+ value: reduceToInfo.complexityClass || "Unclassified",
+ },
+ ],
+ // show source
+ source: reduceToInfo.source,
+ credit:
+ Array.isArray(reduceToInfo.contributors) && reduceToInfo.contributors.length
+ ? reduceToInfo.contributors.join(", ")
+ : "",
+ // hyperlink
+ componentLink: reduceToInfo.problemLink || "",
+ sourceLink: reduceToInfo.sourceLink || "",
+ }
: TOOLTIP1
}
>
@@ -148,7 +152,7 @@ export default function ReduceToRowReact({
const reductions = option.split("-").map((r) => reductionNameMap.get(r) ?? r);
const reductionName = reductions.reduce((name, r) => (name += r + " - "), "");
return [option, reductionName.slice(0, reductionName.lastIndexOf(" - "))];
- })
+ }),
)
}
disabled={!problemName || !chosenReduceTo}
@@ -164,50 +168,55 @@ export default function ReduceToRowReact({
toolTip={
chosenReductionType
? {
- header: reducerInfo.reductionName ?? "",
- formalDef: reducerInfo.reductionDefinition ?? "",
- // plain description for the reduction
- info: reducerInfo.info ?? reducerInfo.description ?? "",
- classification: [
- {
- label: "Reduction cost",
- value: REDUCTION_COST_LABELS[reducerInfo.cost] || reducerInfo.cost || "Unclassified",
- },
- { label: "Reduction type", value: reducerInfo.reductionType || "Unclassified" },
- { label: "Complexity bucket", value: reducerInfo.complexityBucket || "Unclassified" },
- { label: "Big-O", value: reducerInfo.complexity || "Not yet determined" },
- ],
- // separate Source line
- source: reducerInfo.source,
- // contributors if present
- credit:
- Array.isArray(reducerInfo.contributors) &&
- reducerInfo.contributors.length
- ? reducerInfo.contributors.join(", ")
- : "",
- componentLink: reducerInfo.problemLink || "",
- sourceLink: reducerInfo.sourceLink || "",
- }
+ header: reducerInfo.reductionName ?? "",
+ formalDef: reducerInfo.reductionDefinition ?? "",
+ // plain description for the reduction
+ info: reducerInfo.info ?? reducerInfo.description ?? "",
+ classification: [
+ {
+ label: "Reduction cost",
+ value:
+ REDUCTION_COST_LABELS[reducerInfo.cost] ||
+ reducerInfo.cost ||
+ "Unclassified",
+ },
+ { label: "Reduction type", value: reducerInfo.reductionType || "Unclassified" },
+ {
+ label: "Complexity bucket",
+ value: reducerInfo.complexityBucket || "Unclassified",
+ },
+ { label: "Big-O", value: reducerInfo.complexity || "Not yet determined" },
+ ],
+ // separate Source line
+ source: reducerInfo.source,
+ // contributors if present
+ credit:
+ Array.isArray(reducerInfo.contributors) && reducerInfo.contributors.length
+ ? reducerInfo.contributors.join(", ")
+ : "",
+ componentLink: reducerInfo.problemLink || "",
+ sourceLink: reducerInfo.sourceLink || "",
+ }
: TOOLTIP2
}
>
{dragHandleProps && (
-
-
-
- )}
+
+
+
+ )}
@@ -264,7 +273,13 @@ function ReduceInfo({ instance, chosenReduceTo, problemName }) {
);
}
if (prettyInstance[0] === "BOOLEAN") {
- return ;
+ return (
+
+ );
}
return {instance} ;
@@ -319,39 +334,44 @@ If any of them match it return both a "pretty" version of the instance in a arra
In the case of a graph nodes and edges are returned in [1] and [2] respectively.
SAT or boolean form is only the "pretty" form in [1] and [2] is an empty string.*/
function checkProblemType(stringInstance, chosenReduceTo) {
- const spacedInstance = stringInstance.replace(/,/g, ', ');
- const kValue = stringInstance.match('(\\d+)(?!.*\\d)'); // Gets the K value from the string.
+ const spacedInstance = stringInstance.replace(/,/g, ", ");
+ const kValue = stringInstance.match("(\\d+)(?!.*\\d)"); // Gets the K value from the string.
// Regex for undirected graph
- const prettyUndirectedNodes = spacedInstance.match('((?<=\\(\\({)[ -~]+)(?=}, {{)');
+ const prettyUndirectedNodes = spacedInstance.match("((?<=\\(\\({)[ -~]+)(?=}, {{)");
const prettyUndirectedEdges = getEdges(spacedInstance);
if (prettyUndirectedNodes != null) {
return ["GRAPH", prettyUndirectedNodes[0], prettyUndirectedEdges[0], kValue[0]];
}
// Regex for directed graph. Consequently the edge regex is the same for both directed and undirected. Shouldn't be a problem, but good to note.
- const prettyDirectedNodes = spacedInstance.match('((?<=\\(\\({)[ -~]+)(?=}, {\\()');
+ const prettyDirectedNodes = spacedInstance.match("((?<=\\(\\({)[ -~]+)(?=}, {\\()");
const prettyDirectedEdges = getEdges(spacedInstance);
if (prettyDirectedNodes != null && (chosenReduceTo == "ARCSET" || chosenReduceTo == "TSP")) {
return ["GRAPH", prettyDirectedNodes[0], prettyDirectedEdges[0], kValue[0]];
}
// Regex for Boolean problems.Getting rid of all the characters we don't need and spliting to get all the literals.
- const literalArray = stringInstance.replaceAll("(", "")
+ const literalArray = stringInstance
+ .replaceAll("(", "")
.replaceAll(")", "|") // Replace with a | for splitting
.replaceAll("&", "")
.split("|");
const uniqueLiterals = new Set(literalArray); // Getting rid of duplicate literals
- var literalString = ""
+ var literalString = "";
uniqueLiterals.forEach((literal) => {
- literalString += literal + ", "
- })
- literalString = literalString.match('(?:.)+(?=, , )'); // Getting rid of trailing commas.
+ literalString += literal + ", ";
+ });
+ literalString = literalString.match("(?:.)+(?=, , )"); // Getting rid of trailing commas.
- const clauses = stringInstance.replaceAll("|", " | ").replaceAll("&", ", ")
+ const clauses = stringInstance.replaceAll("|", " | ").replaceAll("&", ", ");
// Literals and clauses.
- if (clauses != "" && literalString != "" && (chosenReduceTo == "SAT" || chosenReduceTo == "3SAT")) {
+ if (
+ clauses != "" &&
+ literalString != "" &&
+ (chosenReduceTo == "SAT" || chosenReduceTo == "3SAT")
+ ) {
return ["BOOLEAN", literalString, clauses];
}
@@ -361,5 +381,5 @@ function checkProblemType(stringInstance, chosenReduceTo) {
// Parses the edges from the graph
function getEdges(stringInstance) {
- return stringInstance.match('((?<=}, {)[ -~]+)(?=}\\), )');
+ return stringInstance.match("((?<=}, {)[ -~]+)(?=}\\), )");
}
diff --git a/components/pageblocks/SolveRowReact.js b/components/pageblocks/SolveRowReact.js
index c115a3ed..eb842e9f 100644
--- a/components/pageblocks/SolveRowReact.js
+++ b/components/pageblocks/SolveRowReact.js
@@ -8,17 +8,13 @@
* @author Alex Diviney
*/
-import React from "react";
-import { useContext } from "react";
+import React, { useContext } from "react";
import "bootstrap/dist/css/bootstrap.min.css";
-import { Button } from "@mui/material";
-import { Download as DownloadIcon } from '@mui/icons-material';
-import { DragIndicator as DragIndicatorIcon } from '@mui/icons-material';
-import { IconButton } from '@mui/material';
-
+import { Download as DownloadIcon, DragIndicator as DragIndicatorIcon } from "@mui/icons-material";
+import { Button, IconButton } from "@mui/material";
+import { useSolverInfo } from "../hooks/ProblemProvider";
import { requestSolvedInstance } from "../redux";
import PopoverTooltipClick from "../widgets/PopoverTooltipClick";
-import { useSolverInfo } from "../hooks/ProblemProvider";
import ProblemSection from "../widgets/ProblemSection";
import SearchBarExtensible from "../widgets/SearchBarExtensible";
@@ -54,15 +50,15 @@ export default function SolveRowReact({
async function handleSolve() {
setSolvedInstance(
chosenSolver && problemInstance
- ? (await requestSolvedInstance(url, chosenSolver, problemInstance)) ?? ""
- : ""
+ ? ((await requestSolvedInstance(url, chosenSolver, problemInstance)) ?? "")
+ : "",
);
}
async function handleDownload() {
- const blob = new Blob([solvedInstance], { type: 'text/plain' });
+ const blob = new Blob([solvedInstance], { type: "text/plain" });
const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
+ const link = document.createElement("a");
link.href = url;
link.download = "query";
@@ -72,9 +68,8 @@ export default function SolveRowReact({
document.body.removeChild(link);
}
- const tip =
- chosenSolver
- ? {
+ const tip = chosenSolver
+ ? {
header: solverInfo.solverName ?? "",
formalDef: solverInfo.solverDefinition ?? "",
// Keep description clean
@@ -95,7 +90,7 @@ export default function SolveRowReact({
{ label: "Big-O", value: solverInfo.complexity || "Not yet determined" },
],
}
- : TOOLTIP;
+ : TOOLTIP;
return (
@@ -113,27 +108,29 @@ export default function SolveRowReact({
label: `Add new ${problemNameMap.get(problem)} solution algorithm "${input}"`,
href: `${url}ProblemTemplate/solver?problemName=${problemName}&solverName=${input}`,
});
- return !chosenReduceTo ? [extender(problemName)] : [extender(problemName), extender(chosenReduceTo)];
+ return !chosenReduceTo
+ ? [extender(problemName)]
+ : [extender(problemName), extender(chosenReduceTo)];
}}
/>{" "}
{dragHandleProps && (
-
-
-
- )}
+
+
+
+ )}
diff --git a/components/pageblocks/VerifyRowReact.js b/components/pageblocks/VerifyRowReact.js
index 8352c6cf..ff192d37 100644
--- a/components/pageblocks/VerifyRowReact.js
+++ b/components/pageblocks/VerifyRowReact.js
@@ -1,32 +1,33 @@
/**
* VerifyRowReact.js
- *
+ *
* This component does the real grunt work of the VerifyRow component. It uses passed in props to style and provide default text for its objects,
* uses the global state values for the problem name and instance, sets global state values pertaining to reduction, and has a variety of listeners and API calls.
- *
+ *
* Essentialy, this is the brains of the VerifyRowReact.js component and deals with the GUI's Reduce "Row"
* @author Alex Diviney
*/
-import React from 'react'
-import { useContext, useEffect, useState } from 'react';
-import 'bootstrap/dist/css/bootstrap.min.css'
-import { FormControl } from 'react-bootstrap'
-import { Button } from '@mui/material'
-import { DragIndicator as DragIndicatorIcon } from '@mui/icons-material';
-import { IconButton } from '@mui/material';
+import React, { useContext, useEffect, useState } from "react";
+import "bootstrap/dist/css/bootstrap.min.css";
+import { DragIndicator as DragIndicatorIcon } from "@mui/icons-material";
+import { Button, IconButton } from "@mui/material";
+import { FormControl } from "react-bootstrap";
+import { useVerifierInfo } from "../hooks/ProblemProvider";
+import { requestIsCertificateValid, requestVerifiedInstance } from "../redux";
+import PopoverTooltipClick from "../widgets/PopoverTooltipClick";
+import ProblemSection from "../widgets/ProblemSection";
+import SearchBarExtensible from "../widgets/SearchBarExtensible";
-import { requestVerifiedInstance, requestIsCertificateValid } from '../redux';
-import PopoverTooltipClick from '../widgets/PopoverTooltipClick';
-import { useVerifierInfo } from '../hooks/ProblemProvider';
-import ProblemSection from '../widgets/ProblemSection';
-import SearchBarExtensible from '../widgets/SearchBarExtensible';
-
-const ACCORDION_FORM_ONE = { placeHolder: "Select verifier" }
-const BUTTON = { buttonText: "Verify" }
-const CARD = { cardBodyText: "Enter a certificate:", cardHeaderText: "Verify" }
-const TOOLTIP = { header: "Problem Verifier", formalDef: "Choose a verifier to see information about it", info: "" }
-const THEME = { colors: { grey: "#424242", orange: "#d4441c" } }
+const ACCORDION_FORM_ONE = { placeHolder: "Select verifier" };
+const BUTTON = { buttonText: "Verify" };
+const CARD = { cardBodyText: "Enter a certificate:", cardHeaderText: "Verify" };
+const TOOLTIP = {
+ header: "Problem Verifier",
+ formalDef: "Choose a verifier to see information about it",
+ info: "",
+};
+const THEME = { colors: { grey: "#424242", orange: "#d4441c" } };
export default function VerifyRowReact({
url,
@@ -56,8 +57,14 @@ export default function VerifyRowReact({
async function handleVerify() {
setVerifyResult(
chosenVerifier
- ? await requestVerifiedInstance(url, problemName, chosenVerifier, problemInstance, certificate)
- : "Please select a verifier."
+ ? await requestVerifiedInstance(
+ url,
+ problemName,
+ chosenVerifier,
+ problemInstance,
+ certificate,
+ )
+ : "Please select a verifier.",
);
}
@@ -83,41 +90,41 @@ export default function VerifyRowReact({
toolTip={
chosenVerifier
? {
- header: verifierInfo.verifierName ?? "",
- formalDef: verifierInfo.verifierDefinition ?? "",
- // plain description only
- info: verifierInfo.info ?? verifierInfo.description ?? "",
- // show source
- source: verifierInfo.source,
- // show contributors
- credit:
- Array.isArray(verifierInfo.contributors) && verifierInfo.contributors.length
- ? verifierInfo.contributors.join(", ")
- : "",
- // hyperlink target
- componentLink: verifierInfo.verifierLink || "",
- sourceLink: verifierInfo.sourceLink || "",
- }
+ header: verifierInfo.verifierName ?? "",
+ formalDef: verifierInfo.verifierDefinition ?? "",
+ // plain description only
+ info: verifierInfo.info ?? verifierInfo.description ?? "",
+ // show source
+ source: verifierInfo.source,
+ // show contributors
+ credit:
+ Array.isArray(verifierInfo.contributors) && verifierInfo.contributors.length
+ ? verifierInfo.contributors.join(", ")
+ : "",
+ // hyperlink target
+ componentLink: verifierInfo.verifierLink || "",
+ sourceLink: verifierInfo.sourceLink || "",
+ }
: TOOLTIP
}
>
{dragHandleProps && (
-
-
-
- )}
+
+
+
+ )}
diff --git a/components/pageblocks/VisualizeRowReact.js b/components/pageblocks/VisualizeRowReact.js
index d586e25b..fec708ad 100644
--- a/components/pageblocks/VisualizeRowReact.js
+++ b/components/pageblocks/VisualizeRowReact.js
@@ -5,42 +5,32 @@
* and async loading of visualization data.
*/
-import React, { useState, useEffect } from "react";
+import React, { useEffect, useState } from "react";
import "bootstrap/dist/css/bootstrap.min.css";
import {
- Button,
- Switch,
- FormControlLabel,
- IconButton,
- TextField,
- Tooltip,
-} from "@mui/material";
-import {
- SkipPrevious,
- SkipNext,
- FastRewind,
+ DragIndicator as DragIndicatorIcon,
FastForward,
+ FastRewind,
+ SkipNext,
+ SkipPrevious,
} from "@mui/icons-material";
import RefreshIcon from "@mui/icons-material/Refresh";
-import { DragIndicator as DragIndicatorIcon } from '@mui/icons-material';
+import { Button, FormControlLabel, IconButton, Switch, TextField, Tooltip } from "@mui/material";
import Link from "next/link"; // <-- IMPORTANT for Quantum button
-
-import PopoverTooltipClick from "../widgets/PopoverTooltipClick";
-import SearchBarExtensible from "../widgets/SearchBarExtensible";
-import { visualizationTypeCategory } from "../Visualization/svgs/visualizationCategories";
-
+import { useVisualizationInfo } from "../hooks/ProblemProvider";
import {
requestProblemGenericInstance,
requestReducedInstance,
- requestVisualization,
requestReductionVisualization,
requestSolvedInstance,
+ requestVisualization,
} from "../redux";
-
-import VisualizationLogic from "../widgets/VisualizationLogic";
-import ProblemSection from "../widgets/ProblemSection";
-import { useVisualizationInfo } from "../hooks/ProblemProvider";
import { isRenderable } from "../Visualization/svgs/renderability";
+import { visualizationTypeCategory } from "../Visualization/svgs/visualizationCategories";
+import PopoverTooltipClick from "../widgets/PopoverTooltipClick";
+import ProblemSection from "../widgets/ProblemSection";
+import SearchBarExtensible from "../widgets/SearchBarExtensible";
+import VisualizationLogic from "../widgets/VisualizationLogic";
const CARD = { cardBodyText: "DEFAULT BODY", cardHeaderText: "Visualize" };
const SWITCHES = {
@@ -78,10 +68,10 @@ export default function VisualizeRowReact({
const visualizationInfo = useVisualizationInfo(url, chosenVisualization);
const unrenderableOptions = (VisualizationOptions || []).filter(
- (option) => !isRenderable(visualizationTypeMap?.get(option))
+ (option) => !isRenderable(visualizationTypeMap?.get(option)),
);
const hasRenderableOption = (VisualizationOptions || []).some(
- (option) => !unrenderableOptions.includes(option)
+ (option) => !unrenderableOptions.includes(option),
);
const noRenderableOptions = (VisualizationOptions || []).length > 0 && !hasRenderableOption;
@@ -113,10 +103,10 @@ export default function VisualizeRowReact({
const [disableReduction, setDisableReduction] = useState(!chosenReductionType);
const [problemVisualizationData, setProblemVisualizationData] = useState(
- defaultSat3VisualizationArr
+ defaultSat3VisualizationArr,
);
const [reducedVisualizationData, setReducedVisualizationData] = useState(
- defaultCLIQUEVisualizationArr
+ defaultCLIQUEVisualizationArr,
);
const [currentProblemData, setCurrentProblemData] = useState(null);
const [currentReductionData, setCurrentReductionData] = useState(null);
@@ -167,13 +157,7 @@ export default function VisualizeRowReact({
// Fetch reduction visualization
useEffect(() => {
- if (
- !chosenReduceTo ||
- !problemInstance ||
- !showReduction ||
- !solution
- )
- return;
+ if (!chosenReduceTo || !problemInstance || !showReduction || !solution) return;
const fetch = async () => {
try {
@@ -181,7 +165,7 @@ export default function VisualizeRowReact({
url,
chosenReductionType,
solution,
- problemInstance
+ problemInstance,
);
setProblemReductionData(data ?? []);
} catch (err) {
@@ -192,7 +176,6 @@ export default function VisualizeRowReact({
fetch();
}, [showReduction, chosenReduceTo, problemInstance, solution, chosenReductionType, url]);
-
// Fetch main visualization data
useEffect(() => {
if (!instanceReady || !chosenVisualization) return;
@@ -201,11 +184,7 @@ export default function VisualizeRowReact({
const fetch = async () => {
try {
- const data = await requestVisualization(
- url,
- chosenVisualization,
- problemInstance,
- );
+ const data = await requestVisualization(url, chosenVisualization, problemInstance);
if (!alive) return;
@@ -213,10 +192,7 @@ export default function VisualizeRowReact({
// In reduction mode, only show the first and last frames to highlight the delta
if (showReduction && processedData.length > 1) {
- processedData = [
- processedData[0],
- processedData[processedData.length - 1],
- ];
+ processedData = [processedData[0], processedData[processedData.length - 1]];
}
setProblemData(processedData);
@@ -232,14 +208,7 @@ export default function VisualizeRowReact({
return () => {
alive = false;
};
- }, [
- instanceReady,
- chosenVisualization,
- problemInstance,
- showReduction,
- url,
- problemName,
- ]);
+ }, [instanceReady, chosenVisualization, problemInstance, showReduction, url, problemName]);
// Fetch SAT3
useEffect(() => {
@@ -247,21 +216,12 @@ export default function VisualizeRowReact({
const fetchSAT3 = async () => {
try {
- const clauses = await requestProblemGenericInstance(
- url,
- problemName,
- problemInstance
- );
+ const clauses = await requestProblemGenericInstance(url, problemName, problemInstance);
if (clauses) setProblemVisualizationData(clauses.clauses);
if (chosenReductionType) {
- const reduced = await requestReducedInstance(
- url,
- chosenReductionType,
- problemInstance
- );
- if (reduced)
- setReducedVisualizationData(reduced.reductionTo.clusterNodes);
+ const reduced = await requestReducedInstance(url, chosenReductionType, problemInstance);
+ if (reduced) setReducedVisualizationData(reduced.reductionTo.clusterNodes);
}
} catch (err) {
console.error("SAT3 fetch failed:", err);
@@ -318,8 +278,7 @@ export default function VisualizeRowReact({
function handleRadioChange(type) {
if (type === "start") setCurrentStep(0);
else if (type === "back") setCurrentStep((p) => Math.max(0, p - 1));
- else if (type === "forward")
- setCurrentStep((p) => Math.min(totalSteps - 1, p + 1));
+ else if (type === "forward") setCurrentStep((p) => Math.min(totalSteps - 1, p + 1));
else if (type === "end") setCurrentStep(totalSteps - 1);
}
@@ -331,26 +290,25 @@ export default function VisualizeRowReact({
const tip = chosenVisualization
? {
- header: visualizationInfo.visualizationName ?? "",
- formalDef: visualizationInfo.visualizationDefinition ?? "",
- info: visualizationInfo.info ?? visualizationInfo.description ?? "",
- classification: [
- {
- label: "Visualization type",
- value: visualizationInfo.visualizationType
- ? visualizationTypeCategory(visualizationInfo.visualizationType)
- : "Unclassified",
- },
- ],
- source: visualizationInfo.source,
- credit:
- Array.isArray(visualizationInfo.contributors) &&
- visualizationInfo.contributors.length
- ? visualizationInfo.contributors.join(", ")
- : "",
- componentLink: visualizationInfo.visualizationLink || "",
- sourceLink: visualizationInfo.sourceLink || "",
- }
+ header: visualizationInfo.visualizationName ?? "",
+ formalDef: visualizationInfo.visualizationDefinition ?? "",
+ info: visualizationInfo.info ?? visualizationInfo.description ?? "",
+ classification: [
+ {
+ label: "Visualization type",
+ value: visualizationInfo.visualizationType
+ ? visualizationTypeCategory(visualizationInfo.visualizationType)
+ : "Unclassified",
+ },
+ ],
+ source: visualizationInfo.source,
+ credit:
+ Array.isArray(visualizationInfo.contributors) && visualizationInfo.contributors.length
+ ? visualizationInfo.contributors.join(", ")
+ : "",
+ componentLink: visualizationInfo.visualizationLink || "",
+ sourceLink: visualizationInfo.sourceLink || "",
+ }
: TOOLTIP;
return (
@@ -380,22 +338,22 @@ export default function VisualizeRowReact({
{dragHandleProps && (
-
-
-
- )}
+
+
+
+ )}
@@ -428,19 +386,11 @@ export default function VisualizeRowReact({
placement="bottom"
title={isDisabled ? "Navigation disabled during reduction or gadget mode." : ""}
>
-
-
handleRadioChange("start")}
- >
+
+ handleRadioChange("start")}>
- handleRadioChange("back")}
- >
+ handleRadioChange("back")}>
@@ -450,23 +400,16 @@ export default function VisualizeRowReact({
value={currentStep}
onChange={(e) => {
const n = Number(e.target.value);
- if (!isNaN(n) && n >= 0 && n < totalSteps)
- setCurrentStep(n);
+ if (!isNaN(n) && n >= 0 && n < totalSteps) setCurrentStep(n);
}}
style={{ width: "70px" }}
disabled={isDisabled}
/>
- handleRadioChange("forward")}
- >
+ handleRadioChange("forward")}>
- handleRadioChange("end")}
- >
+ handleRadioChange("end")}>
@@ -475,9 +418,27 @@ export default function VisualizeRowReact({
{/* Switches */}
- } label={SWITCHES.switch3} onChange={handleSwitch3Change} />
- } label={SWITCHES.switch2} onChange={handleSwitch2Change} />
- } label={SWITCHES.switch1} onChange={handleSwitch1Change} />
+ }
+ label={SWITCHES.switch3}
+ onChange={handleSwitch3Change}
+ />
+ }
+ label={SWITCHES.switch2}
+ onChange={handleSwitch2Change}
+ />
+ }
+ label={SWITCHES.switch1}
+ onChange={handleSwitch1Change}
+ />
diff --git a/components/redux/index.js b/components/redux/index.js
index d4fb1211..5447262d 100644
--- a/components/redux/index.js
+++ b/components/redux/index.js
@@ -32,8 +32,8 @@ async function fetchPostJson(url, body, failMsg) {
method: "POST",
body: JSON.stringify(body),
headers: {
- 'Content-Type': 'application/json; charset=UTF-8'
- }
+ "Content-Type": "application/json; charset=UTF-8",
+ },
});
if (resp.ok) {
return await resp.json();
@@ -125,12 +125,12 @@ export async function requestGadgetMap(url, reduction, instance) {
return await fetchPostJson(
`${url}ProblemProvider/gadgets?reduction=${reduction}`,
instance,
- () => `${reduction} MAP GADGETS REQUEST FAILED`
+ () => `${reduction} MAP GADGETS REQUEST FAILED`,
);
}
export async function processReductions(url, reductionPath, instance) {
- const reductions = reductionPath.split("-").map(r => r.trim());
+ const reductions = reductionPath.split("-").map((r) => r.trim());
let currentInstance = instance;
let currentMap = null;
@@ -163,7 +163,7 @@ function composeMappings(map1, map2) {
for (const b of entry1.reductionToIds) {
for (const entry2 of map2) {
if (entry2.reductionFromIds.includes(b)) {
- entry2.reductionToIds.forEach(c => linkedTo.add(c));
+ entry2.reductionToIds.forEach((c) => linkedTo.add(c));
}
}
}
@@ -193,8 +193,8 @@ export function makeIdsUnique(gadgets) {
let nextToId = 0;
// First pass: map reductionFromIds safely
- gadgets.forEach(gadget => {
- (gadget.reductionFromIds || []).forEach(oldId => {
+ gadgets.forEach((gadget) => {
+ (gadget.reductionFromIds || []).forEach((oldId) => {
const key = String(oldId);
if (!fromIdMap.has(key)) {
fromIdMap.set(key, String(nextFromId++));
@@ -204,8 +204,8 @@ export function makeIdsUnique(gadgets) {
// Second pass: map reductionToIds safely
nextToId = nextFromId;
- gadgets.forEach(gadget => {
- (gadget.reductionToIds || []).forEach(oldId => {
+ gadgets.forEach((gadget) => {
+ (gadget.reductionToIds || []).forEach((oldId) => {
const key = String(oldId);
if (!toIdMap.has(key)) {
toIdMap.set(key, String(nextToId++));
@@ -214,16 +214,19 @@ export function makeIdsUnique(gadgets) {
});
// Third pass: create new gadgets array safely
- const updatedGadgets = gadgets.map(gadget => ({
+ const updatedGadgets = gadgets.map((gadget) => ({
...gadget,
- reductionFromIds: (gadget.reductionFromIds || []).map(id => fromIdMap.get(String(id)) || String(id)),
- reductionToIds: (gadget.reductionToIds || []).map(id => toIdMap.get(String(id)) || String(id)),
+ reductionFromIds: (gadget.reductionFromIds || []).map(
+ (id) => fromIdMap.get(String(id)) || String(id),
+ ),
+ reductionToIds: (gadget.reductionToIds || []).map(
+ (id) => toIdMap.get(String(id)) || String(id),
+ ),
}));
return { gadgets: updatedGadgets, fromIdMap, toIdMap };
}
-
/**
* Remap IDs in gadgets, clauses, or literals based on the provided idMap.
* Only touches properties that exist: id, reductionFromIds, reductionToIds.
@@ -238,10 +241,10 @@ export function remapIdsDeep(obj, idMap) {
if (key === "id" && idMap.has(String(val))) {
result[key] = String(idMap.get(String(val)));
} else if ((key === "reductionFromIds" || key === "reductionToIds") && Array.isArray(val)) {
- result[key] = val.map(v => String(idMap.get(String(v)) ?? v));
+ result[key] = val.map((v) => String(idMap.get(String(v)) ?? v));
} else if (Array.isArray(val)) {
// only recurse for arrays
- result[key] = val.map(v => remapIdsDeep(v, idMap));
+ result[key] = val.map((v) => remapIdsDeep(v, idMap));
} else if (val && typeof val === "object") {
result[key] = remapIdsDeep(val, idMap);
} else {
@@ -257,7 +260,10 @@ export function remapIdsDeep(obj, idMap) {
* @returns `undefined` on failure and logs the error.
*/
export async function requestInfo(url, apiCall) {
- return await fetchJson(`${url}ProblemProvider/info?interface=${apiCall}`, () => `${apiCall} INFO REQUEST FAILED`);
+ return await fetchJson(
+ `${url}ProblemProvider/info?interface=${apiCall}`,
+ () => `${apiCall} INFO REQUEST FAILED`,
+ );
}
/**
@@ -285,7 +291,7 @@ export async function requestReducedInstance(url, reduction, instance) {
return await fetchPostJson(
`${url}ProblemProvider/reduce?reduction=${reduction}`,
instance,
- () => `${reduction} REDUCED INSTANCE REQUEST FAILED`
+ () => `${reduction} REDUCED INSTANCE REQUEST FAILED`,
);
}
@@ -310,7 +316,7 @@ export async function requestReductionInfo(url, apiCall) {
export async function requestReductionOptions(url, problem) {
return await fetchJson(
`${url}Navigation/NPC_NavGraph/availableReductions/?chosenProblem=${problem}`,
- () => `${problem} REDUCTION OPTIONS REQUEST FAILED`
+ () => `${problem} REDUCTION OPTIONS REQUEST FAILED`,
);
}
@@ -322,7 +328,7 @@ export async function requestReductionVisualization(url, reduction, solution, in
return await fetchPostJson(
`${url}ProblemProvider/visualizeReduction?reduction=${reduction}&solution=${solution}`,
instance,
- () => `${reduction} VISUALIZE REQUEST FAILED`
+ () => `${reduction} VISUALIZE REQUEST FAILED`,
);
}
@@ -342,11 +348,10 @@ export async function requestProblemGenericInstance(url, problem, instance) {
return await fetchPostJson(
`${url}ProblemProvider/problemInstance?problem=${problem}`,
instance,
- () => `${problem} PROBLEM GENERIC INSTANCE REQUEST FAILED`
+ () => `${problem} PROBLEM GENERIC INSTANCE REQUEST FAILED`,
);
}
-
/**
* @returns an array of arrays of reductions implemented for reducing a problem to another problem.
* @returns `undefined` on failure and logs the error.
@@ -354,7 +359,7 @@ export async function requestProblemGenericInstance(url, problem, instance) {
export async function requestReductions(url, problemFrom, problemTo) {
return await fetchJson(
`${url}Navigation/NPC_NavGraph/reductionPath/?reducingFrom=${problemFrom}&reducingTo=${problemTo}`,
- () => `${problemFrom} TO ${problemTo} REDUCTIONS REQUEST FAILED`
+ () => `${problemFrom} TO ${problemTo} REDUCTIONS REQUEST FAILED`,
);
}
@@ -366,7 +371,7 @@ export async function requestSolvedInstance(url, solver, instance) {
return await fetchPostJson(
`${url}ProblemProvider/solve?solver=${solver}`,
instance,
- () => `${solver} SOLVED INSTANCE REQUEST FAILED`
+ () => `${solver} SOLVED INSTANCE REQUEST FAILED`,
);
}
@@ -377,7 +382,7 @@ export async function requestSolvedInstance(url, solver, instance) {
export async function requestSolvers(url, problem) {
return await fetchJson(
`${url}Navigation/Problem_SolversRefactor/?chosenProblem=${problem}`,
- () => `${problem} SOLVERS REQUEST FAILED`
+ () => `${problem} SOLVERS REQUEST FAILED`,
);
}
@@ -388,7 +393,7 @@ export async function requestSolvers(url, problem) {
export async function requestVerifiers(url, problem) {
return await fetchJson(
`${url}Navigation/Problem_VerifiersRefactor/?chosenProblem=${problem}`,
- () => `${problem} VERIFIERS REQUEST FAILED`
+ () => `${problem} VERIFIERS REQUEST FAILED`,
);
}
@@ -399,13 +404,13 @@ export async function requestVerifiers(url, problem) {
export async function requestVerifiedInstance(url, problem, verifier, instance, certificate) {
// Temporary solution until certificate validation is moved to the Redux API
if (!isCertificateValid(problem, certificate)) {
- return "Invalid Input"
+ return "Invalid Input";
}
return await fetchPostJson(
`${url}ProblemProvider/verify?verifier=${verifier}`,
{ problemInstance: instance, certificate: certificate },
- () => `${verifier} VERIFIED INSTANCE REQUEST FAILED`
+ () => `${verifier} VERIFIED INSTANCE REQUEST FAILED`,
);
}
@@ -417,7 +422,7 @@ export async function requestVisualization(url, visualization, instance) {
return await fetchPostJson(
`${url}ProblemProvider/visualize?visualization=${visualization}`,
instance,
- () => `${visualization} VISUALIZE REQUEST FAILED`
+ () => `${visualization} VISUALIZE REQUEST FAILED`,
);
}
@@ -428,7 +433,7 @@ export async function requestVisualization(url, visualization, instance) {
export async function requestVisualizations(url, problem) {
return await fetchJson(
`${url}Navigation/Problem_VisualizationsRefactor/?chosenProblem=${problem}`,
- () => `${problem} VISUALIZATIONS REQUEST FAILED`
+ () => `${problem} VISUALIZATIONS REQUEST FAILED`,
);
}
/**
@@ -436,13 +441,8 @@ export async function requestVisualizations(url, problem) {
* @returns `undefined` on failure and logs the error.
*/
export function requestAllProblems(url) {
- return cachedRequest(
- `${url}|allProblems`,
- () =>
- fetchJson(
- `${url}Navigation/Batch/allProblems`,
- () => "ALL PROBLEMS REQUEST FAILED"
- )
+ return cachedRequest(`${url}|allProblems`, () =>
+ fetchJson(`${url}Navigation/Batch/allProblems`, () => "ALL PROBLEMS REQUEST FAILED"),
);
}
/**
@@ -450,13 +450,8 @@ export function requestAllProblems(url) {
* @returns `undefined` on failure and logs the error.
*/
export function requestAllSolvers(url) {
- return cachedRequest(
- `${url}|allSolvers`,
- () =>
- fetchJson(
- `${url}Navigation/Batch/allSolvers`,
- () => "ALL SOLVERS REQUEST FAILED"
- )
+ return cachedRequest(`${url}|allSolvers`, () =>
+ fetchJson(`${url}Navigation/Batch/allSolvers`, () => "ALL SOLVERS REQUEST FAILED"),
);
}
/**
@@ -464,13 +459,8 @@ export function requestAllSolvers(url) {
* @returns `undefined` on failure and logs the error.
*/
export function requestAllVerifiers(url) {
- return cachedRequest(
- `${url}|allVerifiers`,
- () =>
- fetchJson(
- `${url}Navigation/Batch/allVerifiers`,
- () => "ALL VERIFIERS REQUEST FAILED"
- )
+ return cachedRequest(`${url}|allVerifiers`, () =>
+ fetchJson(`${url}Navigation/Batch/allVerifiers`, () => "ALL VERIFIERS REQUEST FAILED"),
);
}
/**
@@ -478,13 +468,11 @@ export function requestAllVerifiers(url) {
* @returns `undefined` on failure and logs the error.
*/
export function requestAllVisualizations(url) {
- return cachedRequest(
- `${url}|allVisualizations`,
- () =>
- fetchJson(
- `${url}Navigation/Batch/allVisualizations`,
- () => "ALL VISUALIZATIONS REQUEST FAILED"
- )
+ return cachedRequest(`${url}|allVisualizations`, () =>
+ fetchJson(
+ `${url}Navigation/Batch/allVisualizations`,
+ () => "ALL VISUALIZATIONS REQUEST FAILED",
+ ),
);
}
@@ -494,13 +482,8 @@ export function requestAllVisualizations(url) {
* @returns `undefined` on failure and logs the error.
*/
export function requestAllInfo(url) {
- return cachedRequest(
- `${url}|allInfo`,
- () =>
- fetchJson(
- `${url}Navigation/Batch/allInfo`,
- () => "ALL INFO REQUEST FAILED"
- )
+ return cachedRequest(`${url}|allInfo`, () =>
+ fetchJson(`${url}Navigation/Batch/allInfo`, () => "ALL INFO REQUEST FAILED"),
);
}
@@ -513,13 +496,11 @@ export function requestAllInfo(url) {
* `requestAllInfo` in that case.
*/
export function requestAllVisualizationTypes(url) {
- return cachedRequest(
- `${url}|allVisualizationTypes`,
- () =>
- fetchJson(
- `${url}Navigation/Batch/allVisualizationTypes`,
- () => "ALL VISUALIZATION TYPES REQUEST FAILED"
- )
+ return cachedRequest(`${url}|allVisualizationTypes`, () =>
+ fetchJson(
+ `${url}Navigation/Batch/allVisualizationTypes`,
+ () => "ALL VISUALIZATION TYPES REQUEST FAILED",
+ ),
);
}
@@ -532,5 +513,6 @@ export function requestAllVisualizationTypes(url) {
*/
export function requestReductionGraph(url) {
return cachedRequest(`${url}|reductionGraph`, () =>
- fetchJson(`${url}Navigation/Reductions`, () => "REDUCTION GRAPH REQUEST FAILED"));
-}
\ No newline at end of file
+ fetchJson(`${url}Navigation/Reductions`, () => "REDUCTION GRAPH REQUEST FAILED"),
+ );
+}
diff --git a/components/widgets/FacetFilterGroup.js b/components/widgets/FacetFilterGroup.js
index 33195c2b..0478a810 100644
--- a/components/widgets/FacetFilterGroup.js
+++ b/components/widgets/FacetFilterGroup.js
@@ -1,5 +1,5 @@
+import { Box, Checkbox, FormControlLabel, FormGroup, Typography } from "@mui/material";
import React from "react";
-import { Checkbox, FormControlLabel, FormGroup, Typography, Box } from "@mui/material";
/**
* Generic, reusable multi-select checkbox facet. Not specific to any one
@@ -59,7 +59,10 @@ export default function FacetFilterGroup({ label, options, selected, onChange })
}
label={
- {optionLabel} ({count})
+ {optionLabel}{" "}
+
+ ({count})
+
}
/>
diff --git a/components/widgets/PopoverTooltipClick.js b/components/widgets/PopoverTooltipClick.js
index 94a4b5bd..05f07e02 100644
--- a/components/widgets/PopoverTooltipClick.js
+++ b/components/widgets/PopoverTooltipClick.js
@@ -1,13 +1,7 @@
-import { useState } from 'react';
-import {
- Box,
- Divider,
- Link,
- Popover,
- Typography,
-} from '@mui/material';
-import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
-import OpenInNewIcon from '@mui/icons-material/OpenInNew';
+import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
+import OpenInNewIcon from "@mui/icons-material/OpenInNew";
+import { Box, Divider, Link, Popover, Typography } from "@mui/material";
+import { useState } from "react";
function PopoverTooltipClick({ toolTip = {} }) {
const [anchorEl, setAnchorEl] = useState(null);
@@ -25,24 +19,20 @@ function PopoverTooltipClick({ toolTip = {} }) {
return (
<>
-
+
{t.header && (
<>
-
+
{t.header}
@@ -56,9 +46,9 @@ function PopoverTooltipClick({ toolTip = {} }) {
@@ -71,14 +61,17 @@ function PopoverTooltipClick({ toolTip = {} }) {
) : null}
{t.info ? (
-
+
Definition: {t.info}
{t.componentLink && (
@@ -104,7 +97,7 @@ function PopoverTooltipClick({ toolTip = {} }) {
href={t.sourceLink}
target="_blank"
rel="noopener noreferrer"
- sx={{ ml: 0.5, verticalAlign: 'middle' }}
+ sx={{ ml: 0.5, verticalAlign: "middle" }}
>
diff --git a/components/widgets/ProblemCard.js b/components/widgets/ProblemCard.js
index 828a43b2..758dbfa3 100644
--- a/components/widgets/ProblemCard.js
+++ b/components/widgets/ProblemCard.js
@@ -1,7 +1,10 @@
-import React from "react";
-import Link from "next/link";
+import {
+ CheckCircle as CheckCircleIcon,
+ RemoveCircleOutlined as DashIcon,
+} from "@mui/icons-material";
import { Box, Chip, Typography } from "@mui/material";
-import { CheckCircle as CheckCircleIcon, RemoveCircleOutlined as DashIcon } from "@mui/icons-material";
+import Link from "next/link";
+import React from "react";
// Same glassmorphism card treatment as pages/aboutus/index.js's theSectionCard,
// scaled down for a dense grid of many cards.
@@ -24,14 +27,18 @@ const cardSx = {
* the problem name navigates to `/?problem=`, which the home page
* reads on mount to auto-select that problem.
*/
-export default function ProblemCard({ name, complexityClass, solverTypes, hasRenderableVisualization }) {
+export default function ProblemCard({
+ name,
+ complexityClass,
+ solverTypes,
+ hasRenderableVisualization,
+}) {
return (
-
-
+
+
{hasRenderableVisualization ? (
-
+
) : (
-
+
)}
diff --git a/components/widgets/ProblemFilterMenu.js b/components/widgets/ProblemFilterMenu.js
index bd7ae072..66dc6abb 100644
--- a/components/widgets/ProblemFilterMenu.js
+++ b/components/widgets/ProblemFilterMenu.js
@@ -1,4 +1,4 @@
-import { useState } from "react";
+import FilterListIcon from "@mui/icons-material/FilterList";
import {
Badge,
Box,
@@ -11,7 +11,7 @@ import {
Popover,
Typography,
} from "@mui/material";
-import FilterListIcon from "@mui/icons-material/FilterList";
+import { useState } from "react";
import { buildFacetOptions, buildGroupedFacetOptions } from "../hooks/ProblemFilters/facetOptions";
import { visualizationTypeCategory } from "../Visualization/svgs/visualizationCategories";
@@ -38,7 +38,10 @@ function FacetCheckbox({ optionKey, label, count, selected, onChange }) {
}
label={
- {label} ({count})
+ {label}{" "}
+
+ ({count})
+
}
/>
diff --git a/components/widgets/ProblemSection.js b/components/widgets/ProblemSection.js
index 8b32c42a..c319c8ae 100644
--- a/components/widgets/ProblemSection.js
+++ b/components/widgets/ProblemSection.js
@@ -2,11 +2,10 @@
* A singular section of a problem.
*/
-import React from "react";
-import { useContext } from "react";
+import React, { useContext } from "react";
import "bootstrap/dist/css/bootstrap.min.css";
-import { Accordion, Card, AccordionContext } from "react-bootstrap";
-import { Stack, Button, Box } from "@mui/material";
+import { Box, Button, Stack } from "@mui/material";
+import { Accordion, AccordionContext, Card } from "react-bootstrap";
import { useAccordionButton } from "react-bootstrap/AccordionButton";
/// Default theme.
@@ -60,7 +59,7 @@ ProblemSection.Header = function Header({ children, title, titleWidth }) {
width: titleWidth ?? "10%",
display: "flex",
justifyContent: "center", // horizontal center
- alignItems: "center", // vertical center
+ alignItems: "center", // vertical center
}}
>
{title}
@@ -74,7 +73,6 @@ ProblemSection.Header = function Header({ children, title, titleWidth }) {
);
};
-
ProblemSection.Body = function Body({ children }) {
return (
diff --git a/components/widgets/ResponsiveAppBar.js b/components/widgets/ResponsiveAppBar.js
index ce90e680..d5d11a08 100644
--- a/components/widgets/ResponsiveAppBar.js
+++ b/components/widgets/ResponsiveAppBar.js
@@ -1,98 +1,82 @@
/**
* ResponsiveAppBar.js
*
- * This component was directly ripped from the app bar section of mui.com:
+ * This component was directly ripped from the app bar section of mui.com:
* https://mui.com/material-ui/react-app-bar/
* * @author Alex Diviney
*/
+import { Adb as AdbIcon } from "@mui/icons-material"; // Grouped icons safely
+import { AppBar, Box, Button, Container, Toolbar, Typography } from "@mui/material"; // Grouped all directory imports safely into a named root import
+import * as React from "react";
-import * as React from 'react';
-import {
- AppBar,
- Box,
- Toolbar,
- Typography,
- Container,
- Button,
-} from '@mui/material'; // Grouped all directory imports safely into a named root import
-import { Adb as AdbIcon } from '@mui/icons-material'; // Grouped icons safely
-
-const pages = ['Home', 'About Us', 'Browse', 'Help', 'Contribute']
+const pages = ["Home", "About Us", "Browse", "Help", "Contribute"];
const ResponsiveAppBar = () => {
- return (
-
-
-
-
- {/**This is the REDUX LOGO Component. */}
-
- REDUX
-
-
-
-
-
-
-
-
- {pages.map((page) => {
-
- var currentHref = page.toLowerCase();
-
- if (currentHref === "home") {
- currentHref = "";
- }
- else {
- currentHref = currentHref.replace(' ', '');
- }
- return (
-
- {page}
-
- )
- }
- )}
-
+ return (
+
+
+
+
+ {/**This is the REDUX LOGO Component. */}
+
+ REDUX
+
+
+
+
+ {pages.map((page) => {
+ var currentHref = page.toLowerCase();
-
-
-
- );
+ if (currentHref === "home") {
+ currentHref = "";
+ } else {
+ currentHref = currentHref.replace(" ", "");
+ }
+ return (
+
+ {page}
+
+ );
+ })}
+
+
+
+
+ );
};
-export default ResponsiveAppBar;
\ No newline at end of file
+export default ResponsiveAppBar;
diff --git a/components/widgets/SearchBarExtensible.js b/components/widgets/SearchBarExtensible.js
index d40f84db..f3b4cae0 100644
--- a/components/widgets/SearchBarExtensible.js
+++ b/components/widgets/SearchBarExtensible.js
@@ -1,5 +1,5 @@
+import { Autocomplete, Button, Divider, ListSubheader, Paper, TextField } from "@mui/material";
import React, { useState } from "react";
-import { Autocomplete, TextField, Paper, Divider, Button, ListSubheader } from "@mui/material";
export default function SearchBarExtensible({
selected,
@@ -37,28 +37,34 @@ export default function SearchBarExtensible({
onInputChange={(event, value) => {
setInput(value ?? "");
}}
- value={disabled ? disabledMessage : optionsMap.get(selected) ?? ""}
+ value={disabled ? disabledMessage : (optionsMap.get(selected) ?? "")}
onChange={(event, value) => {
value = getKeyByValue(optionsMap, value) ?? "";
if (value === "" || options.includes(value)) {
onSelect(value);
}
}}
- options={Array.isArray(options)
- ? [...options]
- .sort((a, b) => sortOptions(a, b, { groupBy, groupOrder, optionsHighlight }))
- .map((x) => optionsMap.get(x) ?? x)
- : []}
- groupBy={groupBy ? (option) => groupBy(getKeyByValue(optionsMap, option)) ?? "Unclassified" : undefined}
+ options={
+ Array.isArray(options)
+ ? [...options]
+ .sort((a, b) => sortOptions(a, b, { groupBy, groupOrder, optionsHighlight }))
+ .map((x) => optionsMap.get(x) ?? x)
+ : []
+ }
+ groupBy={
+ groupBy
+ ? (option) => groupBy(getKeyByValue(optionsMap, option)) ?? "Unclassified"
+ : undefined
+ }
// Bolds the group header so it reads as a section divider, not a selectable option.
renderGroup={
groupBy
? (params) => (
-
- {params.group}
- {params.children}
-
- )
+
+ {params.group}
+ {params.children}
+
+ )
: undefined
}
getOptionDisabled={
@@ -93,16 +99,16 @@ export default function SearchBarExtensible({
renderOption={
optionsHighlight || optionsDisabled
? (props, option) => {
- const key = getKeyByValue(optionsMap, option);
- const isDeemphasized = optionsHighlight ? !optionsHighlight.includes(key) : false;
- const isDisabledOption = optionsDisabled ? optionsDisabled.includes(key) : false;
- return (
-
- {option}
- {isDisabledOption && disabledOptionHint ? ` (${disabledOptionHint})` : ""}
-
- );
- }
+ const key = getKeyByValue(optionsMap, option);
+ const isDeemphasized = optionsHighlight ? !optionsHighlight.includes(key) : false;
+ const isDisabledOption = optionsDisabled ? optionsDisabled.includes(key) : false;
+ return (
+
+ {option}
+ {isDisabledOption && disabledOptionHint ? ` (${disabledOptionHint})` : ""}
+
+ );
+ }
: null
}
/>
diff --git a/components/widgets/ShareButton.js b/components/widgets/ShareButton.js
index de4ba762..3a193328 100644
--- a/components/widgets/ShareButton.js
+++ b/components/widgets/ShareButton.js
@@ -1,63 +1,65 @@
-import React from 'react';
-import Button from 'react-bootstrap/Button';
-import { Share as ShareIcon } from '@mui/icons-material';
+import { Share as ShareIcon } from "@mui/icons-material";
+import React from "react";
+import Button from "react-bootstrap/Button";
const THEME = { colors: { grey: "#424242", orange: "#d4441c" } };
const createShareLink = (baseUrl, data) => {
- const params = new URLSearchParams(data).toString();
- return `${baseUrl}?${params}`;
+ const params = new URLSearchParams(data).toString();
+ return `${baseUrl}?${params}`;
};
const handleShare = async (problem, solver, verifier, reducer) => {
+ const data = {
+ problem: problem.problemName ?? "",
+ instance: problem.problemInstance ?? "",
+ solver: solver.chosenSolver ?? "",
+ reduceTo: reducer.chosenReduceTo ?? "",
+ reductionType: reducer.chosenReductionType ?? "",
+ verifier: verifier.chosenVerifier ?? "",
+ };
- const data = {
- problem: problem.problemName ?? "",
- instance: problem.problemInstance ?? "",
- solver: solver.chosenSolver ?? "",
- reduceTo: reducer.chosenReduceTo ?? "",
- reductionType: reducer.chosenReductionType ?? "",
- verifier: verifier.chosenVerifier ?? "",
- };
-
- localStorage.setItem('problemData', JSON.stringify(data));
- // Create the share URL with the parameters
- const shareUrl = createShareLink(window.location.origin + window.location.pathname, data);
+ localStorage.setItem("problemData", JSON.stringify(data));
+ // Create the share URL with the parameters
+ const shareUrl = createShareLink(window.location.origin + window.location.pathname, data);
- if (navigator.share) {
- try {
- await navigator.share({
- title: 'Check this out!',
- text: 'Here is some interesting content.',
- url: shareUrl
- });
- console.log('Content shared successfully');
- } catch (error) {
- console.error('Error sharing content:', error);
- }
- } else {
- // Fallback: Copy the URL to the clipboard
- try {
- await navigator.clipboard.writeText(shareUrl);
- alert('Web Share API is not supported in your browser. The share URL has been copied to your clipboard.');
- } catch (error) {
- console.error('Error copying URL to clipboard:', error);
- alert('Failed to copy the share URL to the clipboard.');
- }
+ if (navigator.share) {
+ try {
+ await navigator.share({
+ title: "Check this out!",
+ text: "Here is some interesting content.",
+ url: shareUrl,
+ });
+ console.log("Content shared successfully");
+ } catch (error) {
+ console.error("Error sharing content:", error);
}
+ } else {
+ // Fallback: Copy the URL to the clipboard
+ try {
+ await navigator.clipboard.writeText(shareUrl);
+ alert(
+ "Web Share API is not supported in your browser. The share URL has been copied to your clipboard.",
+ );
+ } catch (error) {
+ console.error("Error copying URL to clipboard:", error);
+ alert("Failed to copy the share URL to the clipboard.");
+ }
+ }
};
const ShareButton = ({ problem, solver, verifier, reducer }) => (
- handleShare(problem, solver, verifier, reducer)}>
-
-
+ onClick={() => handleShare(problem, solver, verifier, reducer)}
+ >
+
+
);
-export default ShareButton;
\ No newline at end of file
+export default ShareButton;
diff --git a/components/widgets/TextBox.js b/components/widgets/TextBox.js
index 152f5de6..e5da7211 100644
--- a/components/widgets/TextBox.js
+++ b/components/widgets/TextBox.js
@@ -1,14 +1,19 @@
-import React from 'react';
+import React from "react";
//This function exports the skeleton of a Textbox. The structure of the required prop object is very arbitary and subject to change
function TextBox(props) {
- return(
)
+ return (
+
+ );
}
-export default TextBox
\ No newline at end of file
+export default TextBox;
diff --git a/components/widgets/VisualizationLogic.js b/components/widgets/VisualizationLogic.js
index 4a11560b..289e903c 100644
--- a/components/widgets/VisualizationLogic.js
+++ b/components/widgets/VisualizationLogic.js
@@ -1,13 +1,12 @@
// This is a holder for visualizations that passes down urls based on switch data.
-
-import Split from 'react-split'
-import { useEffect, useState } from 'react';
-import { Container } from '@mui/material';
-import { No_Renderable_Viz_Svg, Viz_Render_Error_Svg } from '../Visualization/svgs/No_Viz_SVG';
-import Visualizations from '../Visualization/svgs/Visualizations.js'
-import { isRenderable } from '../Visualization/svgs/renderability';
-import { remapIdsDeep, makeIdsUnique, processReductions } from '../redux';
+import { Container } from "@mui/material";
+import { useEffect, useState } from "react";
+import Split from "react-split";
+import { makeIdsUnique, processReductions, remapIdsDeep } from "../redux";
+import { No_Renderable_Viz_Svg, Viz_Render_Error_Svg } from "../Visualization/svgs/No_Viz_SVG";
+import { isRenderable } from "../Visualization/svgs/renderability";
+import Visualizations from "../Visualization/svgs/Visualizations.js";
export default function VisualizationLogic({
url,
@@ -28,133 +27,132 @@ export default function VisualizationLogic({
let visualization;
let reducedVisualization;
- const solve = visualizationState.solverOn
+ const solve = visualizationState.solverOn;
- const handleBar = () => { }
+ const handleBar = () => {};
const [mappedProblemData, setMappedProblemData] = useState(null);
const [mappedReductionData, setMappedReductionData] = useState(null);
useEffect(() => {
if (problemInstance && problemData) {
- processReductions(url, chosenReductionType, problemInstance)
- .then(rawGadgetMap => {
- const { gadgets, fromIdMap } = makeIdsUnique(rawGadgetMap);
- setGadgetMap(gadgets);
- setMappedProblemData(remapIdsDeep(problemData, fromIdMap) || problemData);
- })
+ processReductions(url, chosenReductionType, problemInstance).then((rawGadgetMap) => {
+ const { gadgets, fromIdMap } = makeIdsUnique(rawGadgetMap);
+ setGadgetMap(gadgets);
+ setMappedProblemData(remapIdsDeep(problemData, fromIdMap) || problemData);
+ });
}
}, [problemData, url, chosenReductionType, problemInstance]);
-useEffect(() => {
- if (visualizationState.reductionOn && reductionVisualization && url && problemInstance) {
- processReductions(url, chosenReductionType, problemInstance)
- .then(rawGadgetMap => {
+ useEffect(() => {
+ if (visualizationState.reductionOn && reductionVisualization && url && problemInstance) {
+ processReductions(url, chosenReductionType, problemInstance).then((rawGadgetMap) => {
const { gadgets, toIdMap } = makeIdsUnique(rawGadgetMap);
setGadgetMap(gadgets);
setMappedReductionData(remapIdsDeep(reductionData, toIdMap) || reductionData);
- })
- }
-}, [
- visualizationState.reductionOn,
- reductionVisualization,
- chosenReductionType,
- problemInstance,
- reductionData,
- url
-]);
-
-
-if (url && problemInstance && mappedProblemData && Object.keys(mappedProblemData).length > 0) {
- if (!isRenderable(visualizationType)) {
- visualization = (
-
- )
- } else {
- try {
- visualization = Visualizations.get(visualizationType)(solve, url, mappedProblemData, gadgetMap, visualizationState.gadgetsOn)
- } catch (err) {
- console.error("visualization renderer threw", visualizationType, err)
+ });
+ }
+ }, [
+ visualizationState.reductionOn,
+ reductionVisualization,
+ chosenReductionType,
+ problemInstance,
+ reductionData,
+ url,
+ ]);
+
+ if (url && problemInstance && mappedProblemData && Object.keys(mappedProblemData).length > 0) {
+ if (!isRenderable(visualizationType)) {
visualization = (
-
- )
- }
- }
-
- if (visualizationState.reductionOn) {
- if (!isRenderable(reductionVisualization)) {
- reducedVisualization = (
-
- )
+ );
} else {
try {
- reducedVisualization = Visualizations.get(reductionVisualization)(solve, url, mappedReductionData, gadgetMap, visualizationState.gadgetsOn)
-
- //NOTE - Caleb, The following is a temporary fix until CLIQUE_SVG_REACT.js is fixed, currently it takes the 3sat instance,
- // but should take the clique instance, once that is fixed the following code block should be able to be removed without issue
- if (reductionName == "CLIQUE") {
- //reducedVisualization = ReducedVisualizations.get(chosenReductionType)(solve, url, problemInstance, mappedSolution)
- }
-
+ visualization = Visualizations.get(visualizationType)(
+ solve,
+ url,
+ mappedProblemData,
+ gadgetMap,
+ visualizationState.gadgetsOn,
+ );
} catch (err) {
- console.error("reduction visualization renderer threw", reductionVisualization, err)
- reducedVisualization = (
+ console.error("visualization renderer threw", visualizationType, err);
+ visualization = (
+ );
+ }
+ }
+
+ if (visualizationState.reductionOn) {
+ if (!isRenderable(reductionVisualization)) {
+ reducedVisualization = (
+
- )
+ );
+ } else {
+ try {
+ reducedVisualization = Visualizations.get(reductionVisualization)(
+ solve,
+ url,
+ mappedReductionData,
+ gadgetMap,
+ visualizationState.gadgetsOn,
+ );
+
+ //NOTE - Caleb, The following is a temporary fix until CLIQUE_SVG_REACT.js is fixed, currently it takes the 3sat instance,
+ // but should take the clique instance, once that is fixed the following code block should be able to be removed without issue
+ if (reductionName == "CLIQUE") {
+ //reducedVisualization = ReducedVisualizations.get(chosenReductionType)(solve, url, problemInstance, mappedSolution)
+ }
+ } catch (err) {
+ console.error("reduction visualization renderer threw", reductionVisualization, err);
+ reducedVisualization = (
+
+ );
+ }
}
}
}
-}
-
-
-if (!visualizationState.reductionOn && !loading) {
- return (
- <>
-
- {visualization}
-
- >
- )
-}
-else if (visualizationState.reductionOn && !loading) {
- return (
- <>
-
-
- {/* {"Container1"} */}
- {visualization}
-
-
-
- {/* {"Container2"} */}
- {reducedVisualization}
-
-
-
- >
- )
-}
+ if (!visualizationState.reductionOn && !loading) {
+ return (
+ <>
+
{visualization}
+ >
+ );
+ } else if (visualizationState.reductionOn && !loading) {
+ return (
+ <>
+
+
+ {/* {"Container1"} */}
+ {visualization}
+
+
+
+ {/* {"Container2"} */}
+ {reducedVisualization}
+
+
+ >
+ );
+ }
-return (
- <>
- >
-)
+ return <>>;
}
diff --git a/eslint.config.js b/eslint.config.js
index d80fa83c..8c10714e 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -37,23 +37,14 @@ const importX = require("eslint-plugin-import-x");
const prettier = require("eslint-config-prettier");
// eslint-config-next exports an array of flat-config objects; spread it in.
-const nextConfigs = Array.isArray(nextCoreWebVitals)
- ? nextCoreWebVitals
- : [nextCoreWebVitals];
+const nextConfigs = Array.isArray(nextCoreWebVitals) ? nextCoreWebVitals : [nextCoreWebVitals];
module.exports = [
// 1. Ignore what isn't ours. A config object with ONLY `ignores` is global.
// public/ holds the vendored Q.js library + static assets — linting it produced 38
// spurious no-undef errors, so it's excluded here.
{
- ignores: [
- "node_modules/**",
- ".next/**",
- "out/**",
- "build/**",
- "public/**",
- "next-env.d.ts",
- ],
+ ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "public/**", "next-env.d.ts"],
},
// 2. Base JavaScript correctness — the previously-missing floor.
diff --git a/next.config.js b/next.config.js
index 195edde6..3e616343 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
module.exports = {
- output: 'standalone',
+ output: "standalone",
reactStrictMode: true,
- transpilePackages: ['@mui/material', '@mui/icons-material', '@mui/system'],
-}
+ transpilePackages: ["@mui/material", "@mui/icons-material", "@mui/system"],
+};
diff --git a/pages/Data.json b/pages/Data.json
index acea7146..ca106a03 100644
--- a/pages/Data.json
+++ b/pages/Data.json
@@ -1,1002 +1,1002 @@
[
- {
- "author": "Chinua Achebe",
- "country": "Nigeria",
- "imageLink": "images/things-fall-apart.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Things_Fall_Apart\n",
- "pages": 209,
- "title": "Things Fall Apart",
- "year": 1958
- },
- {
- "author": "Hans Christian Andersen",
- "country": "Denmark",
- "imageLink": "images/fairy-tales.jpg",
- "language": "Danish",
- "link": "https://en.wikipedia.org/wiki/Fairy_Tales_Told_for_Children._First_Collection.\n",
- "pages": 784,
- "title": "Fairy tales",
- "year": 1836
- },
- {
- "author": "Dante Alighieri",
- "country": "Italy",
- "imageLink": "images/the-divine-comedy.jpg",
- "language": "Italian",
- "link": "https://en.wikipedia.org/wiki/Divine_Comedy\n",
- "pages": 928,
- "title": "The Divine Comedy",
- "year": 1315
- },
- {
- "author": "Unknown",
- "country": "Sumer and Akkadian Empire",
- "imageLink": "images/the-epic-of-gilgamesh.jpg",
- "language": "Akkadian",
- "link": "https://en.wikipedia.org/wiki/Epic_of_Gilgamesh\n",
- "pages": 160,
- "title": "The Epic Of Gilgamesh",
- "year": -1700
- },
- {
- "author": "Unknown",
- "country": "Achaemenid Empire",
- "imageLink": "images/the-book-of-job.jpg",
- "language": "Hebrew",
- "link": "https://en.wikipedia.org/wiki/Book_of_Job\n",
- "pages": 176,
- "title": "The Book Of Job",
- "year": -600
- },
- {
- "author": "Unknown",
- "country": "India/Iran/Iraq/Egypt/Tajikistan",
- "imageLink": "images/one-thousand-and-one-nights.jpg",
- "language": "Arabic",
- "link": "https://en.wikipedia.org/wiki/One_Thousand_and_One_Nights\n",
- "pages": 288,
- "title": "One Thousand and One Nights",
- "year": 1200
- },
- {
- "author": "Unknown",
- "country": "Iceland",
- "imageLink": "images/njals-saga.jpg",
- "language": "Old Norse",
- "link": "https://en.wikipedia.org/wiki/Nj%C3%A1ls_saga\n",
- "pages": 384,
- "title": "Nj\u00e1l's Saga",
- "year": 1350
- },
- {
- "author": "Jane Austen",
- "country": "United Kingdom",
- "imageLink": "images/pride-and-prejudice.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Pride_and_Prejudice\n",
- "pages": 226,
- "title": "Pride and Prejudice",
- "year": 1813
- },
- {
- "author": "Honor\u00e9 de Balzac",
- "country": "France",
- "imageLink": "images/le-pere-goriot.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Le_P%C3%A8re_Goriot\n",
- "pages": 443,
- "title": "Le P\u00e8re Goriot",
- "year": 1835
- },
- {
- "author": "Samuel Beckett",
- "country": "Republic of Ireland",
- "imageLink": "images/molloy-malone-dies-the-unnamable.jpg",
- "language": "French, English",
- "link": "https://en.wikipedia.org/wiki/Molloy_(novel)\n",
- "pages": 256,
- "title": "Molloy, Malone Dies, The Unnamable, the trilogy",
- "year": 1952
- },
- {
- "author": "Giovanni Boccaccio",
- "country": "Italy",
- "imageLink": "images/the-decameron.jpg",
- "language": "Italian",
- "link": "https://en.wikipedia.org/wiki/The_Decameron\n",
- "pages": 1024,
- "title": "The Decameron",
- "year": 1351
- },
- {
- "author": "Jorge Luis Borges",
- "country": "Argentina",
- "imageLink": "images/ficciones.jpg",
- "language": "Spanish",
- "link": "https://en.wikipedia.org/wiki/Ficciones\n",
- "pages": 224,
- "title": "Ficciones",
- "year": 1965
- },
- {
- "author": "Emily Bront\u00eb",
- "country": "United Kingdom",
- "imageLink": "images/wuthering-heights.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Wuthering_Heights\n",
- "pages": 342,
- "title": "Wuthering Heights",
- "year": 1847
- },
- {
- "author": "Albert Camus",
- "country": "Algeria, French Empire",
- "imageLink": "images/l-etranger.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/The_Stranger_(novel)\n",
- "pages": 185,
- "title": "The Stranger",
- "year": 1942
- },
- {
- "author": "Paul Celan",
- "country": "Romania, France",
- "imageLink": "images/poems-paul-celan.jpg",
- "language": "German",
- "link": "\n",
- "pages": 320,
- "title": "Poems",
- "year": 1952
- },
- {
- "author": "Louis-Ferdinand C\u00e9line",
- "country": "France",
- "imageLink": "images/voyage-au-bout-de-la-nuit.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Journey_to_the_End_of_the_Night\n",
- "pages": 505,
- "title": "Journey to the End of the Night",
- "year": 1932
- },
- {
- "author": "Miguel de Cervantes",
- "country": "Spain",
- "imageLink": "images/don-quijote-de-la-mancha.jpg",
- "language": "Spanish",
- "link": "https://en.wikipedia.org/wiki/Don_Quixote\n",
- "pages": 1056,
- "title": "Don Quijote De La Mancha",
- "year": 1610
- },
- {
- "author": "Geoffrey Chaucer",
- "country": "England",
- "imageLink": "images/the-canterbury-tales.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/The_Canterbury_Tales\n",
- "pages": 544,
- "title": "The Canterbury Tales",
- "year": 1450
- },
- {
- "author": "Anton Chekhov",
- "country": "Russia",
- "imageLink": "images/stories-of-anton-chekhov.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/List_of_short_stories_by_Anton_Chekhov\n",
- "pages": 194,
- "title": "Stories",
- "year": 1886
- },
- {
- "author": "Joseph Conrad",
- "country": "United Kingdom",
- "imageLink": "images/nostromo.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Nostromo\n",
- "pages": 320,
- "title": "Nostromo",
- "year": 1904
- },
- {
- "author": "Charles Dickens",
- "country": "United Kingdom",
- "imageLink": "images/great-expectations.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Great_Expectations\n",
- "pages": 194,
- "title": "Great Expectations",
- "year": 1861
- },
- {
- "author": "Denis Diderot",
- "country": "France",
- "imageLink": "images/jacques-the-fatalist.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Jacques_the_Fatalist\n",
- "pages": 596,
- "title": "Jacques the Fatalist",
- "year": 1796
- },
- {
- "author": "Alfred D\u00f6blin",
- "country": "Germany",
- "imageLink": "images/berlin-alexanderplatz.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/Berlin_Alexanderplatz\n",
- "pages": 600,
- "title": "Berlin Alexanderplatz",
- "year": 1929
- },
- {
- "author": "Fyodor Dostoevsky",
- "country": "Russia",
- "imageLink": "images/crime-and-punishment.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/Crime_and_Punishment\n",
- "pages": 551,
- "title": "Crime and Punishment",
- "year": 1866
- },
- {
- "author": "Fyodor Dostoevsky",
- "country": "Russia",
- "imageLink": "images/the-idiot.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/The_Idiot\n",
- "pages": 656,
- "title": "The Idiot",
- "year": 1869
- },
- {
- "author": "Fyodor Dostoevsky",
- "country": "Russia",
- "imageLink": "images/the-possessed.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/Demons_(Dostoyevsky_novel)\n",
- "pages": 768,
- "title": "The Possessed",
- "year": 1872
- },
- {
- "author": "Fyodor Dostoevsky",
- "country": "Russia",
- "imageLink": "images/the-brothers-karamazov.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/The_Brothers_Karamazov\n",
- "pages": 824,
- "title": "The Brothers Karamazov",
- "year": 1880
- },
- {
- "author": "George Eliot",
- "country": "United Kingdom",
- "imageLink": "images/middlemarch.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Middlemarch\n",
- "pages": 800,
- "title": "Middlemarch",
- "year": 1871
- },
- {
- "author": "Ralph Ellison",
- "country": "United States",
- "imageLink": "images/invisible-man.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Invisible_Man\n",
- "pages": 581,
- "title": "Invisible Man",
- "year": 1952
- },
- {
- "author": "Euripides",
- "country": "Greece",
- "imageLink": "images/medea.jpg",
- "language": "Greek",
- "link": "https://en.wikipedia.org/wiki/Medea_(play)\n",
- "pages": 104,
- "title": "Medea",
- "year": -431
- },
- {
- "author": "William Faulkner",
- "country": "United States",
- "imageLink": "images/absalom-absalom.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Absalom,_Absalom!\n",
- "pages": 313,
- "title": "Absalom, Absalom!",
- "year": 1936
- },
- {
- "author": "William Faulkner",
- "country": "United States",
- "imageLink": "images/the-sound-and-the-fury.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/The_Sound_and_the_Fury\n",
- "pages": 326,
- "title": "The Sound and the Fury",
- "year": 1929
- },
- {
- "author": "Gustave Flaubert",
- "country": "France",
- "imageLink": "images/madame-bovary.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Madame_Bovary\n",
- "pages": 528,
- "title": "Madame Bovary",
- "year": 1857
- },
- {
- "author": "Gustave Flaubert",
- "country": "France",
- "imageLink": "images/l-education-sentimentale.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Sentimental_Education\n",
- "pages": 606,
- "title": "Sentimental Education",
- "year": 1869
- },
- {
- "author": "Federico Garc\u00eda Lorca",
- "country": "Spain",
- "imageLink": "images/gypsy-ballads.jpg",
- "language": "Spanish",
- "link": "https://en.wikipedia.org/wiki/Gypsy_Ballads\n",
- "pages": 218,
- "title": "Gypsy Ballads",
- "year": 1928
- },
- {
- "author": "Gabriel Garc\u00eda M\u00e1rquez",
- "country": "Colombia",
- "imageLink": "images/one-hundred-years-of-solitude.jpg",
- "language": "Spanish",
- "link": "https://en.wikipedia.org/wiki/One_Hundred_Years_of_Solitude\n",
- "pages": 417,
- "title": "One Hundred Years of Solitude",
- "year": 1967
- },
- {
- "author": "Gabriel Garc\u00eda M\u00e1rquez",
- "country": "Colombia",
- "imageLink": "images/love-in-the-time-of-cholera.jpg",
- "language": "Spanish",
- "link": "https://en.wikipedia.org/wiki/Love_in_the_Time_of_Cholera\n",
- "pages": 368,
- "title": "Love in the Time of Cholera",
- "year": 1985
- },
- {
- "author": "Johann Wolfgang von Goethe",
- "country": "Saxe-Weimar",
- "imageLink": "images/faust.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/Goethe%27s_Faust\n",
- "pages": 158,
- "title": "Faust",
- "year": 1832
- },
- {
- "author": "Nikolai Gogol",
- "country": "Russia",
- "imageLink": "images/dead-souls.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/Dead_Souls\n",
- "pages": 432,
- "title": "Dead Souls",
- "year": 1842
- },
- {
- "author": "G\u00fcnter Grass",
- "country": "Germany",
- "imageLink": "images/the-tin-drum.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/The_Tin_Drum\n",
- "pages": 600,
- "title": "The Tin Drum",
- "year": 1959
- },
- {
- "author": "Jo\u00e3o Guimar\u00e3es Rosa",
- "country": "Brazil",
- "imageLink": "images/the-devil-to-pay-in-the-backlands.jpg",
- "language": "Portuguese",
- "link": "https://en.wikipedia.org/wiki/The_Devil_to_Pay_in_the_Backlands\n",
- "pages": 494,
- "title": "The Devil to Pay in the Backlands",
- "year": 1956
- },
- {
- "author": "Knut Hamsun",
- "country": "Norway",
- "imageLink": "images/hunger.jpg",
- "language": "Norwegian",
- "link": "https://en.wikipedia.org/wiki/Hunger_(Hamsun_novel)\n",
- "pages": 176,
- "title": "Hunger",
- "year": 1890
- },
- {
- "author": "Ernest Hemingway",
- "country": "United States",
- "imageLink": "images/the-old-man-and-the-sea.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/The_Old_Man_and_the_Sea\n",
- "pages": 128,
- "title": "The Old Man and the Sea",
- "year": 1952
- },
- {
- "author": "Homer",
- "country": "Greece",
- "imageLink": "images/the-iliad-of-homer.jpg",
- "language": "Greek",
- "link": "https://en.wikipedia.org/wiki/Iliad\n",
- "pages": 608,
- "title": "Iliad",
- "year": -735
- },
- {
- "author": "Homer",
- "country": "Greece",
- "imageLink": "images/the-odyssey-of-homer.jpg",
- "language": "Greek",
- "link": "https://en.wikipedia.org/wiki/Odyssey\n",
- "pages": 374,
- "title": "Odyssey",
- "year": -800
- },
- {
- "author": "Henrik Ibsen",
- "country": "Norway",
- "imageLink": "images/a-Dolls-house.jpg",
- "language": "Norwegian",
- "link": "https://en.wikipedia.org/wiki/A_Doll%27s_House\n",
- "pages": 68,
- "title": "A Doll's House",
- "year": 1879
- },
- {
- "author": "James Joyce",
- "country": "Irish Free State",
- "imageLink": "images/ulysses.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Ulysses_(novel)\n",
- "pages": 228,
- "title": "Ulysses",
- "year": 1922
- },
- {
- "author": "Franz Kafka",
- "country": "Czechoslovakia",
- "imageLink": "images/stories-of-franz-kafka.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/Franz_Kafka_bibliography#Short_stories\n",
- "pages": 488,
- "title": "Stories",
- "year": 1924
- },
- {
- "author": "Franz Kafka",
- "country": "Czechoslovakia",
- "imageLink": "images/the-trial.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/The_Trial\n",
- "pages": 160,
- "title": "The Trial",
- "year": 1925
- },
- {
- "author": "Franz Kafka",
- "country": "Czechoslovakia",
- "imageLink": "images/the-castle.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/The_Castle_(novel)\n",
- "pages": 352,
- "title": "The Castle",
- "year": 1926
- },
- {
- "author": "K\u0101lid\u0101sa",
- "country": "India",
- "imageLink": "images/the-recognition-of-shakuntala.jpg",
- "language": "Sanskrit",
- "link": "https://en.wikipedia.org/wiki/Abhij%C3%B1%C4%81na%C5%9B%C4%81kuntalam\n",
- "pages": 147,
- "title": "The recognition of Shakuntala",
- "year": 150
- },
- {
- "author": "Yasunari Kawabata",
- "country": "Japan",
- "imageLink": "images/the-sound-of-the-mountain.jpg",
- "language": "Japanese",
- "link": "https://en.wikipedia.org/wiki/The_Sound_of_the_Mountain\n",
- "pages": 288,
- "title": "The Sound of the Mountain",
- "year": 1954
- },
- {
- "author": "Nikos Kazantzakis",
- "country": "Greece",
- "imageLink": "images/zorba-the-greek.jpg",
- "language": "Greek",
- "link": "https://en.wikipedia.org/wiki/Zorba_the_Greek\n",
- "pages": 368,
- "title": "Zorba the Greek",
- "year": 1946
- },
- {
- "author": "D. H. Lawrence",
- "country": "United Kingdom",
- "imageLink": "images/sons-and-lovers.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Sons_and_Lovers\n",
- "pages": 432,
- "title": "Sons and Lovers",
- "year": 1913
- },
- {
- "author": "Halld\u00f3r Laxness",
- "country": "Iceland",
- "imageLink": "images/independent-people.jpg",
- "language": "Icelandic",
- "link": "https://en.wikipedia.org/wiki/Independent_People\n",
- "pages": 470,
- "title": "Independent People",
- "year": 1934
- },
- {
- "author": "Giacomo Leopardi",
- "country": "Italy",
- "imageLink": "images/poems-giacomo-leopardi.jpg",
- "language": "Italian",
- "link": "\n",
- "pages": 184,
- "title": "Poems",
- "year": 1818
- },
- {
- "author": "Doris Lessing",
- "country": "United Kingdom",
- "imageLink": "images/the-golden-notebook.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/The_Golden_Notebook\n",
- "pages": 688,
- "title": "The Golden Notebook",
- "year": 1962
- },
- {
- "author": "Astrid Lindgren",
- "country": "Sweden",
- "imageLink": "images/pippi-longstocking.jpg",
- "language": "Swedish",
- "link": "https://en.wikipedia.org/wiki/Pippi_Longstocking\n",
- "pages": 160,
- "title": "Pippi Longstocking",
- "year": 1945
- },
- {
- "author": "Lu Xun",
- "country": "China",
- "imageLink": "images/diary-of-a-madman.jpg",
- "language": "Chinese",
- "link": "https://en.wikipedia.org/wiki/A_Madman%27s_Diary\n",
- "pages": 389,
- "title": "Diary of a Madman",
- "year": 1918
- },
- {
- "author": "Naguib Mahfouz",
- "country": "Egypt",
- "imageLink": "images/children-of-gebelawi.jpg",
- "language": "Arabic",
- "link": "https://en.wikipedia.org/wiki/Children_of_Gebelawi\n",
- "pages": 355,
- "title": "Children of Gebelawi",
- "year": 1959
- },
- {
- "author": "Thomas Mann",
- "country": "Germany",
- "imageLink": "images/buddenbrooks.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/Buddenbrooks\n",
- "pages": 736,
- "title": "Buddenbrooks",
- "year": 1901
- },
- {
- "author": "Thomas Mann",
- "country": "Germany",
- "imageLink": "images/the-magic-mountain.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/The_Magic_Mountain\n",
- "pages": 720,
- "title": "The Magic Mountain",
- "year": 1924
- },
- {
- "author": "Herman Melville",
- "country": "United States",
- "imageLink": "images/moby-dick.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Moby-Dick\n",
- "pages": 378,
- "title": "Moby Dick",
- "year": 1851
- },
- {
- "author": "Michel de Montaigne",
- "country": "France",
- "imageLink": "images/essais.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Essays_(Montaigne)\n",
- "pages": 404,
- "title": "Essays",
- "year": 1595
- },
- {
- "author": "Elsa Morante",
- "country": "Italy",
- "imageLink": "images/history.jpg",
- "language": "Italian",
- "link": "https://en.wikipedia.org/wiki/History_(novel)\n",
- "pages": 600,
- "title": "History",
- "year": 1974
- },
- {
- "author": "Toni Morrison",
- "country": "United States",
- "imageLink": "images/beloved.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Beloved_(novel)\n",
- "pages": 321,
- "title": "Beloved",
- "year": 1987
- },
- {
- "author": "Murasaki Shikibu",
- "country": "Japan",
- "imageLink": "images/the-tale-of-genji.jpg",
- "language": "Japanese",
- "link": "https://en.wikipedia.org/wiki/The_Tale_of_Genji\n",
- "pages": 1360,
- "title": "The Tale of Genji",
- "year": 1006
- },
- {
- "author": "Robert Musil",
- "country": "Austria",
- "imageLink": "images/the-man-without-qualities.jpg",
- "language": "German",
- "link": "https://en.wikipedia.org/wiki/The_Man_Without_Qualities\n",
- "pages": 365,
- "title": "The Man Without Qualities",
- "year": 1931
- },
- {
- "author": "Vladimir Nabokov",
- "country": "Russia/United States",
- "imageLink": "images/lolita.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Lolita\n",
- "pages": 317,
- "title": "Lolita",
- "year": 1955
- },
- {
- "author": "George Orwell",
- "country": "United Kingdom",
- "imageLink": "images/nineteen-eighty-four.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Nineteen_Eighty-Four\n",
- "pages": 272,
- "title": "Nineteen Eighty-Four",
- "year": 1949
- },
- {
- "author": "Ovid",
- "country": "Roman Empire",
- "imageLink": "images/the-metamorphoses-of-ovid.jpg",
- "language": "Classical Latin",
- "link": "https://en.wikipedia.org/wiki/Metamorphoses\n",
- "pages": 576,
- "title": "Metamorphoses",
- "year": 100
- },
- {
- "author": "Fernando Pessoa",
- "country": "Portugal",
- "imageLink": "images/the-book-of-disquiet.jpg",
- "language": "Portuguese",
- "link": "https://en.wikipedia.org/wiki/The_Book_of_Disquiet\n",
- "pages": 272,
- "title": "The Book of Disquiet",
- "year": 1928
- },
- {
- "author": "Edgar Allan Poe",
- "country": "United States",
- "imageLink": "images/tales-and-poems-of-edgar-allan-poe.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Edgar_Allan_Poe_bibliography#Tales\n",
- "pages": 842,
- "title": "Tales",
- "year": 1950
- },
- {
- "author": "Marcel Proust",
- "country": "France",
- "imageLink": "images/a-la-recherche-du-temps-perdu.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/In_Search_of_Lost_Time\n",
- "pages": 2408,
- "title": "In Search of Lost Time",
- "year": 1920
- },
- {
- "author": "Fran\u00e7ois Rabelais",
- "country": "France",
- "imageLink": "images/gargantua-and-pantagruel.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Gargantua_and_Pantagruel\n",
- "pages": 623,
- "title": "Gargantua and Pantagruel",
- "year": 1533
- },
- {
- "author": "Juan Rulfo",
- "country": "Mexico",
- "imageLink": "images/pedro-paramo.jpg",
- "language": "Spanish",
- "link": "https://en.wikipedia.org/wiki/Pedro_P%C3%A1ramo\n",
- "pages": 124,
- "title": "Pedro P\u00e1ramo",
- "year": 1955
- },
- {
- "author": "Rumi",
- "country": "Sultanate of Rum",
- "imageLink": "images/the-masnavi.jpg",
- "language": "Persian",
- "link": "https://en.wikipedia.org/wiki/Masnavi\n",
- "pages": 438,
- "title": "The Masnavi",
- "year": 1236
- },
- {
- "author": "Salman Rushdie",
- "country": "United Kingdom, India",
- "imageLink": "images/midnights-children.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Midnight%27s_Children\n",
- "pages": 536,
- "title": "Midnight's Children",
- "year": 1981
- },
- {
- "author": "Saadi",
- "country": "Persia, Persian Empire",
- "imageLink": "images/bostan.jpg",
- "language": "Persian",
- "link": "https://en.wikipedia.org/wiki/Bustan_(book)\n",
- "pages": 298,
- "title": "Bostan",
- "year": 1257
- },
- {
- "author": "Tayeb Salih",
- "country": "Sudan",
- "imageLink": "images/season-of-migration-to-the-north.jpg",
- "language": "Arabic",
- "link": "https://en.wikipedia.org/wiki/Season_of_Migration_to_the_North\n",
- "pages": 139,
- "title": "Season of Migration to the North",
- "year": 1966
- },
- {
- "author": "Jos\u00e9 Saramago",
- "country": "Portugal",
- "imageLink": "images/blindness.jpg",
- "language": "Portuguese",
- "link": "https://en.wikipedia.org/wiki/Blindness_(novel)\n",
- "pages": 352,
- "title": "Blindness",
- "year": 1995
- },
- {
- "author": "William Shakespeare",
- "country": "England",
- "imageLink": "images/hamlet.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Hamlet\n",
- "pages": 432,
- "title": "Hamlet",
- "year": 1603
- },
- {
- "author": "William Shakespeare",
- "country": "England",
- "imageLink": "images/king-lear.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/King_Lear\n",
- "pages": 384,
- "title": "King Lear",
- "year": 1608
- },
- {
- "author": "William Shakespeare",
- "country": "England",
- "imageLink": "images/othello.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Othello\n",
- "pages": 314,
- "title": "Othello",
- "year": 1609
- },
- {
- "author": "Sophocles",
- "country": "Greece",
- "imageLink": "images/oedipus-the-king.jpg",
- "language": "Greek",
- "link": "https://en.wikipedia.org/wiki/Oedipus_the_King\n",
- "pages": 88,
- "title": "Oedipus the King",
- "year": -430
- },
- {
- "author": "Stendhal",
- "country": "France",
- "imageLink": "images/le-rouge-et-le-noir.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/The_Red_and_the_Black\n",
- "pages": 576,
- "title": "The Red and the Black",
- "year": 1830
- },
- {
- "author": "Laurence Sterne",
- "country": "England",
- "imageLink": "images/the-life-and-opinions-of-tristram-shandy.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/The_Life_and_Opinions_of_Tristram_Shandy,_Gentleman\n",
- "pages": 640,
- "title": "The Life And Opinions of Tristram Shandy",
- "year": 1760
- },
- {
- "author": "Italo Svevo",
- "country": "Italy",
- "imageLink": "images/confessions-of-zeno.jpg",
- "language": "Italian",
- "link": "https://en.wikipedia.org/wiki/Zeno%27s_Conscience\n",
- "pages": 412,
- "title": "Confessions of Zeno",
- "year": 1923
- },
- {
- "author": "Jonathan Swift",
- "country": "Ireland",
- "imageLink": "images/gullivers-travels.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Gulliver%27s_Travels\n",
- "pages": 178,
- "title": "Gulliver's Travels",
- "year": 1726
- },
- {
- "author": "Leo Tolstoy",
- "country": "Russia",
- "imageLink": "images/war-and-peace.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/War_and_Peace\n",
- "pages": 1296,
- "title": "War and Peace",
- "year": 1867
- },
- {
- "author": "Leo Tolstoy",
- "country": "Russia",
- "imageLink": "images/anna-karenina.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/Anna_Karenina\n",
- "pages": 864,
- "title": "Anna Karenina",
- "year": 1877
- },
- {
- "author": "Leo Tolstoy",
- "country": "Russia",
- "imageLink": "images/the-death-of-ivan-ilyich.jpg",
- "language": "Russian",
- "link": "https://en.wikipedia.org/wiki/The_Death_of_Ivan_Ilyich\n",
- "pages": 92,
- "title": "The Death of Ivan Ilyich",
- "year": 1886
- },
- {
- "author": "Mark Twain",
- "country": "United States",
- "imageLink": "images/the-adventures-of-huckleberry-finn.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Adventures_of_Huckleberry_Finn\n",
- "pages": 224,
- "title": "The Adventures of Huckleberry Finn",
- "year": 1884
- },
- {
- "author": "Valmiki",
- "country": "India",
- "imageLink": "images/ramayana.jpg",
- "language": "Sanskrit",
- "link": "https://en.wikipedia.org/wiki/Ramayana\n",
- "pages": 152,
- "title": "Ramayana",
- "year": -450
- },
- {
- "author": "Virgil",
- "country": "Roman Empire",
- "imageLink": "images/the-aeneid.jpg",
- "language": "Classical Latin",
- "link": "https://en.wikipedia.org/wiki/Aeneid\n",
- "pages": 442,
- "title": "The Aeneid",
- "year": -23
- },
- {
- "author": "Vyasa",
- "country": "India",
- "imageLink": "images/the-mahab-harata.jpg",
- "language": "Sanskrit",
- "link": "https://en.wikipedia.org/wiki/Mahabharata\n",
- "pages": 276,
- "title": "Mahabharata",
- "year": -700
- },
- {
- "author": "Walt Whitman",
- "country": "United States",
- "imageLink": "images/leaves-of-grass.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Leaves_of_Grass\n",
- "pages": 152,
- "title": "Leaves of Grass",
- "year": 1855
- },
- {
- "author": "Virginia Woolf",
- "country": "United Kingdom",
- "imageLink": "images/mrs-dalloway.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/Mrs_Dalloway\n",
- "pages": 216,
- "title": "Mrs Dalloway",
- "year": 1925
- },
- {
- "author": "Virginia Woolf",
- "country": "United Kingdom",
- "imageLink": "images/to-the-lighthouse.jpg",
- "language": "English",
- "link": "https://en.wikipedia.org/wiki/To_the_Lighthouse\n",
- "pages": 209,
- "title": "To the Lighthouse",
- "year": 1927
- },
- {
- "author": "Marguerite Yourcenar",
- "country": "France/Belgium",
- "imageLink": "images/memoirs-of-hadrian.jpg",
- "language": "French",
- "link": "https://en.wikipedia.org/wiki/Memoirs_of_Hadrian\n",
- "pages": 408,
- "title": "Memoirs of Hadrian",
- "year": 1951
- }
- ]
\ No newline at end of file
+ {
+ "author": "Chinua Achebe",
+ "country": "Nigeria",
+ "imageLink": "images/things-fall-apart.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Things_Fall_Apart\n",
+ "pages": 209,
+ "title": "Things Fall Apart",
+ "year": 1958
+ },
+ {
+ "author": "Hans Christian Andersen",
+ "country": "Denmark",
+ "imageLink": "images/fairy-tales.jpg",
+ "language": "Danish",
+ "link": "https://en.wikipedia.org/wiki/Fairy_Tales_Told_for_Children._First_Collection.\n",
+ "pages": 784,
+ "title": "Fairy tales",
+ "year": 1836
+ },
+ {
+ "author": "Dante Alighieri",
+ "country": "Italy",
+ "imageLink": "images/the-divine-comedy.jpg",
+ "language": "Italian",
+ "link": "https://en.wikipedia.org/wiki/Divine_Comedy\n",
+ "pages": 928,
+ "title": "The Divine Comedy",
+ "year": 1315
+ },
+ {
+ "author": "Unknown",
+ "country": "Sumer and Akkadian Empire",
+ "imageLink": "images/the-epic-of-gilgamesh.jpg",
+ "language": "Akkadian",
+ "link": "https://en.wikipedia.org/wiki/Epic_of_Gilgamesh\n",
+ "pages": 160,
+ "title": "The Epic Of Gilgamesh",
+ "year": -1700
+ },
+ {
+ "author": "Unknown",
+ "country": "Achaemenid Empire",
+ "imageLink": "images/the-book-of-job.jpg",
+ "language": "Hebrew",
+ "link": "https://en.wikipedia.org/wiki/Book_of_Job\n",
+ "pages": 176,
+ "title": "The Book Of Job",
+ "year": -600
+ },
+ {
+ "author": "Unknown",
+ "country": "India/Iran/Iraq/Egypt/Tajikistan",
+ "imageLink": "images/one-thousand-and-one-nights.jpg",
+ "language": "Arabic",
+ "link": "https://en.wikipedia.org/wiki/One_Thousand_and_One_Nights\n",
+ "pages": 288,
+ "title": "One Thousand and One Nights",
+ "year": 1200
+ },
+ {
+ "author": "Unknown",
+ "country": "Iceland",
+ "imageLink": "images/njals-saga.jpg",
+ "language": "Old Norse",
+ "link": "https://en.wikipedia.org/wiki/Nj%C3%A1ls_saga\n",
+ "pages": 384,
+ "title": "Nj\u00e1l's Saga",
+ "year": 1350
+ },
+ {
+ "author": "Jane Austen",
+ "country": "United Kingdom",
+ "imageLink": "images/pride-and-prejudice.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Pride_and_Prejudice\n",
+ "pages": 226,
+ "title": "Pride and Prejudice",
+ "year": 1813
+ },
+ {
+ "author": "Honor\u00e9 de Balzac",
+ "country": "France",
+ "imageLink": "images/le-pere-goriot.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Le_P%C3%A8re_Goriot\n",
+ "pages": 443,
+ "title": "Le P\u00e8re Goriot",
+ "year": 1835
+ },
+ {
+ "author": "Samuel Beckett",
+ "country": "Republic of Ireland",
+ "imageLink": "images/molloy-malone-dies-the-unnamable.jpg",
+ "language": "French, English",
+ "link": "https://en.wikipedia.org/wiki/Molloy_(novel)\n",
+ "pages": 256,
+ "title": "Molloy, Malone Dies, The Unnamable, the trilogy",
+ "year": 1952
+ },
+ {
+ "author": "Giovanni Boccaccio",
+ "country": "Italy",
+ "imageLink": "images/the-decameron.jpg",
+ "language": "Italian",
+ "link": "https://en.wikipedia.org/wiki/The_Decameron\n",
+ "pages": 1024,
+ "title": "The Decameron",
+ "year": 1351
+ },
+ {
+ "author": "Jorge Luis Borges",
+ "country": "Argentina",
+ "imageLink": "images/ficciones.jpg",
+ "language": "Spanish",
+ "link": "https://en.wikipedia.org/wiki/Ficciones\n",
+ "pages": 224,
+ "title": "Ficciones",
+ "year": 1965
+ },
+ {
+ "author": "Emily Bront\u00eb",
+ "country": "United Kingdom",
+ "imageLink": "images/wuthering-heights.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Wuthering_Heights\n",
+ "pages": 342,
+ "title": "Wuthering Heights",
+ "year": 1847
+ },
+ {
+ "author": "Albert Camus",
+ "country": "Algeria, French Empire",
+ "imageLink": "images/l-etranger.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/The_Stranger_(novel)\n",
+ "pages": 185,
+ "title": "The Stranger",
+ "year": 1942
+ },
+ {
+ "author": "Paul Celan",
+ "country": "Romania, France",
+ "imageLink": "images/poems-paul-celan.jpg",
+ "language": "German",
+ "link": "\n",
+ "pages": 320,
+ "title": "Poems",
+ "year": 1952
+ },
+ {
+ "author": "Louis-Ferdinand C\u00e9line",
+ "country": "France",
+ "imageLink": "images/voyage-au-bout-de-la-nuit.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Journey_to_the_End_of_the_Night\n",
+ "pages": 505,
+ "title": "Journey to the End of the Night",
+ "year": 1932
+ },
+ {
+ "author": "Miguel de Cervantes",
+ "country": "Spain",
+ "imageLink": "images/don-quijote-de-la-mancha.jpg",
+ "language": "Spanish",
+ "link": "https://en.wikipedia.org/wiki/Don_Quixote\n",
+ "pages": 1056,
+ "title": "Don Quijote De La Mancha",
+ "year": 1610
+ },
+ {
+ "author": "Geoffrey Chaucer",
+ "country": "England",
+ "imageLink": "images/the-canterbury-tales.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/The_Canterbury_Tales\n",
+ "pages": 544,
+ "title": "The Canterbury Tales",
+ "year": 1450
+ },
+ {
+ "author": "Anton Chekhov",
+ "country": "Russia",
+ "imageLink": "images/stories-of-anton-chekhov.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/List_of_short_stories_by_Anton_Chekhov\n",
+ "pages": 194,
+ "title": "Stories",
+ "year": 1886
+ },
+ {
+ "author": "Joseph Conrad",
+ "country": "United Kingdom",
+ "imageLink": "images/nostromo.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Nostromo\n",
+ "pages": 320,
+ "title": "Nostromo",
+ "year": 1904
+ },
+ {
+ "author": "Charles Dickens",
+ "country": "United Kingdom",
+ "imageLink": "images/great-expectations.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Great_Expectations\n",
+ "pages": 194,
+ "title": "Great Expectations",
+ "year": 1861
+ },
+ {
+ "author": "Denis Diderot",
+ "country": "France",
+ "imageLink": "images/jacques-the-fatalist.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Jacques_the_Fatalist\n",
+ "pages": 596,
+ "title": "Jacques the Fatalist",
+ "year": 1796
+ },
+ {
+ "author": "Alfred D\u00f6blin",
+ "country": "Germany",
+ "imageLink": "images/berlin-alexanderplatz.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/Berlin_Alexanderplatz\n",
+ "pages": 600,
+ "title": "Berlin Alexanderplatz",
+ "year": 1929
+ },
+ {
+ "author": "Fyodor Dostoevsky",
+ "country": "Russia",
+ "imageLink": "images/crime-and-punishment.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/Crime_and_Punishment\n",
+ "pages": 551,
+ "title": "Crime and Punishment",
+ "year": 1866
+ },
+ {
+ "author": "Fyodor Dostoevsky",
+ "country": "Russia",
+ "imageLink": "images/the-idiot.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/The_Idiot\n",
+ "pages": 656,
+ "title": "The Idiot",
+ "year": 1869
+ },
+ {
+ "author": "Fyodor Dostoevsky",
+ "country": "Russia",
+ "imageLink": "images/the-possessed.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/Demons_(Dostoyevsky_novel)\n",
+ "pages": 768,
+ "title": "The Possessed",
+ "year": 1872
+ },
+ {
+ "author": "Fyodor Dostoevsky",
+ "country": "Russia",
+ "imageLink": "images/the-brothers-karamazov.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/The_Brothers_Karamazov\n",
+ "pages": 824,
+ "title": "The Brothers Karamazov",
+ "year": 1880
+ },
+ {
+ "author": "George Eliot",
+ "country": "United Kingdom",
+ "imageLink": "images/middlemarch.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Middlemarch\n",
+ "pages": 800,
+ "title": "Middlemarch",
+ "year": 1871
+ },
+ {
+ "author": "Ralph Ellison",
+ "country": "United States",
+ "imageLink": "images/invisible-man.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Invisible_Man\n",
+ "pages": 581,
+ "title": "Invisible Man",
+ "year": 1952
+ },
+ {
+ "author": "Euripides",
+ "country": "Greece",
+ "imageLink": "images/medea.jpg",
+ "language": "Greek",
+ "link": "https://en.wikipedia.org/wiki/Medea_(play)\n",
+ "pages": 104,
+ "title": "Medea",
+ "year": -431
+ },
+ {
+ "author": "William Faulkner",
+ "country": "United States",
+ "imageLink": "images/absalom-absalom.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Absalom,_Absalom!\n",
+ "pages": 313,
+ "title": "Absalom, Absalom!",
+ "year": 1936
+ },
+ {
+ "author": "William Faulkner",
+ "country": "United States",
+ "imageLink": "images/the-sound-and-the-fury.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/The_Sound_and_the_Fury\n",
+ "pages": 326,
+ "title": "The Sound and the Fury",
+ "year": 1929
+ },
+ {
+ "author": "Gustave Flaubert",
+ "country": "France",
+ "imageLink": "images/madame-bovary.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Madame_Bovary\n",
+ "pages": 528,
+ "title": "Madame Bovary",
+ "year": 1857
+ },
+ {
+ "author": "Gustave Flaubert",
+ "country": "France",
+ "imageLink": "images/l-education-sentimentale.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Sentimental_Education\n",
+ "pages": 606,
+ "title": "Sentimental Education",
+ "year": 1869
+ },
+ {
+ "author": "Federico Garc\u00eda Lorca",
+ "country": "Spain",
+ "imageLink": "images/gypsy-ballads.jpg",
+ "language": "Spanish",
+ "link": "https://en.wikipedia.org/wiki/Gypsy_Ballads\n",
+ "pages": 218,
+ "title": "Gypsy Ballads",
+ "year": 1928
+ },
+ {
+ "author": "Gabriel Garc\u00eda M\u00e1rquez",
+ "country": "Colombia",
+ "imageLink": "images/one-hundred-years-of-solitude.jpg",
+ "language": "Spanish",
+ "link": "https://en.wikipedia.org/wiki/One_Hundred_Years_of_Solitude\n",
+ "pages": 417,
+ "title": "One Hundred Years of Solitude",
+ "year": 1967
+ },
+ {
+ "author": "Gabriel Garc\u00eda M\u00e1rquez",
+ "country": "Colombia",
+ "imageLink": "images/love-in-the-time-of-cholera.jpg",
+ "language": "Spanish",
+ "link": "https://en.wikipedia.org/wiki/Love_in_the_Time_of_Cholera\n",
+ "pages": 368,
+ "title": "Love in the Time of Cholera",
+ "year": 1985
+ },
+ {
+ "author": "Johann Wolfgang von Goethe",
+ "country": "Saxe-Weimar",
+ "imageLink": "images/faust.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/Goethe%27s_Faust\n",
+ "pages": 158,
+ "title": "Faust",
+ "year": 1832
+ },
+ {
+ "author": "Nikolai Gogol",
+ "country": "Russia",
+ "imageLink": "images/dead-souls.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/Dead_Souls\n",
+ "pages": 432,
+ "title": "Dead Souls",
+ "year": 1842
+ },
+ {
+ "author": "G\u00fcnter Grass",
+ "country": "Germany",
+ "imageLink": "images/the-tin-drum.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/The_Tin_Drum\n",
+ "pages": 600,
+ "title": "The Tin Drum",
+ "year": 1959
+ },
+ {
+ "author": "Jo\u00e3o Guimar\u00e3es Rosa",
+ "country": "Brazil",
+ "imageLink": "images/the-devil-to-pay-in-the-backlands.jpg",
+ "language": "Portuguese",
+ "link": "https://en.wikipedia.org/wiki/The_Devil_to_Pay_in_the_Backlands\n",
+ "pages": 494,
+ "title": "The Devil to Pay in the Backlands",
+ "year": 1956
+ },
+ {
+ "author": "Knut Hamsun",
+ "country": "Norway",
+ "imageLink": "images/hunger.jpg",
+ "language": "Norwegian",
+ "link": "https://en.wikipedia.org/wiki/Hunger_(Hamsun_novel)\n",
+ "pages": 176,
+ "title": "Hunger",
+ "year": 1890
+ },
+ {
+ "author": "Ernest Hemingway",
+ "country": "United States",
+ "imageLink": "images/the-old-man-and-the-sea.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/The_Old_Man_and_the_Sea\n",
+ "pages": 128,
+ "title": "The Old Man and the Sea",
+ "year": 1952
+ },
+ {
+ "author": "Homer",
+ "country": "Greece",
+ "imageLink": "images/the-iliad-of-homer.jpg",
+ "language": "Greek",
+ "link": "https://en.wikipedia.org/wiki/Iliad\n",
+ "pages": 608,
+ "title": "Iliad",
+ "year": -735
+ },
+ {
+ "author": "Homer",
+ "country": "Greece",
+ "imageLink": "images/the-odyssey-of-homer.jpg",
+ "language": "Greek",
+ "link": "https://en.wikipedia.org/wiki/Odyssey\n",
+ "pages": 374,
+ "title": "Odyssey",
+ "year": -800
+ },
+ {
+ "author": "Henrik Ibsen",
+ "country": "Norway",
+ "imageLink": "images/a-Dolls-house.jpg",
+ "language": "Norwegian",
+ "link": "https://en.wikipedia.org/wiki/A_Doll%27s_House\n",
+ "pages": 68,
+ "title": "A Doll's House",
+ "year": 1879
+ },
+ {
+ "author": "James Joyce",
+ "country": "Irish Free State",
+ "imageLink": "images/ulysses.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Ulysses_(novel)\n",
+ "pages": 228,
+ "title": "Ulysses",
+ "year": 1922
+ },
+ {
+ "author": "Franz Kafka",
+ "country": "Czechoslovakia",
+ "imageLink": "images/stories-of-franz-kafka.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/Franz_Kafka_bibliography#Short_stories\n",
+ "pages": 488,
+ "title": "Stories",
+ "year": 1924
+ },
+ {
+ "author": "Franz Kafka",
+ "country": "Czechoslovakia",
+ "imageLink": "images/the-trial.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/The_Trial\n",
+ "pages": 160,
+ "title": "The Trial",
+ "year": 1925
+ },
+ {
+ "author": "Franz Kafka",
+ "country": "Czechoslovakia",
+ "imageLink": "images/the-castle.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/The_Castle_(novel)\n",
+ "pages": 352,
+ "title": "The Castle",
+ "year": 1926
+ },
+ {
+ "author": "K\u0101lid\u0101sa",
+ "country": "India",
+ "imageLink": "images/the-recognition-of-shakuntala.jpg",
+ "language": "Sanskrit",
+ "link": "https://en.wikipedia.org/wiki/Abhij%C3%B1%C4%81na%C5%9B%C4%81kuntalam\n",
+ "pages": 147,
+ "title": "The recognition of Shakuntala",
+ "year": 150
+ },
+ {
+ "author": "Yasunari Kawabata",
+ "country": "Japan",
+ "imageLink": "images/the-sound-of-the-mountain.jpg",
+ "language": "Japanese",
+ "link": "https://en.wikipedia.org/wiki/The_Sound_of_the_Mountain\n",
+ "pages": 288,
+ "title": "The Sound of the Mountain",
+ "year": 1954
+ },
+ {
+ "author": "Nikos Kazantzakis",
+ "country": "Greece",
+ "imageLink": "images/zorba-the-greek.jpg",
+ "language": "Greek",
+ "link": "https://en.wikipedia.org/wiki/Zorba_the_Greek\n",
+ "pages": 368,
+ "title": "Zorba the Greek",
+ "year": 1946
+ },
+ {
+ "author": "D. H. Lawrence",
+ "country": "United Kingdom",
+ "imageLink": "images/sons-and-lovers.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Sons_and_Lovers\n",
+ "pages": 432,
+ "title": "Sons and Lovers",
+ "year": 1913
+ },
+ {
+ "author": "Halld\u00f3r Laxness",
+ "country": "Iceland",
+ "imageLink": "images/independent-people.jpg",
+ "language": "Icelandic",
+ "link": "https://en.wikipedia.org/wiki/Independent_People\n",
+ "pages": 470,
+ "title": "Independent People",
+ "year": 1934
+ },
+ {
+ "author": "Giacomo Leopardi",
+ "country": "Italy",
+ "imageLink": "images/poems-giacomo-leopardi.jpg",
+ "language": "Italian",
+ "link": "\n",
+ "pages": 184,
+ "title": "Poems",
+ "year": 1818
+ },
+ {
+ "author": "Doris Lessing",
+ "country": "United Kingdom",
+ "imageLink": "images/the-golden-notebook.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/The_Golden_Notebook\n",
+ "pages": 688,
+ "title": "The Golden Notebook",
+ "year": 1962
+ },
+ {
+ "author": "Astrid Lindgren",
+ "country": "Sweden",
+ "imageLink": "images/pippi-longstocking.jpg",
+ "language": "Swedish",
+ "link": "https://en.wikipedia.org/wiki/Pippi_Longstocking\n",
+ "pages": 160,
+ "title": "Pippi Longstocking",
+ "year": 1945
+ },
+ {
+ "author": "Lu Xun",
+ "country": "China",
+ "imageLink": "images/diary-of-a-madman.jpg",
+ "language": "Chinese",
+ "link": "https://en.wikipedia.org/wiki/A_Madman%27s_Diary\n",
+ "pages": 389,
+ "title": "Diary of a Madman",
+ "year": 1918
+ },
+ {
+ "author": "Naguib Mahfouz",
+ "country": "Egypt",
+ "imageLink": "images/children-of-gebelawi.jpg",
+ "language": "Arabic",
+ "link": "https://en.wikipedia.org/wiki/Children_of_Gebelawi\n",
+ "pages": 355,
+ "title": "Children of Gebelawi",
+ "year": 1959
+ },
+ {
+ "author": "Thomas Mann",
+ "country": "Germany",
+ "imageLink": "images/buddenbrooks.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/Buddenbrooks\n",
+ "pages": 736,
+ "title": "Buddenbrooks",
+ "year": 1901
+ },
+ {
+ "author": "Thomas Mann",
+ "country": "Germany",
+ "imageLink": "images/the-magic-mountain.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/The_Magic_Mountain\n",
+ "pages": 720,
+ "title": "The Magic Mountain",
+ "year": 1924
+ },
+ {
+ "author": "Herman Melville",
+ "country": "United States",
+ "imageLink": "images/moby-dick.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Moby-Dick\n",
+ "pages": 378,
+ "title": "Moby Dick",
+ "year": 1851
+ },
+ {
+ "author": "Michel de Montaigne",
+ "country": "France",
+ "imageLink": "images/essais.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Essays_(Montaigne)\n",
+ "pages": 404,
+ "title": "Essays",
+ "year": 1595
+ },
+ {
+ "author": "Elsa Morante",
+ "country": "Italy",
+ "imageLink": "images/history.jpg",
+ "language": "Italian",
+ "link": "https://en.wikipedia.org/wiki/History_(novel)\n",
+ "pages": 600,
+ "title": "History",
+ "year": 1974
+ },
+ {
+ "author": "Toni Morrison",
+ "country": "United States",
+ "imageLink": "images/beloved.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Beloved_(novel)\n",
+ "pages": 321,
+ "title": "Beloved",
+ "year": 1987
+ },
+ {
+ "author": "Murasaki Shikibu",
+ "country": "Japan",
+ "imageLink": "images/the-tale-of-genji.jpg",
+ "language": "Japanese",
+ "link": "https://en.wikipedia.org/wiki/The_Tale_of_Genji\n",
+ "pages": 1360,
+ "title": "The Tale of Genji",
+ "year": 1006
+ },
+ {
+ "author": "Robert Musil",
+ "country": "Austria",
+ "imageLink": "images/the-man-without-qualities.jpg",
+ "language": "German",
+ "link": "https://en.wikipedia.org/wiki/The_Man_Without_Qualities\n",
+ "pages": 365,
+ "title": "The Man Without Qualities",
+ "year": 1931
+ },
+ {
+ "author": "Vladimir Nabokov",
+ "country": "Russia/United States",
+ "imageLink": "images/lolita.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Lolita\n",
+ "pages": 317,
+ "title": "Lolita",
+ "year": 1955
+ },
+ {
+ "author": "George Orwell",
+ "country": "United Kingdom",
+ "imageLink": "images/nineteen-eighty-four.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Nineteen_Eighty-Four\n",
+ "pages": 272,
+ "title": "Nineteen Eighty-Four",
+ "year": 1949
+ },
+ {
+ "author": "Ovid",
+ "country": "Roman Empire",
+ "imageLink": "images/the-metamorphoses-of-ovid.jpg",
+ "language": "Classical Latin",
+ "link": "https://en.wikipedia.org/wiki/Metamorphoses\n",
+ "pages": 576,
+ "title": "Metamorphoses",
+ "year": 100
+ },
+ {
+ "author": "Fernando Pessoa",
+ "country": "Portugal",
+ "imageLink": "images/the-book-of-disquiet.jpg",
+ "language": "Portuguese",
+ "link": "https://en.wikipedia.org/wiki/The_Book_of_Disquiet\n",
+ "pages": 272,
+ "title": "The Book of Disquiet",
+ "year": 1928
+ },
+ {
+ "author": "Edgar Allan Poe",
+ "country": "United States",
+ "imageLink": "images/tales-and-poems-of-edgar-allan-poe.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Edgar_Allan_Poe_bibliography#Tales\n",
+ "pages": 842,
+ "title": "Tales",
+ "year": 1950
+ },
+ {
+ "author": "Marcel Proust",
+ "country": "France",
+ "imageLink": "images/a-la-recherche-du-temps-perdu.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/In_Search_of_Lost_Time\n",
+ "pages": 2408,
+ "title": "In Search of Lost Time",
+ "year": 1920
+ },
+ {
+ "author": "Fran\u00e7ois Rabelais",
+ "country": "France",
+ "imageLink": "images/gargantua-and-pantagruel.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Gargantua_and_Pantagruel\n",
+ "pages": 623,
+ "title": "Gargantua and Pantagruel",
+ "year": 1533
+ },
+ {
+ "author": "Juan Rulfo",
+ "country": "Mexico",
+ "imageLink": "images/pedro-paramo.jpg",
+ "language": "Spanish",
+ "link": "https://en.wikipedia.org/wiki/Pedro_P%C3%A1ramo\n",
+ "pages": 124,
+ "title": "Pedro P\u00e1ramo",
+ "year": 1955
+ },
+ {
+ "author": "Rumi",
+ "country": "Sultanate of Rum",
+ "imageLink": "images/the-masnavi.jpg",
+ "language": "Persian",
+ "link": "https://en.wikipedia.org/wiki/Masnavi\n",
+ "pages": 438,
+ "title": "The Masnavi",
+ "year": 1236
+ },
+ {
+ "author": "Salman Rushdie",
+ "country": "United Kingdom, India",
+ "imageLink": "images/midnights-children.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Midnight%27s_Children\n",
+ "pages": 536,
+ "title": "Midnight's Children",
+ "year": 1981
+ },
+ {
+ "author": "Saadi",
+ "country": "Persia, Persian Empire",
+ "imageLink": "images/bostan.jpg",
+ "language": "Persian",
+ "link": "https://en.wikipedia.org/wiki/Bustan_(book)\n",
+ "pages": 298,
+ "title": "Bostan",
+ "year": 1257
+ },
+ {
+ "author": "Tayeb Salih",
+ "country": "Sudan",
+ "imageLink": "images/season-of-migration-to-the-north.jpg",
+ "language": "Arabic",
+ "link": "https://en.wikipedia.org/wiki/Season_of_Migration_to_the_North\n",
+ "pages": 139,
+ "title": "Season of Migration to the North",
+ "year": 1966
+ },
+ {
+ "author": "Jos\u00e9 Saramago",
+ "country": "Portugal",
+ "imageLink": "images/blindness.jpg",
+ "language": "Portuguese",
+ "link": "https://en.wikipedia.org/wiki/Blindness_(novel)\n",
+ "pages": 352,
+ "title": "Blindness",
+ "year": 1995
+ },
+ {
+ "author": "William Shakespeare",
+ "country": "England",
+ "imageLink": "images/hamlet.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Hamlet\n",
+ "pages": 432,
+ "title": "Hamlet",
+ "year": 1603
+ },
+ {
+ "author": "William Shakespeare",
+ "country": "England",
+ "imageLink": "images/king-lear.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/King_Lear\n",
+ "pages": 384,
+ "title": "King Lear",
+ "year": 1608
+ },
+ {
+ "author": "William Shakespeare",
+ "country": "England",
+ "imageLink": "images/othello.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Othello\n",
+ "pages": 314,
+ "title": "Othello",
+ "year": 1609
+ },
+ {
+ "author": "Sophocles",
+ "country": "Greece",
+ "imageLink": "images/oedipus-the-king.jpg",
+ "language": "Greek",
+ "link": "https://en.wikipedia.org/wiki/Oedipus_the_King\n",
+ "pages": 88,
+ "title": "Oedipus the King",
+ "year": -430
+ },
+ {
+ "author": "Stendhal",
+ "country": "France",
+ "imageLink": "images/le-rouge-et-le-noir.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/The_Red_and_the_Black\n",
+ "pages": 576,
+ "title": "The Red and the Black",
+ "year": 1830
+ },
+ {
+ "author": "Laurence Sterne",
+ "country": "England",
+ "imageLink": "images/the-life-and-opinions-of-tristram-shandy.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/The_Life_and_Opinions_of_Tristram_Shandy,_Gentleman\n",
+ "pages": 640,
+ "title": "The Life And Opinions of Tristram Shandy",
+ "year": 1760
+ },
+ {
+ "author": "Italo Svevo",
+ "country": "Italy",
+ "imageLink": "images/confessions-of-zeno.jpg",
+ "language": "Italian",
+ "link": "https://en.wikipedia.org/wiki/Zeno%27s_Conscience\n",
+ "pages": 412,
+ "title": "Confessions of Zeno",
+ "year": 1923
+ },
+ {
+ "author": "Jonathan Swift",
+ "country": "Ireland",
+ "imageLink": "images/gullivers-travels.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Gulliver%27s_Travels\n",
+ "pages": 178,
+ "title": "Gulliver's Travels",
+ "year": 1726
+ },
+ {
+ "author": "Leo Tolstoy",
+ "country": "Russia",
+ "imageLink": "images/war-and-peace.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/War_and_Peace\n",
+ "pages": 1296,
+ "title": "War and Peace",
+ "year": 1867
+ },
+ {
+ "author": "Leo Tolstoy",
+ "country": "Russia",
+ "imageLink": "images/anna-karenina.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/Anna_Karenina\n",
+ "pages": 864,
+ "title": "Anna Karenina",
+ "year": 1877
+ },
+ {
+ "author": "Leo Tolstoy",
+ "country": "Russia",
+ "imageLink": "images/the-death-of-ivan-ilyich.jpg",
+ "language": "Russian",
+ "link": "https://en.wikipedia.org/wiki/The_Death_of_Ivan_Ilyich\n",
+ "pages": 92,
+ "title": "The Death of Ivan Ilyich",
+ "year": 1886
+ },
+ {
+ "author": "Mark Twain",
+ "country": "United States",
+ "imageLink": "images/the-adventures-of-huckleberry-finn.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Adventures_of_Huckleberry_Finn\n",
+ "pages": 224,
+ "title": "The Adventures of Huckleberry Finn",
+ "year": 1884
+ },
+ {
+ "author": "Valmiki",
+ "country": "India",
+ "imageLink": "images/ramayana.jpg",
+ "language": "Sanskrit",
+ "link": "https://en.wikipedia.org/wiki/Ramayana\n",
+ "pages": 152,
+ "title": "Ramayana",
+ "year": -450
+ },
+ {
+ "author": "Virgil",
+ "country": "Roman Empire",
+ "imageLink": "images/the-aeneid.jpg",
+ "language": "Classical Latin",
+ "link": "https://en.wikipedia.org/wiki/Aeneid\n",
+ "pages": 442,
+ "title": "The Aeneid",
+ "year": -23
+ },
+ {
+ "author": "Vyasa",
+ "country": "India",
+ "imageLink": "images/the-mahab-harata.jpg",
+ "language": "Sanskrit",
+ "link": "https://en.wikipedia.org/wiki/Mahabharata\n",
+ "pages": 276,
+ "title": "Mahabharata",
+ "year": -700
+ },
+ {
+ "author": "Walt Whitman",
+ "country": "United States",
+ "imageLink": "images/leaves-of-grass.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Leaves_of_Grass\n",
+ "pages": 152,
+ "title": "Leaves of Grass",
+ "year": 1855
+ },
+ {
+ "author": "Virginia Woolf",
+ "country": "United Kingdom",
+ "imageLink": "images/mrs-dalloway.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/Mrs_Dalloway\n",
+ "pages": 216,
+ "title": "Mrs Dalloway",
+ "year": 1925
+ },
+ {
+ "author": "Virginia Woolf",
+ "country": "United Kingdom",
+ "imageLink": "images/to-the-lighthouse.jpg",
+ "language": "English",
+ "link": "https://en.wikipedia.org/wiki/To_the_Lighthouse\n",
+ "pages": 209,
+ "title": "To the Lighthouse",
+ "year": 1927
+ },
+ {
+ "author": "Marguerite Yourcenar",
+ "country": "France/Belgium",
+ "imageLink": "images/memoirs-of-hadrian.jpg",
+ "language": "French",
+ "link": "https://en.wikipedia.org/wiki/Memoirs_of_Hadrian\n",
+ "pages": 408,
+ "title": "Memoirs of Hadrian",
+ "year": 1951
+ }
+]
diff --git a/pages/_app.js b/pages/_app.js
index 84564cd7..ae7825f7 100644
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -1,18 +1,19 @@
-import Head from 'next/head'
-import '../styles/globals.css'
-import '../styles/q.css';
-import 'driver.js/dist/driver.css';
+import Head from "next/head";
+import "../styles/globals.css";
+import "../styles/q.css";
+import "driver.js/dist/driver.css";
+
// import '../styles/reducedStyle.css'
// Site-wide default metadata. Lives here (not _document) so it is emitted in the
// server-rendered HTML that link crawlers (Discord, Slack, iMessage, Twitter, etc.)
// read — they do not execute JS, so without these tags they show no preview.
// Individual pages can override any of these with their own .
-const SITE_URL = 'https://redux.isu.edu'
-const SITE_NAME = 'Redux'
+const SITE_URL = "https://redux.isu.edu";
+const SITE_NAME = "Redux";
const SITE_DESCRIPTION =
- 'Redux is an educational platform for exploring computational complexity — problems, reductions, and NP-completeness.'
-const OG_IMAGE = `${SITE_URL}/og-image.png` // TODO: add public/og-image.png (recommended 1200x630)
+ "Redux is an educational platform for exploring computational complexity — problems, reductions, and NP-completeness.";
+const OG_IMAGE = `${SITE_URL}/og-image.png`; // TODO: add public/og-image.png (recommended 1200x630)
function MyApp({ Component, pageProps }) {
return (
@@ -38,7 +39,7 @@ function MyApp({ Component, pageProps }) {
>
- )
+ );
}
-export default MyApp
+export default MyApp;
diff --git a/pages/aboutus/index.js b/pages/aboutus/index.js
index cd2178dd..8108f84e 100644
--- a/pages/aboutus/index.js
+++ b/pages/aboutus/index.js
@@ -1,19 +1,17 @@
-import ResponsiveAppBar from "../../components/widgets/ResponsiveAppBar";
-
import {
- createTheme,
- ThemeProvider,
- Container,
+ Avatar,
Box,
- Typography,
- Link,
+ Container,
+ CssBaseline,
+ createTheme,
Grid,
- Avatar,
+ Link,
+ ThemeProvider,
Tooltip,
- CssBaseline,
+ Typography,
} from "@mui/material";
-
import isulogo from "../../components/images/ISULogo.png";
+import ResponsiveAppBar from "../../components/widgets/ResponsiveAppBar";
// The only contributors whose GitHub profiles are known, along with avatar and link
const contributorProfiles = {
@@ -212,11 +210,7 @@ function ItemContributor({ name }) {
title={
-
+
Redux
- , a platform for NP-Complete problems. Input your challenges and
- gain access to reductions, solutions, verifiers, and
- visualizations. Join our community of problem solvers and unravel
- computational complexities using the application library. The
+ , a platform for NP-Complete problems. Input your challenges and gain access to
+ reductions, solutions, verifiers, and visualizations. Join our community of problem
+ solvers and unravel computational complexities using the application library. The
project was greatly inspired by Richard Karp's paper{" "}
- Kaden Marchetti, Andrija Sevaljevic, Alex Diviney, Caleb
- Eardley, Russell Phillips, Rajiv Khadka, Daniel Igbokwe, and
- Paul Bodily. 2024. Redux: An Interactive, Dynamic Knowledge
- Base for Teaching NP-completeness. In Proceedings of the 2024
- on Innovation and Technology in Computer Science Education V. 1
- (ITiCSE 2024). Association for Computing Machinery, New York,
- NY, USA, 255–261.{" "}
+ Kaden Marchetti, Andrija Sevaljevic, Alex Diviney, Caleb Eardley, Russell
+ Phillips, Rajiv Khadka, Daniel Igbokwe, and Paul Bodily. 2024. Redux: An
+ Interactive, Dynamic Knowledge Base for Teaching NP-completeness. In Proceedings
+ of the 2024 on Innovation and Technology in Computer Science Education V. 1
+ (ITiCSE 2024). Association for Computing Machinery, New York, NY, USA, 255–261.{" "}
- Below are research publications and awards associated with the
- Redux project and its contributors.
+ Below are research publications and awards associated with the Redux project and its
+ contributors.
@@ -484,7 +475,6 @@ export default function AboutUsPage() {
}}
>
{item.citation}{" "}
-
{item.doi && (
)}
-
{item.pdf && (
)}
-
{item.url && (
- Any opinions, findings, conclusions, or recommendations
- expressed in this material are those of the author(s) and do not
- necessarily reflect the views of the funding agencies who have
- supported this work.
+ Any opinions, findings, conclusions, or recommendations expressed in this material
+ are those of the author(s) and do not necessarily reflect the views of the funding
+ agencies who have supported this work.
@@ -611,7 +598,8 @@ export default function AboutUsPage() {
sx={{ color: "#F47C20", fontWeight: 600 }}
>
BSD 3-Clause License
- .
+
+ .
diff --git a/pages/api/hello.js b/pages/api/hello.js
index df63de88..aee21e9a 100644
--- a/pages/api/hello.js
+++ b/pages/api/hello.js
@@ -1,5 +1,5 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
export default function handler(req, res) {
- res.status(200).json({ name: 'John Doe' })
+ res.status(200).json({ name: "John Doe" });
}
diff --git a/pages/api/redux/[...path].js b/pages/api/redux/[...path].js
index 1c7c40e7..bb635a22 100644
--- a/pages/api/redux/[...path].js
+++ b/pages/api/redux/[...path].js
@@ -5,12 +5,12 @@ export const config = {
export default async function handler(req, res) {
const baseUrl = process.env.REDUX_BASE_URL;
if (!baseUrl) {
- res.status(500).json({ error: 'REDUX_BASE_URL is not configured' });
+ res.status(500).json({ error: "REDUX_BASE_URL is not configured" });
return;
}
- const suffix = req.url.replace(/^\/api\/redux\/?/, '');
- const targetUrl = `${baseUrl.replace(/\/$/, '')}/${suffix}`;
+ const suffix = req.url.replace(/^\/api\/redux\/?/, "");
+ const targetUrl = `${baseUrl.replace(/\/$/, "")}/${suffix}`;
// Guard against SSRF: the user-controlled suffix must not be able to steer the
// request to a host/scheme other than the configured backend. Resolve the URL
@@ -21,30 +21,30 @@ export default async function handler(req, res) {
target = new URL(targetUrl);
base = new URL(baseUrl);
} catch {
- res.status(400).json({ error: 'Invalid request path' });
+ res.status(400).json({ error: "Invalid request path" });
return;
}
const isSameOrigin = target.origin === base.origin;
- const isAllowedScheme = target.protocol === 'http:' || target.protocol === 'https:';
+ const isAllowedScheme = target.protocol === "http:" || target.protocol === "https:";
if (!isSameOrigin || !isAllowedScheme) {
- res.status(400).json({ error: 'Refusing to proxy request outside the configured backend' });
+ res.status(400).json({ error: "Refusing to proxy request outside the configured backend" });
return;
}
const headers = {};
for (const [key, value] of Object.entries(req.headers)) {
- if (!['host', 'connection', 'transfer-encoding'].includes(key.toLowerCase())) {
- headers[key] = Array.isArray(value) ? value.join(', ') : value;
+ if (!["host", "connection", "transfer-encoding"].includes(key.toLowerCase())) {
+ headers[key] = Array.isArray(value) ? value.join(", ") : value;
}
}
// Do not follow redirects server-side: a compromised or misbehaving backend
// could 3xx us toward an internal address (another SSRF path). Forward the
// redirect response to the client and let the browser decide what to do.
- const fetchOptions = { method: req.method, headers, redirect: 'manual' };
+ const fetchOptions = { method: req.method, headers, redirect: "manual" };
- if (!['GET', 'HEAD'].includes(req.method)) {
+ if (!["GET", "HEAD"].includes(req.method)) {
const chunks = [];
for await (const chunk of req) {
chunks.push(chunk);
@@ -62,7 +62,7 @@ export default async function handler(req, res) {
res.status(upstream.status);
for (const [key, value] of upstream.headers) {
- if (!['transfer-encoding', 'connection'].includes(key.toLowerCase())) {
+ if (!["transfer-encoding", "connection"].includes(key.toLowerCase())) {
res.setHeader(key, value);
}
}
diff --git a/pages/api/render-tikz.js b/pages/api/render-tikz.js
index fa75e079..9b25f22f 100644
--- a/pages/api/render-tikz.js
+++ b/pages/api/render-tikz.js
@@ -1,23 +1,23 @@
import tex2svg from "node-tikzjax";
export default async function handler(req, res) {
- if (req.method !== "POST") return res.status(405).end();
- const { tikzBody } = req.body;
+ if (req.method !== "POST") return res.status(405).end();
+ const { tikzBody } = req.body;
- const tikzDocument = `
+ const tikzDocument = `
\\begin{document}
${tikzBody}
\\end{document}
`;
- try {
- const svg = await tex2svg(tikzDocument, {
- showConsole: false,
- tikzLibraries: ["automata", "positioning", "arrows.meta"],
- });
- res.status(200).json({ success: true, svg });
- } catch (err) {
- console.error("TikZ Compilation Error:", err);
- res.status(500).json({ success: false, error: err.message });
- }
+ try {
+ const svg = await tex2svg(tikzDocument, {
+ showConsole: false,
+ tikzLibraries: ["automata", "positioning", "arrows.meta"],
+ });
+ res.status(200).json({ success: true, svg });
+ } catch (err) {
+ console.error("TikZ Compilation Error:", err);
+ res.status(500).json({ success: false, error: err.message });
+ }
}
diff --git a/pages/browse/index.js b/pages/browse/index.js
index 5ce8a51e..2d750c9d 100644
--- a/pages/browse/index.js
+++ b/pages/browse/index.js
@@ -1,23 +1,23 @@
-import React, { useMemo } from "react";
-import ResponsiveAppBar from "../../components/widgets/ResponsiveAppBar";
-import FacetFilterGroup from "../../components/widgets/FacetFilterGroup";
-import ProblemCard from "../../components/widgets/ProblemCard";
-import SearchBarExtensible from "../../components/widgets/SearchBarExtensible";
-import { useProblemIndex } from "../../components/hooks/ProblemFilters/useProblemIndex";
-import { useProblemFilters } from "../../components/hooks/ProblemFilters/useProblemFilters";
-import { buildFacetOptions } from "../../components/hooks/ProblemFilters/facetOptions";
import {
- createTheme,
- ThemeProvider,
- CssBaseline,
- Container,
Box,
- Typography,
- Grid,
Button,
Chip,
CircularProgress,
+ Container,
+ CssBaseline,
+ createTheme,
+ Grid,
+ ThemeProvider,
+ Typography,
} from "@mui/material";
+import React, { useMemo } from "react";
+import { buildFacetOptions } from "../../components/hooks/ProblemFilters/facetOptions";
+import { useProblemFilters } from "../../components/hooks/ProblemFilters/useProblemFilters";
+import { useProblemIndex } from "../../components/hooks/ProblemFilters/useProblemIndex";
+import FacetFilterGroup from "../../components/widgets/FacetFilterGroup";
+import ProblemCard from "../../components/widgets/ProblemCard";
+import ResponsiveAppBar from "../../components/widgets/ResponsiveAppBar";
+import SearchBarExtensible from "../../components/widgets/SearchBarExtensible";
// Same dark palette as pages/aboutus/index.js, for visual consistency across
// the app's newer MUI-Grid-card pages.
@@ -104,8 +104,8 @@ export default function BrowsePage() {
Browse Problems
- Filter the full problem list by complexity class, solver type, visualization type,
- or reduction reachability.
+ Filter the full problem list by complexity class, solver type, visualization type, or
+ reduction reachability.
{loading ? (
@@ -116,7 +116,15 @@ export default function BrowsePage() {
) : (
-
+
- Our goal from the beginning has not been to build a knowledge
- base ourselves but to build a framework for crowd-sourced
- contribution across the world, think Wikipedia. We hope to see
- contributors add everything from new problems, algorithms,
- reductions, visualizations, features, bug fixes, and beyond. Our
- goal is to make the framework easy to understand and even easier
- to extend. Below are tutorials and helpful information to get
- you started.
+ Our goal from the beginning has not been to build a knowledge base ourselves but to
+ build a framework for crowd-sourced contribution across the world, think Wikipedia.
+ We hope to see contributors add everything from new problems, algorithms,
+ reductions, visualizations, features, bug fixes, and beyond. Our goal is to make the
+ framework easy to understand and even easier to extend. Below are tutorials and
+ helpful information to get you started.
- Before submitting a pull request, make sure your changes run
- locally, follow the existing project structure, include clear
- descriptions of the work completed, and are tested carefully.
- Additional checklist details will be added as the contribution
+ Before submitting a pull request, make sure your changes run locally, follow the
+ existing project structure, include clear descriptions of the work completed, and
+ are tested carefully. Additional checklist details will be added as the contribution
documentation is expanded.
@@ -257,10 +253,9 @@ export default function ContributePage() {
textAlign: "justify",
}}
>
- Interested in getting more involved? We love collaboration!
- Whether you are an industry partner, a university research
- group, or an individual passionate about getting involved, we
- have lots of project ideas we could use your help with. If
+ Interested in getting more involved? We love collaboration! Whether you are an
+ industry partner, a university research group, or an individual passionate about
+ getting involved, we have lots of project ideas we could use your help with. If
interested, please reach out to Dr. Paul Bodily at{" "}
bodipaul@isu.edu
- .
+
+ .
@@ -286,8 +282,8 @@ export default function ContributePage() {
textAlign: "justify",
}}
>
- Terms of Use content will be added here. This section is
- intended to describe expectations and conditions for using Redux.
+ Terms of Use content will be added here. This section is intended to describe
+ expectations and conditions for using Redux.
@@ -302,43 +298,42 @@ export default function ContributePage() {
textAlign: "justify",
}}
>
- Privacy Policy content will be added here. This section is
- intended to explain what information is collected, how it is
- used, and how user privacy is protected.
+ Privacy Policy content will be added here. This section is intended to explain what
+ information is collected, how it is used, and how user privacy is protected.
-
-
-
-
+ sx={{
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ pt: 2,
+ pb: 3,
+ }}
+ >
+
+
+
+
);
diff --git a/pages/help/index.js b/pages/help/index.js
index de0156bf..3be669aa 100644
--- a/pages/help/index.js
+++ b/pages/help/index.js
@@ -1,15 +1,14 @@
-import ResponsiveAppBar from "../../components/widgets/ResponsiveAppBar";
-import isulogo from "../../components/images/ISULogo.png";
-
import {
- createTheme,
- ThemeProvider,
- Container,
Box,
- Typography,
+ Container,
CssBaseline,
+ createTheme,
Link,
+ ThemeProvider,
+ Typography,
} from "@mui/material";
+import isulogo from "../../components/images/ISULogo.png";
+import ResponsiveAppBar from "../../components/widgets/ResponsiveAppBar";
const backgroundLinks = [
{
@@ -179,39 +178,38 @@ export default function HelpPage() {
mb: 2.2,
}}
>
- Redux is a dynamic, interactive computer science knowledgebase
- consisting of canonical computer science problems, solutions,
- and reduction algorithms. The following pages provide helpful
- background to the organization of problems, solutions, and
- reductions in Redux based on the concept of complexity classes:
+ Redux is a dynamic, interactive computer science knowledgebase consisting of
+ canonical computer science problems, solutions, and reduction algorithms. The
+ following pages provide helpful background to the organization of problems,
+ solutions, and reductions in Redux based on the concept of complexity classes:
- {backgroundLinks.map((link, index) => (
-
-
- {link.label}
-
- {index < backgroundLinks.length - 1 ? ", " : "."}
-
- ))}
-
+ sx={{
+ color: "#374151",
+ fontSize: "0.87rem",
+ lineHeight: 1.9,
+ textAlign: "justify",
+ }}
+ >
+ {backgroundLinks.map((link, index) => (
+
+
+ {link.label}
+
+ {index < backgroundLinks.length - 1 ? ", " : "."}
+
+ ))}
+
@@ -226,8 +224,7 @@ export default function HelpPage() {
mb: 2,
}}
>
- All of the content of the Redux knowledge base can be accessed
- directly via:
+ All of the content of the Redux knowledge base can be accessed directly via:
@@ -308,35 +305,35 @@ export default function HelpPage() {
-
-
-
-
+ sx={{
+ display: "flex",
+ justifyContent: "center",
+ alignItems: "center",
+ pt: 2,
+ pb: 3,
+ }}
+ >
+
+
+
+
);
diff --git a/pages/index.js b/pages/index.js
index da5190f9..252a0ce3 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -7,46 +7,40 @@
*/
import React from "react"; //React is implicitly imported
+import Button from "react-bootstrap/Button";
import ProblemRowReact from "../components/pageblocks/ProblemRowReact";
import ReduceToRowReact from "../components/pageblocks/ReduceToRowReact";
-import VisualizeRowReact from "../components/pageblocks/VisualizeRowReact";
import SolveRowReact from "../components/pageblocks/SolveRowReact";
import VerifyRowReact from "../components/pageblocks/VerifyRowReact";
-import Button from "react-bootstrap/Button";
+import VisualizeRowReact from "../components/pageblocks/VisualizeRowReact";
import "bootstrap/dist/css/bootstrap.min.css";
-import Image from "next/image";
-import isulogo from "../components/images/ISULogo.png";
-import ResponsiveAppBar from "../components/widgets/ResponsiveAppBar";
-import {
- Box,
- createTheme,
- Grid,
- ThemeProvider,
- Typograph,
-} from "@mui/material";
-import { Container } from "react-bootstrap";
-import { useProblemProvider } from "../components/hooks/ProblemProvider";
-import { useEffect, memo, useState } from "react"; // CHANGED: added useState for row order
-import { useUnload } from "../components/eventHandlers/handleUnload";
-import ShareButton from "../components/widgets/ShareButton";
-import TourLauncher from "../components/tour/TourLauncher";
-import { useHandleParameters } from "../components/eventHandlers/handleParameters";
import {
- DndContext,
closestCenter,
+ DndContext,
PointerSensor,
TouchSensor,
useSensor,
useSensors,
} from "@dnd-kit/core";
import {
+ arrayMove,
SortableContext,
- verticalListSortingStrategy,
useSortable,
- arrayMove,
+ verticalListSortingStrategy,
} from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
+import { Box, createTheme, Grid, ThemeProvider, Typograph } from "@mui/material";
+import Image from "next/image";
+import { memo, useEffect, useState } from "react"; // CHANGED: added useState for row order
+import { Container } from "react-bootstrap";
+import { useHandleParameters } from "../components/eventHandlers/handleParameters";
+import { useUnload } from "../components/eventHandlers/handleUnload";
+import { useProblemProvider } from "../components/hooks/ProblemProvider";
+import isulogo from "../components/images/ISULogo.png";
+import TourLauncher from "../components/tour/TourLauncher";
+import ResponsiveAppBar from "../components/widgets/ResponsiveAppBar";
+import ShareButton from "../components/widgets/ShareButton";
const SHOW_QUANTUM_VIS = false; //Flag to show a quantum circuit visualizer (sandbox feature)
const ProblemRowMemo = memo(ProblemRowReact);
@@ -55,17 +49,12 @@ const VisualizeRowMemo = memo(VisualizeRowReact);
const SolveRowMemo = memo(SolveRowReact);
const VerifyRowMemo = memo(VerifyRowReact);
-const reduxBaseUrl = '/api/redux/';
+const reduxBaseUrl = "/api/redux/";
function SortableRow({ id, children }) {
- const {
- attributes,
- listeners,
- setNodeRef,
- transform,
- transition,
- isDragging,
- } = useSortable({ id });
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
+ id,
+ });
const style = {
transform: CSS.Transform.toString(transform),
@@ -134,22 +123,12 @@ function MainPageContent() {
//useHandleParameters();
- const { problem, solver, verifier, reducer, visualization } =
- useProblemProvider(reduxBaseUrl);
+ const { problem, solver, verifier, reducer, visualization } = useProblemProvider(reduxBaseUrl);
- const [rowOrder, setRowOrder] = useState([
- "problem",
- "reduce",
- "visualize",
- "solve",
- "verify",
- ]);
+ const [rowOrder, setRowOrder] = useState(["problem", "reduce", "visualize", "solve", "verify"]);
- // PointerSensor covers mouse; TouchSensor adds mobile/tablet support
- const sensors = useSensors(
- useSensor(PointerSensor),
- useSensor(TouchSensor)
- );
+ // PointerSensor covers mouse; TouchSensor adds mobile/tablet support
+ const sensors = useSensors(useSensor(PointerSensor), useSensor(TouchSensor));
const rowMap = {
problem: ,
@@ -209,10 +188,7 @@ function MainPageContent() {
collisionDetection={closestCenter}
onDragEnd={handleDragEnd}
>
-
+
{rowOrder.map((key) => (
{rowMap[key]}
@@ -250,7 +226,7 @@ function MainPageContent() {
export default function MainPage() {
return (
<>
-
+
>
);
-}
\ No newline at end of file
+}
diff --git a/pages/navigationgraph/index.js b/pages/navigationgraph/index.js
index f79e94ce..0537a11a 100644
--- a/pages/navigationgraph/index.js
+++ b/pages/navigationgraph/index.js
@@ -6,7 +6,6 @@
// import 'bootstrap/dist/css/bootstrap.min.css';
// import { Container, Box, createTheme, ThemeProvider } from '@mui/material';
-
// //OverlayViewF
// /**
@@ -24,10 +23,8 @@
// }
-
// export default function Test(props) {
-
// const [tool, setToolTip] = useState({});
// const [nodeTarget, setTarget] = useState();
// const [show, setShow] = useState(false);
@@ -64,15 +61,11 @@
// ellipseArray[0].setAttribute("fill", "none")
// })
-
// }
// }, 2000);
-
// }, [])
-
-
// const handleClick = event => {
// // 👇️ refers to the div element
// const element = event.target;
@@ -90,8 +83,6 @@
// }
// }).catch(console.log("Problem not defined"));
-
-
// } else {
// setTarget(null)
// setShow(false);
@@ -100,8 +91,6 @@
// }
// };
-
-
// return (
// <>
@@ -159,19 +148,12 @@
//
// >
-
-
// );
-
-
-
// }
-
-
function HomePage() {
- return BUILD ISSUE PATCH. TEMPORARY
- }
-
- export default HomePage
\ No newline at end of file
+ return BUILD ISSUE PATCH. TEMPORARY
;
+}
+
+export default HomePage;
diff --git a/styles/globals.css b/styles/globals.css
index 440bc82d..2ae1171a 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -1,7 +1,17 @@
html,
body {
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+ font-family:
+ -apple-system,
+ BlinkMacSystemFont,
+ Segoe UI,
+ Roboto,
+ Oxygen,
+ Ubuntu,
+ Cantarell,
+ Fira Sans,
+ Droid Sans,
+ Helvetica Neue,
+ sans-serif;
}
a {
@@ -9,8 +19,8 @@ a {
text-decoration: none;
}
-.accordion{
- transform-origin: top; /* Ensure it scales from the top */
+.accordion {
+ transform-origin: top; /* Ensure it scales from the top */
border: 2px solid #ccc; /* Dark border */
}
@@ -18,7 +28,6 @@ a {
text-align: center;
margin: 100px;
background-color: aliceblue;
-
}
.TextBoxInner {
@@ -88,7 +97,6 @@ a {
* {
box-sizing: border-box;
-
}
/* .accordion{
@@ -101,7 +109,6 @@ a {
padding: 10px;
} */
-
/* Remove active colors from default accordion button */
.accordion-button:not(.collapsed) {
color: rgba(255, 255, 255, 0);
@@ -128,7 +135,6 @@ a {
background-position: 50%;
}
-
.gutter.gutter-horizontal {
/* background-image: url('grips/vertical.png'); */
cursor: col-resize;
@@ -162,4 +168,4 @@ svg {
-webkit-user-select: none; /* Safari/Chrome */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE/Edge */
-}
\ No newline at end of file
+}
diff --git a/styles/q.css b/styles/q.css
index 597d0b00..fc16ca1a 100644
--- a/styles/q.css
+++ b/styles/q.css
@@ -5,9 +5,6 @@
*/
@charset "utf-8";
-
-
-
/*
This file is in the process of being separated
@@ -26,297 +23,221 @@
*/
-
-
-
-svg, :root {
-
-
-
- /**************/
- /* */
- /* Colors */
- /* */
- /**************/
-
-
- /* Base color (blue) */
-
- --Q-color-base-hue: 210;
- --Q-color-base-saturation: 85%;
- --Q-color-base-lightness: 40%;
-
-
- /* Red */
-
- --Q-color-red-hue: calc( var( --Q-color-base-hue ) + 180 - 30 );
- --Q-color-red-saturation: 85%;
- --Q-color-red-lightness: 45%;
- --Q-color-red: hsl(
-
- var( --Q-color-red-hue ),
- var( --Q-color-red-saturation ),
- var( --Q-color-red-lightness )
- );
-
-
- /* Orange */
-
- --Q-color-orange-hue: calc( var( --Q-color-base-hue ) + 180 - 15 );
- --Q-color-orange-saturation: 85%;
- --Q-color-orange-lightness: 50%;
- --Q-color-orange: hsl(
-
- var( --Q-color-orange-hue ),
- var( --Q-color-orange-saturation ),
- var( --Q-color-orange-lightness )
- );
-
-
- /* Yellow */
-
- --Q-color-yellow-hue: calc( var( --Q-color-base-hue ) + 180 + 15 );
- --Q-color-yellow-saturation: 90%;
- --Q-color-yellow-lightness: 50%;
- --Q-color-yellow: hsl(
-
- var( --Q-color-yellow-hue ),
- var( --Q-color-yellow-saturation ),
- var( --Q-color-yellow-lightness )
- );
-
-
- /* Green */
-
- --Q-color-green-hue: calc( var( --Q-color-base-hue ) + 180 + 60 );
- --Q-color-green-saturation: 80%;
- --Q-color-green-lightness: 35%;
- --Q-color-green: hsl(
-
- var( --Q-color-green-hue ),
- var( --Q-color-green-saturation ),
- var( --Q-color-green-lightness )
- );
-
-
- /* Blue */
-
- --Q-color-blue-hue: var( --Q-color-base-hue );
- --Q-color-blue-saturation: var( --Q-color-base-saturation );
- --Q-color-blue-lightness: var( --Q-color-base-lightness );
- --Q-color-blue: hsl(
-
- var( --Q-color-blue-hue ),
- var( --Q-color-blue-saturation ),
- var( --Q-color-blue-lightness )
- );
-
-
- /* Grayscale */
-
- --Q-color-white: #FFFFFF;
- --Q-color-chalk: #F9F9F9;
- --Q-color-newsprint: #F3F3F3;
- --Q-color-titanium: #CCCCCC;
- --Q-color-slate: #777777;
- --Q-color-charcoal: #333333;
- --Q-color-black: #000000;
-
-
- /* Background */
-
- --Q-color-background-hue: var( --Q-color-base-hue );
- --Q-color-background-saturation: 15%;
- --Q-color-background-lightness: 98%;
- --Q-color-background: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- var( --Q-color-background-lightness )
- );
- /*--Q-color-background: white;*/
-
-
- /* Misc */
-
- --Q-text-color: hsl(
-
- var( --Q-color-base-hue ),
- 5%,
- 35%
- );
- --Q-text-code-comment-color: rgba( 0, 0, 0, 0.4 );
- --Q-text-code-output-color: rgba( 0, 0, 0, 1 );
-
- --Q-selection-color: var( --Q-color-black );
- --Q-selection-background-color: var( --Q-color-yellow );
-
- --Q-hyperlink-internal-color: var( --Q-color-blue );
- --Q-hyperlink-external-color: var( --Q-text-color );
-
- --Q-background-callout-color: var( --Q-color-white );
-
- --Q-svg-fill-color: var( --Q-text-color );
-
-
-
-
- /* Fonts */
-
- --Q-font-family-serif: 'Source Serif Pro', 'Roboto Slab', 'Georgia', serif;
- --Q-font-family-sans: 'SF Pro Text', system-ui, -apple-system, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
- --Q-font-family-mono: 'Roboto Mono', 'Source Code Pro', 'Menlo', 'Courier New', monospace;
- --Q-font-family-symbols: 'Georgia', serif;
+svg,
+:root {
+ /**************/
+ /* */
+ /* Colors */
+ /* */
+ /**************/
+
+ /* Base color (blue) */
+
+ --Q-color-base-hue: 210;
+ --Q-color-base-saturation: 85%;
+ --Q-color-base-lightness: 40%;
+
+ /* Red */
+
+ --Q-color-red-hue: calc(var(--Q-color-base-hue) + 180 - 30);
+ --Q-color-red-saturation: 85%;
+ --Q-color-red-lightness: 45%;
+ --Q-color-red: hsl(
+ var(--Q-color-red-hue),
+ var(--Q-color-red-saturation),
+ var(--Q-color-red-lightness)
+ );
+
+ /* Orange */
+
+ --Q-color-orange-hue: calc(var(--Q-color-base-hue) + 180 - 15);
+ --Q-color-orange-saturation: 85%;
+ --Q-color-orange-lightness: 50%;
+ --Q-color-orange: hsl(
+ var(--Q-color-orange-hue),
+ var(--Q-color-orange-saturation),
+ var(--Q-color-orange-lightness)
+ );
+
+ /* Yellow */
+
+ --Q-color-yellow-hue: calc(var(--Q-color-base-hue) + 180 + 15);
+ --Q-color-yellow-saturation: 90%;
+ --Q-color-yellow-lightness: 50%;
+ --Q-color-yellow: hsl(
+ var(--Q-color-yellow-hue),
+ var(--Q-color-yellow-saturation),
+ var(--Q-color-yellow-lightness)
+ );
+
+ /* Green */
+
+ --Q-color-green-hue: calc(var(--Q-color-base-hue) + 180 + 60);
+ --Q-color-green-saturation: 80%;
+ --Q-color-green-lightness: 35%;
+ --Q-color-green: hsl(
+ var(--Q-color-green-hue),
+ var(--Q-color-green-saturation),
+ var(--Q-color-green-lightness)
+ );
+
+ /* Blue */
+
+ --Q-color-blue-hue: var(--Q-color-base-hue);
+ --Q-color-blue-saturation: var(--Q-color-base-saturation);
+ --Q-color-blue-lightness: var(--Q-color-base-lightness);
+ --Q-color-blue: hsl(
+ var(--Q-color-blue-hue),
+ var(--Q-color-blue-saturation),
+ var(--Q-color-blue-lightness)
+ );
+
+ /* Grayscale */
+
+ --Q-color-white: #ffffff;
+ --Q-color-chalk: #f9f9f9;
+ --Q-color-newsprint: #f3f3f3;
+ --Q-color-titanium: #cccccc;
+ --Q-color-slate: #777777;
+ --Q-color-charcoal: #333333;
+ --Q-color-black: #000000;
+
+ /* Background */
+
+ --Q-color-background-hue: var(--Q-color-base-hue);
+ --Q-color-background-saturation: 15%;
+ --Q-color-background-lightness: 98%;
+ --Q-color-background: hsl(
+ var(--Q-color-background-hue),
+ var(--Q-color-background-saturation),
+ var(--Q-color-background-lightness)
+ );
+ /*--Q-color-background: white;*/
+
+ /* Misc */
+
+ --Q-text-color: hsl(var(--Q-color-base-hue), 5%, 35%);
+ --Q-text-code-comment-color: rgba(0, 0, 0, 0.4);
+ --Q-text-code-output-color: rgba(0, 0, 0, 1);
+
+ --Q-selection-color: var(--Q-color-black);
+ --Q-selection-background-color: var(--Q-color-yellow);
+
+ --Q-hyperlink-internal-color: var(--Q-color-blue);
+ --Q-hyperlink-external-color: var(--Q-text-color);
+
+ --Q-background-callout-color: var(--Q-color-white);
+
+ --Q-svg-fill-color: var(--Q-text-color);
+
+ /* Fonts */
+
+ --Q-font-family-serif: "Source Serif Pro", "Roboto Slab", "Georgia", serif;
+ --Q-font-family-sans:
+ "SF Pro Text", system-ui, -apple-system, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
+ --Q-font-family-mono: "Roboto Mono", "Source Code Pro", "Menlo", "Courier New", monospace;
+ --Q-font-family-symbols: "Georgia", serif;
}
-
-
-
- /*******************/
- /* */
- /* Interactive */
- /* */
+/*******************/
+/* */
+/* Interactive */
+/* */
/*******************/
-
-.Q-input,
+.Q-input,
.Q-circuit-text-input {
-
- margin: 1.5rem 0 0 0 !important;
- outline: none !important;
- border: none !important;
- border-radius: 1.2rem !important;
- box-shadow:
- 0.2rem 0.2rem 0.2rem rgba( 0, 0, 0, 0.15 ) inset,
- -0.2rem -0.2rem 0.2rem rgba( 255, 255, 255, 1 ) inset;
-
- background: linear-gradient(
-
- 0.375turn,
- rgba( 255, 255, 255, 1.0 ),
- rgba( 255, 255, 255, 0.2 )
- ) !important;
-}
-.Q-input,
+ margin: 1.5rem 0 0 0 !important;
+ outline: none !important;
+ border: none !important;
+ border-radius: 1.2rem !important;
+ box-shadow:
+ 0.2rem 0.2rem 0.2rem rgba(0, 0, 0, 0.15) inset,
+ -0.2rem -0.2rem 0.2rem rgba(255, 255, 255, 1) inset;
+
+ background: linear-gradient(
+ 0.375turn,
+ rgba(255, 255, 255, 1),
+ rgba(255, 255, 255, 0.2)
+ ) !important;
+}
+.Q-input,
.Q-circuit-text-input {
-
- padding: 1.5rem !important;
- color: #555 !important;
- font-size: 0.9rem !important;
- line-height: 1.2rem !important;
+ padding: 1.5rem !important;
+ color: #555 !important;
+ font-size: 0.9rem !important;
+ line-height: 1.2rem !important;
}
-
-
.Q-circuit-text-input {
-
- /*min-width: 18rem;*/
- width: 100%;
- min-height: 8rem;
- /*margin: 1rem 0 2rem 0;*/
- margin: 1rem 0 0 0;
- border: 1px solid var( --Q-color-blue );
- border-radius: 0.5rem;
- background-color: var( --Q-color-chalk );
- padding: 1rem 0 0 2rem;
- color: var( --Q-color-blue );
- font-family: var( --Q-font-family-mono );
- font-size: 1.0rem;
- line-height: 1.2rem;
- white-space: pre;
- word-wrap: normal;/* OMFG, iOS you make me sad. */
+ /*min-width: 18rem;*/
+ width: 100%;
+ min-height: 8rem;
+ /*margin: 1rem 0 2rem 0;*/
+ margin: 1rem 0 0 0;
+ border: 1px solid var(--Q-color-blue);
+ border-radius: 0.5rem;
+ background-color: var(--Q-color-chalk);
+ padding: 1rem 0 0 2rem;
+ color: var(--Q-color-blue);
+ font-family: var(--Q-font-family-mono);
+ font-size: 1rem;
+ line-height: 1.2rem;
+ white-space: pre;
+ word-wrap: normal; /* OMFG, iOS you make me sad. */
}
-
-
-
-
-
.Q-button {
-
- position: relative;
- text-align: right;
- margin: 0.5rem 1rem 0 0;
- border-radius: 3rem;
- box-shadow:
- -0.1rem -0.1rem 0 rgba( 255, 255, 255, 1 ),
- 0.1rem 0.1rem 0.2rem rgba( 0, 0, 0, 0.3 );
- height: 3rem;
- background:
- var( --Q-color-blue )
- linear-gradient(
-
- 0.4turn,
- rgba( 255, 255, 255, 0.2 ),
- rgba( 0, 0, 0, 0.08 )
- );
- padding: 0.8rem 1.8rem;
- color: var( --Q-color-white );
- font-family: var( --Q-font-family-sans );
- font-size: 1rem;
- line-height: 1rem;
- font-weight: 500;
- letter-spacing: 0;
- text-shadow: -1px -1px 0 rgba( 0, 0, 0, 0.1 );
- cursor: pointer;
+ position: relative;
+ text-align: right;
+ margin: 0.5rem 1rem 0 0;
+ border-radius: 3rem;
+ box-shadow:
+ -0.1rem -0.1rem 0 rgba(255, 255, 255, 1),
+ 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.3);
+ height: 3rem;
+ background: var(--Q-color-blue)
+ linear-gradient(0.4turn, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.08));
+ padding: 0.8rem 1.8rem;
+ color: var(--Q-color-white);
+ font-family: var(--Q-font-family-sans);
+ font-size: 1rem;
+ line-height: 1rem;
+ font-weight: 500;
+ letter-spacing: 0;
+ text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.1);
+ cursor: pointer;
}
.Q-button:hover {
-
- background:
- hsl(
-
- var( --Q-color-blue-hue ),
- var( --Q-color-blue-saturation ),
- calc( var( --Q-color-blue-lightness ) * 1.2 )
- )
- linear-gradient(
-
- 0.4turn,
- rgba( 255, 255, 255, 0.2 ),
- rgba( 0, 0, 0, 0.08 )
- );
+ background: hsl(
+ var(--Q-color-blue-hue),
+ var(--Q-color-blue-saturation),
+ calc(var(--Q-color-blue-lightness) * 1.2)
+ )
+ linear-gradient(0.4turn, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.08));
}
.Q-button:focus {
-
- margin-top: 0.7rem;
- margin-bottom: -0.2rem;
- margin-right: 0.9rem;
- outline: none;
- box-shadow:
- -0.1rem -0.1rem 0 rgba( 255, 255, 255, 1 ) inset,
- 0.1rem 0.1rem 0.2rem rgba( 0, 0, 0, 0.3 ) inset;
- background:
- var( --Q-color-blue )
- linear-gradient(
-
- 0.4turn,
- rgba( 0, 0, 0, 0.08 ),
- rgba( 255, 255, 255, 0.2 )
- );
+ margin-top: 0.7rem;
+ margin-bottom: -0.2rem;
+ margin-right: 0.9rem;
+ outline: none;
+ box-shadow:
+ -0.1rem -0.1rem 0 rgba(255, 255, 255, 1) inset,
+ 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.3) inset;
+ background: var(--Q-color-blue)
+ linear-gradient(0.4turn, rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.2));
}
.Q-button[disabled] {
-
- box-shadow:
- -0.1rem -0.1rem 0 rgba( 255, 255, 255, 1 ),
- 0.1rem 0.1rem 0.2rem rgba( 0, 0, 0, 0.3 );
- background:
- var( --Q-color-background )
- linear-gradient(
-
- 0.45turn,
- rgba( 255, 255, 255, 0.1 ),
- rgba( 0, 0, 0, 0.05 )
- );
- color: rgba( 0, 0, 0, 0.3 );
- text-shadow: 1px 1px 0 rgba( 255, 255, 255, 1 );
- cursor: default;
+ box-shadow:
+ -0.1rem -0.1rem 0 rgba(255, 255, 255, 1),
+ 0.1rem 0.1rem 0.2rem rgba(0, 0, 0, 0.3);
+ background: var(--Q-color-background)
+ linear-gradient(0.45turn, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.05));
+ color: rgba(0, 0, 0, 0.3);
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 1);
+ cursor: default;
}
-
-
-
-
-
/*
The below still need to be prefaced with “Q-”
@@ -324,167 +245,118 @@ svg, :root {
*/
-
-
-
-
-
- /*************/
- /* */
- /* Maths */
- /* */
/*************/
-
+/* */
+/* Maths */
+/* */
+/*************/
.maths {
-
- max-width: 100%;
- overflow-x: auto;
- font-family: var( --Q-font-family-sans );
+ max-width: 100%;
+ overflow-x: auto;
+ font-family: var(--Q-font-family-sans);
}
dd .maths {
-
- margin-top: 0;
- margin-left: 0;
+ margin-top: 0;
+ margin-left: 0;
}
-
-
-
.symbol {
-
- font-size: 1.1em;
- padding: 0 0.1em;
- font-family: var( --Q-font-family-symbols );
- font-style: italic;
- font-weight: 900;
- letter-spacing: 0.05em;
+ font-size: 1.1em;
+ padding: 0 0.1em;
+ font-family: var(--Q-font-family-symbols);
+ font-style: italic;
+ font-weight: 900;
+ letter-spacing: 0.05em;
}
-
-
-
.division {
-
- display: inline-block;
- vertical-align: middle;
- margin: 10px;
+ display: inline-block;
+ vertical-align: middle;
+ margin: 10px;
}
.division td {
-
- padding: 5px;
+ padding: 5px;
}
.dividend {
-
- border-bottom: 1px solid #CCC;
- text-align: center;
+ border-bottom: 1px solid #ccc;
+ text-align: center;
}
.divisor {
-
- text-align: center;
+ text-align: center;
}
-
-
-
.matrix {
-
- display: inline-block;
- vertical-align: middle;
- position: relative;
- align: middle;
- margin: 1em;
- padding: 1em;
- font-family: var( --Q-font-family-mono );
- font-weight: 300;
- line-height: 1em;
- text-align: right;
+ display: inline-block;
+ vertical-align: middle;
+ position: relative;
+ align: middle;
+ margin: 1em;
+ padding: 1em;
+ font-family: var(--Q-font-family-mono);
+ font-weight: 300;
+ line-height: 1em;
+ text-align: right;
}
.matrix td {
-
- padding: 5px 10px;
+ padding: 5px 10px;
}
-.matrix-bracket-left, .matrix-bracket-right {
-
- position: absolute;
- top: 0;
- width: 5px;
- height: 100%;
- border: 1px solid #CCC;
+.matrix-bracket-left,
+.matrix-bracket-right {
+ position: absolute;
+ top: 0;
+ width: 5px;
+ height: 100%;
+ border: 1px solid #ccc;
}
.matrix-bracket-left {
-
- left: 0;
- border-right: none;
+ left: 0;
+ border-right: none;
}
.matrix-bracket-right {
-
- right: 0;
- border-left: none;
+ right: 0;
+ border-left: none;
}
/*.matrix.qubit tr:first-child td {
color: #BBB;
}*/
-
-
.Q-state-vector,
.complex-vector {
-
- font-family: var( --Q-font-family-mono );
+ font-family: var(--Q-font-family-mono);
}
.Q-state-vector.bra::before,
.complex-vector.bra::before {
-
- content: '⟨';
- color: #BBB;
+ content: "⟨";
+ color: #bbb;
}
.Q-state-vector.bra::after,
.complex-vector.bra::after {
-
- content: '|';
- color: #BBB;
+ content: "|";
+ color: #bbb;
}
.Q-state-vector.ket::before,
.complex-vector.ket::before {
-
- content: '|';
- color: #BBB;
+ content: "|";
+ color: #bbb;
}
.Q-state-vector.ket::after,
.complex-vector.ket::after {
-
- content: '⟩';
- color: #BBB;
+ content: "⟩";
+ color: #bbb;
}
.Q-state-vector.bra + .Q-state-vector.ket::before,
.complex-vector.bra + .complex-vector.ket::before {
-
- content: '';
+ content: "";
}
-
-
-
-
-
-
/*
Copyright © 2019–2020, Stewart Smith. See LICENSE for details.
*/
-
-
-
-
-
-
-
-
-
/*
Z indices:
@@ -562,110 +434,74 @@ dd .maths {
*/
-
-
-
-
-
.Q-circuit,
.Q-circuit-palette {
-
- position: relative;
- width: 100%;
+ position: relative;
+ width: 100%;
}
.Q-circuit-palette {
-
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
- line-height: 0;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ line-height: 0;
}
.Q-circuit-palette > div {
-
- display: inline-block;
- position: relative;
- width: 4rem;
- height: 4rem;
+ display: inline-block;
+ position: relative;
+ width: 4rem;
+ height: 4rem;
}
-
.Q-circuit {
-
- margin: 1rem 0 2rem 0;
- /*border-top: 2px solid hsl( 0, 0%, 50% );*/
+ margin: 1rem 0 2rem 0;
+ /*border-top: 2px solid hsl( 0, 0%, 50% );*/
}
.Q-circuit-board-foreground {
-
- line-height: 3.85rem;
- width: auto;
+ line-height: 3.85rem;
+ width: auto;
}
-
-
-
-
-
- /***************/
- /* */
- /* Toolbar */
- /* */
/***************/
-
+/* */
+/* Toolbar */
+/* */
+/***************/
.Q-circuit-toolbar {
-
- display: block;
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
- margin-bottom: 0.5rem;
-
- box-sizing: border-box;
- display: grid;
- grid-auto-columns: 3.6rem;
- grid-auto-rows: 3.0rem;
- grid-auto-flow: column;
-
+ display: block;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ margin-bottom: 0.5rem;
+
+ box-sizing: border-box;
+ display: grid;
+ grid-auto-columns: 3.6rem;
+ grid-auto-rows: 3rem;
+ grid-auto-flow: column;
}
.Q-circuit-button {
-
- position: relative;
- display: inline-block;
- /*margin: 0 0.5rem 0.5rem 0;*/
- width: 3.6rem;
- height: 3rem;
-/* box-shadow:
+ position: relative;
+ display: inline-block;
+ /*margin: 0 0.5rem 0.5rem 0;*/
+ width: 3.6rem;
+ height: 3rem;
+ /* box-shadow:
-0.1rem -0.1rem 0 rgba( 255, 255, 255, 0.8 ),
0.1rem 0.1rem 0.1rem rgba( 0, 0, 0, 0.35 );*/
- border-top: 1px solid hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 100%
- );
- border-right: 1px solid hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 90%
- );
- border-bottom: 1px solid hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 85%
- );
- border-left: 1px solid hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 97%
- );
- background: var( --Q-color-background );
-/* background:
+ border-top: 1px solid
+ hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 100%);
+ border-right: 1px solid
+ hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 90%);
+ border-bottom: 1px solid
+ hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 85%);
+ border-left: 1px solid
+ hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 97%);
+ background: var(--Q-color-background);
+ /* background:
var( --Q-color-background )
linear-gradient(
@@ -674,123 +510,96 @@ dd .maths {
rgba( 0, 0, 0, 0.02 ),
rgba( 255, 255, 255, 0.1 )
);*/
- color: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 30%
- );
- text-shadow: 1px 1px 0 rgba( 255, 255, 255, 1 );
- /*border-radius: 0.5rem;*/
- /*border-radius: 100%;*/
- line-height: 2.9rem;
- text-align: center;
- cursor: pointer;
- overflow: hidden;
- font-weight: 900;
+ color: hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 30%);
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 1);
+ /*border-radius: 0.5rem;*/
+ /*border-radius: 100%;*/
+ line-height: 2.9rem;
+ text-align: center;
+ cursor: pointer;
+ overflow: hidden;
+ font-weight: 900;
}
.Q-circuit-toolbar .Q-circuit-button:first-child {
-
- border-top-left-radius: 0.5rem;
- border-bottom-left-radius: 0.5rem;
+ border-top-left-radius: 0.5rem;
+ border-bottom-left-radius: 0.5rem;
}
.Q-circuit-toolbar .Q-circuit-button:last-child {
-
- border-top-right-radius: 0.5rem;
- border-bottom-right-radius: 0.5rem;
+ border-top-right-radius: 0.5rem;
+ border-bottom-right-radius: 0.5rem;
}
.Q-circuit-locked .Q-circuit-button,
.Q-circuit-button[Q-disabled] {
-
- color: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 85%
- );
- cursor: not-allowed;
+ color: hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 85%);
+ cursor: not-allowed;
}
.Q-circuit-locked .Q-circuit-toggle-lock {
-
- color: inherit;
- cursor: pointer;
+ color: inherit;
+ cursor: pointer;
}
-
-
-
.Q-circuit-board-container {
-
- position: relative;
- margin: 0 0 2rem 0;
- margin: 0;
- width: 100%;
- max-height: 60vh;
- overflow: scroll;
+ position: relative;
+ margin: 0 0 2rem 0;
+ margin: 0;
+ width: 100%;
+ max-height: 60vh;
+ overflow: scroll;
}
.Q-circuit-board {
-
- position: relative;
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
+ position: relative;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
}
/*.Q-circuit-palette,*/
.Q-circuit-board-foreground,
.Q-circuit-board-background,
.Q-circuit-clipboard {
-
- box-sizing: border-box;
- display: grid;
- grid-auto-rows: 4rem;
- grid-auto-columns: 4rem;
- grid-auto-flow: column;
+ box-sizing: border-box;
+ display: grid;
+ grid-auto-rows: 4rem;
+ grid-auto-columns: 4rem;
+ grid-auto-flow: column;
}
/*.Q-circuit-palette,*/
.Q-circuit-board-foreground,
.Q-circuit-board-background {
-
- position: relative;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
+ position: relative;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
}
.Q-circuit-clipboard {
-
- position: absolute;
- z-index: 100;
- min-width: 4rem;
- min-height: 4rem;
- transform: scale( 1.05 );
+ position: absolute;
+ z-index: 100;
+ min-width: 4rem;
+ min-height: 4rem;
+ transform: scale(1.05);
}
-.Q-circuit-clipboard, .Q-circuit-clipboard > div {
-
- cursor: grabbing;
+.Q-circuit-clipboard,
+.Q-circuit-clipboard > div {
+ cursor: grabbing;
}
.Q-circuit-clipboard-danger .Q-circuit-operation {
-
- background-color: var( --Q-color-yellow );
+ background-color: var(--Q-color-yellow);
}
.Q-circuit-clipboard-destroy {
-
- animation-name: Q-circuit-clipboard-poof;
- animation-fill-mode: forwards;
- animation-duration: 0.3s;
- animation-iteration-count: 1;
+ animation-name: Q-circuit-clipboard-poof;
+ animation-fill-mode: forwards;
+ animation-duration: 0.3s;
+ animation-iteration-count: 1;
}
@keyframes Q-circuit-clipboard-poof {
-
- 100% {
-
- transform: scale( 1.5 );
- opacity: 0;
- }
+ 100% {
+ transform: scale(1.5);
+ opacity: 0;
+ }
}
.Q-circuit-board-background {
-
- /*
+ /*
Clipboard: 100
Operation: 0
@@ -798,350 +607,242 @@ dd .maths {
Background: -20
*/
- position: absolute;
- z-index: -20;
- color: rgba( 0, 0, 0, 0.2 );
+ position: absolute;
+ z-index: -20;
+ color: rgba(0, 0, 0, 0.2);
}
.Q-circuit-board-background > div {
-
-/* transition:
+ /* transition:
background-color 0.2s,
color 0.2s;*/
}
.Q-circuit-board-background .Q-circuit-cell-highlighted {
-
- background-color: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 95%
- );
- /*transition: none;*/
+ background-color: hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 95%);
+ /*transition: none;*/
}
-
-
-
.Q-circuit-register-wire {
-
- position: absolute;
- top: calc( 50% - 0.5px );
- width: 100%;
- height: 1px;
- background-color: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 50%
- );
+ position: absolute;
+ top: calc(50% - 0.5px);
+ width: 100%;
+ height: 1px;
+ background-color: hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 50%);
}
-
-
.Q-circuit-palette > div,
.Q-circuit-clipboard > div,
.Q-circuit-board-foreground > div {
-
- text-align: center;
+ text-align: center;
}
-
-
-
-
-
- /***************/
- /* */
- /* Headers */
- /* */
/***************/
-
+/* */
+/* Headers */
+/* */
+/***************/
.Q-circuit-header {
-
- position: sticky;
- z-index: 2;
- margin: 0;
- /*background-color: var( --Q-color-background );*/
- background-color: white;
- color: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 75%
- );
- font-family: var( --Q-font-family-mono );
+ position: sticky;
+ z-index: 2;
+ margin: 0;
+ /*background-color: var( --Q-color-background );*/
+ background-color: white;
+ color: hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 75%);
+ font-family: var(--Q-font-family-mono);
}
.Q-circuit-input.Q-circuit-cell-highlighted,
.Q-circuit-header.Q-circuit-cell-highlighted {
-
- background-color: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 95%
- );
- color: black;
+ background-color: hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 95%);
+ color: black;
}
.Q-circuit-selectall {
-
- z-index: 3;
- margin: 0;
- top: 0;
- /*left: 4rem;*/
- /*grid-column: 2;*/
- left: 0;
- grid-column-start: 1;
- grid-column-end: 3;
- grid-row: 1;
- cursor: se-resize;
+ z-index: 3;
+ margin: 0;
+ top: 0;
+ /*left: 4rem;*/
+ /*grid-column: 2;*/
+ left: 0;
+ grid-column-start: 1;
+ grid-column-end: 3;
+ grid-row: 1;
+ cursor: se-resize;
}
.Q-circuit-moment-label,
.Q-circuit-moment-add {
-
- grid-row: 1;
- top: 0;
- cursor: s-resize;
+ grid-row: 1;
+ top: 0;
+ cursor: s-resize;
}
.Q-circuit-register-label,
.Q-circuit-register-add {
-
- grid-column: 2;
- left: 4rem;
- cursor: e-resize;
+ grid-column: 2;
+ left: 4rem;
+ cursor: e-resize;
}
.Q-circuit-moment-add,
.Q-circuit-register-add {
-
- cursor: pointer;
+ cursor: pointer;
}
.Q-circuit-moment-add,
.Q-circuit-register-add {
-
- display: none;
+ display: none;
}
.Q-circuit-selectall,
.Q-circuit-moment-label,
.Q-circuit-moment-add {
-
- border-bottom: 1px solid hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 95%
- );
+ border-bottom: 1px solid
+ hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 95%);
}
.Q-circuit-selectall,
.Q-circuit-register-label,
.Q-circuit-register-add {
-
- border-right: 1px solid hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 95%
- );
+ border-right: 1px solid
+ hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 95%);
}
.Q-circuit-input {
-
- position: sticky;
- z-index: 2;
- grid-column: 1;
- left: 0;
- /*background-color: var( --Q-color-background );*/
- background-color: white;
- font-size: 1.5rem;
- font-weight: 900;
- font-family: var( --Q-font-family-mono );
+ position: sticky;
+ z-index: 2;
+ grid-column: 1;
+ left: 0;
+ /*background-color: var( --Q-color-background );*/
+ background-color: white;
+ font-size: 1.5rem;
+ font-weight: 900;
+ font-family: var(--Q-font-family-mono);
}
-
-
-
-
-
.Q-circuit-operation-link-container {
-
- --Q-link-stroke: 3px;
- --Q-link-radius: 100%;
-
- display: block;
- position: relative;
- left: calc( 50% - ( var( --Q-link-stroke ) / 2 ));
- width: 50%;
- height: 100%;
- overflow: hidden;
+ --Q-link-stroke: 3px;
+ --Q-link-radius: 100%;
+
+ display: block;
+ position: relative;
+ left: calc(50% - (var(--Q-link-stroke) / 2));
+ width: 50%;
+ height: 100%;
+ overflow: hidden;
}
.Q-circuit-operation-link-container.Q-circuit-cell-highlighted {
-
- background-color: transparent;
+ background-color: transparent;
}
.Q-circuit-operation-link {
+ display: block;
+ position: absolute;
+ width: calc(var(--Q-link-stroke) * 2);
+ height: calc(100% - 4rem + var(--Q-link-stroke));
+ /*border: var( --Q-link-stroke ) solid hsl( 0, 0%, 50% );*/
+ border: var(--Q-link-stroke) solid hsl(var(--Q-color-background-hue), 10%, 30%);
- display: block;
- position: absolute;
- width: calc( var( --Q-link-stroke ) * 2 );
- height: calc( 100% - 4rem + var( --Q-link-stroke ));
- /*border: var( --Q-link-stroke ) solid hsl( 0, 0%, 50% );*/
- border: var( --Q-link-stroke ) solid hsl(
+ /*border: var( --Q-link-stroke ) solid var( --Q-color-orange );*/
- var( --Q-color-background-hue ),
- 10%,
- 30%
- );
-
- /*border: var( --Q-link-stroke ) solid var( --Q-color-orange );*/
-
- transform: translate( -50%, calc( 2rem - ( var( --Q-link-stroke ) / 2 )));
- transform-origin: center;
+ transform: translate(-50%, calc(2rem - (var(--Q-link-stroke) / 2)));
+ transform-origin: center;
}
.Q-circuit-operation-link.Q-circuit-operation-link-curved {
-
- width: calc( var( --Q-link-radius ) - var( --Q-link-stroke ));
- width: 200%;
- border-radius: 100%;
+ width: calc(var(--Q-link-radius) - var(--Q-link-stroke));
+ width: 200%;
+ border-radius: 100%;
}
-
-
-
-
-
- /******************/
- /* */
- /* Operations */
- /* */
/******************/
-
+/* */
+/* Operations */
+/* */
+/******************/
.Q-circuit-operation {
-
- position: relative;
- /*--Q-operation-color-hue: var( --Q-color-green-hue );
+ position: relative;
+ /*--Q-operation-color-hue: var( --Q-color-green-hue );
--Q-operation-color-main: var( --Q-color-green );*/
-
- --Q-operation-color-hue: var( --Q-color-blue-hue );
- --Q-operation-color-main: hsl(
-
- var( --Q-operation-color-hue ),
- 10%,
- 35%
- );
-
- --Q-operation-color-light: hsl(
-
- var( --Q-operation-color-hue ),
- 10%,
- 50%
- );
- --Q-operation-color-dark: hsl(
-
- var( --Q-operation-color-hue ),
- 10%,
- 25%
- );
- color: white;
- text-shadow: -0.05rem -0.05rem 0 rgba( 0, 0, 0, 0.1 );
- font-size: 1.5rem;
- line-height: 2.9rem;
- font-weight: 900;
- cursor: grab;
+
+ --Q-operation-color-hue: var(--Q-color-blue-hue);
+ --Q-operation-color-main: hsl(var(--Q-operation-color-hue), 10%, 35%);
+
+ --Q-operation-color-light: hsl(var(--Q-operation-color-hue), 10%, 50%);
+ --Q-operation-color-dark: hsl(var(--Q-operation-color-hue), 10%, 25%);
+ color: white;
+ text-shadow: -0.05rem -0.05rem 0 rgba(0, 0, 0, 0.1);
+ font-size: 1.5rem;
+ line-height: 2.9rem;
+ font-weight: 900;
+ cursor: grab;
}
.Q-circuit-locked .Q-circuit-operation {
-
- cursor: not-allowed;
+ cursor: not-allowed;
}
.Q-circuit-operation-tile {
-
- position: absolute;
- top: 0.5rem;
- left: 0.5rem;
- right: 0.5rem;
- bottom: 0.5rem;
-
- /*margin: 0.5rem;*/
- /*padding: 0.5rem;*/
-
- /*box-shadow: 0.1rem 0.1rem 0.2rem rgba( 0, 0, 0, 0.2 );*/
- border-radius: 0.2rem;
- /*
+ position: absolute;
+ top: 0.5rem;
+ left: 0.5rem;
+ right: 0.5rem;
+ bottom: 0.5rem;
+
+ /*margin: 0.5rem;*/
+ /*padding: 0.5rem;*/
+
+ /*box-shadow: 0.1rem 0.1rem 0.2rem rgba( 0, 0, 0, 0.2 );*/
+ border-radius: 0.2rem;
+ /*
border-top: 0.1rem solid var( --Q-operation-color-light );
border-left: 0.1rem solid var( --Q-operation-color-light );
border-right: 0.1rem solid var( --Q-operation-color-dark );
border-bottom: 0.1rem solid var( --Q-operation-color-dark );
*/
- background:
- var( --Q-operation-color-main )
- /*linear-gradient(
+ background: var(--Q-operation-color-main);
+ /*linear-gradient(
0.45turn,
rgba( 255, 255, 255, 0.1 ),
rgba( 0, 0, 0, 0.05 )
- )*/;
+ )*/
}
.Q-circuit-palette .Q-circuit-operation:hover {
-
- /*background-color: rgba( 255, 255, 255, 0.6 );*/
- background-color: white;
+ /*background-color: rgba( 255, 255, 255, 0.6 );*/
+ background-color: white;
}
.Q-circuit-palette .Q-circuit-operation-tile {
+ --Q-before-rotation: 12deg;
+ --Q-before-x: 1px;
+ --Q-before-y: -2px;
- --Q-before-rotation: 12deg;
- --Q-before-x: 1px;
- --Q-before-y: -2px;
-
- --Q-after-rotation: -7deg;
- --Q-after-x: -2px;
- --Q-after-y: 3px;
-
- box-shadow: 0.2rem 0.2rem 0.2rem rgba( 0, 0, 0, 0.2 );
+ --Q-after-rotation: -7deg;
+ --Q-after-x: -2px;
+ --Q-after-y: 3px;
+
+ box-shadow: 0.2rem 0.2rem 0.2rem rgba(0, 0, 0, 0.2);
}
.Q-circuit-palette .Q-circuit-operation-tile:before,
.Q-circuit-palette .Q-circuit-operation-tile:after {
-
- content: "";
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- border-radius: 0.2rem;
- /*background-color: hsl( 0, 0%, 60% );*/
-
- background-color: var( --Q-operation-color-dark );
- transform:
- translate( var( --Q-before-x ), var( --Q-before-y ))
- rotate( var( --Q-before-rotation ));
- z-index: -10;
- /*z-index: 10;*/
- display: block;
- box-shadow: 0.2rem 0.2rem 0.2rem rgba( 0, 0, 0, 0.2 );
+ content: "";
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ border-radius: 0.2rem;
+ /*background-color: hsl( 0, 0%, 60% );*/
+
+ background-color: var(--Q-operation-color-dark);
+ transform: translate(var(--Q-before-x), var(--Q-before-y)) rotate(var(--Q-before-rotation));
+ z-index: -10;
+ /*z-index: 10;*/
+ display: block;
+ box-shadow: 0.2rem 0.2rem 0.2rem rgba(0, 0, 0, 0.2);
}
.Q-circuit-palette .Q-circuit-operation-tile:after {
-
- transform:
- translate( var( --Q-after-x ), var( --Q-after-y ))
- rotate( var( --Q-after-rotation ));
- box-shadow: 0.2rem 0.2rem 0.2rem rgba( 0, 0, 0, 0.2 );
+ transform: translate(var(--Q-after-x), var(--Q-after-y)) rotate(var(--Q-after-rotation));
+ box-shadow: 0.2rem 0.2rem 0.2rem rgba(0, 0, 0, 0.2);
}
.Q-circuit-operation:hover .Q-circuit-operation-tile {
-
- color: white;
+ color: white;
}
-
-
-
.Q-circuit-operation-hadamard .Q-circuit-operation-tile {
-
- /*--Q-operation-color-hue: var( --Q-color-red-hue );*/
- /*--Q-operation-color-main: var( --Q-color-red );*/
-
- /*--Q-operation-color-hue: 0;
+ /*--Q-operation-color-hue: var( --Q-color-red-hue );*/
+ /*--Q-operation-color-main: var( --Q-color-red );*/
+ /*--Q-operation-color-hue: 0;
--Q-operation-color-main: hsl( 0, 0%, 10% );*/
-
-
-/* background:
+ /* background:
linear-gradient(
-33deg,
@@ -1153,179 +854,130 @@ dd .maths {
.Q-circuit-operation-identity .Q-circuit-operation-tile,
.Q-circuit-operation-control .Q-circuit-operation-tile,
.Q-circuit-operation-target .Q-circuit-operation-tile {
-
- /*--Q-operation-color-hue: var( --Q-color-orange-hue );*/
- /*--Q-operation-color-main: var( --Q-color-orange );*/
- border-radius: 100%;
+ /*--Q-operation-color-hue: var( --Q-color-orange-hue );*/
+ /*--Q-operation-color-main: var( --Q-color-orange );*/
+ border-radius: 100%;
}
.Q-circuit-operation-identity .Q-circuit-operation-tile,
.Q-circuit-operation-control .Q-circuit-operation-tile {
-
- top: calc( 50% - 0.7rem );
- left: calc( 50% - 0.7rem );
- width: 1.4rem;
- height: 1.4rem;
- overflow: hidden;
-/* --Q-operation-color-hue: 0;
+ top: calc(50% - 0.7rem);
+ left: calc(50% - 0.7rem);
+ width: 1.4rem;
+ height: 1.4rem;
+ overflow: hidden;
+ /* --Q-operation-color-hue: 0;
--Q-operation-color-main: hsl( 0, 0%, 10% );*/
}
.Q-circuit-operation-pauli-x,
.Q-circuit-operation-pauli-y,
.Q-circuit-operation-pauli-z {
-
- /*--Q-operation-color-hue: var( --Q-color-red-hue );*/
- /*--Q-operation-color-main: var( --Q-color-red );*/
-
-/* --Q-operation-color-hue: 0;
+ /*--Q-operation-color-hue: var( --Q-color-red-hue );*/
+ /*--Q-operation-color-main: var( --Q-color-red );*/
+ /* --Q-operation-color-hue: 0;
--Q-operation-color-main: hsl( 0, 0%, 30% );*/
}
.Q-circuit-operation-swap .Q-circuit-operation-tile {
-
- top: calc( 50% - 0.55rem );
- left: calc( 50% - 0.55rem );
- width: 1.2rem;
- height: 1.2rem;
- border-radius: 0;
- transform-origin: center;
- transform: rotate( 45deg );
- font-size: 0;
+ top: calc(50% - 0.55rem);
+ left: calc(50% - 0.55rem);
+ width: 1.2rem;
+ height: 1.2rem;
+ border-radius: 0;
+ transform-origin: center;
+ transform: rotate(45deg);
+ font-size: 0;
}
-
-
-
-
-
- /********************/
- /* */
- /* Other states */
- /* */
/********************/
-
+/* */
+/* Other states */
+/* */
+/********************/
.Q-circuit-palette > div:hover,
.Q-circuit-board-foreground > div:hover {
-
- outline: 2px solid var( --Q-hyperlink-internal-color );
- outline-offset: -2px;
+ outline: 2px solid var(--Q-hyperlink-internal-color);
+ outline-offset: -2px;
}
.Q-circuit-palette > div:hover .Q-circuit-operation-tile {
-
- box-shadow: none;
+ box-shadow: none;
}
/*.Q-circuit-palette > div:hover,*/
.Q-circuit-board-foreground > div:hover {
-
- background-color: white;
- color: black;
+ background-color: white;
+ color: black;
}
-
-
-
-
-
.Q-circuit-clipboard > div,
.Q-circuit-cell-selected {
-
- background-color: white;
+ background-color: white;
}
.Q-circuit-clipboard > div:before,
.Q-circuit-cell-selected:before {
-
- content: "";
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- display: block;
- z-index: -10;
- box-shadow:
- 0 0 1rem rgba( 0, 0, 0, 0.2 ),
- 0.4rem 0.4rem 0.2rem rgba( 0, 0, 0, 0.2 );
- outline: 1px solid hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 50%
- );
- /*outline-offset: -1px;*/
+ content: "";
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ display: block;
+ z-index: -10;
+ box-shadow:
+ 0 0 1rem rgba(0, 0, 0, 0.2),
+ 0.4rem 0.4rem 0.2rem rgba(0, 0, 0, 0.2);
+ outline: 1px solid hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 50%);
+ /*outline-offset: -1px;*/
}
-
-
-
.Q-circuit-clipboard > div {
-
- background-color: white;
+ background-color: white;
}
.Q-circuit-clipboard > div:before {
-
- /*
+ /*
This was very helpful!
https://blog.dudak.me/2014/css-shadows-under-adjacent-elements/
*/
- content: "";
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: -10;
- display: block;
- box-shadow: 0.4rem 0.4rem 0.3rem rgba( 0, 0, 0, 0.2 );
+ content: "";
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: -10;
+ display: block;
+ box-shadow: 0.4rem 0.4rem 0.3rem rgba(0, 0, 0, 0.2);
}
-
-
-
-
- /***************/
- /* */
- /* Buttons */
- /* */
/***************/
-
+/* */
+/* Buttons */
+/* */
+/***************/
.Q-circuit-locked .Q-circuit-toggle-lock,
.Q-circuit-locked .Q-circuit-toggle-lock:hover {
-
- background-color: var( --Q-color-red );
+ background-color: var(--Q-color-red);
}
.Q-circuit-toggle-lock {
-
- z-index: 3;
- left: 0;
- top: 0;
- grid-column: 1;
- grid-row: 1;
- cursor: pointer;
- font-size: 1.1rem;
- text-shadow: none;
- font-weight: normal;
+ z-index: 3;
+ left: 0;
+ top: 0;
+ grid-column: 1;
+ grid-row: 1;
+ cursor: pointer;
+ font-size: 1.1rem;
+ text-shadow: none;
+ font-weight: normal;
}
.Q-circuit-button-undo,
.Q-circuit-button-redo {
-
- font-size: 1.2rem;
- line-height: 2.6rem;
- font-weight: normal;
+ font-size: 1.2rem;
+ line-height: 2.6rem;
+ font-weight: normal;
}
-
-
.Q-circuit p {
-
- padding: 1rem;
- color: hsl(
-
- var( --Q-color-background-hue ),
- var( --Q-color-background-saturation ),
- 66%
- );
+ padding: 1rem;
+ color: hsl(var(--Q-color-background-hue), var(--Q-color-background-saturation), 66%);
}
-
-