Skip to content

Commit 95638c7

Browse files
committed
style: add graphics to feature panels
1 parent 875dfd8 commit 95638c7

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

docs/website/data.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,27 @@
8888
"panels": [
8989
{
9090
"description": "MrDocs understands C++ features such as attributes and noexcept functions.",
91-
"source": "terminate.cpp"
91+
"source": "terminate.cpp",
92+
"imageClass": "mrdocs",
93+
"boxClass": "box1 box-shape3 box270"
9294
},
9395
{
9496
"description": "Specially formatted comments are rendered to form a reference as part of documentation.",
95-
"source": "distance.cpp"
97+
"source": "distance.cpp",
98+
"imageClass": "cards",
99+
"boxClass": "box1 box-shape1 box0"
96100
},
97101
{
98102
"description": "Special directives are used to describe details about the symbols.",
99-
"source": "is_prime.cpp"
103+
"source": "is_prime.cpp",
104+
"imageClass": "shouting",
105+
"boxClass": "box1 box-shape2 box90"
100106
},
101107
{
102108
"description": "It understands concepts, constraints and SFINAE.",
103-
"source": "sqrt.cpp"
109+
"source": "sqrt.cpp",
110+
"imageClass": "thinking",
111+
"boxClass": "box1 box-shape1 box180"
104112
}
105113
]
106114
}

docs/website/index.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ <h1>MrDocs</h1>
7979
<div class="grid principles-banner">
8080
<div class="principles-image">
8181
<div class="box1 box-shape1 box0">
82-
<div class="inner-box thinking"></div>
82+
<div class="inner-box thinking"></div>
8383
</div>
8484
</div>
8585
<div class="principles-content">
@@ -155,6 +155,9 @@ <h3>MrDocs let's you keep the code simple and maintainable.</h3>
155155
[[noreturn]]
156156
<span class="hljs-function"><span class="hljs-type">void</span>
157157
<span class="hljs-title">terminate</span><span class="hljs-params">()</span> <span class="hljs-keyword">noexcept</span></span>;</code></pre>
158+
<div class="box1 box-shape3 box270">
159+
<div class="inner-box mrdocs"></div>
160+
</div>
158161
</div>
159162
<div class="documentation-panel">
160163
<div>
@@ -209,6 +212,9 @@ <h4>NOTE</h4>
209212
*/</span>
210213
<span class="hljs-function"><span class="hljs-type">double</span>
211214
<span class="hljs-title">distance</span><span class="hljs-params">(<span class="hljs-type">double</span> x0, <span class="hljs-type">double</span> y0, <span class="hljs-type">double</span> x1, <span class="hljs-type">double</span> y1)</span></span>;</code></pre>
215+
<div class="box1 box-shape1 box0">
216+
<div class="inner-box cards"></div>
217+
</div>
212218
</div>
213219
<div class="documentation-panel">
214220
<div>
@@ -294,6 +300,9 @@ <h3>Parameters</h3>
294300
*/</span>
295301
<span class="hljs-function"><span class="hljs-type">bool</span>
296302
<span class="hljs-title">is_prime</span><span class="hljs-params">(<span class="hljs-type">unsigned</span> <span class="hljs-type">long</span> <span class="hljs-type">long</span> n)</span> <span class="hljs-keyword">noexcept</span></span>;</code></pre>
303+
<div class="box1 box-shape2 box90">
304+
<div class="inner-box shouting"></div>
305+
</div>
297306
</div>
298307
<div class="documentation-panel">
299308
<div>
@@ -387,6 +396,9 @@ <h3>Parameters</h3>
387396
<span class="hljs-keyword">return</span> result;
388397
}
389398
</code></pre>
399+
<div class="box1 box-shape1 box180">
400+
<div class="inner-box thinking"></div>
401+
</div>
390402
</div>
391403
<div class="documentation-panel">
392404
<div>

docs/website/index.html.hbs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<div class="grid principles-banner">
9191
<div class="principles-image">
9292
<div class="box1 box-shape1 box0">
93-
<div class="inner-box thinking"></div>
93+
<div class="inner-box thinking"></div>
9494
</div>
9595
</div>
9696
<div class="principles-content">
@@ -153,6 +153,9 @@
153153
<div class="panel-container">
154154
<div class="snippet-panel">
155155
<pre><code>{{{ snippet }}}</code></pre>
156+
<div class="{{boxClass}}">
157+
<div class="inner-box {{imageClass}}"></div>
158+
</div>
156159
</div>
157160
<div class="documentation-panel">
158161
{{{ documentation }}}

0 commit comments

Comments
 (0)