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 option to remove "COPY CODE" for examples #476

Open
mfriesenegger opened this issue Jul 20, 2022 · 1 comment
Open

Add option to remove "COPY CODE" for examples #476

mfriesenegger opened this issue Jul 20, 2022 · 1 comment
Labels
effort:L Large effort effort:M Medium effort format-html html, xhtml, html5, webhelp, jsp support skill-css/js CSS and/or Javascript knowledge necessary skill-xslt XSLT knowledge necessary styles-2022 "suse2022-ns" styles

Comments

@mfriesenegger
Copy link

Problem Description

I am writing SUSE Best Practice documents. I show example output using . This will show a "COPY CODE" link but the reader does not need to copy the example output.

Expected Behaviour

Provide a method to disable "COPY CODE".

@tomschr tomschr added skill-xslt XSLT knowledge necessary format-html html, xhtml, html5, webhelp, jsp support skill-css/js CSS and/or Javascript knowledge necessary styles-2022 "suse2022-ns" styles labels Jul 20, 2022
@tomschr tomschr added effort:M Medium effort effort:L Large effort labels Oct 25, 2022
@tomschr
Copy link
Collaborator

tomschr commented Oct 25, 2022

Thanks Mike for your idea.

From what I see, it needs the following considerations:

  1. Markup (XML): A way to express to suppress the "copy code" for each screen. In most cases an attribute or a processing instruction should be fine. This part is done by our writers. However, the default action is to add these icons to every screen element in HTML.
  2. Documentation: Document how to do it in our styleguide.
  3. Transformation (XSLT): Convert the special markup from (1) with the XSLT stylehsheet into a specific class (for example, class="nocopy").
  4. Layout (JavaScript/CSS): Pick every verbatim element (in HTML, usually <pre>) except the one with the class from (2). Only insert icons for those who have NOT this class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:L Large effort effort:M Medium effort format-html html, xhtml, html5, webhelp, jsp support skill-css/js CSS and/or Javascript knowledge necessary skill-xslt XSLT knowledge necessary styles-2022 "suse2022-ns" styles
Projects
None yet
Development

No branches or pull requests

2 participants