Comments (4)
The actual reference is created in https://github.com/espruino/Espruino/blob/master/scripts/build_board_docs.py - or via make docs
- it's called from https://github.com/espruino/EspruinoDocs/blob/master/build.sh#L31
But the whole website isn't public I'm afraid - but to get the page we basically just shove the generated file inside the attached wrapper.
If you're happy to make some changes to the wrapper to get this working differently that'd be really helpful - but it's used for the whole website, so I don't really want to find it's something that's broken everything.
it seems like the heading points to the sidebar entry and the sidebar entry points to the header.
That's the idea... People do use the reference html file on its own (in which case the sidebar is at the top, so it can be handy to flick to and fro)
from espruinodocs.
It looks like most of the changes can be done in the carousel.css
file and the sitewide.js
file. I noticed now that the table of contents is moved into the sidebar using js. That isn't really needed with the following css rule:
@media (min-width: 992px) {
#contents {
position: fixed;
top: 50px;
left: 0;
bottom: 0;
overflow-y: auto;
overflow-x: hidden;
width: 300px;
}
#maincontent:has(#contents) {
margin-left: 300px;
}
}
This way you can remove all the wrapping divs and have just
<body>
<div id="header">...</div>
<div id="maincontent">...</div>
</body>
The result is that the ToC is shown in the sidebar on desktop and at the top of the page on mobile devices.
The header (.navbar-wrapper
) should have the rule position: sticky
rather than position:absolute
, and .navbar-wrapper .navbar
should have margin-bottom: 0
.
from espruinodocs.
Thanks! I've just pulled those changes in, and the reference appears to load a lot faster now it doesn't rearrange the divs in JS.
I haven't got rid of the content
div yet though as I seem to recall that bootstrap kind of expected it and I think it might mess up some of the rest of the website.
from espruinodocs.
There is some bootstrap grid layout code that isn't strictly necessary, since the grid only has a single column, given that the sidebar is positioned using fixed. It's also from bootstrap 3 which had to rely on float and hacks in order to get layouts that are now pretty easy to do with grid and flexbox.
from espruinodocs.
Related Issues (20)
- [tutorials/BLE Advertising.md] Python section, not using sudo with pip HOT 1
- STM32F4DISCOVERY with different accelerometer HOT 2
- Data Streaming To GCP HOT 1
- [Hardware Reference - SetUI] HOT 3
- info/Compilation.md HOT 1
- info/Font Converter.md HOT 3
- KeyPad return values HOT 1
- Docs not built correctly HOT 1
- ST7735 on ESP32 using hardware SPI HOT 3
- graph module bug HOT 1
- Add "Bangle.js Battery Load/Intensity notes" HOT 2
- Forum isn't redirecting correctly HOT 1
- tutorials/Software PWM.md HOT 1
- There is no maximum PW rate specified for the puck.js2 HOT 1
- Add Ungoogled Chromium and Bromite to docs as a FOSS alternative HOT 2
- New tutorial: How to rapidly build and test Espruino for banglejs2 HOT 2
- tutorials/Tiny Word Clock.md HOT 7
- Mouldking module not working, possibly wrong device address? HOT 3
- tutorials/Bangle.js Fast Load.md HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espruinodocs.