Welcome to IVYSTUDY, a dynamic and interactive study platform designed to provide free access to lessons and study materials. This documentation explains the structure and functionality of IVYSTUDY.
"Security protects your users. Transparency helps them trust and understand you. Never sacrifice the former for the latter—but maximize the latter within the safety bounds of the former."
# | Section | Description |
---|---|---|
1 | Overview | Introduction to IVYSTUDY's structure, goals, and design principles. |
2 | Features | Highlights of responsive design, dark mode, search, and interactivity. |
3 | File Structure | Overview of the single-file layout and reliance on external libraries. |
4 | HTML Structure | Breakdown of <head> and <body> elements and their roles. |
5 | CSS Styling | Description of theming, responsiveness, animations, and dark mode styling. |
6 | JavaScript Functionality | Handles dynamic loading, modal display, search, and dark mode toggle. |
7 | Meta Tags and SEO | Details Open Graph tags for better social sharing and SEO visibility. |
8 | Dark Mode | Explanation of how dark mode is implemented and stored using localStorage. |
9 | Dynamic Content Loading | Lessons are fetched and rendered based on filters and search. |
10 | Search Functionality | Real-time suggestions, filtering, and term highlighting. |
11 | Lesson Modal | Displays lessons with Markdown + LaTeX support and navigation controls. |
12 | Social Banner | Banner image appears when the site is shared via social media platforms. |
13 | License | Licensing terms for using and distributing the project. |
The IVYSTUDY platform is built on a single html file. It includes a responsive design, dynamic content loading, and interactive features to enhance the user experience. The file integrates various libraries and frameworks to provide a seamless and modern interface.
Its still a bit messy as we are currently in early production
- Responsive Design: Optimized for all screen sizes using Tailwind CSS.
- Dark Mode: Toggle between light and dark themes.
- Dynamic Content Loading: Fetches lessons and resources from a remote repository.
- Search Functionality: Real-time search with suggestions and filtering.
- Lesson Modal: Displays lesson content in a modal with support for:
- Standard MD
- LaTeX
- Charts
- Diagrams
- Desmos Integration - Currently pending approval
- Markscheme
- Social Banner: Automatically displays a banner when the page is shared.
- Interactive Elements: Includes animations, dropdowns, and hover effects.
- Continuity: Dark mode / Light mode sync across subpages without user data
The index.html
file is self-contained and relies on external libraries for styling and functionality, as are the adjacent subpages, our development cycle is currently too quick to continuously update this section however upon completion a full tree will be uploaded.
The <head>
section includes:
-
Meta Tags:
viewport
: Ensures responsive design.og:title
,og:description
,og:image
,og:url
,og:type
: Open Graph tags for social sharing.
-
External Libraries:
- Tailwind CSS for styling.
- Google Fonts for typography.
- Highlight.js for syntax highlighting.
- KaTeX for rendering LaTeX equations.
- Markdown-it and plugins for Markdown rendering.
-
Custom Styles:
- Defined using CSS variables for easy theming.
- Includes animations, hover effects, and dark mode styles.
The <body>
section is divided into the following components:
-
Loading Screen:
- Displays a loading animation while the page initializes.
-
Hero Section:
- Contains the platform title and a brief description.
-
Search Bar:
- Allows users to search for lessons, topics, or subjects.
- Includes real-time suggestions and results.
-
Class Filter:
- Displays subject pills for filtering lessons by category.
-
Content Section:
- Dynamically loads lessons and resources based on filters and search queries.
-
Lesson Modal:
- A modal for displaying lesson content with Markdown and LaTeX support.
-
Footer:
- Links to Terms, Privacy, and Contact pages.
-
Dark Mode Toggle:
- A floating button to switch between light and dark themes.
-
Custom Variables:
--primary
: Primary color for text and accents.--accent
: Secondary color for backgrounds and highlights.
-
Animations:
fadeIn
: Smooth fade-in effect.spin
: Loading spinner animation.
-
Dark Mode:
- Overrides light mode styles with darker colors for better readability.
-
Responsive Design:
- Uses Tailwind CSS classes for mobile-first design.
The platform includes custom styles for rendering Markdown content beautifully:
-
Headings:
h1
,h2
,h3
: Styled with bold fonts, custom colors, and spacing for- Common Github MD Syntax
-
Paragraphs:
- Line height and spacing are optimized for readability.
- Common Github MD Syntax
-
Blockquotes:
- Styled with a left border and background color for emphasis.
- Common Github MD Syntax
-
Lists:
- Custom bullet and number styles with proper indentation.
- Common Github MD Syntax
-
Code Blocks:
- Syntax highlighting using Highlight.js.
- Styled with a light background, rounded corners, and padding.
- Common Github MD Syntax
-
Tables:
- Borders, padding, and alternating row colors for better visibility.
- Common Github MD Syntax
-
Images:
- Responsive with rounded corners and spacing.
- Common Github MD Syntax
-
Markschemes:
- Done via the following syntax
<details> <summary>Markscheme</summary> CONTENT IN HERE </details>
-
LaTeX Adjacent MD Math
- Done via the following syntax
(Normal) $$ Content $$ (For Inline) $$ Content $$
-
Dynamic Content Loading:
- Fetches curriculum data from a remote JSON file.
- Processes and displays lessons based on filters and search queries.
-
Search Functionality:
- Real-time search with debounce to improve performance.
- Highlights matching terms in results.
-
Lesson Modal:
- Fetches and renders lesson content in Markdown format.
- Supports LaTeX rendering using KaTeX.
-
Dark Mode:
- Toggles between light and dark themes.
- Saves user preference in
localStorage
.
-
Social Banner:
- Displays a banner image when the page is shared on social media.
The platform dynamically fetches and renders lessons from a remote JSON file. The process involves:
-
Fetching Data:
- Uses the
fetch
API to retrieve lesson data.
- Uses the
-
Processing Data:
- Parses the JSON response and flattens it into a list of lessons.
-
Rendering Content:
- Filters lessons based on user input and displays them dynamically.
The search bar provides real-time suggestions and results:
-
Debounce Mechanism:
- Prevents excessive API calls by delaying the search execution.
-
Highlighting Matches:
- Highlights matching terms in the search results for better visibility.
-
Filtering:
- Filters lessons based on the search query and selected categories.
The lesson modal displays detailed content for each lesson:
-
Markdown Rendering:
- Converts Markdown to HTML using Markdown-it.
- Supports GitHub Flavored Markdown (GFM) features.
-
LaTeX Rendering:
- Renders mathematical equations using KaTeX.
-
Navigation:
- Includes "Previous" and "Next" buttons for navigating between lessons.
Dark mode is implemented using a combination of CSS and JavaScript:
-
CSS:
- Defines dark mode styles using the
.dark-mode
class. - Overrides light mode colors for better readability.
- Defines dark mode styles using the
-
JavaScript:
- Toggles the
.dark-mode
class on the<body>
element. - Saves the user's preference in
localStorage
.
- Toggles the
The social banner is dynamically loaded and displayed when the page is shared:
-
Open Graph Meta Tags:
og:image
: Specifies the banner image URL.og:title
,og:description
: Provide context for the shared link.
-
Dynamic Loading:
- The banner image is fetched and displayed based on the sharing platform.
The file includes Open Graph meta tags to improve social sharing:
- Title: "Ivy Study - Learning made free"
- Description: "Your go-to study platform."
- Image: A social banner hosted on GitHub.
- URL: The platform's homepage.
Dark mode is implemented using a combination of CSS and JavaScript:
-
CSS:
- Defines dark mode styles using the
.dark-mode
class. - Overrides light mode colors for better readability.
- Defines dark mode styles using the
-
JavaScript:
- Toggles the
.dark-mode
class on the<body>
element. - Saves the user's preference in
localStorage
.
- Toggles the
The platform fetches curriculum data from a remote JSON file and processes it into a flat list of lessons. Lessons are displayed dynamically based on the selected filters and search queries.
The search bar provides real-time suggestions and results:
-
Suggestions:
- Displays popular searches and matching lessons.
-
Results:
- Filters lessons based on the search query.
- Highlights matching terms in the results.
The lesson modal displays detailed content for each lesson:
-
Markdown Rendering:
- Converts Markdown to HTML using Markdown-it.
- Supports GitHub Flavored Markdown (GFM) features.
-
LaTeX Rendering:
- Renders mathematical equations using KaTeX.
-
Navigation:
- Includes "Previous" and "Next" buttons for navigating between lessons.
The social banner is dynamically loaded and displayed when the page is shared. The banner image is hosted on GitHub and linked using the og:image
meta tag.
- Code License: MIT License (see
LICENSE
) - Content License: CC BY-NC-SA 4.0 (see
LICENSE-CONTENT
)