Skip to content

Commit

Permalink
fix appearances when using an arbitrary Bootswatch theme
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhangxiao committed Jan 12, 2024
1 parent 040684b commit f3da4f8
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 4 deletions.
6 changes: 6 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
3.2

fixed morea_theme_navbar_bg configuration in _plugins/MoreaGenerator.rb

fixed the navbar configuration in core.html
- deleted "fixed-top" in <div class="navbar navbar-expand-lg {{site.morea_theme_navbar_bg}}">
- with "fixed-top", the breadcrumb does not show
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SITE SPECIFIC: The following fields are typically changed for each site
name: EE 643 Spring 2024
baseurl: /ee643spring2024
morea_theme: cerulean
morea_theme: zephyr
timezone: Pacific/Honolulu
morea_navbar_items:
# - Prerequisites
Expand Down
3 changes: 2 additions & 1 deletion _layouts/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
</head>
<body>

<div class="navbar navbar-expand-lg fixed-top {{site.morea_theme_navbar_bg}}">
<div class="navbar navbar-expand-lg {{site.morea_theme_navbar_bg}}">
<!--<div class="navbar navbar-expand-lg bg-primary fixed-top">-->
<div class="container">
<a class="navbar-brand" href="{{ site.baseurl }}/index.html"> {{ site.name }} </a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Expand Down
3 changes: 3 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<div class="container">
{{ content }}
</div>
<div class="table-of-contents">
<!-- Table of Contents will be automatically inserted here -->
</div>
{% else %}
{{ content }}
{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion _plugins/MoreaGenerator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ def configSite()
@config['morea_domain'].chop!
end
end

# Set the navbar background depending on the theme.
if ["darkly"].include? @config['morea_theme'].to_s
@config['morea_theme_navbar_bg'] = 'navbar-dark bg-dark'
else
@config['morea_theme_navbar_bg'] = 'navbar-light bg-light'
@config['morea_theme_navbar_bg'] = 'navbar-dark bg-primary'
end
# logMoreaConfig()
end
Expand Down
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ h1, h2, h3 {

small {
font-size: .7em
}
}
12 changes: 12 additions & 0 deletions css/themes/cerulean-original/bootstrap.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions css/themes/zephyr/bootstrap.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions morea/02-overview/reading-building-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ morea_type: reading
morea_labels:
---

* TOC
{:toc}

# Basic building blocks

Here is the block diagram of a typical <span style="color: red;">point-to-point</span> communication system. The top row are blocks in the transmitter, and the bottom row are blocks in the receiver.
Expand Down

0 comments on commit f3da4f8

Please sign in to comment.