Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change colab button location #59

Merged
merged 2 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
changing the location of the colab button
new color, and adding the title from index toml rather than markdown
  • Loading branch information
TuanaCelik committed Nov 23, 2022
commit 2eb9ebbd46e87b8fbd9b01c4dcb1eac1d2b99f04
1 change: 1 addition & 0 deletions themes/haystack/assets/sass/abstracts/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
--color-dark-grey-rgb: 144, 144, 178;
--color-blue-rgb: 24, 139, 245;
--color-dark-blue-rgb: 43, 47, 85;
--color-light-blue-rgb:17,129,193;
--color-green-rgb: 3, 175, 157;
--color-yellow-rgb: 255, 197, 92;

Expand Down
15 changes: 15 additions & 0 deletions themes/haystack/assets/sass/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,21 @@ button.nav-toggle-close {
}
}

&.btn-light-blue {
background-color: rgba($color: #{var(--color-light-blue-rgb)}, $alpha: 1);
color: var(--color-white);

svg {
fill: var(--color-white);
}

&:hover {
background-color: rgba(
$color: #{var(--color-dark-blue-rgb)},
$alpha: 0.9
);
}
}

&.btn-grey {
background-color: rgba($color: #{var(--color-dark-grey-rgb)}, $alpha: 1);
Expand Down
9 changes: 6 additions & 3 deletions themes/haystack/layouts/_default/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@

{{/* Tutorial */}}
<article class="article-content">

{{ with .Params.title }}
<h1> {{.}} </h1>
{{ end }}

<div class="button-container">

{{/* Colab button */}}
{{ with .Params.colab }}
<a
href="{{ . }}"
class="btn btn-dark-blue colab-btn"
class="btn btn-light-blue colab-btn"
target="_blank"
rel="noopener"
>
Expand Down Expand Up @@ -96,7 +99,7 @@
{{ . | time.Format ":date_long" }}
</sub>
{{ end }}

{{/* Article content */}}
{{ .Content }}

Expand Down