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

Updates Hugo & removes vendored docsy #284

Merged
merged 9 commits into from
Jul 12, 2023
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
18 changes: 9 additions & 9 deletions assets/scss/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
position: fixed;
top: 0;
min-height: 71px;
z-index: 10000;
z-index: var(--of--header-main);
display: grid;
grid-template-columns: max-content 1fr max-content;
align-items: center;
grid-template-areas:
"brand search search"
"nav nav nav";

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a LOT of these sprinkled all over, which makes it really hard to focus on the actual changes. Lot of brain power is just needed for filtering out the noise. I'm guessing this is a text editor setting that needs to be fixed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anik120 I agree - people who commit a bunch of spaces at the end of lines should fix their editors :)

In the meantime - git diff upstream/master -w (or --ignore-space-at-eol) should help with that.

Github UI also has a setting for this. I hope this helps.

Screenshot 2023-06-22 at 21 45 23

@media (min-width: $ov--breakpoint--lg) {
display: flex;
align-items: center;
Expand All @@ -21,7 +21,7 @@
grid-area: brand;
display: flex;
margin: var(--of--spacer--sm);

@media (min-width: $ov--breakpoint--lg) {
&__picture {
min-width: 177px;
Expand Down Expand Up @@ -67,10 +67,10 @@
grid-template-columns: 1fr 1fr;
grid-template-rows: min-content min-content;
@media (min-width: $ov--breakpoint--lg) {
display: flex;
margin: 0;
display: flex;
margin: 0;
}

&__li {
@media (min-width: $ov--breakpoint--lg) {
border: none;
Expand All @@ -85,10 +85,10 @@
&:not(:last-of-type):not(:nth-last-child(-n+2)){
border-bottom: none;
}

}
&__a {
width: 100%;
width: 100%;
display: inline-block;
position: relative;
padding: var(--of--spacer--xs) var(--of--spacer--md);
Expand All @@ -106,7 +106,7 @@
// &.has-dropdown {
// grid-area: link;
// }

}
}
}
45 changes: 24 additions & 21 deletions assets/scss/_of-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
--of--FontSize--lg: 1.375rem; //22
--of--FontSize--xl: 1.5rem;//24
--of--FontSize--2xl: 2.625rem; //40

//spacers
--of--spacer--xs: .25rem; //4 purple
--of--spacer--sm: .5rem; //8 light blue
Expand All @@ -16,7 +16,7 @@
--of--spacer--xl: 2rem; //32 pink
--of--spacer--2xl: 3rem; //48 blue
--of--spacer--3xl: 4rem; //64 purple

//color
--of--color-brand--50: #b12239;
--of--color-brand--100: #921c2f;
Expand All @@ -33,48 +33,51 @@
--of--color-black--100: #040404;
--of--color-black--200: #202020;
--of--color-black--300: #000;

//transparencies
--of--color-transparent-background--100: rgba(32,32,32,.90);

//borders
--of--BorderWidth--sm: 2px;
--of--BorderWidth--lg: 4px;
--of--BorderRadius--sm: .1875rem;
--of--BorderRadius--md: .75rem;
--of--BorderRadius--lg: 40rem;

//text
--of--Color--100: var(--of--color-white--100);
--of--Color--200: var(--of--color-white--200);
--of--Color--300: var(--of--color-brand--100);
--of--Color--400: var(--of--color-black--200);
--of--Color--500: var(--of--color-brand--400);
--of--Color--600: var(--of--color-brand--300);



--of--LineHeight--sm: 1.3;
--of--LineHeight--lg: 1.5;

--of--FontWeight--100: 400;
--of--FontWeight--200: 700;

//animation
--of--animation: all .15s linear;

//shadows
--of--BoxShadow--sm: 0px 1px 4px rgba(0,0,0,0.5);

//misc
--of--menu-offset: 56px;
}
//media queries (no custom properties as MQs :(
$ov--breakpoint--xs: 0;
$ov--breakpoint--sm: 576px;
$ov--breakpoint--md: 768px;
$ov--breakpoint--lg: 992px;
$ov--breakpoint--xl: 1200px;
$ov--breakpoint--2xl: 1450px;

//misc
--of--menu-offset: 56px;

// z-indexes
--of--header-main: 10000;
}

//media queries (no custom properties as MQs :(
$ov--breakpoint--xs: 0;
$ov--breakpoint--sm: 576px;
$ov--breakpoint--md: 768px;
$ov--breakpoint--lg: 992px;
$ov--breakpoint--xl: 1200px;
$ov--breakpoint--2xl: 1450px;

// Breadcrumbs
$breadcrumb-font-size: null !default;
Expand Down
15 changes: 7 additions & 8 deletions layouts/partials/hooks/body-end.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{{ with .Site.Params.algolia_docsearch }}
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: 'e11ae88fced1b3f21f2c26a2ddf729d5',
indexName: 'operatorframework',
inputSelector: '.td-search-input',
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3"></script>
<script type="text/javascript">docsearch({
container: '#docsearch',
appId: 'BH4D9OD16A',
apiKey: 'e11ae88fced1b3f21f2c26a2ddf729d5',
indexName: 'operatorframework',
});</script>
{{ end }}
7 changes: 6 additions & 1 deletion layouts/partials/hooks/head-end.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{ with .Site.Params.algolia_docsearch }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3" />
<style>
.DocSearch-Container {
z-index: calc(var(--of--header-main) + 1);
}
</style>
Comment on lines +3 to +7
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this?

Copy link
Collaborator

@anik120 anik120 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stuff like these definitely don't have to be in the same PR though. "Change the look and feel of the search box" is not mentioned anywhere in the PR description/commit messages and yet these changes are there included in the commits.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anik120 PR description mentions this:

Switches the project to docsearch v3 (v2 is no longer maintained + Docsy assumes v3 usage now)

https://docsearch.algolia.com/docs/legacy/dropdown/

This specific style is required so that search popup of docsearch v3 doesn't get covered by header (it wasn't an issue in v2 due to different placement of v2 search overlay).

This is why smaller PRs are always favored. It's really tough to verify everything that's going in in PRs of this size.

Because this repo is so outdated it is impossible (or at least I do not see a way) to split it into smaller changes. You change one thing - you have to change another. It is a can of worms.

{{ end }}