mirror of
https://github.com/m3y54m/Embedded-Engineering-Roadmap.git
synced 2026-10-12 01:08:13 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e63a4b7c80 | ||
|
|
342a344b3c | ||
|
|
8ad7827aec | ||
|
|
864e948e3e | ||
|
|
0c24f6dec4 | ||
|
|
febde4a151 | ||
|
|
b94fac3785 | ||
|
|
4d4b0a3059 | ||
|
|
edaf33ad61 | ||
|
|
9775dc5e61 | ||
|
|
336e1c4653 | ||
|
|
92a37ddac9 | ||
|
|
456bcb954b | ||
|
|
4564daca70 | ||
|
|
8db8117719 | ||
|
|
d395a72a75 | ||
|
|
543a253ab4 | ||
|
|
b6dec3d394 | ||
|
|
da88157952 | ||
|
|
3150cc358d | ||
|
|
b08f3a9699 | ||
|
|
8cf40b4993 | ||
|
|
95aff195b4 | ||
|
|
2c4faffbd8 | ||
|
|
558cc859f5 | ||
|
|
71adde583f | ||
|
|
334e7d0456 |
@@ -5,13 +5,13 @@ on:
|
||||
branches: [master]
|
||||
paths:
|
||||
- README.md
|
||||
- "site/**"
|
||||
- "explorer/**"
|
||||
- .github/workflows/pages.yml
|
||||
- .github/scripts/next-version.sh
|
||||
pull_request:
|
||||
paths:
|
||||
- README.md
|
||||
- "site/**"
|
||||
- "explorer/**"
|
||||
- .github/workflows/pages.yml
|
||||
- .github/scripts/next-version.sh
|
||||
workflow_dispatch:
|
||||
@@ -48,13 +48,16 @@ jobs:
|
||||
node-version: 22
|
||||
|
||||
- name: Test the README parser and map layout
|
||||
run: node --test site/parser.test.mjs
|
||||
run: node --test explorer/parser.test.mjs
|
||||
|
||||
- name: Warn about README sections that are not on the map
|
||||
run: node explorer/tools/coverage.mjs
|
||||
|
||||
- name: Assemble the site
|
||||
run: |
|
||||
mkdir _site
|
||||
cp site/*.html site/*.css site/*.js site/map.json README.md _site/
|
||||
cp -r site/fonts site/assets _site/
|
||||
cp explorer/*.html explorer/*.css explorer/*.js explorer/map.json README.md _site/
|
||||
cp -r explorer/fonts explorer/assets _site/
|
||||
|
||||
- name: Install Chromium
|
||||
run: |
|
||||
@@ -65,7 +68,7 @@ jobs:
|
||||
id: fingerprint
|
||||
# Rendered before build.json exists, so the revision line is not part of the fingerprint.
|
||||
run: |
|
||||
node site/tools/render.mjs _site / fingerprint
|
||||
node explorer/tools/render.mjs _site / fingerprint
|
||||
echo "sha256=$(sha256sum fingerprint/Embedded-Engineering-Roadmap.png | cut -d' ' -f1)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Decide the version
|
||||
@@ -84,7 +87,7 @@ jobs:
|
||||
run: |
|
||||
node -e 'console.log(JSON.stringify({ version: process.env.VERSION, date: process.env.DATE }))' > _site/build.json
|
||||
cat _site/build.json
|
||||
node site/tools/render.mjs _site / _site
|
||||
node explorer/tools/render.mjs _site / _site
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
+11
-2
@@ -30,9 +30,18 @@ Contributions from everyone are welcomed. To keep the roadmap practical, accessi
|
||||
- Contributions should match the topics and structure of the roadmap.
|
||||
- Areas where contributors have experience or genuine interest should be focused on.
|
||||
- If a new topic is thought to make the roadmap more complete, it may be suggested. New topics should be proposed thoughtfully, considering their usefulness and relevance for other learners.
|
||||
- Connections between topics on the map are listed in `site/map.json` under `links` as `["Topic", "Other topic", "why they are related"]`, using the names shown on the map. Connect topics that a learner should study together or that depend on each other, and keep the reason to one short sentence. Tests fail if a name is misspelled, a pair is listed twice or a topic has no connection.
|
||||
- Connections between topics on the map are listed in `explorer/map.json` under `links` as `["Topic", "Other topic", "why they are related"]`, using the names shown on the map. Connect topics that a learner should study together or that depend on each other, and keep the reason to one short sentence. Tests fail if a name is misspelled, a pair is listed twice or a topic has no connection.
|
||||
|
||||
## 6. Versioning and Releases
|
||||
## 6. How the README Feeds the Interactive Roadmap
|
||||
|
||||
The [interactive roadmap](https://m3y54m.github.io/Embedded-Engineering-Roadmap/) reads `README.md` directly; there is no other copy of the content. Most contributions need no change outside the README.
|
||||
|
||||
- **Topics** come from heading depth: `##` is a group, `###` a main topic, `####` and deeper are subtopics. The emojis in headings (✳️ 🔵 🔶 🔸) are decoration only. Renaming a heading changes its link (`#/topic-name`).
|
||||
- **Resources** are list items in the form `- [📘👶💎 Title](https://url)`, optionally followed by a dash and a short note. Symbols: 📘 book, 🎞️ video, 📝 article, 🔗 link, 🎧 audio, 👶 beginner, 💎 essential. `python3 .github/scripts/check_readme.py` checks the format and duplicates.
|
||||
- **The map** (`explorer/map.json`) draws only the main topics. Each label on it opens the README heading with the same name. If the wording differs, or the label has no section of its own, add `"Label": ["README heading"]` to `readme` in `explorer/map.json`. A new main topic needs a README section and a box in `explorer/map.json` (and at least one entry in `links`), unless it should stay off the map: then list its title or group in `offMap`. CI warns about main topics that are neither.
|
||||
- **Preview and test locally:** `python3 -m http.server 8765` from the repository root, then open `/explorer/`; `node --test explorer/parser.test.mjs` runs the checks CI runs.
|
||||
|
||||
## 7. Versioning and Releases
|
||||
|
||||
The roadmap image is versioned as `vMAJOR.MINOR.PATCH`, starting from `v2.0.0`.
|
||||
|
||||
|
||||
@@ -42,7 +42,9 @@ used in an aircraft or rapid transit system.
|
||||
|
||||
## 🗺️ The Roadmap
|
||||
|
||||

|
||||
🌐 **[Open the interactive roadmap](https://m3y54m.github.io/Embedded-Engineering-Roadmap/)** to explore it in your browser. Click any topic to read its description and see its learning resources, hover over it to see the topics it is related to, filter topics by area (software, hardware, soft skills) or importance, and search across all topics and resources. The roadmap can also be downloaded there as a PDF or PNG image.
|
||||
|
||||
[](https://m3y54m.github.io/Embedded-Engineering-Roadmap/)
|
||||
|
||||
The embedded systems engineering roadmap is structured into three fundamental areas: **SOFTWARE**, **HARDWARE**, and **SOFT SKILLS**.
|
||||
|
||||
@@ -123,7 +125,7 @@ If you have reservations about relying on AI advice alone, you can also ask your
|
||||
- [🔗 Electrical Engineering Stack Exchange](https://electronics.stackexchange.com/)
|
||||
- [🔗 Reddit · r/embedded](https://www.reddit.com/r/embedded/)
|
||||
|
||||
### ✳️ Career Development
|
||||
### 💼 Career Development
|
||||
|
||||
As an embedded systems engineer, it's essential to stay up-to-date with industry trends, best practices, and new technologies to advance your career. Here are some resources to help you achieve your career goals:
|
||||
|
||||
@@ -226,6 +228,42 @@ Similar to other professions, embedded engineers require soft skills that can't
|
||||
- [📝 Soft Skills For Embedded Systems Software Developers](https://www.embeddedrelated.com/showarticle/1470.php)
|
||||
- [📝 10 Skills Every Embedded Engineer Should Have](https://medium.com/@lanceharvieruntime/10-skills-every-embedded-engineer-should-have-dcb867095b91)
|
||||
|
||||
#### 🔵 Communication Skills
|
||||
|
||||
- [🔗👶 Technical Writing Courses - Google for Developers](https://developers.google.com/tech-writing)
|
||||
- [📝💎 How To Ask Questions The Smart Way - Eric S. Raymond](http://www.catb.org/esr/faqs/smart-questions.html)
|
||||
- [🔗 Software documentation guide - Write the Docs](https://www.writethedocs.org/guide/)
|
||||
|
||||
#### 🔵 Problem-Solving Skills & Critical Thinking
|
||||
|
||||
- [📘💎 Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems - David J. Agans](https://debuggingrules.com/)
|
||||
- [📝 When debugging, your attitude matters - Julia Evans](https://jvns.ca/blog/debugging-attitude-matters/)
|
||||
|
||||
#### 🔵 Teamwork & Collaborative Abilities
|
||||
|
||||
- [📝 How to Work Well on Teams - Software Engineering at Google](https://abseil.io/resources/swe-book/html/ch02.html)
|
||||
- [📝 Knowledge Sharing - Software Engineering at Google](https://abseil.io/resources/swe-book/html/ch03.html)
|
||||
- [🔗💎 Code Review Developer Guide - Google Engineering Practices](https://google.github.io/eng-practices/review/)
|
||||
- [🔗 Atlassian Team Playbook](https://www.atlassian.com/team-playbook)
|
||||
|
||||
#### 🔵 Organizational & Time Management Skills
|
||||
|
||||
- [📘💎 Getting Things Done: The Art of Stress-Free Productivity - David Allen](https://gettingthingsdone.com/what-is-gtd/)
|
||||
- [🎞️👶 Work Smarter, Not Harder: Time Management for Personal & Professional Productivity - Coursera](https://www.coursera.org/learn/work-smarter-not-harder)
|
||||
- [📝💎 Maker's Schedule, Manager's Schedule - Paul Graham](https://www.paulgraham.com/makersschedule.html)
|
||||
|
||||
#### 🔵 Being Self-Driven and Independent
|
||||
|
||||
- [🎞️👶 Learning How to Learn - Coursera](https://www.coursera.org/learn/learning-how-to-learn)
|
||||
- [📝💎 Teach Yourself Programming in Ten Years - Peter Norvig](https://norvig.com/21-days.html)
|
||||
- [📝💎 How to Do Great Work - Paul Graham](https://paulgraham.com/greatwork.html)
|
||||
- [📝 You and Your Research - Richard Hamming](https://www.paulgraham.com/hamming.html)
|
||||
|
||||
#### 🔵 Adaptability & Patience
|
||||
|
||||
- [📘 Mindset: The New Psychology of Success - Carol S. Dweck](https://www.penguinrandomhouse.com/books/44330/mindset-by-carol-s-dweck-phd/)
|
||||
- [🎞️👶 The power of believing that you can improve - Carol Dweck (TED Talk)](https://www.ted.com/talks/carol_dweck_the_power_of_believing_that_you_can_improve)
|
||||
|
||||
_________________
|
||||
|
||||
### ✳️ Electronics
|
||||
@@ -376,13 +414,19 @@ _________________
|
||||
|
||||
Mastering programming fundamentals and software development principles is essential for a successful embedded design. Embedded systems demand efficient code, optimized data management, reusable design patterns, and effective memory management to function effectively in resource-constrained environments. Embedded developers must possess a strong foundation in these core concepts to create reliable and performant embedded systems.
|
||||
|
||||
#### 🔵 Basic Discrete Mathematics
|
||||
#### 🔵 Discrete Mathematics
|
||||
|
||||
Discrete mathematics is the theoretical basis of computer science and engineering. The parts most useful to embedded engineers are logic and switching algebra (digital circuit design), automata theory (state machines and protocols), combinatorics, coding theory (data transmission and audio/video codecs) and modular arithmetic (checksums and cryptography).
|
||||
|
||||
- [🎞️ Coursera - Introduction to Discrete Mathematics for Computer Science Specialization](https://www.coursera.org/specializations/discrete-mathematics)
|
||||
- [📘👶 Open Access Discrete Mathematics Books by LibreTexts](https://math.libretexts.org/Bookshelves/Combinatorics_and_Discrete_Mathematics)
|
||||
- [📘👶 Essential Discrete Mathematics for Computer Science - Harry Lewis, Rachel Zax](https://dl.acm.org/doi/book/10.5555/3388468)
|
||||
- [📘👶 Guide to Discrete Mathematics - Gerard O'Regan, Springer](https://link.springer.com/book/10.1007/978-3-030-81588-2)
|
||||
- [📘💎 Bridge to Abstract Mathematics, AMS](https://bookstore.ams.org/view?ProductCode=TEXT/22)
|
||||
- [📘💎 Discrete Mathematics and its applications by Rosen](https://dl.acm.org/doi/book/10.5555/579402)
|
||||
- [📘💎 Discrete Mathematics with Applications by Susanna S. Epp](https://dl.acm.org/doi/book/10.5555/1941983)
|
||||
- [📘💎 Switching and Finite Automata Theory, Cambridge Press](https://dl.acm.org/doi/10.5555/1708070)
|
||||
- [📘💎 The Mathematics of Cellular Automata by Jane Hawkins, AMS](https://bookstore.ams.org/stml-108)
|
||||
|
||||
#### 🔵 Algorithms & Data Structures
|
||||
|
||||
@@ -757,6 +801,12 @@ Embedded systems often communicate with other devices or external systems via in
|
||||
|
||||
- [🎞️ What is Matter? Unifying IoT Devices for the Smart Home | Digi-Key Electronics](https://youtu.be/vJIEfih9bl0)
|
||||
|
||||
##### 🔶 UWB
|
||||
|
||||
- [📘👶 Ultra-Wideband For Dummies - Qorvo](https://www.qorvo.com/design-hub/ebooks/ultra-wideband-for-dummies)
|
||||
- [🔗 FiRa Consortium - Advancing Ultra-Wideband (UWB) Technology](https://www.firaconsortium.org/)
|
||||
- [📝 Ultra-wideband - Wikipedia](https://en.wikipedia.org/wiki/Ultra-wideband)
|
||||
|
||||
#### 🔵 Industrial Protocols
|
||||
|
||||
##### 🔶 Modbus
|
||||
@@ -774,6 +824,12 @@ Embedded systems often communicate with other devices or external systems via in
|
||||
|
||||
- [🎞️ Microchip University - An Introduction to EtherCAT®, EtherCAT P and the Microchip LAN925x family of Slave Controllers](https://mu.microchip.com/an-introduction-to-ethercat-ethercat-p-and-the-microchip-lan925x-family-of-slave-controllers)
|
||||
|
||||
##### 🔶 Profinet
|
||||
|
||||
- [🎞️👶 How PROFINET Works? A Beginner's Guide - PI North America](https://us.profinet.com/webinar/how-profinet-works-a-beginners-guide/)
|
||||
- [🎞️ PROFINET Video Series](https://www.profinet.com/profinet-explained/explanatory-videos)
|
||||
- [🔗 PROFINET University](https://profinetuniversity.com/)
|
||||
|
||||
##### 🔶 CoAP & MQTT
|
||||
|
||||
- [🎞️ #144 Internet Protocols: CoAP vs MQTT, Network Sniffing, and preparation for IKEA Tradfri Hacking](https://www.youtube.com/watch?v=pfG8uEDZj5g)
|
||||
@@ -825,6 +881,21 @@ Embedded systems often communicate with other devices or external systems via in
|
||||
- [🎞️ J1939 Explained - A Simple Intro [v2.0 | 2021]](https://www.youtube.com/watch?v=vlqxu9ojbHg)
|
||||
- [🎞️ Unified Diagnostic Services (UDS) Explained - A Simple Intro [2022]](https://www.youtube.com/watch?v=CV_B8tJgI5E)
|
||||
|
||||
##### 🔶 LIN
|
||||
|
||||
- [📝👶 LIN Bus Explained - A Simple Intro - CSS Electronics](https://www.csselectronics.com/pages/lin-bus-protocol-intro-basics)
|
||||
- [📝 Local Interconnect Network - Wikipedia](https://en.wikipedia.org/wiki/Local_Interconnect_Network)
|
||||
|
||||
##### 🔶 MOST
|
||||
|
||||
- [📝 MOST Bus - Wikipedia](https://en.wikipedia.org/wiki/MOST_(bus))
|
||||
- [🔗 MOST Cooperation - Specifications](https://www.mostcooperation.com/specifications/)
|
||||
|
||||
##### 🔶 FlexRay
|
||||
|
||||
- [📝 FlexRay Automotive Communication Bus Overview - NI](https://www.ni.com/en/shop/seamlessly-connect-to-third-party-devices-and-supervisory-system/flexray-automotive-communication-bus-overview.html)
|
||||
- [📝 FlexRay - Wikipedia](https://en.wikipedia.org/wiki/FlexRay)
|
||||
|
||||
#### 🔵 Network Protocols / Socket Programming
|
||||
|
||||
- [🎞️ Networking Fundamentals - Practical Networking (YouTube Playlist)](https://www.youtube.com/playlist?list=PLIFyRwBY_4bRLmKfP1KnZA6rZbRHtxmXi)
|
||||
@@ -1125,8 +1196,6 @@ Embedded Linux is a specialized version of the Linux operating system tailored f
|
||||
- [🔗 Linux From Scratch - step-by-step instructions for building your own custom Linux system](https://www.linuxfromscratch.org/)
|
||||
- [🔗 Automotive Grade Linux (AGL)](https://docs.automotivelinux.org/)
|
||||
- [🔗 Real Time Linux and `PREEMPT_RT` Patch](https://wiki.linuxfoundation.org/realtime/start)
|
||||
- [🔗 Android Open Source Project](https://source.android.com)
|
||||
- [🔗 Android Automotive](https://source.android.com/docs/automotive)
|
||||
|
||||
##### 🔶 Linux Kernel
|
||||
|
||||
@@ -1165,6 +1234,20 @@ Embedded Linux is a specialized version of the Linux operating system tailored f
|
||||
- [📘 Bootlin Embedded Linux, Kernel, drivers, Yocto, Buildroot and Graphics Training](https://bootlin.com/training/)
|
||||
- [🔗 meta-raspberrypi - Yocto/OpenEmbedded layer for Raspberry Pi boards](https://meta-raspberrypi.readthedocs.io/en/latest/)
|
||||
|
||||
##### 🔶 Embedded Android
|
||||
|
||||
Embedded Android builds on Embedded Linux: the device runs a Linux kernel with Android-specific additions, and the Android Open Source Project (AOSP) adds its own build system, hardware abstraction layers (HALs) and framework on top. Learn Embedded Linux first, then how AOSP is built, ported to a board and extended with HALs and native (NDK) code.
|
||||
|
||||
- [🔗💎 Android Open Source Project](https://source.android.com)
|
||||
- [🔗👶 AOSP Architecture Overview](https://source.android.com/docs/core/architecture)
|
||||
- [🔗 Try Android Development - Download, Build and Flash AOSP](https://source.android.com/docs/setup/start)
|
||||
- [🔗 Android Kernel Overview](https://source.android.com/docs/core/architecture/kernel)
|
||||
- [🔗 Hardware Abstraction Layer (HAL) Overview](https://source.android.com/docs/core/architecture/hal)
|
||||
- [🔗 Get Started with the Android NDK](https://developer.android.com/ndk/guides)
|
||||
- [📘💎 Embedded Android - Karim Yaghmour](https://www.oreilly.com/library/view/embedded-android/9781449327958/)
|
||||
- [📘 Android System Development Training (Slides and Labs) - Bootlin](https://bootlin.com/doc/legacy/android/)
|
||||
- [🔗 Android Automotive](https://source.android.com/docs/automotive)
|
||||
|
||||
#### 🔵 Multithreading & Parallel Processing
|
||||
|
||||
- [📝 Threading/Concurrency vs Parallelism](http://www.danielmoth.com/Blog/threadingconcurrency-vs-parallelism.aspx)
|
||||
@@ -1517,35 +1600,6 @@ AUTOSAR, or AUTomotive Open System ARchitecture, is a global industry standard f
|
||||
- [🔗💎 OSEK/VDX Operating System Specification 2.2.3](https://www.osek-vdx.org/mirror/os223.pdf)
|
||||
- [🔗💎 OSEK/VDX OIL (OSEK Implementation Language) Specification 2.4.1](https://www.osek-vdx.org/mirror/oil241.pdf)
|
||||
|
||||
_________________
|
||||
|
||||
### ✳️ Appendix-A: Advanced Topics
|
||||
|
||||
#### 🔵 Discrete Mathematics
|
||||
|
||||
A common subject that is essential to Computer Science students and some Math/Electrical Engineering Majors based on the [Association For Computing Machinery Guidelines for CS/CE education](https://www.acm.org/education/curricula-recommendations). It houses the most essential subjects for _abstract mathematical modelling_ and _theory of computation_. Furthermore, it helps students to establish the essential engineering mindset that represents the common basis among all computer science and computer engineering domains. However, Logic, Theory of combinatorics, Coding Theory, and Theory of Computation are among the most essential subjects for Embedded Systems Engineers.
|
||||
|
||||
_**Goal of learning Discrete Mathematics:**_ Embedded Systems Engineers should be able to grasp most of these information sooner or later based on their subspeciality; as it explains the scientific and theoretical basis of computer engineering (e.g., Coding Theory for Audio/Video Encoding/Decoding and Data Transmission - Automata Theory for event control and data transmission - Logic for digital circuit design and switching algebra - $$\Pi$$ Calculus and Automata Theory for Concurrency Modelling).
|
||||
|
||||
_Discrete Mathematics_ is a multi-semester course that involves subjects about the theoretical mathematical basis of computer science, including but not limited to:
|
||||
|
||||
- Logic (Propositional, Quantificational and Normal Forms).
|
||||
- Axiomatic Set Theory (Sets, Operations on sets, and Power Sets).
|
||||
- Relation Sets and Function Theory (i.e., $$\lambda$$ Calculus).
|
||||
- Theory of combinatorics.
|
||||
- Matrix and Graph Theory.
|
||||
- Theory of computation (i.e., Computational Automata Theory, Computational Complexity, and Computational Computability).
|
||||
- Automata Theory (e.g., Finite-state Machines, Pushdown Automata, Turing Machines, and Cellular Automata).
|
||||
- Process Modelling/Calculi (i.e., $$\pi$$ Calculus).
|
||||
- Coding Theory.
|
||||
- Division Theorem Modular Arithmetics (Parts of Number Theory).
|
||||
- [📘💎 Discrete Mathematics and its applications by Rosen](https://dl.acm.org/doi/book/10.5555/579402)
|
||||
- [📘💎 Discrete Mathematics with Applications by Susanna S. Epp](https://dl.acm.org/doi/book/10.5555/1941983)
|
||||
- [📘💎 Switching and Finite Automata Theory, Cambridge Press](https://dl.acm.org/doi/10.5555/1708070)
|
||||
- [📘💎 Discrete Mathematical Structures by Bernard Kolman](https://www.pearson.com/en-us/subject-catalog/p/discrete-mathematical-structures-classic-version/P200000006227/9780137538782?srsltid=AfmBOooBdohmNtq7Wu42tHwSt7lUma46hBmKjqk8XJ8NNI6sf2-4-1kg)
|
||||
- [📘💎 Invitation to Discrete Mathematics, Oxford University Press](https://global.oup.com/academic/product/invitation-to-discrete-mathematics-9780198570431?cc=eg&lang=en&)
|
||||
- [📘💎 The Mathematics of Cellular Automata by Jane Hawkins, AMS](https://bookstore.ams.org/stml-108)
|
||||
|
||||
## History
|
||||
|
||||
At first this was meant to be my personal reading list but as the list gradually became bigger and bigger, I wondered why not share it with others. So I did research on current job postings for embedded engineering roles, selecting the most frequent skills and including them on a roadmap. In order to make the roadmap more comprehensive I also added some basic skills and finally came up with what you see here.
|
||||
@@ -1568,4 +1622,4 @@ Special thanks to my friends in the community of Iranian Embedded Engineers in T
|
||||
|
||||
If you think that this roadmap can be improved in anyway or you know about some good learning resources that can be added here, please start an issue or a pull request. I’ll be maintaining and updating this repository frequently.
|
||||
|
||||
The roadmap image and PDF are generated from this repository. Topics, descriptions and learning resources come from this README; where each topic sits on the map and how important it is come from [`site/map.json`](site/map.json). Edit those files and the interactive explorer in [`site/`](site) renders the PNG and PDF automatically.
|
||||
The roadmap image and PDF are generated from this repository. Topics, descriptions and learning resources come from this README; where each topic sits on the map and how important it is come from [`explorer/map.json`](explorer/map.json). Edit those files and the interactive explorer in [`explorer/`](explorer) renders the PNG and PDF automatically.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { parseRoadmap, renderInline, TYPES } from './parser.js';
|
||||
import { linkDiagram } from './diagram.js';
|
||||
import { createMapView } from './mapview.js';
|
||||
import { CREDITS, IMPORTANCE, areaDots, areaLabel, h, plural } from './dom.js';
|
||||
import { IMPORTANCE, TITLE, areaDots, areaLabel, h, plural } from './dom.js';
|
||||
|
||||
const SOURCES = [
|
||||
'README.md',
|
||||
@@ -97,7 +97,7 @@ function navigate(node, { push = true, resource = null, reveal = false } = {}) {
|
||||
syncOutline();
|
||||
if (resource) revealResource(resource);
|
||||
const root = state.data.root;
|
||||
document.title = node === root ? 'Embedded Engineering Roadmap · Explorer' : `${node.title} · Embedded Engineering Roadmap`;
|
||||
document.title = node === root ? `${TITLE} · Explorer` : `${node.title} · ${TITLE}`;
|
||||
if (push) {
|
||||
const hash = node === root ? '#/' : `#/${node.slug}`;
|
||||
if (location.hash !== hash) history.pushState(null, '', hash);
|
||||
@@ -311,30 +311,17 @@ function overview(root) {
|
||||
state.plan ? section('Diagram topics by area', areaSummary()) : null,
|
||||
...groups.map((g) => section(g.title, topicChips(g.topics))),
|
||||
section('How to explore', h('ul', { class: 'howto' },
|
||||
h('li', {}, 'Map follows the roadmap diagram: topics sit in Software, Hardware or both, and are colored by importance.'),
|
||||
h('li', {}, 'Use the Areas chips to highlight a single area or only the Software ∩ Hardware cross-section.'),
|
||||
h('li', {}, 'Map follows the roadmap diagram: topics sit in Software, Hardware or both, and are colored by learning priority, a general guide that varies with your specialty and role.'),
|
||||
h('li', {}, 'Click Required, Recommended or Optional in the legend above the map to highlight topics of that priority.'),
|
||||
h('li', {}, 'Hover or select a topic to see solid lines to its related topics. Fainter dashed lines come from resources that share or mention a topic.'),
|
||||
h('li', {}, 'Outline lists every topic of the README; use it to browse topics that are not on the map.'),
|
||||
h('li', {}, 'Press ', h('kbd', {}, '/'), ' to search topics and resources.'))),
|
||||
section(null, h('p', { class: 'res-note' }, 'Built from the ',
|
||||
h('a', { href: `${REPO_URL}#readme`, target: '_blank', rel: 'noopener noreferrer' }, 'roadmap README'),
|
||||
' and the map definition in the repository.')),
|
||||
section('Credits', credits()),
|
||||
].filter(Boolean);
|
||||
}
|
||||
|
||||
function credits() {
|
||||
const external = (href, ...children) => h('a', { href, target: '_blank', rel: 'noopener noreferrer' }, ...children);
|
||||
const build = state.build;
|
||||
return h('div', { class: 'credits' },
|
||||
h('img', { class: 'credits-logo', src: 'assets/logo.svg', alt: '', width: 48, height: 48 }),
|
||||
h('div', { class: 'credits-body' },
|
||||
h('p', {}, 'Creator & maintainer: ', external(CREDITS.authorUrl, h('strong', {}, CREDITS.author))),
|
||||
build ? h('p', {}, 'Revision ', h('strong', {}, build.version), ` · last update ${build.date}`) : null,
|
||||
h('p', {}, 'Licensed under the ', external(CREDITS.licenseUrl, CREDITS.licenseName), '.'),
|
||||
external(CREDITS.licenseUrl, h('img', { class: 'credits-badge', src: 'assets/cc-by-sa.svg', alt: CREDITS.license, width: 88, height: 31 }))));
|
||||
}
|
||||
|
||||
function renderPanel(node) {
|
||||
const root = state.data.root;
|
||||
const panel = els.panel;
|
||||
@@ -344,7 +331,7 @@ function renderPanel(node) {
|
||||
crumbs(node),
|
||||
h('h2', { class: 'panel-title' },
|
||||
node.icon ? h('span', { class: 'title-icon', 'aria-hidden': 'true' }, node.icon) : node === root ? null : swatch(node),
|
||||
node === root ? 'Embedded Engineering Roadmap' : node.title),
|
||||
node === root ? 'About this roadmap' : node.title),
|
||||
node === root ? null : h('div', { class: 'meta' },
|
||||
node.areas && node.areas.length ? h('span', { class: 'pill area-pill' }, areaDots(node.areas), areaLabel(node.areas)) : null,
|
||||
node.importance ? h('span', { class: `pill imp-pill ${node.importance}` }, IMPORTANCE[node.importance]) : null,
|
||||
@@ -589,7 +576,7 @@ async function loadMarkdown() {
|
||||
const response = await fetch(source, { cache: 'no-cache' });
|
||||
if (!response.ok) continue;
|
||||
const text = await response.text();
|
||||
if (text.includes('# Embedded Systems Engineering Roadmap')) return text;
|
||||
if (text.includes(`# ${TITLE}`)) return text;
|
||||
} catch {
|
||||
// Try the next source.
|
||||
}
|
||||
@@ -629,10 +616,24 @@ function wireGlobal() {
|
||||
for (const tab of els.tabs) tab.addEventListener('click', () => setView(tab.dataset.view));
|
||||
document.getElementById('print').addEventListener('click', () => window.print());
|
||||
// The PDF and PNG are rendered by CI next to the deployed site; local previews don't have them.
|
||||
for (const link of document.querySelectorAll('[data-download]')) {
|
||||
const download = document.getElementById('download');
|
||||
for (const link of download.querySelectorAll('[data-download]')) {
|
||||
fetch(link.getAttribute('href'), { method: 'HEAD', cache: 'no-cache' })
|
||||
.then((response) => { link.hidden = !response.ok; }, () => {});
|
||||
.then((response) => {
|
||||
link.hidden = !response.ok;
|
||||
if (response.ok) download.hidden = false;
|
||||
}, () => {});
|
||||
link.addEventListener('click', () => { download.open = false; });
|
||||
}
|
||||
document.addEventListener('pointerdown', (e) => {
|
||||
if (download.open && !download.contains(e.target)) download.open = false;
|
||||
});
|
||||
download.addEventListener('keydown', (e) => {
|
||||
if (e.key !== 'Escape' || !download.open) return;
|
||||
e.stopPropagation();
|
||||
download.open = false;
|
||||
download.querySelector('summary').focus();
|
||||
});
|
||||
// Printing always produces the diagram, whatever view is open.
|
||||
let viewBeforePrint = null;
|
||||
window.addEventListener('beforeprint', () => {
|
||||
@@ -660,6 +661,7 @@ function wireGlobal() {
|
||||
}
|
||||
|
||||
async function init() {
|
||||
document.getElementById('brand-title').textContent = TITLE;
|
||||
applyTheme(store('roadmap-theme') || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'));
|
||||
let markdown;
|
||||
const diagramRequest = loadMap();
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 879 B After Width: | Height: | Size: 879 B |
@@ -1,40 +1,6 @@
|
||||
// Links the topics drawn on the map (map.json) to README topics, so every topic knows
|
||||
// which areas (Software, Hardware, Soft skills) it sits in and how important the map marks it.
|
||||
|
||||
// Map labels whose README heading is worded differently.
|
||||
const ALIASES = {
|
||||
'ADC / DAC': ['ADC', 'DAC'],
|
||||
'Buildroot / Yocto': ['Buildroot', 'Yocto'],
|
||||
'TDD & Unit Testing': ['Test Driven Development (TDD)', 'Unit Testing'],
|
||||
'Threading / Parallelism': ['Multithreading & Parallel Processing'],
|
||||
'Device Drivers': ['Linux Device Drivers'],
|
||||
'Real-Time OS': ['Real-Time Operating Systems'],
|
||||
'Interfaces & Protocols': ['Interfaces, Protocols & Communication Technologies'],
|
||||
Basic: ['Basic Protocols'],
|
||||
'High-Speed': ['High-Speed Protocols'],
|
||||
Wireless: ['Wireless Protocols'],
|
||||
Industrial: ['Industrial Protocols'],
|
||||
Automotive: ['Automotive Protocols'],
|
||||
Network: ['Network Protocols / Socket Programming'],
|
||||
'TCP/IP': ['Network Protocols / Socket Programming'],
|
||||
UDP: ['Network Protocols / Socket Programming'],
|
||||
Cellular: ['Cellular Communication'],
|
||||
MQTT: ['CoAP & MQTT'],
|
||||
CoAP: ['CoAP & MQTT'],
|
||||
'LTE-M / 5G': ['LTE-M & NB-IoT'],
|
||||
'NB-IoT': ['LTE-M & NB-IoT'],
|
||||
'Basic Math & Calculus': ['Basic Calculus'],
|
||||
'SDLC Models': ['Software Development Life Cycle (SDLC) Models'],
|
||||
'Version Control': ['Version Control Systems'],
|
||||
AUTOSAR: ['AUTOSAR Architecture'],
|
||||
// Drawn on the map but without their own README section: open the protocol family instead.
|
||||
Profinet: ['Industrial Protocols'],
|
||||
LIN: ['Automotive Protocols'],
|
||||
MOST: ['Automotive Protocols'],
|
||||
FlexRay: ['Automotive Protocols'],
|
||||
UWB: ['Wireless Protocols'],
|
||||
};
|
||||
|
||||
export const AREA_ORDER = ['SOFTWARE', 'HARDWARE', 'SOFT SKILLS'];
|
||||
export const IMPORTANCE_LEVELS = ['required', 'recommended', 'possible'];
|
||||
const RANK = { required: 3, recommended: 2, possible: 1 };
|
||||
@@ -60,13 +26,12 @@ function topicIndex(topics) {
|
||||
|
||||
export function linkDiagram(map, data) {
|
||||
const index = topicIndex(data.topics);
|
||||
const softSkills = data.topics.find((t) => t.depth === 1 && key(t.title) === 'soft skills');
|
||||
const resolve = (text, areas = []) => {
|
||||
if (ALIASES[text]) return ALIASES[text].map((title) => index.get(key(title))).filter(Boolean);
|
||||
// map.json "readme": map labels whose README heading is worded differently (or has no section of its own).
|
||||
const aliases = map.readme || {};
|
||||
const resolve = (text) => {
|
||||
if (Object.hasOwn(aliases, text)) return [aliases[text]].flat().map((title) => index.get(key(title))).filter(Boolean);
|
||||
const topic = index.get(key(text));
|
||||
if (topic) return [topic];
|
||||
if (softSkills && areas.includes('SOFT SKILLS')) return [softSkills];
|
||||
return [];
|
||||
return topic ? [topic] : [];
|
||||
};
|
||||
|
||||
// A cluster's areas are those of the band it sits in; a group's are the areas all its clusters share.
|
||||
@@ -81,7 +46,7 @@ export function linkDiagram(map, data) {
|
||||
for (const [text, importance] of spec.topics) boxes.push({ text, importance, areas: band.areas, cluster, header: false });
|
||||
}
|
||||
}
|
||||
boxes.forEach((b, i) => Object.assign(b, { id: `box-${i}`, topics: resolve(b.text, b.areas) }));
|
||||
boxes.forEach((b, i) => Object.assign(b, { id: `box-${i}`, topics: resolve(b.text) }));
|
||||
const regions = Object.entries(map.groups).map(([name, clusters]) => {
|
||||
const areas = AREA_ORDER.filter((a) => clusters.every((c) => (clusterAreas.get(c) || []).includes(a)));
|
||||
return { name, clusters, areas, topics: resolve(name) };
|
||||
@@ -106,8 +71,18 @@ export function linkDiagram(map, data) {
|
||||
for (const area of region.areas) if (!t.areas.includes(area)) t.areas.push(area);
|
||||
}
|
||||
}
|
||||
// Subtopics that are not drawn in the diagram inherit the areas of their closest drawn ancestor.
|
||||
// Subtopics that are not drawn in the diagram inherit the areas of their closest drawn ancestor;
|
||||
// a topic that is not drawn itself but has drawn subtopics (Soft Skills) takes theirs.
|
||||
const fromChildren = new Map();
|
||||
for (const t of data.topics) {
|
||||
if (!t.areas.length) continue;
|
||||
for (let p = t.parent; p; p = p.parent) {
|
||||
if (!fromChildren.has(p)) fromChildren.set(p, new Set());
|
||||
for (const area of t.areas) fromChildren.get(p).add(area);
|
||||
}
|
||||
}
|
||||
for (const t of data.topics) {
|
||||
if (!t.areas.length && fromChildren.has(t)) t.areas = [...fromChildren.get(t)];
|
||||
if (!t.areas.length) for (let p = t.parent; p && !t.areas.length; p = p.parent) t.areas = [...(p.areas || [])];
|
||||
t.areas.sort((a, b) => AREA_ORDER.indexOf(a) - AREA_ORDER.indexOf(b));
|
||||
}
|
||||
@@ -166,6 +141,10 @@ export function linkDiagram(map, data) {
|
||||
connections: [...pairs.values()],
|
||||
unmatched: boxes.filter((b) => !b.header && !b.topics.length).map((b) => b.text),
|
||||
invalidLinks,
|
||||
invalid: boxes.filter((b) => !b.header && !IMPORTANCE_LEVELS.includes(b.importance)).map((b) => `${b.text}: ${b.importance}`),
|
||||
invalidReadme: Object.entries(aliases).flatMap(([label, titles]) => {
|
||||
const onMap = boxes.some((b) => b.text === label) || label in map.groups;
|
||||
const missing = [titles].flat().filter((title) => !index.has(key(title)));
|
||||
return onMap && !missing.length ? [] : [`${label} -> ${[titles].flat().join(' + ')}`];
|
||||
}), invalid: boxes.filter((b) => !b.header && !IMPORTANCE_LEVELS.includes(b.importance)).map((b) => `${b.text}: ${b.importance}`),
|
||||
};
|
||||
}
|
||||
@@ -2,14 +2,15 @@
|
||||
|
||||
export const SVG_NS = 'http://www.w3.org/2000/svg';
|
||||
|
||||
// The roadmap's name; also the README's top heading.
|
||||
export const TITLE = 'Embedded Systems Engineering Roadmap';
|
||||
|
||||
export const plural = (n, word) => `${n} ${word}${n === 1 ? '' : 's'}`;
|
||||
|
||||
export const CREDITS = {
|
||||
author: 'Meysam Parvizi',
|
||||
authorUrl: 'https://github.com/m3y54m',
|
||||
repo: 'github.com/m3y54m/Embedded-Engineering-Roadmap',
|
||||
license: 'CC BY-SA 4.0',
|
||||
licenseName: 'Creative Commons Attribution-ShareAlike 4.0 International License',
|
||||
licenseUrl: 'https://creativecommons.org/licenses/by-sa/4.0/',
|
||||
};
|
||||
|
||||
@@ -46,7 +47,7 @@ export const AREAS = {
|
||||
export const IMPORTANCE = {
|
||||
required: 'Required',
|
||||
recommended: 'Recommended',
|
||||
possible: 'Possibility',
|
||||
possible: 'Optional',
|
||||
};
|
||||
|
||||
export const areaClass = (area) => (AREAS[area] ? AREAS[area].cls : 'xx');
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' data:; connect-src 'self' https://raw.githubusercontent.com; base-uri 'none'; form-action 'none'; object-src 'none'">
|
||||
<title>Embedded Engineering Roadmap · Explorer</title>
|
||||
<title>Embedded Systems Engineering Roadmap · Explorer</title>
|
||||
<meta name="description" content="Interactive map of the Embedded Systems Engineering Roadmap: explore topics, how they connect, and their learning resources.">
|
||||
<link rel="icon" href="assets/logo.svg" type="image/svg+xml">
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
@@ -17,7 +17,7 @@
|
||||
<a class="brand" href="#/" aria-label="Roadmap overview">
|
||||
<img class="brand-mark" src="assets/logo.svg" alt="" width="36" height="36">
|
||||
<span class="brand-text">
|
||||
<strong>Embedded Engineering Roadmap</strong>
|
||||
<strong id="brand-title"></strong>
|
||||
<span>Interactive explorer</span>
|
||||
</span>
|
||||
</a>
|
||||
@@ -38,12 +38,15 @@
|
||||
<button type="button" id="print" class="icon-btn" aria-label="Print or save the roadmap as PDF" title="Print or save as PDF (A4)">
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M7 9V3h10v6M7 17H5a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2M7 14h10v7H7z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"/></svg>
|
||||
</button>
|
||||
<a class="icon-btn text-btn" href="Embedded-Engineering-Roadmap.pdf" download data-download hidden title="Download the roadmap as PDF (A4)">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19h14" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>PDF
|
||||
</a>
|
||||
<a class="icon-btn text-btn" href="Embedded-Engineering-Roadmap.png" download data-download hidden title="Download the roadmap as PNG image">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19h14" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>PNG
|
||||
</a>
|
||||
<details class="download-menu" id="download" hidden>
|
||||
<summary class="icon-btn" aria-label="Download the roadmap" title="Download the roadmap">
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19h14" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
</summary>
|
||||
<div class="download-panel">
|
||||
<a class="download-item" href="Embedded-Engineering-Roadmap.pdf" download data-download hidden><b>PDF</b><span>A4, for printing</span></a>
|
||||
<a class="download-item" href="Embedded-Engineering-Roadmap.png" download data-download hidden><b>PNG</b><span>Image</span></a>
|
||||
</div>
|
||||
</details>
|
||||
<button type="button" id="theme" class="icon-btn" aria-label="Switch color theme" title="Switch color theme">
|
||||
<svg viewBox="0 0 24 24" width="18" height="18" aria-hidden="true"><path d="M12 3a9 9 0 1 0 9 9A7 7 0 0 1 12 3Z" fill="currentColor"/></svg>
|
||||
</button>
|
||||
@@ -9,7 +9,7 @@ export const SPACE = 10;
|
||||
const COL = 170;
|
||||
const GUTTER = 26;
|
||||
const LEFT = 86;
|
||||
const TOP = 168;
|
||||
const TOP = 148;
|
||||
const BOX_H = 26;
|
||||
const BOX_H2 = 42;
|
||||
const HEAD_H = 20;
|
||||
@@ -29,6 +29,7 @@ const spanW = (n) => n * COL + (n - 1) * GUTTER;
|
||||
export const PLACED = [
|
||||
'languages', 'fundamentals', 'debugging', 'sdlc', 'vcs', 'build', 'testing', 'specialized', 'osBase', 'linux',
|
||||
'rtos', 'mcu', 'bridge', 'basic', 'wireless', 'highSpeed', 'industrial', 'cellular', 'network', 'automotive',
|
||||
'display',
|
||||
'electronics', 'equipment', 'prototyping', 'fpga', 'soft',
|
||||
];
|
||||
|
||||
@@ -106,7 +107,7 @@ export function buildLayout(plan) {
|
||||
const ifBottom = Math.max(
|
||||
stack(['basic', 'wireless'], sub[0], ifContent, subW),
|
||||
stack(['highSpeed', 'industrial', 'cellular'], sub[1], ifContent, subW),
|
||||
stack(['network', 'automotive'], sub[2], ifContent, subW),
|
||||
stack(['network', 'automotive', 'display'], sub[2], ifContent, subW),
|
||||
);
|
||||
const interfaces = { x: c[2] - SPACE, y: groupTop, w: wide + 2 * SPACE, h: ifBottom + SPACE - groupTop };
|
||||
const bridgeBottom = add(place(clusters.bridge, c[4], groupTop, COL));
|
||||
@@ -142,7 +143,8 @@ export function buildLayout(plan) {
|
||||
return {
|
||||
width: PAGE_WIDTH,
|
||||
height: footer.y + footer.h + 16,
|
||||
titleY: 58,
|
||||
// Baseline that puts the title's cap tops 24 from the page edge, the same as its left margin.
|
||||
titleY: 49,
|
||||
footer,
|
||||
areas: {
|
||||
SOFTWARE: { x: areaX, y: swTop, w: areaW, h: crossBottom - swTop },
|
||||
+247
-96
@@ -9,38 +9,23 @@
|
||||
|
||||
.map-top {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
padding: 12px 16px 10px;
|
||||
z-index: 3;
|
||||
padding: 8px 16px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.start-strip,
|
||||
.map-toolbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.start-strip > *,
|
||||
.map-toolbar > * {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.map-toolbar-label {
|
||||
min-width: 74px;
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.start-chip,
|
||||
.map-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
@@ -57,7 +42,6 @@
|
||||
transition: background 0.15s, border-color 0.15s;
|
||||
}
|
||||
|
||||
.start-chip:hover,
|
||||
.map-chip:hover {
|
||||
border-color: var(--accent);
|
||||
background: var(--chip-hover);
|
||||
@@ -75,16 +59,100 @@
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
.map-chip.clear {
|
||||
border-style: dashed;
|
||||
background: transparent;
|
||||
.filter-pill {
|
||||
border-color: var(--accent);
|
||||
background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
|
||||
}
|
||||
|
||||
.map-toolbar-sep {
|
||||
width: 1px;
|
||||
height: 22px;
|
||||
margin: 0 4px;
|
||||
background: var(--border-strong);
|
||||
.pill-x {
|
||||
margin-right: -3px;
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.filter-pill:hover .pill-x {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.map-menu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.menu-button {
|
||||
list-style: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.menu-button::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu-button::after {
|
||||
content: "";
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
margin: -3px 2px 0 2px;
|
||||
border-right: 2px solid currentColor;
|
||||
border-bottom: 2px solid currentColor;
|
||||
transform: rotate(45deg);
|
||||
transition: transform 0.15s;
|
||||
}
|
||||
|
||||
.map-menu[open] > .menu-button::after {
|
||||
margin-top: 3px;
|
||||
transform: rotate(-135deg);
|
||||
}
|
||||
|
||||
.map-menu[open] > .menu-button {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.map-menu-panel {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
left: 0;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
width: max-content;
|
||||
max-width: min(440px, calc(100vw - 24px));
|
||||
max-height: min(70vh, 520px);
|
||||
overflow-y: auto;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--surface-solid);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
min-width: 260px;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 7px 10px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: var(--text);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menu-item:hover,
|
||||
.menu-item:focus-visible {
|
||||
background: var(--chip-hover);
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
width: 1.4em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.map-summary {
|
||||
@@ -93,22 +161,6 @@
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.dot.both {
|
||||
background: linear-gradient(90deg, var(--sw) 50%, var(--hw) 50%);
|
||||
}
|
||||
|
||||
.imp-swatch {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 11px;
|
||||
border: 1px solid var(--box-edge);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.imp-swatch.required { background: var(--imp-required); }
|
||||
.imp-swatch.recommended { background: var(--imp-recommended); }
|
||||
.imp-swatch.possible { background: var(--imp-possible); border-color: var(--border-strong); }
|
||||
|
||||
.map-canvas {
|
||||
position: relative;
|
||||
min-height: 0;
|
||||
@@ -139,27 +191,78 @@
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
@media not print {
|
||||
.page-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.legend-text {
|
||||
fill: var(--text);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.legend-note {
|
||||
.legend-caption {
|
||||
fill: var(--muted);
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.legend-info circle:first-child {
|
||||
fill: none;
|
||||
stroke: var(--muted);
|
||||
stroke-width: 1.4;
|
||||
}
|
||||
|
||||
.legend-info path {
|
||||
fill: none;
|
||||
stroke: var(--muted);
|
||||
stroke-width: 1.6;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
.legend-info-dot {
|
||||
fill: var(--muted);
|
||||
stroke: var(--muted);
|
||||
stroke-width: 1.2;
|
||||
}
|
||||
|
||||
.legend-imp { stroke: var(--box-edge); stroke-width: 1; }
|
||||
.legend-imp.required { fill: var(--imp-required); }
|
||||
.legend-imp.recommended { fill: var(--imp-recommended); }
|
||||
.legend-imp.possible { fill: var(--imp-possible); stroke: var(--border-strong); }
|
||||
.legend-area { fill: none; stroke-width: 2.5; }
|
||||
.legend-area.sw { stroke: var(--sw); }
|
||||
.legend-area.hw { stroke: var(--hw); }
|
||||
.legend-area.ss { stroke: var(--ss); }
|
||||
.legend-hatch { fill: url(#cross-hatch); stroke: var(--border-strong); }
|
||||
|
||||
.legend-hit {
|
||||
fill: transparent;
|
||||
}
|
||||
|
||||
/* On screen the legend is the filter: each entry toggles a highlight. */
|
||||
@media not print {
|
||||
.legend-item {
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.legend-item:hover .legend-hit {
|
||||
fill: var(--chip-hover);
|
||||
}
|
||||
|
||||
.legend-item:focus-visible .legend-hit {
|
||||
stroke: var(--accent);
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.legend-item[aria-pressed="true"] .legend-hit {
|
||||
fill: color-mix(in srgb, var(--accent) 16%, transparent);
|
||||
stroke: var(--accent);
|
||||
stroke-width: 1.5;
|
||||
}
|
||||
|
||||
.page-legend.filtering .legend-item:not([aria-pressed="true"]) {
|
||||
opacity: 0.45;
|
||||
}
|
||||
}
|
||||
|
||||
.area-fill {
|
||||
stroke: none;
|
||||
@@ -275,14 +378,19 @@
|
||||
stroke-width: 2.2;
|
||||
}
|
||||
|
||||
.box.header.target:hover .header-text,
|
||||
.box.header.lit .header-text,
|
||||
.group-tag.target:hover .tag-text {
|
||||
text-decoration: underline;
|
||||
.header-bg {
|
||||
fill: transparent;
|
||||
transition: fill 0.15s;
|
||||
}
|
||||
|
||||
.box.header.target:hover .header-bg,
|
||||
.box.header.selected .header-bg {
|
||||
fill: color-mix(in srgb, var(--accent) 14%, transparent);
|
||||
}
|
||||
|
||||
.group-tag.target:hover .tag-bg {
|
||||
fill: var(--chip-hover);
|
||||
fill: color-mix(in srgb, var(--surface-solid) 85%, var(--accent));
|
||||
stroke-width: 3;
|
||||
}
|
||||
|
||||
.box.selected .box-bg {
|
||||
@@ -290,19 +398,15 @@
|
||||
stroke-width: 3;
|
||||
}
|
||||
|
||||
.box.header.selected .header-text {
|
||||
fill: var(--accent);
|
||||
}
|
||||
|
||||
.box.target:focus-visible .box-bg,
|
||||
.group-tag.target:focus-visible .tag-bg {
|
||||
stroke: var(--accent);
|
||||
stroke-width: 3.5;
|
||||
}
|
||||
|
||||
.box.header.target:focus-visible .header-text {
|
||||
fill: var(--accent);
|
||||
text-decoration: underline;
|
||||
.box.header.target:focus-visible .header-bg {
|
||||
stroke: var(--accent);
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.layer-boxes .box {
|
||||
@@ -383,62 +487,101 @@
|
||||
}
|
||||
|
||||
.zoom-controls {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
bottom: 16px;
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 14px;
|
||||
background: var(--surface);
|
||||
backdrop-filter: blur(10px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
margin-left: auto;
|
||||
padding: 1px;
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: 999px;
|
||||
background: var(--surface-2);
|
||||
}
|
||||
|
||||
.zoom-controls .icon-btn {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
font-size: 18px;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.zoom-controls .icon-btn:hover {
|
||||
background: var(--chip-hover);
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
display: block;
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 2;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.zoom-level {
|
||||
min-width: 40px;
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.map-top {
|
||||
padding: 8px 10px;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
/* One swipeable row per strip; the fade at the right edge shows there is more. */
|
||||
.start-strip,
|
||||
.map-toolbar {
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
padding-right: 28px;
|
||||
mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.start-strip::-webkit-scrollbar,
|
||||
.map-toolbar::-webkit-scrollbar {
|
||||
.map-summary {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.start-chip,
|
||||
.map-chip,
|
||||
.map-toolbar-label,
|
||||
.map-summary {
|
||||
flex: none;
|
||||
/* Panels span the bar instead of hanging off their button, so they stay on screen. */
|
||||
.map-menu {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.zoom-controls {
|
||||
bottom: 12px;
|
||||
right: 12px;
|
||||
.map-menu-panel {
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
width: auto;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Phones pinch to zoom, so the bar keeps only the fit button. */
|
||||
@media (max-width: 600px) {
|
||||
.map-top {
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.map-toolbar {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.map-toolbar .map-chip {
|
||||
padding: 4px 9px;
|
||||
}
|
||||
|
||||
.zoom-controls .zoom-step,
|
||||
.zoom-level,
|
||||
.map-chip .label-long {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 601px) {
|
||||
.map-chip .label-short {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,6 +593,14 @@
|
||||
}
|
||||
|
||||
@media print {
|
||||
/* Print the final colors, not a frame of the screen-to-print color transition. */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
transition: none !important;
|
||||
animation: none !important;
|
||||
}
|
||||
|
||||
html[data-theme] {
|
||||
color-scheme: light;
|
||||
--bg: #ffffff;
|
||||
@@ -198,6 +198,14 @@
|
||||
["MOST", "possible"],
|
||||
["FlexRay", "possible"]
|
||||
]
|
||||
},
|
||||
"display": {
|
||||
"header": "Display & Camera",
|
||||
"per": 2,
|
||||
"topics": [
|
||||
["MIPI CSI-2", "possible"],
|
||||
["MIPI DSI", "possible"]
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -450,6 +458,13 @@
|
||||
["CAN", "Oscilloscope", "Check the differential signal and bus termination"],
|
||||
["MOST", "CAN", "MOST carries media in a vehicle while CAN carries control"],
|
||||
["MOST", "Ethernet", "Automotive Ethernet is replacing MOST"],
|
||||
["MIPI CSI-2", "MIPI DSI", "Camera and display links share the MIPI D-PHY physical layer"],
|
||||
["MIPI CSI-2", "I2C", "Camera sensors are configured over a control bus such as I2C"],
|
||||
["MIPI CSI-2", "Device Drivers", "Linux exposes camera sensors through V4L2 drivers"],
|
||||
["MIPI CSI-2", "Edge AI", "Camera frames are the main input for on-device vision models"],
|
||||
["MIPI DSI", "Device Drivers", "Linux drives DSI panels through the DRM/KMS subsystem"],
|
||||
["MIPI DSI", "Embedded GUI", "The display link carries the interface the GUI renders"],
|
||||
["MIPI DSI", "DMA", "Frame buffers are streamed to the display with DMA"],
|
||||
|
||||
["Basic Math & Calculus", "Principles of Electric Circuits", "Circuit analysis uses algebra and calculus"],
|
||||
["Principles of Electric Circuits", "Electronics Fundamentals", "Components build on circuit laws"],
|
||||
@@ -471,6 +486,34 @@
|
||||
"groups": {
|
||||
"Operating Systems": ["osBase", "linux", "rtos"],
|
||||
"Microcontrollers": ["rtos", "mcu"],
|
||||
"Interfaces & Protocols": ["basic", "wireless", "highSpeed", "industrial", "cellular", "network", "automotive"]
|
||||
"Interfaces & Protocols": ["basic", "wireless", "highSpeed", "industrial", "cellular", "network", "automotive", "display"]
|
||||
},
|
||||
"offMap": ["Don't Know Where to Start!"],
|
||||
"readme": {
|
||||
"ADC / DAC": ["ADC", "DAC"],
|
||||
"Buildroot / Yocto": ["Buildroot", "Yocto"],
|
||||
"TDD & Unit Testing": ["Test Driven Development (TDD)", "Unit Testing"],
|
||||
"Threading / Parallelism": ["Multithreading & Parallel Processing"],
|
||||
"Device Drivers": ["Linux Device Drivers"],
|
||||
"Real-Time OS": ["Real-Time Operating Systems"],
|
||||
"Interfaces & Protocols": ["Interfaces, Protocols & Communication Technologies"],
|
||||
"Basic": ["Basic Protocols"],
|
||||
"High-Speed": ["High-Speed Protocols"],
|
||||
"Wireless": ["Wireless Protocols"],
|
||||
"Industrial": ["Industrial Protocols"],
|
||||
"Automotive": ["Automotive Protocols"],
|
||||
"Display & Camera": ["Display & Camera Protocols"],
|
||||
"Network": ["Network Protocols / Socket Programming"],
|
||||
"TCP/IP": ["Network Protocols / Socket Programming"],
|
||||
"UDP": ["Network Protocols / Socket Programming"],
|
||||
"Cellular": ["Cellular Communication"],
|
||||
"MQTT": ["CoAP & MQTT"],
|
||||
"CoAP": ["CoAP & MQTT"],
|
||||
"LTE-M / 5G": ["LTE-M & NB-IoT"],
|
||||
"NB-IoT": ["LTE-M & NB-IoT"],
|
||||
"Basic Math & Calculus": ["Basic Calculus"],
|
||||
"SDLC Models": ["Software Development Life Cycle (SDLC) Models"],
|
||||
"Version Control": ["Version Control Systems"],
|
||||
"AUTOSAR": ["AUTOSAR Architecture"]
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
// Interactive roadmap diagram: Software / Hardware / Soft skills areas with their cross-sections,
|
||||
// importance colors, filters and connections between topics. Laid out by layout.js to fit A4.
|
||||
import { AREAS, CREDITS, GITHUB_MARK, IMPORTANCE, areaDots, areaLabel, h, plural, svg } from './dom.js';
|
||||
// priority colors, filters and connections between topics. Laid out by layout.js to fit A4.
|
||||
import { CREDITS, GITHUB_MARK, IMPORTANCE, TITLE, areaDots, areaLabel, h, plural, svg } from './dom.js';
|
||||
import { SPACE, buildLayout } from './layout.js';
|
||||
|
||||
const MIN_ZOOM = 0.6;
|
||||
const MAX_ZOOM = 6;
|
||||
const AREA_RADIUS = 18;
|
||||
|
||||
function intersect(a, b) {
|
||||
const x = Math.max(a.x, b.x);
|
||||
@@ -34,44 +35,77 @@ function splitInTwo(text) {
|
||||
|
||||
export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
const layout = buildLayout(plan);
|
||||
const state = { selected: null, hover: null, areas: new Set(), importance: new Set(), showAll: false, view: null, drag: null };
|
||||
const state = { selected: null, hover: null, importance: new Set(), showAll: false, view: null, drag: null };
|
||||
const boxEls = new Map();
|
||||
const rectOf = new Map();
|
||||
const legendParts = [];
|
||||
|
||||
// ---------- toolbar ----------
|
||||
const chip = (label, cls, pressed, onclick, title) => h('button', {
|
||||
type: 'button', class: `map-chip ${cls}`, 'aria-pressed': String(pressed), onclick, title,
|
||||
// One slim row above the map: a menu of getting-started topics, the active filter and the connections toggle.
|
||||
// Filters are set by clicking the legend at the top of the map.
|
||||
const chip = (label, cls, onclick, title) => h('button', {
|
||||
type: 'button', class: `map-chip ${cls}`, 'aria-pressed': 'false', onclick, title,
|
||||
}, label);
|
||||
const toolbar = h('div', { class: 'map-toolbar', role: 'toolbar', 'aria-label': 'Highlight topics' });
|
||||
const menus = [];
|
||||
function menu(cls, label, ...panel) {
|
||||
const button = h('summary', { class: `map-chip menu-button ${cls}` }, label);
|
||||
const el = h('details', { class: 'map-menu' }, button, h('div', { class: `map-menu-panel ${cls}` }, panel));
|
||||
el.addEventListener('toggle', () => {
|
||||
if (el.open) for (const other of menus) if (other !== el) other.open = false;
|
||||
});
|
||||
el.addEventListener('keydown', (e) => {
|
||||
if (e.key !== 'Escape' || !el.open) return;
|
||||
e.stopPropagation();
|
||||
el.open = false;
|
||||
button.focus();
|
||||
});
|
||||
menus.push(el);
|
||||
return { el, button };
|
||||
}
|
||||
document.addEventListener('pointerdown', (e) => {
|
||||
for (const m of menus) if (m.open && !m.contains(e.target)) m.open = false;
|
||||
});
|
||||
|
||||
// README topics that the diagram does not cover.
|
||||
const extra = data.root.children.filter((t) => !t.areas.length);
|
||||
const start = menu('start', 'Start here',
|
||||
h('nav', { class: 'menu-list', 'aria-label': 'Getting started topics' }, extra.map((t) => h('button', {
|
||||
type: 'button',
|
||||
class: 'menu-item',
|
||||
onclick: () => {
|
||||
start.el.open = false;
|
||||
onSelect(t);
|
||||
},
|
||||
}, h('span', { class: 'menu-icon', 'aria-hidden': 'true' }, t.icon || '•'), t.title))));
|
||||
|
||||
const clearFilters = () => {
|
||||
state.importance.clear();
|
||||
refresh();
|
||||
};
|
||||
const filterLabel = h('span');
|
||||
const filterPill = h('button', {
|
||||
type: 'button',
|
||||
class: 'map-chip filter-pill',
|
||||
title: 'Clear the highlight',
|
||||
'aria-label': 'Clear the highlight',
|
||||
hidden: true,
|
||||
onclick: clearFilters,
|
||||
}, filterLabel, h('span', { class: 'pill-x', 'aria-hidden': 'true' }, '✕'));
|
||||
const linksChip = chip([h('span', { class: 'label-long' }, 'All connections'), h('span', { class: 'label-short' }, 'Links')], 'links', () => {
|
||||
state.showAll = !state.showAll;
|
||||
refresh();
|
||||
}, 'Show the lines between all related topics');
|
||||
const summary = h('span', { class: 'map-summary', role: 'status' });
|
||||
const toolbar = h('div', { class: 'map-toolbar', role: 'toolbar', 'aria-label': 'Map controls' },
|
||||
start.el, linksChip, filterPill, summary);
|
||||
|
||||
function renderToolbar() {
|
||||
const cross = state.areas.size === 2 && state.areas.has('SOFTWARE') && state.areas.has('HARDWARE');
|
||||
toolbar.replaceChildren(...[
|
||||
h('span', { class: 'map-toolbar-label' }, 'Highlight'),
|
||||
Object.entries(AREAS).map(([area, info]) => chip(h('span', {}, h('i', { class: `dot ${info.cls}` }), info.label),
|
||||
'', state.areas.has(area) && !cross, () => {
|
||||
state.areas = state.areas.has(area) && !cross ? new Set() : new Set([area]);
|
||||
refresh();
|
||||
}, `Topics in ${info.label}`)),
|
||||
chip(h('span', {}, h('i', { class: 'dot both' }), 'Software ∩ Hardware'), 'cross', cross, () => {
|
||||
state.areas = cross ? new Set() : new Set(['SOFTWARE', 'HARDWARE']);
|
||||
refresh();
|
||||
}, 'Topics that belong to both Software and Hardware'),
|
||||
h('span', { class: 'map-toolbar-sep', 'aria-hidden': 'true' }),
|
||||
Object.entries(IMPORTANCE).map(([level, label]) => chip(h('span', {}, h('i', { class: `imp-swatch ${level}` }), label),
|
||||
'', state.importance.has(level), () => toggle(state.importance, level))),
|
||||
h('span', { class: 'map-toolbar-sep', 'aria-hidden': 'true' }),
|
||||
chip('Show all connections', 'links', state.showAll, () => { state.showAll = !state.showAll; refresh(); },
|
||||
'Lines between topics that share resources or mention each other'),
|
||||
state.areas.size || state.importance.size ? chip('Clear', 'clear', false, () => {
|
||||
state.areas.clear();
|
||||
state.importance.clear();
|
||||
refresh();
|
||||
}) : null,
|
||||
summary,
|
||||
].flat().filter(Boolean));
|
||||
linksChip.setAttribute('aria-pressed', String(state.showAll));
|
||||
const names = Object.keys(IMPORTANCE).filter((l) => state.importance.has(l)).map((l) => IMPORTANCE[l]);
|
||||
filterLabel.textContent = names.join(' · ');
|
||||
filterPill.hidden = !names.length;
|
||||
for (const part of legendParts) part.g.setAttribute('aria-pressed', String(part.pressed()));
|
||||
legend.classList.toggle('filtering', names.length > 0);
|
||||
}
|
||||
|
||||
function toggle(set, value) {
|
||||
@@ -80,13 +114,6 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
refresh();
|
||||
}
|
||||
|
||||
// README topics that the diagram does not cover.
|
||||
const extra = data.root.children.filter((t) => !t.areas.length);
|
||||
const strip = h('nav', { class: 'start-strip', 'aria-label': 'Getting started topics' },
|
||||
h('span', { class: 'map-toolbar-label' }, 'Start here'),
|
||||
extra.map((t) => h('button', { type: 'button', class: 'start-chip', onclick: () => onSelect(t) },
|
||||
t.icon ? h('span', { 'aria-hidden': 'true' }, t.icon) : null, t.title)));
|
||||
|
||||
// ---------- svg ----------
|
||||
const chart = svg('svg', {
|
||||
class: 'diagram',
|
||||
@@ -106,48 +133,73 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
|
||||
rect({ x: 0, y: 0, w: layout.width, h: layout.height }, { class: 'page-bg' }, layers.page);
|
||||
|
||||
// Title and legend, so the diagram also stands on its own when printed.
|
||||
// Title, then one legend row (priority keys, then an info icon and caption), so the diagram also stands on its own when printed.
|
||||
// On screen the header already names the roadmap, so the title only appears in print, PDF and PNG.
|
||||
const legendY = layout.titleY + 22;
|
||||
// On screen the view starts just above the legend row, close to the toolbar.
|
||||
const screenTop = legendY - 17;
|
||||
const title = svg('text', { x: 24, y: layout.titleY, class: 'page-title' }, layers.labels);
|
||||
title.textContent = 'Embedded Systems Engineering Roadmap';
|
||||
title.textContent = TITLE;
|
||||
const legend = svg('g', { class: 'page-legend' }, layers.labels);
|
||||
const legendItems = [
|
||||
...Object.entries(IMPORTANCE).map(([level, label]) => ({ kind: 'imp', cls: level, label })),
|
||||
{ kind: 'area', cls: 'sw', label: 'Software' },
|
||||
{ kind: 'area', cls: 'hw', label: 'Hardware' },
|
||||
{ kind: 'hatch', cls: '', label: 'Software ∩ Hardware' },
|
||||
{ kind: 'area', cls: 'ss', label: 'Soft skills' },
|
||||
];
|
||||
for (const item of legendItems) {
|
||||
const y = layout.titleY + 22;
|
||||
const cls = item.kind === 'imp' ? `legend-imp ${item.cls}` : item.kind === 'area' ? `legend-area ${item.cls}` : 'legend-hatch';
|
||||
const key = rect({ x: 0, y, w: 22, h: 13 }, { rx: item.kind === 'imp' ? 3 : 4, class: cls }, legend);
|
||||
const t = svg('text', { x: 0, y: y + 11, class: 'legend-text' }, legend);
|
||||
t.textContent = item.label;
|
||||
legendParts.push({ key, t, label: item.label });
|
||||
const info = svg('g', { class: 'legend-info' }, legend);
|
||||
svg('circle', { cx: 7.5, cy: legendY + 6.5, r: 7.5 }, info);
|
||||
svg('path', { d: `M7.5 ${legendY + 6} v4.2` }, info);
|
||||
svg('circle', { cx: 7.5, cy: legendY + 3.2, r: 0.6, class: 'legend-info-dot' }, info);
|
||||
const caption = svg('text', { x: 0, y: legendY + 11, class: 'legend-caption' }, legend);
|
||||
caption.textContent = 'A general guide: priorities vary with your specialty and role';
|
||||
// Areas need no legend: their regions are labeled in the margin. On screen each entry is also a filter button.
|
||||
for (const [level, label] of Object.entries(IMPORTANCE)) {
|
||||
const y = legendY;
|
||||
const pressed = () => state.importance.has(level);
|
||||
const act = () => toggle(state.importance, level);
|
||||
const g = svg('g', {
|
||||
class: 'legend-item', role: 'button', tabindex: '0', 'aria-pressed': 'false', 'aria-label': `Highlight ${label} topics`,
|
||||
}, legend);
|
||||
svg('title', {}, g).textContent = `Highlight ${label} topics`;
|
||||
const hit = rect({ x: 0, y: y - 5, w: 0, h: 23 }, { rx: 6, class: 'legend-hit' }, g);
|
||||
const key = rect({ x: 0, y, w: 22, h: 13 }, { rx: 3, class: `legend-imp ${level}` }, g);
|
||||
const t = svg('text', { x: 0, y: y + 11, class: 'legend-text' }, g);
|
||||
t.textContent = label;
|
||||
g.addEventListener('click', () => {
|
||||
// A drag that starts on the legend pans the map; it must not also filter.
|
||||
if (state.drag && state.drag.moved) return;
|
||||
act();
|
||||
});
|
||||
g.addEventListener('keydown', (e) => {
|
||||
if (e.key !== 'Enter' && e.key !== ' ') return;
|
||||
e.preventDefault();
|
||||
act();
|
||||
});
|
||||
legendParts.push({ g, hit, key, t, label, pressed });
|
||||
}
|
||||
|
||||
function layoutLegend() {
|
||||
let x = 26;
|
||||
for (const part of legendParts) {
|
||||
const width = 28 + ((part.t.getComputedTextLength && part.t.getComputedTextLength()) || part.label.length * 6.5);
|
||||
part.key.setAttribute('x', x);
|
||||
part.t.setAttribute('x', x + 28);
|
||||
x += 28 + ((part.t.getComputedTextLength && part.t.getComputedTextLength()) || part.label.length * 6.5) + 20;
|
||||
part.hit.setAttribute('x', x - 6);
|
||||
part.hit.setAttribute('width', width + 12);
|
||||
x += width + 20;
|
||||
}
|
||||
// The caption follows the keys, set apart by a wider gap.
|
||||
x += 16;
|
||||
info.setAttribute('transform', `translate(${x.toFixed(1)} 0)`);
|
||||
caption.setAttribute('x', (x + 22).toFixed(1));
|
||||
}
|
||||
const note = svg('text', { x: 24, y: layout.titleY + 54, class: 'legend-note' }, layers.labels);
|
||||
note.textContent = 'Colors show the average importance of each skill for an embedded systems engineer.';
|
||||
|
||||
// Areas and their cross-sections.
|
||||
const sw = layout.areas.SOFTWARE;
|
||||
const hw = layout.areas.HARDWARE;
|
||||
const ss = layout.areas['SOFT SKILLS'];
|
||||
rect(sw, { rx: 28, class: 'area-fill sw' }, layers.areas);
|
||||
rect(hw, { rx: 28, class: 'area-fill hw' }, layers.areas);
|
||||
rect(ss, { rx: 28, class: 'area-fill ss' }, layers.areas);
|
||||
rect(sw, { rx: AREA_RADIUS, class: 'area-fill sw' }, layers.areas);
|
||||
rect(hw, { rx: AREA_RADIUS, class: 'area-fill hw' }, layers.areas);
|
||||
rect(ss, { rx: AREA_RADIUS, class: 'area-fill ss' }, layers.areas);
|
||||
rect(layout.cross, { class: 'overlap-fill' }, layers.overlap);
|
||||
rect(sw, { rx: 28, class: 'area-line sw' }, layers.outlines);
|
||||
rect(hw, { rx: 28, class: 'area-line hw' }, layers.outlines);
|
||||
rect(ss, { rx: 28, class: 'area-line ss' }, layers.outlines);
|
||||
rect(sw, { rx: AREA_RADIUS, class: 'area-line sw' }, layers.outlines);
|
||||
rect(hw, { rx: AREA_RADIUS, class: 'area-line hw' }, layers.outlines);
|
||||
rect(ss, { rx: AREA_RADIUS, class: 'area-line ss' }, layers.outlines);
|
||||
|
||||
// Band names run down the left margin; every band reads as one area or a cross-section.
|
||||
for (const band of layout.bands) {
|
||||
@@ -229,9 +281,10 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
const g = svg('g', { class: `box ${item.kind === 'header' ? 'header' : box.importance}`, 'data-box': box.id }, layers.boxes);
|
||||
rectOf.set(box, item);
|
||||
if (item.kind === 'header') {
|
||||
const bg = svg('rect', { class: 'header-bg', rx: 6, x: item.x - 6, y: item.y - 1, height: 24 }, g);
|
||||
const t = svg('text', { x: item.x, y: item.y + 16, class: 'box-text header-text' }, g);
|
||||
t.textContent = item.text;
|
||||
boxEls.set(box, { g, text: t, width: item.w, header: true });
|
||||
boxEls.set(box, { g, text: t, bg, x: item.x, width: item.w, header: true });
|
||||
} else {
|
||||
rect(item, { rx: 5, class: 'box-bg' }, g);
|
||||
const lines = item.h >= 36 ? splitInTwo(item.text) : [item.text];
|
||||
@@ -291,11 +344,11 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
}
|
||||
const importance = (box && box.importance) || topic.importance;
|
||||
tip.replaceChildren(...[
|
||||
h('strong', {}, topic.title),
|
||||
h('strong', {}, box ? box.text : topic.title),
|
||||
topic.areas.length ? h('div', { class: 'tip-areas' }, areaDots(topic.areas), areaLabel(topic.areas)) : null,
|
||||
h('div', { class: 'tip-meta' }, [importance ? IMPORTANCE[importance] : null, plural(topic.total, 'resource'),
|
||||
box && box.related.length ? `${box.related.length} related` : null].filter(Boolean).join(' · ')),
|
||||
h('div', { class: 'tip-hint' }, 'Click this topic to open its details'),
|
||||
h('div', { class: 'tip-hint' }, box && box.text !== topic.title ? `Click to open “${topic.title}”` : 'Click this topic to open its details'),
|
||||
].filter(Boolean));
|
||||
tip.hidden = false;
|
||||
moveTip(e);
|
||||
@@ -371,16 +424,11 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
// ---------- filters ----------
|
||||
function matches(box) {
|
||||
if (!rectOf.has(box) || boxEls.get(box).header) return false;
|
||||
for (const area of state.areas) if (!box.areas.includes(area)) return false;
|
||||
if (state.areas.size === 1 && box.areas.filter((a) => a !== 'SOFT SKILLS').length > 1 && !state.areas.has('SOFT SKILLS')) {
|
||||
// A single area means "only this area", so the cross-section stands apart.
|
||||
return false;
|
||||
}
|
||||
return !state.importance.size || state.importance.has(box.importance);
|
||||
return state.importance.has(box.importance);
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
const filtering = state.areas.size > 0 || state.importance.size > 0;
|
||||
const filtering = state.importance.size > 0;
|
||||
chart.classList.toggle('filtering', filtering);
|
||||
chart.classList.toggle('show-all', state.showAll);
|
||||
let count = 0;
|
||||
@@ -411,7 +459,7 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
const slackX = Math.max(0, page.w - v.w);
|
||||
const slackY = Math.max(0, page.h - v.h);
|
||||
v.x = slackX ? Math.min(Math.max(v.x, -40), slackX + 40) : (page.w - v.w) / 2;
|
||||
v.y = slackY ? Math.min(Math.max(v.y, -40), slackY + 40) : (page.h - v.h) / 2;
|
||||
v.y = slackY ? Math.min(Math.max(v.y, screenTop - 24), slackY + 40) : (page.h - v.h) / 2;
|
||||
state.view = v;
|
||||
chart.setAttribute('viewBox', `${v.x.toFixed(1)} ${v.y.toFixed(1)} ${v.w.toFixed(1)} ${v.h.toFixed(1)}`);
|
||||
if (size) zoomLevel.textContent = `${Math.round((size.w / v.w) * 100)}%`;
|
||||
@@ -421,7 +469,7 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
const size = canvasSize();
|
||||
const width = size ? Math.max(page.w + 40, size.w / MAX_SCALE) : page.w;
|
||||
fitMode = 'width';
|
||||
setView({ x: (page.w - width) / 2, y: -20, w: width });
|
||||
setView({ x: (page.w - width) / 2, y: screenTop, w: width });
|
||||
fitButton.title = 'Show the whole page';
|
||||
}
|
||||
|
||||
@@ -457,6 +505,41 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
setView({ x: px - (px - v.x) / factor, y: py - (py - v.y) / factor, w: v.w / factor });
|
||||
}
|
||||
|
||||
// Two fingers: zoom around their midpoint and pan with it.
|
||||
const touches = new Map();
|
||||
let pinch = null;
|
||||
const spread = () => {
|
||||
const [a, b] = [...touches.values()];
|
||||
return { dist: Math.hypot(a.x - b.x, a.y - b.y), x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 };
|
||||
};
|
||||
|
||||
function beginPinch() {
|
||||
pinch = spread();
|
||||
// The click that ends the gesture must not open a topic.
|
||||
state.drag = { moved: true, id: null };
|
||||
chart.classList.add('panning');
|
||||
hover(null);
|
||||
}
|
||||
|
||||
function movePinch() {
|
||||
if (touches.size < 2) return;
|
||||
const now = spread();
|
||||
if (pinch.dist > 0 && now.dist > 0) zoomAt(now.dist / pinch.dist, now.x, now.y);
|
||||
const unit = state.view.w / chart.getBoundingClientRect().width;
|
||||
fitMode = 'custom';
|
||||
setView({ ...state.view, x: state.view.x - (now.x - pinch.x) * unit, y: state.view.y - (now.y - pinch.y) * unit });
|
||||
pinch = now;
|
||||
}
|
||||
|
||||
function endTouch(e) {
|
||||
if (!touches.delete(e.pointerId)) return;
|
||||
if (pinch && touches.size < 2) {
|
||||
pinch = null;
|
||||
chart.classList.remove('panning');
|
||||
}
|
||||
if (!touches.size && state.drag && state.drag.id === null) window.setTimeout(() => { state.drag = null; }, 0);
|
||||
}
|
||||
|
||||
chart.addEventListener('wheel', (e) => {
|
||||
e.preventDefault();
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
@@ -471,10 +554,20 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
setView({ ...state.view, x: state.view.x + dx * unit, y: state.view.y + dy * unit });
|
||||
}, { passive: false });
|
||||
chart.addEventListener('pointerdown', (e) => {
|
||||
if (e.pointerType === 'touch') touches.set(e.pointerId, { x: e.clientX, y: e.clientY });
|
||||
if (touches.size === 2) {
|
||||
beginPinch();
|
||||
return;
|
||||
}
|
||||
if (e.button !== 0) return;
|
||||
state.drag = { x: e.clientX, y: e.clientY, view: { ...state.view }, moved: false, id: e.pointerId };
|
||||
});
|
||||
chart.addEventListener('pointermove', (e) => {
|
||||
if (touches.has(e.pointerId)) touches.set(e.pointerId, { x: e.clientX, y: e.clientY });
|
||||
if (pinch) {
|
||||
movePinch();
|
||||
return;
|
||||
}
|
||||
const drag = state.drag;
|
||||
if (!drag || drag.id !== e.pointerId) return;
|
||||
const dx = e.clientX - drag.x;
|
||||
@@ -490,6 +583,7 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
setView({ ...drag.view, x: drag.view.x - dx * scale, y: drag.view.y - dy * scale });
|
||||
});
|
||||
const endDrag = (e) => {
|
||||
endTouch(e);
|
||||
if (!state.drag || state.drag.id !== e.pointerId) return;
|
||||
chart.classList.remove('panning');
|
||||
// The click that follows a drag still needs to see `moved`.
|
||||
@@ -499,17 +593,39 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
chart.addEventListener('pointercancel', endDrag);
|
||||
chart.addEventListener('dblclick', toggleFit);
|
||||
|
||||
// Safari on a Mac sends its own gesture events for trackpad pinches (other browsers send Ctrl + wheel).
|
||||
// On iOS the same pinch also arrives as touches, which are handled above, so skip it there.
|
||||
let gestureScale = 1;
|
||||
chart.addEventListener('gesturestart', (e) => {
|
||||
e.preventDefault();
|
||||
gestureScale = 1;
|
||||
});
|
||||
chart.addEventListener('gesturechange', (e) => {
|
||||
e.preventDefault();
|
||||
if (touches.size) return;
|
||||
zoomAt(e.scale / gestureScale, e.clientX, e.clientY);
|
||||
gestureScale = e.scale;
|
||||
});
|
||||
|
||||
const zoomLevel = h('span', { class: 'zoom-level', 'aria-live': 'polite' }, '100%');
|
||||
const fitButton = h('button', { type: 'button', class: 'icon-btn', 'aria-label': 'Toggle between fitting the width and the whole page', title: 'Show the whole page', onclick: toggleFit }, '⤢');
|
||||
const zoomControls = h('div', { class: 'zoom-controls' },
|
||||
h('button', { type: 'button', class: 'icon-btn', 'aria-label': 'Zoom in', title: 'Zoom in (Ctrl + scroll)', onclick: () => zoomAt(1.25) }, '+'),
|
||||
// Drawn as SVG: text glyphs sit on font baselines that differ between browsers.
|
||||
const btnIcon = (d) => {
|
||||
const el = svg('svg', { viewBox: '0 0 16 16', width: 14, height: 14, 'aria-hidden': 'true', class: 'btn-icon' });
|
||||
svg('path', { d }, el);
|
||||
return el;
|
||||
};
|
||||
const fitButton = h('button', { type: 'button', class: 'icon-btn zoom-fit', 'aria-label': 'Toggle between fitting the width and the whole page', title: 'Show the whole page', onclick: toggleFit },
|
||||
btnIcon('M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9'));
|
||||
const zoomControls = h('div', { class: 'zoom-controls', role: 'group', 'aria-label': 'Zoom' },
|
||||
h('button', { type: 'button', class: 'icon-btn zoom-step', 'aria-label': 'Zoom out', title: 'Zoom out (Ctrl + scroll)', onclick: () => zoomAt(1 / 1.25) }, btnIcon('M3 8h10')),
|
||||
zoomLevel,
|
||||
h('button', { type: 'button', class: 'icon-btn', 'aria-label': 'Zoom out', title: 'Zoom out (Ctrl + scroll)', onclick: () => zoomAt(1 / 1.25) }, '−'),
|
||||
h('button', { type: 'button', class: 'icon-btn zoom-step', 'aria-label': 'Zoom in', title: 'Zoom in (Ctrl + scroll)', onclick: () => zoomAt(1.25) }, btnIcon('M3 8h10M8 3v10')),
|
||||
fitButton);
|
||||
toolbar.append(zoomControls);
|
||||
|
||||
root.replaceChildren(
|
||||
h('div', { class: 'map-top' }, strip, toolbar),
|
||||
h('div', { class: 'map-canvas' }, chart, zoomControls),
|
||||
h('div', { class: 'map-top' }, toolbar),
|
||||
h('div', { class: 'map-canvas' }, chart),
|
||||
tip,
|
||||
);
|
||||
fitWidth();
|
||||
@@ -539,6 +655,7 @@ export function createMapView({ root, plan, data, build, onSelect }) {
|
||||
span.setAttribute('lengthAdjust', 'spacingAndGlyphs');
|
||||
}
|
||||
}
|
||||
if (el.bg) el.bg.setAttribute('width', (el.text.getComputedTextLength() + 12).toFixed(1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Turns the roadmap README into a topic tree with descriptions, resources and cross-links.
|
||||
// Pure module: no DOM access, so it runs in the browser and under `node --test`.
|
||||
import { TITLE } from './dom.js';
|
||||
|
||||
export const TYPES = {
|
||||
book: { icon: '📘', label: 'Book' },
|
||||
@@ -87,7 +88,7 @@ function makeNode(fields) {
|
||||
|
||||
export function parseRoadmap(markdown) {
|
||||
const lines = markdown.replace(/\r\n?/g, '\n').split('\n');
|
||||
const root = makeNode({ id: 'root', slug: '', title: 'Embedded Engineering Roadmap' });
|
||||
const root = makeNode({ id: 'root', slug: '', title: TITLE });
|
||||
const groups = [];
|
||||
const stack = [];
|
||||
let target = root;
|
||||
@@ -56,7 +56,8 @@ const map = JSON.parse(readFileSync(new URL('./map.json', import.meta.url), 'utf
|
||||
|
||||
test('places topics in the map areas and their cross-section', () => {
|
||||
const plan = linkDiagram(map, data);
|
||||
assert.deepEqual(plan.unmatched, [], 'every map topic matches a README heading (or an alias in diagram.js)');
|
||||
assert.deepEqual(plan.unmatched, [], 'every map topic matches a README heading (or a "readme" entry in map.json)');
|
||||
assert.deepEqual(plan.invalidReadme, [], 'map.json "readme" entries name a topic on the map and existing README headings');
|
||||
assert.deepEqual(plan.invalid, [], 'importance is required, recommended or possible');
|
||||
assert.deepEqual(find('GPIO').areas, ['SOFTWARE', 'HARDWARE']);
|
||||
assert.deepEqual(find('I2C').areas, ['SOFTWARE', 'HARDWARE']);
|
||||
@@ -108,7 +108,7 @@ body {
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font: 15px/1.5 var(--font);
|
||||
font: 15px/1.5 var(--font-display);
|
||||
color: var(--text);
|
||||
background:
|
||||
radial-gradient(1100px 760px at 12% -12%, var(--glow-a), transparent 62%),
|
||||
@@ -127,6 +127,18 @@ button {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Labels, titles and controls use the roadmap's display face; longer text keeps the body face. */
|
||||
.desc,
|
||||
.res-note,
|
||||
.res-also,
|
||||
.why,
|
||||
.howto,
|
||||
.empty,
|
||||
.result-sub,
|
||||
.tip-hint {
|
||||
font-family: var(--font);
|
||||
}
|
||||
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
@@ -172,6 +184,7 @@ button {
|
||||
.brand-text strong {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: 1000;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
@@ -351,16 +364,59 @@ button {
|
||||
background: var(--chip-hover);
|
||||
}
|
||||
|
||||
.text-btn {
|
||||
width: auto;
|
||||
grid-auto-flow: column;
|
||||
gap: 6px;
|
||||
padding: 0 11px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
.download-menu {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.download-menu > summary {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.download-menu > summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.download-menu[open] > summary {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.download-panel {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
right: 0;
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
min-width: 190px;
|
||||
padding: 6px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--surface-solid);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.download-item {
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.download-item:hover,
|
||||
.download-item:focus-visible {
|
||||
background: var(--chip-hover);
|
||||
}
|
||||
|
||||
.download-item b {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.download-item span {
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
|
||||
.layout {
|
||||
@@ -967,32 +1023,6 @@ button {
|
||||
font: 12px var(--font);
|
||||
}
|
||||
|
||||
.credits {
|
||||
display: grid;
|
||||
grid-template-columns: 48px minmax(0, 1fr);
|
||||
gap: 14px;
|
||||
align-items: start;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.credits-logo {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.credits-body p {
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
|
||||
.credits-body strong {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.credits-badge {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.sheet-close {
|
||||
display: none;
|
||||
}
|
||||
@@ -1115,11 +1145,14 @@ button {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
/* Below this width the title and the actions no longer fit one row, so the title goes. */
|
||||
@media (max-width: 720px) {
|
||||
.brand-text {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.actions {
|
||||
gap: 6px;
|
||||
}
|
||||
@@ -1128,14 +1161,6 @@ button {
|
||||
#print {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.text-btn {
|
||||
padding: 0 9px;
|
||||
}
|
||||
|
||||
.text-btn svg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
@@ -0,0 +1,20 @@
|
||||
// Warns (never fails) about README sections that have no place on the map yet.
|
||||
// Usage: node explorer/tools/coverage.mjs Sections listed in map.json "offMap" (titles or group names) are skipped.
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { parseRoadmap } from '../parser.js';
|
||||
import { linkDiagram } from '../diagram.js';
|
||||
|
||||
const read = (path) => readFileSync(new URL(path, import.meta.url), 'utf8');
|
||||
const map = JSON.parse(read('../map.json'));
|
||||
const data = parseRoadmap(read('../../README.md'));
|
||||
const plan = linkDiagram(map, data);
|
||||
|
||||
const drawn = new Set(plan.boxes.flatMap((b) => b.topics));
|
||||
const onMap = (t) => drawn.has(t) || t.children.some(onMap);
|
||||
const skipped = new Set(map.offMap || []);
|
||||
const missing = data.root.children.filter((t) => !skipped.has(t.title) && !skipped.has(t.group) && !onMap(t));
|
||||
|
||||
for (const t of missing) {
|
||||
console.log(`::warning file=README.md,title=Not on the roadmap map::"${t.title}" has no box on the map. Add it to explorer/map.json, or to "offMap" if it should stay off the map (see CONTRIBUTING.md).`);
|
||||
}
|
||||
console.log(missing.length ? `${missing.length} README section(s) are not on the map.` : 'Every README section is on the map or listed in "offMap".');
|
||||
@@ -1,13 +1,13 @@
|
||||
// Renders the roadmap map to an A4 PDF and a PNG with headless Chromium, straight from the site.
|
||||
// Usage: node site/tools/render.mjs [rootDir] [pagePath] [outDir]
|
||||
// defaults: repository root, /site/, ./dist (needs: npm install --no-save playwright)
|
||||
// Usage: node explorer/tools/render.mjs [rootDir] [pagePath] [outDir]
|
||||
// defaults: repository root, /explorer/, ./dist (needs: npm install --no-save playwright)
|
||||
import { createServer } from 'node:http';
|
||||
import { mkdir, readFile } from 'node:fs/promises';
|
||||
import { extname, join, resolve, sep } from 'node:path';
|
||||
import { chromium } from 'playwright';
|
||||
|
||||
const root = resolve(process.argv[2] || '.');
|
||||
const pagePath = process.argv[3] || '/site/';
|
||||
const pagePath = process.argv[3] || '/explorer/';
|
||||
const outDir = resolve(process.argv[4] || 'dist');
|
||||
const NAME = 'Embedded-Engineering-Roadmap';
|
||||
const PNG_SCALE = 2;
|
||||
Reference in New Issue
Block a user