Skip to content

Commit

Permalink
Merge pull request #1179 from openSUSE/hellcp/doc-lint
Browse files Browse the repository at this point in the history
Fix lint issues with the doc
  • Loading branch information
hennevogel committed Mar 30, 2022
2 parents d9fa5af + adc0b1a commit e0c9c06
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .haml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
linters:
MultilinePipe:
enabled: false
95 changes: 61 additions & 34 deletions app/views/download/doc.html.haml
Original file line number Diff line number Diff line change
@@ -1,57 +1,84 @@
- @page_title = "OBS Download page"
- @page_title = 'OBS Download page'

.container.my-4
%h1= _("Using OBS download pages")
%h1= _('Using OBS download pages')
%p
= _("Welcome to the OBS download page. This page offers a simple way to show your users the latest builds of your packages and appliances by either embedding its output as an iframe in your project homepage, or by creating a download page for you.")
%h2= _("Creating a download page for a package")
= _('Welcome to the OBS download page. This page offers a simple way to |
show your users the latest builds of your packages and appliances by |
either embedding its output as an iframe in your project homepage, or |
by creating a download page for you.') |
%h2= _('Creating a download page for a package')
%p
= _("Just create a link to:")
= _('Just create a link to:')
%pre
https://software.opensuse.org/download/package?project=
%b>= _("projectname")
%b>= _('projectname')
&package=
%b>= _("packagename")
= _("Example:")
- package_link = url_for(controller: :download, action: :package, project: "openSUSE:Tools", package: "osc", only_path: false)
%b>= _('packagename')
= _('Example:')
- package_link = url_for(controller: :download, action: :package,
project: 'openSUSE:Tools', package: 'osc',
only_path: false)
= link_to nil, package_link
%p
= _("To embed this page as an iframe in the download section of your project homepage, you can use this code:")
= _('To embed this page as an iframe in the download section of your |
project homepage, you can use this code:') |
%pre
<iframe src="https://software.opensuse.org/download/package.iframe?project=
%b>= _("projectname")
<iframe src='https://software.opensuse.org/download/package.iframe
%span> ?project=
%b>= _('projectname')
package=
%b>= _("packagename")
"></iframe>
= _("Which will result in an output like this:")
%iframe{src: url_for(controller: :download, action: :package, project: "openSUSE:Tools", package: "osc", format: "iframe", protocol: "https"), width: "100%", height: "700px", frameBorder: 0}
%b>= _('packagename')
'></iframe>
= _('Which will result in an output like this:')
%iframe{ src: url_for(controller: :download, action: :package,
project: 'openSUSE:Tools', package: 'osc',
format: 'iframe', protocol: 'https'),
width: '100%', height: '700px', frameBorder: 0 }
%h2 Creating a download page for an appliance
%p
= _("If your OBS project is building appliances, you can also link to those with:")
= _('If your OBS project is building appliances, you can also link to |
those with:') |
%pre
https://software.opensuse.org/download/appliance?project=
%b>= _("projectname")
%b>= _('projectname')
%p
= _("To embed an iframe showing the appliances of your project, use this code:")
= _('To embed an iframe showing the appliances of your project, use this |
code:') |
%pre
<iframe src="https://software.opensuse.org/download/appliance.iframe?project=
%b>= _("projectname")
"></iframe>
<iframe src='https://software.opensuse.org/download/appliance.iframe
%span> ?project=
%b>= _('projectname')
'></iframe>
%p
= _("Which will result in an output like this:")
%iframe{src: url_for(controller: :download, action: :appliance, project: "OBS:Server:2.10", format: "iframe", protocol: "https"), width: "100%", height: "700px", frameBorder: 0}
%h2= _("Advanced options")
%h3= _("JSON output")
= _('Which will result in an output like this:')
%iframe{ src: url_for(controller: :download, action: :appliance,
project: 'OBS:Server:2.10', format: 'iframe',
protocol: 'https'),
width: '100%', height: '700px', frameBorder: 0 }
%h2= _('Advanced options')
%h3= _('JSON output')
%p
= _("You can also request the data in json format by using .json as output format, for example:")
= link_to nil, controller: :download, action: :package, format: :json, project: "openSUSE:Tools", package: "osc", only_path: false
%h3= _("Theming")
= _('You can also request the data in json format by using .json as |
output format, for example:') |
= link_to nil, controller: :download, action: :package, format: :json,
project: 'openSUSE:Tools', package: 'osc', only_path: false
%h3= _('Theming')
%p
= _("To customize the theming of the download page, you have multiple options to change the colors.")
= _('To customize the theming of the download page, you have multiple |
options to change the colors.') |
- params = _('Use the parameters **bcolor** (background), **fcolor** |
(foreground), **acolor** (links) and **hcolor** (hover) to |
set the different colors.') |
:markdown
#{_("Use the parameters **bcolor** (background), **fcolor** (foreground), **acolor** (links) and **hcolor** (hover) to set the different colors.")}
#{params}
%p
= _("Example:")
- custom_iframe = url_for(controller: :download, action: :appliance, format: :iframe, project: "OBS:Server:2.10", fcolor: "ffffff", hcolor: "35b9ab", acolor: "73ba25", bcolor: "173f4f", only_path: false)
= _('Example:')
- custom_iframe = url_for(controller: :download, action: :appliance,
format: :iframe, project: 'OBS:Server:2.10',
fcolor: 'ffffff', hcolor: '35b9ab',
acolor: '73ba25', bcolor: '173f4f',
only_path: false)
%pre= custom_iframe
%iframe{src: custom_iframe, width: "100%", height: "700px", frameBorder: 0}
%iframe{ src: custom_iframe, width: '100%', height: '700px',
frameBorder: 0 }

0 comments on commit e0c9c06

Please sign in to comment.