Skip to content

Commit

Permalink
Merge pull request #38 from carpentries/test-banner
Browse files Browse the repository at this point in the history
testing out adding a beta phase banner
  • Loading branch information
zkamvar authored May 23, 2022
2 parents 0f888d2 + b316987 commit b0b350a
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/compile-css.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Comple js
run: bash squash-a-script.sh
- name: Install sass
run: brew install sass/sass/sass
run: npm install -g sass
- name: Compile sass
run: bash squash-sass.sh
- name: Commit
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: varnish
Title: Front-end for The Carpentries Lesson Template
Version: 0.1.12
Version: 0.1.13
Authors@R: c(
person(given = "Zhian N.",
family = "Kamvar",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# varnish 0.1.13

* An alert for the workbench beta phase is implemented if the lesson has `workbench-beta: true` in the `config.yaml`.

# varnish 0.1.12

* dropdown navigation no longer is hidden by the sidebar on XXL screens;
Expand Down
2 changes: 1 addition & 1 deletion inst/pkgdown/assets/assets/styles.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/pkgdown/assets/assets/styles.css.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions inst/pkgdown/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
<div class="large-logo"><img alt="{{#yaml}}{{carpentry_name}}{{/yaml}}" src="{{#site}}{{root}}{{/site}}assets/images/{{#yaml}}{{carpentry_icon}}-logo.svg{{/yaml}}"></div>
</div>
<div class="selector-container ">
{{#yaml}}{{#workbench-beta}}
<div class="beta-alert alert alert-light alert-dismissable fade show" role="alert">
<i aria-hidden="true" class="icon" data-feather="alert-circle" style="color: #5bbad5"></i>
Workbench Beta |
<a href="https://github.com/carpentries/workbench/discussions" class="alert-link">Give Feedback</a> |
<a href="https://carpentries.github.io/workbench" class="alert-link">Learn More</a>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{{/workbench-beta}}{{/yaml}}
{{#yaml}}{{#language}}
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle " type="button" id="dropdownMenu2" data-bs-toggle="dropdown" aria-expanded="false">
Expand Down
16 changes: 16 additions & 0 deletions source/stylesheets/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
display: none;
}


.top-nav .dropdown button {
background: #ffffff;
color: $black;
Expand All @@ -183,6 +184,21 @@
border-left: 1px solid $black;
}

// ZNK -------------------------------------
// Styling the alert box for the beta phase
// to not be so boxxy
.top-nav .beta-alert {
display: inline;
padding: inherit;
}

// the button x centered with the text,
// not justified
.top-nav .beta-alert button.btn-close {
padding: 0.25rem 0.25rem 0.75rem 0.25rem;
}
// ------------------------------------- ZNK

.top-nav .icon {
position: relative;
top: -2px;
Expand Down

0 comments on commit b0b350a

Please sign in to comment.