All static files in Evalua Javiera — stylesheets, JavaScript modules, and images — are served from theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/groupTwoisTheBest/evaJav/llms.txt
Use this file to discover all available pages before exploring further.
static/ directory at the root of the project. FastAPI exposes the entire directory under the /static URL prefix using its built-in StaticFiles integration, meaning every file inside static/ is reachable at a predictable public path with no additional configuration required.
Static Mount
The mount is declared near the top ofmain.py, immediately after the FastAPI() instance is created:
name="static" parameter registers the mount with FastAPI’s URL-reversal system, enabling Jinja2 templates to reference static files through the url_for helper:
CSS Files
static/style.css
style.css is the global stylesheet loaded by base.html as the default for every page (unless a child template overrides the {% block stylesheets %} block). It defines CSS custom properties (variables) at the :root level and applies consistent dark-themed styles across all elements.
Key design tokens:
| Variable | Value | Usage |
|---|---|---|
--fondo | #222222 | Dark background colour applied to every element |
--texto | #f2f2f2 | Light off-white text colour |
--border | 3px solid #3B4B6A | Deep-blue solid border on inputs |
--BorderShadow | 0 0 7px rgb(75, 131, 177) | Blue glow box-shadow on inputs |
- The
*universal selector setsbackground,color,font-family(sans-serif), and uses flexbox column layout (display: flex; flex-direction: column; align-items: center; justify-content: center) on every element. formelements have a white1px solid #fffborder. Twoformrules exist in the file: the first setswidth: 90vw,height: 90vh, andgap: 10px; the second rule (at the bottom of the file) overrides those dimensions towidth: 40vwandheight: 50vh, and addsgap: 8pxand the white border, so the effective rendered size is40vw × 50vh.buttonelements use a blue background (#385288) and are40vwwide on mobile, narrowing to20vwon viewports wider than 800 px.- A
@media (min-width: 800px)breakpoint applies desktop overrides: wider inputs, smaller legend font size (3vw), reduced form dimensions, and removes link underlines.
static/index.css
index.css is the login-page-specific stylesheet. It is loaded by index.html, which overrides the {% block stylesheets %} block in base.html to replace style.css with this file:
JavaScript Modules
Each page in Evalua Javiera loads exactly one JavaScript file, injected bybase.html through the {{ linkJs.src }} expression. The three modules cover the three interactive steps of the evaluation flow.
static/js/index.js
Handles client-side authentication on the login page (/). It also serves as the script for the confirmation page (/Agradecimiento), which requires no interactive logic of its own.
Responsibilities:
- Defines the
usersarray containing all authorised student credentials. - Implements the
login(event)function, called by the form’sonsubmithandler. - On successful match, redirects the browser to the user’s
redirectpath. - On failure, displays an
alertwith an error message.
static/js/sele_prof.js
Handles teacher selection on the /seleccionatuprofesor page.
Responsibilities:
- Attaches a
submitevent listener to the form withid="Selectormestro". - Reads the value of the
<select id="maestro">dropdown. - If a teacher is selected, persists the choice to
localStoragevialocalStorage.setItem('maestroSeleccionado', maestro)and navigates to/calificaElProfesor. - If no teacher is selected, shows an alert prompting the student to make a choice.
static/js/cal_plataform.js
Handles the rating submission on the /calificaElProfesor page.
Responsibilities:
- Reads
maestroSeleccionadofromlocalStorageand populates the<legend id="Selectormestro">element withEvaluando a: [teacher name]so the student knows who they are rating. - Attaches a
submitevent listener to the form withid="calification". - Reads the three dropdown values:
exp(#explicationsTopics),act(#actitudinal),cls(#classActivity). - If all three are filled, serialises them as JSON and saves them to
localStoragevialocalStorage.setItem('calification', JSON.stringify({ exp, act, cls })), then redirects to/Agradecimiento. - If any dropdown is empty, shows an alert asking the student to complete all fields.
