- Notifications
You must be signed in to change notification settings - Fork352
Dan top nav sticky#743
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
11 commits Select commitHold shift + click to select a range
10e1b9a make sticky, remove radius, shift tertiary btns
chillenbergerfe74d1d sticky nav sizing
chillenberger97e030c sticky nav background and transition js
chillenberger69f1210 add github stars, fix search
chillenbergerdcf528a add topnav hover states, js for dynamic styling, spacing
chillenbergerbda8d50 remove override for development
chillenbergera1c0d8a style nav ubttons active state, refactor top nav html
chillenberger49c9033 search underline spacing
chillenbergerace765e square buttons
chillenbergercd31eda add pricing link, remove open source link
chillenberger51945bb Merge branch 'master' into dan-top-nav-sticky
chillenbergerFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletionspgml-dashboard/static/css/scss/abstracts/variables.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionpgml-dashboard/static/css/scss/base/_base.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -110,7 +110,7 @@ table { | ||
| } | ||
| html, body, main { | ||
| height:fit-content; | ||
| } | ||
| article { | ||
27 changes: 26 additions & 1 deletionpgml-dashboard/static/css/scss/components/_badges.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,37 @@ | ||
| // Center badge content | ||
| .badge { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| } | ||
| .beta-badge { | ||
| @extend .badge; | ||
| text-transform: uppercase; | ||
| color: #{$pink}; | ||
| } | ||
| .github-badge { | ||
| $color: $neon-shade-100; | ||
| padding: 4px; | ||
| p { | ||
| margin: 0px; | ||
| background: #{$color}; | ||
| border-radius: calc($border-radius / 2); | ||
| padding: 4px; | ||
| font-size: 0.8rem; | ||
| font-weight: 500; | ||
| } | ||
| // Add right pointing arrow | ||
| &::after { | ||
| content: ""; | ||
| width: 0; | ||
| height: 0; | ||
| border-top: 5px solid transparent; | ||
| border-bottom: 5px solid transparent; | ||
| border-left: 5px solid #{$color}; | ||
| } | ||
| } |
18 changes: 2 additions & 16 deletionspgml-dashboard/static/css/scss/components/_buttons.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
44 changes: 36 additions & 8 deletionspgml-dashboard/static/css/scss/components/_navs.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
15 changes: 13 additions & 2 deletionspgml-dashboard/static/css/scss/layout/_containers.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
19 changes: 13 additions & 6 deletionspgml-dashboard/static/css/scss/themes/dark.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletionspgml-dashboard/static/js/btn-secondary.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
22 changes: 12 additions & 10 deletionspgml-dashboard/static/js/search.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletionspgml-dashboard/static/js/topnav-styling.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import { | ||
| Controller | ||
| } from '@hotwired/stimulus' | ||
| export default class extends Controller { | ||
| initialize() { | ||
| this.pinned_to_top = false; | ||
| } | ||
| connect() { | ||
| this.act_when_scrolled(); | ||
| this.act_when_expanded(); | ||
| } | ||
| act_when_scrolled() { | ||
| // check scroll position in initial render | ||
| if( window.scrollY > 48) { | ||
| this.pinned_to_top = true; | ||
| this.element.classList.add("pinned"); | ||
| } | ||
| addEventListener("scroll", (event) => { | ||
| if (window.scrollY > 48 && !this.pinned_to_top) { | ||
| this.pinned_to_top = true; | ||
| this.element.classList.add("pinned"); | ||
| } | ||
| if (window.scrollY < 48 && this.pinned_to_top) { | ||
| this.pinned_to_top = false; | ||
| this.element.classList.remove("pinned"); | ||
| }; | ||
| }) | ||
| } | ||
| // Applies a class when navbar is expanded, used in mobile view for adding background contrast. | ||
| act_when_expanded() { | ||
| addEventListener('show.bs.collapse', () => { | ||
| this.element.classList.add('navbar-expanded'); | ||
| }) | ||
| addEventListener('hidden.bs.collapse', () => { | ||
| this.element.classList.remove('navbar-expanded'); | ||
| }) | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletionspgml-dashboard/templates/components/github_icon.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <a class="d-flex align-items-center nav-link p-0 border-bottom-0" href="https://github.com/postgresml/postgresml"> | ||
| <span class="badge github-badge"><p>Stars | 3.3K</p></span> | ||
| <svg width="35" height="35" viewBox="0 0 40 39" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
| <path d="M20 0.25C17.3736 0.25 14.7728 0.763591 12.3463 1.76145C9.91982 2.75931 7.71504 4.22189 5.85786 6.06569C2.10714 9.78942 0 14.8399 0 20.106C0 28.8824 5.74 36.3284 13.68 38.9692C14.68 39.1281 15 38.5126 15 37.9764V34.6208C9.46 35.8121 8.28 31.9601 8.28 31.9601C7.36 29.6568 6.06 29.0412 6.06 29.0412C4.24 27.8102 6.2 27.8499 6.2 27.8499C8.2 27.9889 9.26 29.895 9.26 29.895C11 32.9132 13.94 32.0196 15.08 31.5431C15.26 30.2525 15.78 29.3788 16.34 28.8824C11.9 28.386 7.24 26.6784 7.24 19.1132C7.24 16.9092 8 15.142 9.3 13.7322C9.1 13.2358 8.4 11.1708 9.5 8.49025C9.5 8.49025 11.18 7.95414 15 10.5156C16.58 10.0787 18.3 9.86032 20 9.86032C21.7 9.86032 23.42 10.0787 25 10.5156C28.82 7.95414 30.5 8.49025 30.5 8.49025C31.6 11.1708 30.9 13.2358 30.7 13.7322C32 15.142 32.76 16.9092 32.76 19.1132C32.76 26.6982 28.08 28.3661 23.62 28.8625C24.34 29.4781 25 30.6893 25 32.5359V37.9764C25 38.5126 25.32 39.1479 26.34 38.9692C34.28 36.3085 40 28.8824 40 20.106C40 17.4985 39.4827 14.9165 38.4776 12.5075C37.4725 10.0984 35.9993 7.9095 34.1421 6.06569C32.285 4.22189 30.0802 2.75931 27.6537 1.76145C25.2272 0.763591 22.6264 0.25 20 0.25Z" fill="#FAFAFA"/> | ||
| </svg> | ||
| </a> |
2 changes: 1 addition & 1 deletionpgml-dashboard/templates/components/search_modal.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletionspgml-dashboard/templates/content/article.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.