Skip to content
Merged
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
19 changes: 6 additions & 13 deletions site/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ title: Write Once, Read Anywhere
URL:
save_as: index.html

PreTeXt is an authoring and publishing system for authors of textbooks, research articles, and monographs, especially in STEM disciplines.
PreTeXt is an authoring and publishing system for authors of textbooks, research articles, and monographs, especially in STEM disciplines, with a strong focus on accessibility.

The best of DocBook, LaTeX, and HTML.

Expand All @@ -13,26 +13,19 @@ Open Source: GPL license

### Gallery and Catalog

PreTeXt has been used to create a large number of Open Educational Resources.

The [Gallery](https://pretextbook.org/gallery.html) is a small collection of mature PreTeXt projects that demonstrate the range of features and the diversity of subjects.

The [Catalog](https://pretextbook.org/catalog.html) is a comprehensive list of PreTeXt projects. You can get a sense of the possibilities, and where authors have public source, you can look to see how certain constructions are authored.

### Starting Out

The [Documentation page](https://pretextbook.org/documentation.html) has information on Getting Started, the full documentation (The PreTeXt Guide) and additional resources.

### Community

Authors, publishers, readers, and developers congregate on Google Groups (in addition to GitHub issues once discussions are resolved). The support forum is the easiest, quickest, most accurate way to get help from experienced authors, publishers and developers, even if you are just starting out, and have only read the [PreTeXt Guide](https://pretextbook.org/documentation.html) once. Every PreTeXt author should subscribe to the announcements forum since changes and new features are broadcast there.

- Support forum/mailing-list: [pretext-support](https://groups.google.com/forum/#!forum/pretext-support)
- Announcements only, low-volume: [pretext-announce](https://groups.google.com/forum/#!forum/pretext-announce)
- Feature discussions and implementation: [pretext-dev](https://groups.google.com/forum/#!forum/pretext-dev)
- Accessibility discussions: [pretext-a11y](https://groups.google.com/forum/#!forum/pretext-a11y)
Our [documentation](documentation.html) has information on getting started, using all the many features of PreTeXt, and additional resources.

Connect with the [#PreTeXtGang](https://twitter.com/hashtag/PreTeXtGang) on [Twitter](https://twitter.com/PreTeXtBook) or [Mastodon](https://fosstodon.org/@PreTeXt).
### Get Involved

The inactive [mathbook-xml-support](https://groups.google.com/forum/?fromgroups#!forum/mathbook-xml-support) group can be searched for old questions and their answers.
We strive to make PreTeXt a welcoming and supportive [community](community.html).

### Code

Expand Down
3 changes: 3 additions & 0 deletions site/pelican_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
ARCHIVES_SAVE_AS = None
CATEGORIES_SAVE_AS = None
TAGS_SAVE_AS = None

85 changes: 84 additions & 1 deletion site/theme/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ header.header {
color: #FFF;
font: normal 1.4em monospace, sans-serif;
margin-right: 10px;
text-align: right;
}

.navbar ul {
Expand Down Expand Up @@ -131,6 +132,39 @@ header.header {
background-color: #444;
}

/* Hamburger menu button */
.navbar-toggle {
display: none;
flex-direction: column;
background: none;
border: none;
cursor: pointer;
padding: 10px;
align-self: center;
}

.navbar-toggle span {
width: 25px;
height: 3px;
background-color: #FFF;
margin: 5px 0;
transition: 0.3s;
border-radius: 2px;
}

/* Clever display of hamburger menu as an X */
.navbar-toggle.active span:nth-child(1) {
transform: rotate(-45deg) translate(-10px, 10px);
}

.navbar-toggle.active span:nth-child(2) {
opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
transform: rotate(45deg) translate(-8px, -8px);
}

/* path */
/*.path {
background: #949490;
Expand Down Expand Up @@ -204,4 +238,53 @@ header.header {
padding: 30px 3%;
margin: 0;
}
}

/* Keep header compact and prepare for absolute menu positioning */
header.header {
position: relative;
display:flex;
justify-content: space-between;
}

.navbar-toggle {
display: inline-flex;
}

/* Dropdown overlays content instead of expanding header */
.navbar {
position: absolute;
top: 100%; /* directly below the header */
left: 0;
right: 0;
width: 100%;
background: hsl(60, 2%, 13%);
box-shadow: 0 6px 16px rgba(0,0,0,0.3);
border-top: 1px solid #444;
z-index: 1000;

max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease-out;
text-align: left;
}

.navbar.active {
max-height: 60vh; /* allow scrolling when tall */
overflow-y: auto;
}

.navbar ul {
width: 100%;
}

.navbar li {
display: block;
width: 100%;
border-bottom: 1px solid #444;
}

.navbar a {
display: block;
padding: 12px 15px;
}
}
32 changes: 29 additions & 3 deletions site/theme/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,20 @@

<body>
{% block body %}
<header class="header">
<header class="header page-header">
{% block header %}
<div class="title">
<a href="index.html">PreTeXt</a>
</div>
{% endblock header %}
{% block nav %}
<nav class="navbar">
<div class="navbar-container">
<button class="navbar-toggle" id="navbar-toggle">
<span></span>
<span></span>
<span></span>
</button>
<nav class="navbar" id="navbar-menu">
<ul>
<!--<li><a href="index.html">Home</a></li>-->
<li><a href="documentation.html">Documentation</a></li>
Expand All @@ -45,6 +51,7 @@
<!--<li><a href="contact.html">Contact</a></li>-->
</ul>
</nav>
</div>
{% endblock nav %}
</header>
<main>
Expand Down Expand Up @@ -82,7 +89,26 @@
gtag('js', new Date());
gtag('config', 'UA-48811660-1');
</script><!--End: Google Global Site Tag code-->
<script>
// Hamburger menu toggle
const navbarToggle = document.getElementById('navbar-toggle');
const navbarMenu = document.getElementById('navbar-menu');

navbarToggle.addEventListener('click', function() {
navbarToggle.classList.toggle('active');
navbarMenu.classList.toggle('active');
});

// Close menu when a link is clicked
const navbarLinks = navbarMenu.querySelectorAll('a');
navbarLinks.forEach(link => {
link.addEventListener('click', function() {
navbarToggle.classList.remove('active');
navbarMenu.classList.remove('active');
});
});
</script>
{% endblock body %}
</body>

</html>
</html>
Loading