Skip to content

Commit 51691b0

Browse files
committed
Add consistent left sidebar to all pages
1 parent c3823ec commit 51691b0

2 files changed

Lines changed: 43 additions & 82 deletions

File tree

about.html

Lines changed: 27 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -8,71 +8,21 @@
88
* { margin: 0; padding: 0; box-sizing: border-box; }
99
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #111; background: #fff; }
1010
a { color: #111; text-decoration: none; }
11-
12-
nav {
13-
border-bottom: 1px solid #e0e0e0;
14-
padding: 0 3rem;
15-
display: flex; align-items: center; justify-content: space-between;
16-
height: 60px;
17-
}
18-
.nav-logo { display: flex; align-items: center; gap: 10px; color: #111; }
11+
nav { border-bottom: 1px solid #e0e0e0; padding: 0 2rem; display: flex; align-items: center; height: 60px; }
12+
.nav-logo { display: flex; align-items: center; gap: 10px; }
1913
.nav-logo img { width: 28px; height: 28px; }
2014
.nav-logo span { font-size: 15px; font-weight: 500; }
21-
.nav-links { display: flex; gap: 2.5rem; }
22-
.nav-links a { font-size: 14px; color: #555; }
23-
.nav-links a:hover { color: #111; }
24-
25-
26-
27-
.content h1 {
28-
font-size: 2.2rem;
29-
font-weight: 600;
30-
letter-spacing: -0.02em;
31-
margin-bottom: 3rem;
32-
}
33-
34-
.content h2 {
35-
font-size: 1.1rem;
36-
font-weight: 600;
37-
margin-top: 3rem;
38-
margin-bottom: 1rem;
39-
}
40-
41-
.content p {
42-
font-size: 1rem;
43-
color: #444;
44-
line-height: 1.85;
45-
margin-bottom: 1.25rem;
46-
}
47-
48-
.content code {
49-
font-family: "SF Mono", "Fira Code", monospace;
50-
font-size: 13px;
51-
background: #f4f4f4;
52-
border-radius: 4px;
53-
padding: 2px 6px;
54-
color: #111;
55-
}
56-
57-
footer {
58-
border-top: 1px solid #e0e0e0;
59-
padding: 2rem;
60-
text-align: center;
61-
font-size: 13px;
62-
color: #888;
63-
}
64-
6515
.layout { display: flex; min-height: calc(100vh - 60px); }
66-
.sidebar {
67-
width: 180px; min-width: 180px;
68-
border-right: 1px solid #e0e0e0;
69-
padding: 2rem 1.5rem;
70-
display: flex; flex-direction: column; gap: 0.25rem;
71-
}
72-
.sidebar a { font-size: 14px; color: #555; padding: 0.35rem 0; display: block; }
16+
.sidebar { width: 180px; min-width: 180px; border-right: 1px solid #e0e0e0; padding: 2.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
17+
.sidebar a { font-size: 14px; color: #555; padding: 0.4rem 0; display: block; }
7318
.sidebar a:hover { color: #111; }
7419
.sidebar a.active { color: #111; font-weight: 500; }
75-
.page-content { flex: 1; max-width: 720px; padding: 4rem 3rem; }
20+
.content { max-width: 680px; padding: 4rem 3rem; }
21+
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 2.5rem; }
22+
.content h2 { font-size: 1rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 0.75rem; }
23+
.content p { font-size: 1rem; color: #444; line-height: 1.85; margin-bottom: 1.25rem; }
24+
.content code { font-family: "SF Mono", "Fira Code", monospace; font-size: 13px; background: #f4f4f4; border-radius: 4px; padding: 2px 6px; color: #111; }
25+
footer { border-top: 1px solid #e0e0e0; padding: 2rem; text-align: center; font-size: 13px; color: #888; }
7626
</style>
7727
</head>
7828
<body>
@@ -82,45 +32,41 @@
8232
<img src="assets/cpp-logo.png" alt="C++ Mode">
8333
<span>C++ Mode</span>
8434
</a>
85-
<div class="nav-links">
86-
<a href="reference.html">Reference</a>
87-
<a href="examples.html">Examples</a>
88-
<a href="about.html">About</a>
89-
</div>
9035
</nav>
9136

9237
<div class="layout">
9338
<div class="sidebar">
94-
<a href="reference.html" >Reference</a>
95-
<a href="examples.html" >Examples</a>
96-
<a href="about.html" class='active'>About</a>
39+
<a href="reference.html">Reference</a>
40+
<a href="examples.html">Examples</a>
41+
<a href="about.html" class="active">About</a>
9742
</div>
98-
<div class="page-content">
99-
<h1>About</h1>
43+
<div class="content">
44+
<h1>About</h1>
10045

101-
<p>C++ Mode is a plugin for the Processing 4 IDE that lets you write sketches in C++ instead of Java. The idea is to take everything that makes Processing easy to pick up and bring it to C++.</p>
46+
<p>C++ Mode is a plugin for the Processing 4 IDE that lets you write sketches in C++ instead of Java. The idea is to take everything that makes Processing easy to pick up and bring it to C++.</p>
10247

103-
<h2>Why C++ Mode?</h2>
48+
<h2>Why C++ Mode?</h2>
10449

105-
<p>Getting started with C++ is hard. Before you can draw anything on screen you need to set up a build system, open a window, initialize OpenGL, and write a lot of setup code. Most people give up before they see anything.</p>
50+
<p>Getting started with C++ is hard. Before you can draw anything on screen you need to set up a build system, open a window, initialize OpenGL, and write a lot of setup code. Most people give up before they see anything.</p>
10651

107-
<p>Processing solved this problem for Java. C++ Mode does the same thing for C++. You type <code>ellipse(300, 300, 50, 50)</code>, hit Run, and something appears on screen. The window, the event loop, the OpenGL context, all of it is taken care of.</p>
52+
<p>Processing solved this problem for Java. C++ Mode does the same thing for C++. You type <code>ellipse(300, 300, 50, 50)</code>, hit Run, and something appears on screen. The window, the event loop, the OpenGL context, all of it is taken care of.</p>
10853

109-
<h2>A friendlier path into C++</h2>
54+
<h2>A friendlier path into C++</h2>
11055

111-
<p>If you already know Processing, you already know most of the API. <code>setup()</code>, <code>draw()</code>, <code>background()</code>, <code>mouseX</code>, <code>fill()</code> all work the same way. The only difference is that you are now writing C++.</p>
56+
<p>If you already know Processing, you already know most of the API. <code>setup()</code>, <code>draw()</code>, <code>background()</code>, <code>mouseX</code>, <code>fill()</code> all work the same way. The only difference is that you are now writing C++.</p>
11257

113-
<p>You can take it step by step. Start with sketches that look almost identical to what you would write in Java. Then start introducing C++ concepts at your own pace: structs, vectors, pointers, templates. The visual feedback makes it easier to understand what your code is actually doing.</p>
58+
<p>You can take it step by step. Start with sketches that look almost identical to what you would write in Java. Then start introducing C++ concepts at your own pace: structs, vectors, pointers, templates. The visual feedback makes it easier to understand what your code is actually doing.</p>
11459

115-
<h2>Who is it for</h2>
60+
<h2>Who is it for</h2>
11661

117-
<p>C++ Mode is for Processing users who are curious about C++ and want a familiar starting point. It is for students taking a C++ course who want to make something visual while they learn. It is for developers who already know C++ and want a fast creative coding environment. And it is for artists who want their sketches to run as fast as possible without giving up the simplicity of the Processing API.</p>
62+
<p>C++ Mode is for Processing users who are curious about C++ and want a familiar starting point. It is for students taking a C++ course who want to make something visual while they learn. It is for developers who already know C++ and want a fast creative coding environment. And it is for artists who want their sketches to run as fast as possible without giving up the simplicity of the Processing API.</p>
11863

119-
<p>Made by <a href="https://github.com/pepc84" style="border-bottom: 1px solid #ddd;">Jose Gonzalez Llamas</a>. Contributions welcome on <a href="https://github.com/processing-cpp/processing.cpp" style="border-bottom: 1px solid #ddd;">GitHub</a>.</p>
64+
<p>Made by <a href="https://github.com/pepc84" style="border-bottom: 1px solid #ddd;">Jose Gonzalez Llamas</a>. Contributions welcome on <a href="https://github.com/processing-cpp/processing.cpp" style="border-bottom: 1px solid #ddd;">GitHub</a>.</p>
65+
</div>
12066
</div>
12167

12268
<footer>
123-
<p>C++ Mode for Processing 4</p>
69+
<p>C++ Mode for Processing</p>
12470
</footer>
12571

12672
</body>

index.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
.search-result-item .tag { font-size: 11px; color: #aaa; margin-left: 6px; }
5252
.search-empty { padding: 12px 14px; font-size: 13px; color: #aaa; }
5353

54+
.sidebar { position: fixed; top: 60px; left: 0; width: 180px; height: calc(100vh - 60px); border-right: 1px solid #e0e0e0; padding: 2.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; background: #fff; z-index: 10; }
55+
.sidebar a { font-size: 14px; color: #555; padding: 0.4rem 0; display: block; }
56+
.sidebar a:hover { color: #111; }
57+
.page-body { margin-left: 180px; }
5458
.main {
5559
height: calc(100vh - 60px);
5660
display: flex; align-items: center;
@@ -93,7 +97,11 @@
9397
.right img { width: 380px; height: 380px; object-fit: contain; }
9498

9599
@media (max-width: 768px) {
96-
.main { flex-direction: column; padding: 3rem 2rem; }
100+
.sidebar { position: fixed; top: 60px; left: 0; width: 180px; height: calc(100vh - 60px); border-right: 1px solid #e0e0e0; padding: 2.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; background: #fff; z-index: 10; }
101+
.sidebar a { font-size: 14px; color: #555; padding: 0.4rem 0; display: block; }
102+
.sidebar a:hover { color: #111; }
103+
.page-body { margin-left: 180px; }
104+
.main { flex-direction: column; padding: 3rem 2rem; }
97105
.right img { width: 200px; height: 200px; }
98106
body { overflow: auto; }
99107
}
@@ -117,6 +125,13 @@
117125
</div>
118126
</nav>
119127

128+
<div class="sidebar">
129+
<a href="reference.html">Reference</a>
130+
<a href="examples.html">Examples</a>
131+
<a href="about.html">About</a>
132+
</div>
133+
134+
<div class="page-body">
120135
<div class="main">
121136
<div class="left">
122137
<h1>C++ Mode for<br><span class="proc">Processing</span></h1>

0 commit comments

Comments
 (0)