Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed the Unexpected Navigation and Alignment issue #202

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions eduaid_web/package-lock.json

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

Binary file added eduaid_web/src/assets/wifipedia_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 37 additions & 14 deletions eduaid_web/src/pages/Text_Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import stars from "../assets/stars.png";
import cloud from "../assets/cloud.png";
import { FaClipboard } from "react-icons/fa";
import Switch from "react-switch";
import wifipediaLogo from "../assets/wifipedia_logo.png"; // Import Wikipedia logo

const Text_Input = () => {
const [text, setText] = useState("");
const [difficulty, setDifficulty] = useState("Easy Difficulty");
const [numQuestions, setNumQuestions] = useState(10);
const [loading, setLoading] = useState(false);
const fileInputRef = useRef(null);
const [fileContent, setFileContent] = useState("");
const [docUrl, setDocUrl] = useState("");
const [isToggleOn, setIsToggleOn] = useState(0);
const [isToggleOn, setIsToggleOn] = useState(false); // Toggle state as boolean

const toggleSwitch = () => {
setIsToggleOn((isToggleOn + 1) % 2);
setIsToggleOn(!isToggleOn); // Toggle the state
};

const handleFileUpload = async (event) => {
Expand Down Expand Up @@ -173,9 +173,12 @@ const Text_Input = () => {
loading ? "pointer-events-none" : ""
}`}
>
<a href="/">
<div className="flex items-end gap-[2px]">
<div className="flex items-end gap-[2px]">
<a href="/">
<img src={logo} alt="logo" className="w-24 my-6 ml-6 block" />
</a>
<<<<<<< HEAD
<a href="/">
<div className="text-4xl mb-5 font-extrabold">
<span className="bg-gradient-to-r from-[#FF005C] to-[#7600F2] text-transparent bg-clip-text">
Edu
Expand All @@ -184,11 +187,25 @@ const Text_Input = () => {
Aid
</span>
</div>
</a>
</div>
<div className="text-center mt-[-8px] mx-1">
<div className="text-white text-xl font-bold">Enter the Content</div>
<div className="text-white text-center justify-center flex gap-2 text-xl font-bold">
=======
<div className="text-4xl mb-5 font-extrabold">
<span className="bg-gradient-to-r from-[#FF005C] to-[#7600F2] text-transparent bg-clip-text">
Edu
</span>
<span className="bg-gradient-to-r from-[#7600F2] to-[#00CBE7] text-transparent bg-clip-text">
Aid
</span>
</div>
</a>
<div className="text-right mt-[-8px] mx-1">
</div>
<div className="text-center mt-[-8px] mx-1">
<div className="text-white text-xl font-bold">Enter the Content</div>
<div className="text-white text-right justify-end flex gap-2 text-xl font-bold">
<div className="text-white flex justify-center items-center gap-2 text-xl font-bold">
>>>>>>> 0629530 (fixed the Fix Header Layout and Navigation Links on input page)
to Generate{" "}
<span className="bg-gradient-to-r from-[#7600F2] to-[#00CBE7] text-transparent bg-clip-text">
Questionaries
Expand Down Expand Up @@ -285,11 +302,19 @@ const Text_Input = () => {
<div className="text-white text-xl font-bold">Use Wikipedia: </div>
<Switch
onChange={toggleSwitch}
checked={isToggleOn === 1}
checked={isToggleOn}
onColor="#008080"
offColor="#3e5063"
checkedIcon={false}
uncheckedIcon={false}
checkedIcon={
<div className="flex justify-center items-center h-full">
<img src={wifipediaLogo} alt="Wikipedia" className="h-5 w-5 opacity-100" />
</div>
}
uncheckedIcon={
<div className="flex justify-center items-center h-full">
<img src={wifipediaLogo} alt="Wikipedia" className="h-5 w-5 opacity-40" />
</div>
}
/>
</div>
</div>
Expand All @@ -299,18 +324,16 @@ const Text_Input = () => {
Back
</button>
</a>
{/* <a href="output"> */}
<button
onClick={handleSaveToLocalStorage}
className="bg-black items-center text-xl text-white px-4 py-2 border-gradient flex"
>
Next
</button>
{/* </a> */}
</div>
</div>
</div>
);
};

export default Text_Input;
export default Text_Input;