Scroll back to top
Name | Abbreviation |
---|---|
Statics | sta |
Dynamics | dyn |
Solid Mechanics | sol |
Text successfully copied to clipboard!
public
src
|--> components
|--> layouts
|--> pages
|--> <course_abbreviation>
|--> <course_abbreviation>.astro
Once your folder and home page have been created, decide on how many pages you will have, as well as all their names. Once that is done, to get started, copy the example page which is located at "src/pages/about/examples/example.astro" into your folder, and rename it. Once again, no spaces or special characters, so for example, "Stress Transformation" becomes "stress_transformation". Repeat until you reach your desired amount of pages. You should now have the following structure:
Text successfully copied to clipboard!
public
src
|--> components
|--> layouts
|--> pages
|--> <course_abbreviation>
|--> <page_1>.astro
|--> <page_2>.astro
|--> <page_3>.astro
|--> <course_abbreviation>.astro
Now, if you have the pages locally running on your computer, they should be accessible at http://localhost:4321/<course_abbreviation>/<page_1> (replace <course_abbreviation> and <page_1> with your respective course abbreviation and page names). Note that while the pages have ".astro" as their file extension, the links to those pages do not include it.
If you plan on adding images or animations to your course, make sure to create a new folder in `public` as well, with your course abbreviation. You should now have the following structure:
Text successfully copied to clipboard!
public
|--> <course_abbreviation>
|--> <course_page>_Figs
|--> <image>.png
src
|--> components
|--> layouts
|--> pages
|--> <course_abbreviation>
|--> <page_1>.astro
|--> <page_2>.astro
|--> <page_3>.astro
|--> <course_abbreviation>.astro
Text successfully copied to clipboard!
<!-- ADD YOUR COURSE HERE -->
Include the piece of code in the box below at that location. Edit everything to fit your course name, course abbreviation, etc., and add the same links as on your home page, make sure however that the links contain "?origin=sidebar" and not "?origin=coursemenu", as the distinction is essential for analytics purposes.
Text successfully copied to clipboard!
<li class="dropdown mega nav-item ">
<a class="nav-link dropdown-toggle" aria-haspopup="true" aria-expanded="false" aria-label="About" onclick="window.location.href='/<course_abbreviation>'">
<span><course_name></span>
</a>
<div class="dropdown-menu tile-list px-2" id="mainnav-<course_abbreviation>">
<div class="d-flex">
<section class="tile menu white-box col">
<h2><a href="/<course_abbreviation>"><course_name></a></h2>
<ol style="column-fill: balance; columns: x <= how many columns do you want your menu to have?;" class="course-menu">
<li><a href="/<course_abbreviation>/page1?origin=sidebar">Page 1</a></li>
<li><a href="/<course_abbreviation>/page2?origin=sidebar">Page 2</a></li>
etc...
</ol>
</section>
</div>
</div>
</li>