Skip to content

Improve look and feel of olm site #67

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

Merged
merged 3 commits into from
Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 3 additions & 2 deletions assets/scss/_docs.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.td-sidebar-nav .td-sidebar-link__page {
color: #222;
font-weight: normal;
//font-weight: normal;
}

.of-docs__wrapper {
Expand All @@ -11,12 +11,13 @@
list-style: disc;
margin-left: 2rem;
}
.td-sidebar-nav .td-sidebar-link__page {
.td-sidebar-nav .td-sidebar-link__page {
font-weight: normal;
}
h1,h2,h3,h4,h5,h6 {
color: var(--of--Color--brand--200);
font-weight: 800;
letter-spacing: 2px;
Copy link
Contributor

Choose a reason for hiding this comment

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

@anmol372 could we revert this change? We specifically wanted margin: var(--of--spacer--md) 0 var(--of--spacer--sm); because the spacing between the heading was looking really bad

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

margin: var(--of--spacer--md) 0 var(--of--spacer--sm);

a:hover {
Expand Down
155 changes: 155 additions & 0 deletions assets/scss/_sidebar-tree.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
//
// Left side navigation
//
.td-sidebar-nav {
padding-right: 0.5rem;
margin-right: -15px;
margin-left: -15px;

@include media-breakpoint-up(md) {
@supports (position: sticky) {
// max-height: calc(100vh - 10rem);
max-height: calc(100vh - 4rem);
overflow-y: auto;
}
}


@include media-breakpoint-up(md) {
display: block !important;
}


&__section {
li {
list-style: none;
}

ul {
padding: 0;
margin: 0;
}

@include media-breakpoint-up(md) {
& > ul {
padding-left: .5rem;
}
}


padding-left: 0;
}

&__section-title {
display: block;
//font-weight: $font-weight-medium;
font-weight: 550;

.active {
//font-weight: $font-weight-bold;
font-weight: 800;
color: $gray-900;
}

a {
color: $gray-700;
}
}

.td-sidebar-link {
display: block;
padding-bottom: 0.375rem;

&__page {
color: $gray-600;
font-weight: $font-weight-light;
}
}

a {
&:hover {
color: $blue;
text-decoration: none;
}

&.active {
//font-weight: $font-weight-bold;
font-weight: 800;
color: $gray-800;

}
}

.dropdown {
a {
color: $gray-700;
}

.nav-link {
padding: 0 0 1rem;
}
}
}

.td-sidebar {
padding-top: 4rem;
margin-bottom: var(--of--spacer--md);
display:flex;
justify-content: center;
background: var(--of--color-white--200);
span {
margin-left: var(--of--spacer--md);
font-family: var(--of--font-family);
}
@include media-breakpoint-up(md) {
padding-top: var(--of--spacer--md);
padding-bottom: 4rem;
background-color: $td-sidebar-bg-color;
margin-bottom: 0;
padding-right: 1rem;
border-right: 1px solid $td-sidebar-border-color;
}

&__toggle {
line-height: 1;
color: $gray-900;
margin: 1rem;
}

&__search {
padding: 1rem 15px;
margin-right: -15px;
margin-left: -15px;
}

&__inner {
order: 0;

@include media-breakpoint-up(md) {
@supports (position: sticky) {
position: sticky;
top:71px;
z-index: 10;
height: calc(100vh - 6rem);
}
}


@include media-breakpoint-up(xl) {
flex: 0 1 320px;
}


.td-search-box {
width: 100%;
}

&__heading {
padding: var(--of--spacer--md);
background: var(--of--color-brand--300);
color: var(--of--color-white--100);
margin-left: -15px;
margin-right: -15px;
}
}
}
61 changes: 61 additions & 0 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,68 @@
@import "../../themes/docsy/assets/scss/support/functions";
@import "../../themes/docsy/assets/scss/bs-variables";
@import "../../themes/docsy/assets/scss/support/mixins";

@import "../../themes/docsy/assets/vendor/bootstrap/scss/bootstrap";

@import "../../themes/docsy/assets/vendor/Font-Awesome/scss/fontawesome.scss";
@import "../../themes/docsy/assets/vendor/Font-Awesome/scss/solid.scss";
@import "../../themes/docsy/assets/vendor/Font-Awesome/scss/brands.scss";

@import "../../themes/docsy/assets/scss/support/utilities";
@import "../../themes/docsy/assets/scss/colors";
@import "../../themes/docsy/assets/scss/boxes";
@import "../../themes/docsy/assets/scss/blog";
@import "../../themes/docsy/assets/scss/code";
@import "../../themes/docsy/assets/scss/nav";
//@import "../../themes/docsy/assets/scss/sidebar-tree";
@import "../../themes/docsy/assets/scss/sidebar-toc";
@import "../../themes/docsy/assets/scss/buttons";
@import "../../themes/docsy/assets/scss/breadcrumb";
@import "../../themes/docsy/assets/scss/alerts";
@import "../../themes/docsy/assets/scss/content";
@import "../../themes/docsy/assets/scss/search";
@import "../../themes/docsy/assets/scss/main-container";
@import "../../themes/docsy/assets/scss/blocks/blocks";
@import "../../themes/docsy/assets/scss/section-index";
@import "../../themes/docsy/assets/scss/pageinfo";

@if $td-enable-google-fonts {
@import url($web-font-path);
}

footer {
min-height: 150px;

@include media-breakpoint-down(md) {
min-height: 200px;
}
}

// Adjust anchors vs the fixed menu.
@include media-breakpoint-up(md) {
.td-offset-anchor:target {
display: block;
position: relative;
top: -4rem;
visibility: hidden;
}

h2[id]:before, h3[id]:before, h4[id]:before, h5[id]:before {
display: block;
content: " ";
margin-top: -5rem;
height: 5rem;
visibility: hidden;
}
}



@import "functions";
@import "variables";
@import "reset";
@import "type";
@import "sidebar-tree";

//components
@import "header";
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/Concepts/crds/subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ weight: 4
---


A Subscription represents an intention to install an operator. It is the CustomResource that relate an operator to a CatalogSource. Subscriptions describe which [channel](/docs/glossary/glossary/#channel) of an operator package to subscribe to, and whether to perform updates automatically or manually. If set to automatic, the Subscription ensures OLM will manage and upgrade the operator to ensure the latest version is always running in the cluster.
A Subscription represents an intention to install an operator. It is the CustomResource that relate an operator to a CatalogSource. Subscriptions describe which [channel](/docs/glossary/#channel) of an operator package to subscribe to, and whether to perform updates automatically or manually. If set to automatic, the Subscription ensures OLM will manage and upgrade the operator to ensure the latest version is always running in the cluster.

Here's an example of a Subscription definition:

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/Tasks/install-operator-with-olm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: >
Install your operator from a catalog of operators
---

[Once you've made your operator available in a catalog](/docs/tasks/make-operator-part-of-catalog/), or you've chosen an operator from the [list of operators available to be installed in the cluster](/docs/tasks/list-operators-available-to-install/), you can install your operator by creating a [`Subscription`](/docs/concepts/crds/subscription/) to a specific [channel](/docs/glossary/glossary/#channel).
[Once you've made your operator available in a catalog](/docs/tasks/make-operator-part-of-catalog/), or you've chosen an operator from the [list of operators available to be installed in the cluster](/docs/tasks/list-operators-available-to-install/), you can install your operator by creating a [`Subscription`](/docs/concepts/crds/subscription/) to a specific [channel](/docs/glossary/#channel).

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ $ kubectl get packagemanifests -l operatorframework.io/os.windows=supported

## Caveats

Only the labels on the [HEAD of the default channel](/docs/glossary/glossary/#channel-head) are considered for filtering PackageManifests by label.
Only the labels on the [HEAD of the default channel](/docs/glossary/#channel-head) are considered for filtering PackageManifests by label.

This means, for example, that providing an alternate architecture for an operator in the non-default channel is possible, but will not be available for filtering in the PackageManifest API.
21 changes: 10 additions & 11 deletions content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ description: >

- [git](https://git-scm.com/downloads)
- [go](https://golang.org/dl/) version `v1.12+`.
- [docker](https://docs.docker.com/install/) version `17.03`+.
- Alternatively [podman](https://github.com/containers/libpod/blob/master/install.md) `v1.2.0+` or [buildah](https://github.com/containers/buildah/blob/master/install.md) `v1.7+`
- [docker](https://docs.docker.com/install/) version `17.03`+ or [podman](https://github.com/containers/libpod/blob/master/install.md) `v1.2.0+` or [buildah](https://github.com/containers/buildah/blob/master/install.md) `v1.7+`.
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) `v1.11.3+`.
- Access to a Kubernetes `v1.11.3+` cluster.

## Installing OLM in your cluster

### Install Released OLM
For installing release versions of OLM, for example version 0.12.0, you can use the following command:
For installing release versions of OLM, for example version 0.15.1, you can use the following command:

```bash
```sh
Copy link
Member

Choose a reason for hiding this comment

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

If we expect users to copy these shell commands verbatim then I suggest we do not prepend $ to each line of a sh block; this prefix is only visually useful when using a console block with command output as an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense, I prepended the $ prefix to match the style on the SDK website, but I have corrected it.

export olm_release=0.15.1
kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${olm_release}/crds.yaml
kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${olm_release}/olm.yaml
Expand All @@ -32,7 +31,7 @@ Learn more about available releases [here](https://github.com/operator-framework

To deploy OLM locally on a [minikube cluster](https://kubernetes.io/docs/tasks/tools/install-minikube/) for development work, use the `run-local` target in the [Makefile](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Makefile).

```bash
```sh
git clone https://github.com/operator-framework/operator-lifecycle-manager.git
cd operator-lifecycle-manager
make run-local
Expand All @@ -42,7 +41,7 @@ make run-local

You can verify your installation of OLM by first checking for all the neccesasary CRDs in the cluster:

```bash
```sh
$ kubectl get crd
NAME CREATED AT
catalogsources.operators.coreos.com 2019-10-21T18:15:27Z
Expand All @@ -54,7 +53,7 @@ subscriptions.operators.coreos.com 2019-10-21T18:15:27Z

And then inspecting the deployments of OLM and it's related components:

```bash
```sh
$ kubectl get deploy -n olm
NAME READY UP-TO-DATE AVAILABLE AGE
catalog-operator 1/1 1 1 5m52s
Expand All @@ -67,7 +66,7 @@ packageserver 2/2 2 2 5m43s
When you install OLM, it comes packaged with a number of Operators developed by the community that you can install instantly.
You can use the `pacakagemanifest` api to see the operators available for you to install in your cluster:

```bash
```sh
$ kubectl get packagemanifest -n olm
NAME CATALOG AGE
cassandra-operator Community Operators 26m
Expand All @@ -79,7 +78,7 @@ wildfly Community Operators 26m

To install the etcd operator in the default namespace, first create an `OperatorGroup` for the default namespace:

```bash
```sh
$ cat operatorgroup.yaml
kind: OperatorGroup
apiVersion: operators.coreos.com/v1
Expand All @@ -96,7 +95,7 @@ operatorgroup.operators.coreos.com/og-single created

Then create a subscription for the etcd operator:

```bash
```sh
$ cat subscription.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
Expand All @@ -117,7 +116,7 @@ subscription.operators.coreos.com/etcd created

This installs the v0.9.2 version of the etcd operator, and then upgrades to the latest version of the etcd operator in your cluster.

```bash
```sh
$ kubectl get sub -n default
NAME PACKAGE SOURCE CHANNEL
etcd etcd operatorhubio-catalog singlenamespace-alpha
Expand Down
17 changes: 17 additions & 0 deletions layouts/docs/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{ define "main" }}
<div class="td-content">
<h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
{{ .Content }}
{{ partial "section-index.html" . }}
{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
{{ partial "feedback.html" .Site.Params.ui.feedback }}
<br />
{{ end }}
{{ if (.Site.DisqusShortname) }}
<br />
{{ partial "disqus-comment.html" . }}
{{ end }}
<div class="text-muted mt-5 pt-3 border-top">{{ partial "page-meta-lastmod.html" . }}</div>
</div>
{{ end }}
3 changes: 3 additions & 0 deletions layouts/docs/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{ define "main" }}
{{ .Render "content" }}
{{ end }}
Loading