Skip to content

Commit

Permalink
Update main site to indicate edge status
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Jun 2, 2022
1 parent a0766c5 commit 2792d0e
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 9 deletions.
77 changes: 71 additions & 6 deletions bridgetown-website/src/_components/shared/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@ body > nav {
margin: var(--sl-spacing-medium) 0;
}

&.edge {
background: linear-gradient(
to bottom,
white 0%,
rgb(255, 251, 235) 90%,
white 100%
);
}

& a.active {
text-decoration-thickness: 5px;
text-decoration-skip: none;
text-underline-offset: 0.3em;
}

& .logo {
width:320px;
width: 320px;
margin-top: -45px;

@media (--nav-minimal) {
Expand All @@ -32,7 +41,7 @@ body > nav {
margin-left: 0.7rem;
font-size: 70%;
font-weight: var(--body-font-weight);
opacity:0.5;
opacity: 0.5;
}
}

Expand All @@ -42,7 +51,8 @@ html:not([loaded]) #nav-bar {
animation-fill-mode: forwards;
}

navbar-inner, footer-inner {
navbar-inner,
footer-inner {
display: block;
max-width: var(--max-content-width);
margin: 0 auto;
Expand All @@ -55,16 +65,71 @@ bridgetown-search-form input {
font-size: 1em;
font-weight: 520;
margin-bottom: 0.3em;
padding: .2em .6em;
padding: 0.2em 0.6em;
width: calc(100% - 1.3em);
background: #fff;
opacity: 0.5;
border: 1px solid var(--color-light-gray);
border-radius: 1em;
box-shadow: inset 0 .0625em .125em rgba(10,10,10,.05);
box-shadow: inset 0 0.0625em 0.125em rgba(10, 10, 10, 0.05);
color: inherit;

&:focus, &:hover {
&:focus,
&:hover {
opacity: 1;
}
}

@keyframes swingBackAndForth {
0% {
transform: rotate(-7deg);
}
4.5% {
transform: rotate(-16deg);
}
11.5% {
transform: rotate(-7deg);
}
18% {
transform: rotate(-10deg);
}
25% {
transform: rotate(-7deg);
}
30% {
transform: rotate(-8deg);
}
37% {
transform: rotate(-7deg);
}
}

edge-label {
position: absolute;
left: 7.3rem;
top: 4.5rem;
margin: 0;
font-size: 0.9rem;
font-weight: bold;
transform: rotate(-7deg);
transform-origin: 99% 2%;
background: var(--color-orange);
color: white;
padding: 0.25em 0.7em;
border-radius: 4px 2px 4px 4px;
box-shadow: 0px 11px 6px -7px rgba(0, 0, 0, 0.15);
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
cursor: pointer;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);

animation: swingBackAndForth 8s;
animation-delay: 1s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;

@media (--nav-minimal) {
font-size: 0.75rem;
top: 5.15rem;
left: 7.75rem;
}
}
1 change: 1 addition & 0 deletions bridgetown-website/src/_components/shared/navbar.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class Shared::Navbar < Bridgetown::Component
def initialize(metadata:, resource:)
@metadata, @resource = metadata, resource
@site = Bridgetown::Current.site
end
end
10 changes: 8 additions & 2 deletions bridgetown-website/src/_components/shared/navbar.serb
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<nav aria-label="Main navigation">
<nav aria-label="Main navigation"{% if site.data.edge_version %} class="edge"{% end %}>
<navbar-inner id="nav-bar" data-turbo-permanent>
<sl-bar align-items="center" spaced="between" expanded="false">
<sl-bar-item branding size="4/10 lg:3/10 xl:3/10">
<sl-bar-item branding size="4/10 lg:3/10 xl:3/10" style="position:relative">
<a href="/">
{{ svg "/images/bridgetown-logo-2022.svg", class: "logo", role: "img", "aria-label": "Bridgetown" }}
</a>
{% if site.data.edge_version %}
<edge-label onclick='
this.style.animation = "none";
setTimeout(() => this.style.animation = null, 50)
'>EDGE</edge-label>
{% end %}
</sl-bar-item>
<sl-bar-item mobileonly>
<sl-button menutoggle type="text" onclick='
Expand Down
6 changes: 5 additions & 1 deletion bridgetown-website/src/_pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ While your competitors are wrestling with complicated build tools, limited progr
{:style="text-align:center; margin-top:3rem"}

<small>Version {{ Bridgetown::VERSION }} released {{ current_version_date }}
Looking for [0.2x documentation](https://bridgetown-v0.onrender.com/)?</small>
{% if site.data.edge_version %}
Looking for [stable release documentation](https://www.bridgetownrb.com/)?
{% else %}
Looking for [0.2x documentation](https://bridgetown-v0.onrender.com/)?
{% end %}</small>
{:style="color:var(--sl-color-neutral-300)"}


Expand Down

0 comments on commit 2792d0e

Please sign in to comment.