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

Add link to subscriptions page via post-processing #720

Closed
lcawl opened this issue Mar 14, 2019 · 4 comments
Closed

Add link to subscriptions page via post-processing #720

lcawl opened this issue Mar 14, 2019 · 4 comments
Assignees

Comments

@lcawl
Copy link
Contributor

lcawl commented Mar 14, 2019

The X-Pack icon near page or section title is currently implemented as described in #542

We would like to turn it into a link to https://www.elastic.co/subscriptions

I had intended to accomplish this via the following Asciidoctor functionality: #567 but the last time I tested it, there were problems: #505 (comment)

If we can accomplish this temporarily (or permanently) via post-processing instead, that's worth considering.

@lcawl
Copy link
Contributor Author

lcawl commented Mar 16, 2019

It seems to me that for the post-processing to work, we would either need to:

  • Implement this similar to the current edit-me links (though in this case it would use the same URL in all the Stack docs and instead of disabling infrequently (:edit_url!:) we'd likely want its default to be disabled since the OSS-specific pages typically out-number the X-Pack-specific pages.

  • Add an element to each X-Pack-specific page/section that can be post-processed to be a clickable image (i.e. by turning it into something like <a href="https://www.elastic.co/subscriptions" class="license_me" title="Link to subscriptions" rel="nofollow">Subscriptions</a>).

In both cases you'd need to add something like this to the style.css (based on the existing edit_me and xpack examples):

#guide a.license_me {
position: absolute;
font-size: 14px;
right: -15px;
top: 0;
text-align: center:
z-index: 1000;
padding-top: 26px;
line-height: 1;
opacity: 0.3;
background-repeat: no-repeat;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAUCAYAAADPym6aAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAARTQAAEU0BwDlgYwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQfSURBVEiJ3VdbaBxlGD3fP5PtTqxBjYhYxCRqNAFtMZs3sQar0ezMThthEMFWVJBUUFpsY1NLg7RgHytSbAreQKQTarLzz24CiiNeXxKDWm2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2Dg4O/V2Kzs7OvAzg1NTW1obqeiOaZeWylWaZpzgkhHg+CYAsRdSmKMsTMz1by0Wh0iIjeBLCZmbuZ+dxS6kBra2sRAFRV3UNEXyYSietX2kFSSgbQZxjGR7VE/ZcxMTHRpqrqj/+bby0B4CwRdTWayFqhqmo3gILKzCcAHHYch4QQC40mtkpsYOZDzPyWms/nX9Y0LRBC7LkMf3VTAN7N5/MH/gYB17/KZ7ITXwAAAABJRU5ErkJggg==');
}

#guide a.license_me:hover {
opacity: 1;
}

@nik9000
Copy link
Member

nik9000 commented Mar 21, 2019

I'm working on this now. I've got a link showing up in the page but there is javascript getting in the way. I'll keep working on it!

@nik9000
Copy link
Member

nik9000 commented Mar 21, 2019 via email

nik9000 added a commit to nik9000/docs that referenced this issue Mar 22, 2019
This replaces the `x-pack` tags on the titles of pages that are about
elastic licensed features with clickable links that take you to the
subscriptions page.

This is implemented by replacing the section rendering code in docbook
with customized code that includes the link.

This also replaces the background image of the `x-pack` tag with one
that looks "more clickable" and has a hover treatment.

Closes elastic#720
nik9000 added a commit to nik9000/docs that referenced this issue Mar 22, 2019
This replaces the `x-pack` tags on the titles of pages that are about
elastic licensed features with clickable links that take you to the
subscriptions page.

This is implemented by replacing the section rendering code in docbook
with customized code that includes the link.

This also replaces the background image of the `x-pack` tag with one
that looks "more clickable" and has a hover treatment.

Closes elastic#720
nik9000 added a commit that referenced this issue Mar 27, 2019
This replaces the `x-pack` tags on the titles of pages that are about
elastic licensed features with clickable links that take you to the
subscriptions page.

This is implemented by replacing the title rendering code in docbook
with customized code that includes the link.

This also replaces the background image of the `x-pack` tag with one
that looks "more clickable" and has a hover treatment.

Closes #720
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants