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

Updated styling for the GuidePage to fix the scrolling and sizing issues #21

Open
wants to merge 1 commit 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
16 changes: 12 additions & 4 deletions src/GuidePage.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
.guide-container {
position: absolute;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow-y: hidden;
}

.guide-info {
margin-right: -175px;
margin-left: 35%;
Expand All @@ -20,11 +29,10 @@
overflow-y: scroll;
padding: 25px;
font-style: normal;
font-size: 20px;
font-size: 15px;
line-height: 31px;
max-height: 800px;
min-height: 800px;
height: auto;
height: 65%;
max-height: 675px;
}

.GuidePage-container {
Expand Down
16 changes: 8 additions & 8 deletions src/GuidePage.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { useEffect, useState } from 'react';
import ReactMarkdown from 'react-markdown';
import './GuidePage.css';
import { useEffect, useState } from "react";
import ReactMarkdown from "react-markdown";
import "./GuidePage.css";

const GuidePage = (props) => {
const path =
'https://raw.githubusercontent.com/pennapps/guides/main/' +
"https://raw.githubusercontent.com/pennapps/guides/main/" +
props.guide +
'.md';
const [pageState, loadFile] = useState('');
".md";
const [pageState, loadFile] = useState("");
useEffect(() => {
fetch(path).then((file) =>
file.text().then((text) => loadFile(text.slice(props.guide.length + 2))),
file.text().then((text) => loadFile(text.slice(props.guide.length + 2)))
);
}, [path, props.guide]);
return (
<div>
<div className="guide-container">
<nav className="guide-nav">
<h3>PennApps Mentoring</h3>
</nav>
Expand Down