Skip to content

Commit

Permalink
fix: Better styling
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Aug 18, 2020
1 parent 82b96ed commit 065a67e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 27 deletions.
4 changes: 1 addition & 3 deletions _episodes/03-cmakelists.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ cd cmake_workshop/code/00-intro
{%- endcapture %}
{{ tmp | markdownify }}
<div class="solution"><h2>Solution</h2>
{% highlight cmake %}
{% include code/00-intro/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/00-intro/CMakeLists.txt" %}
</div>
</div>

Expand Down
4 changes: 1 addition & 3 deletions _episodes/04-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ definitions on `simple_lib`.
{%- endcapture %}
{{ tmp | markdownify }}
<div class="solution"><h2>Solution</h2>
{% highlight cmake %}
{% include code/01-simple/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/01-simple/CMakeLists.txt" %}
</div>
</div>

Expand Down
20 changes: 5 additions & 15 deletions _episodes/06-projectstructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ First, take a look at the main [`CMakeLists.txt`][] file. This is an example of
in CMake 3.14, so enjoy it for a minute. Now let's look at specifics!

<details><summary>Click to see CMakeLists.txt</summary>
{% highlight cmake%}
{% include code/03-structure/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/03-structure/CMakeLists.txt" %}
</details>

### Protect project code
Expand Down Expand Up @@ -78,9 +76,7 @@ prefer git submodules in `/extern`.
Now follow the `add_subdirectory` command to see the src folder, where a library is created.

<details><summary>Click to see src/CMakeLists.txt</summary>
{% highlight cmake%}
{% include code/03-structure/src/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/03-structure/src/CMakeLists.txt" %}
</details>


Expand Down Expand Up @@ -108,9 +104,7 @@ Now take a look at `apps/CMakeLists.txt`. This one is pretty simple, since all t
using our library was done on the library target, as it should be.

<details><summary>Click to see apps/CMakeLists.txt</summary>
{% highlight cmake%}
{% include code/03-structure/apps/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/03-structure/apps/CMakeLists.txt" %}
</details>

### Docs and Tests
Expand All @@ -119,15 +113,11 @@ using our library was done on the library target, as it should be.
Feel free to look at `docs` and `tests` for their `CMakeLists.txt`.

<details><summary>Click to see docs/CMakeLists.txt</summary>
{% highlight cmake%}
{% include code/03-structure/docs/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/03-structure/docs/CMakeLists.txt" %}
</details>

<details><summary>Click to see tests/CMakeLists.txt</summary>
{% highlight cmake%}
{% include code/03-structure/tests/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/03-structure/tests/CMakeLists.txt" %}
</details>

> ## More reading
Expand Down
8 changes: 2 additions & 6 deletions _episodes/10-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ make
root -b -q -x ../CheckLoad.C
```

{% highlight cmake %}
{% include code/05a-root/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/05a-root/CMakeLists.txt" %}



## Example 2: Targets

Change to the `code/05b-root` directory. Run the same command above.

{% highlight cmake %}
{% include code/05b-root/CMakeLists.txt %}
{% endhighlight %}
{% include hl_code.html lang="cmake" file="code/05b-root/CMakeLists.txt" %}

{% include links.md %}
5 changes: 5 additions & 0 deletions _includes/hl_code.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="language-{{ include.lang }} highlighter-rouge">
{% highlight include.lang %}
{% include {{ include.file }} %}
{% endhighlight %}
</div>

0 comments on commit 065a67e

Please sign in to comment.