Skip to content

Commit 57fbb23

Browse files
committed
Add new image template & temp fix for OneDeploy Overview image
Signed-off-by: Pedro Ielpi <pielpi@opennebula.io>
1 parent 0d00298 commit 57fbb23

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

content/docs/quick_start/automatic_deployment_of_opennebula_with_one_deploy/one_deploy_overview.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ The basic procedure is as follows:
3232
3333
Ansible is an agentless platform, and uses SSH as the default transport for deployment. The control node must be able to communicate with the managed nodes via SSH.
3434

35-
![image](/images/one_deploy_basic_arch.png)
36-
<br/>
35+
<!-- ![image](/images/one_deploy_basic_arch.png&width=1612&height=718) -->
36+
37+
{{< image path=/images/one_deploy_basic_arch.png width=720 height=446 >}}
38+
39+
<!-- ![image](/images/one_deploy_basic_arch.png)
40+
<br/> -->
3741

3842
It is worth noting that you can use the control node itself as a managed node. In the tutorials included in this documentation, the OpenNebula Front-end is installed on the Ansible control node, and the Hypervisors on the managed nodes.
3943

layouts/shortcodes/image.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{- with resources.Get (.Get "path") }}
2+
{{- with .Process (printf "resize %dx wepb" ($.Get "width")) -}}
3+
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="{{ $.Get "alt" }}">
4+
{{- end }}
5+
{{- end -}}

layouts/shortcodes/imgproc.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{{ $original := .Page.Resources.GetMatch (printf "**%s*" (.Get 0)) -}}
2+
{{ $command := .Get 1 -}}
3+
{{ $options := .Get 2 -}}
4+
{{ if eq $command "Fit" -}}
5+
{{ .Scratch.Set "image" ($original.Fit $options) -}}
6+
{{ else if eq $command "Resize" -}}
7+
{{ .Scratch.Set "image" ($original.Resize $options) -}}
8+
{{ else if eq $command "Fill" -}}
9+
{{ .Scratch.Set "image" ($original.Fill $options) -}}
10+
{{ else if eq $command "Crop" -}}
11+
{{ .Scratch.Set "image" ($original.Crop $options) -}}
12+
{{ else -}}
13+
{{ errorf "Invalid image processing command: Must be one of Fit, Fill, Crop or Resize." -}}
14+
{{ end -}}
15+
{{ $image := .Scratch.Get "image" -}}
16+
17+
<figure class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: {{ add $image.Width 10 -}}px">
18+
<img class="card-img-top" src="{{- $image.RelPermalink -}}" width="{{- $image.Width -}}" height="{{- $image.Height -}}">
19+
{{ with .Inner -}}
20+
<figcaption class="card-body px-0 pt-2 pb-0">
21+
<p class="card-text">
22+
{{/* Do **not** remove this comment! It ends above html block! See https://spec.commonmark.org/0.30/#html-blocks, 7. */}}
23+
{{ . }}{{ with $image.Params.byline }}<small class="text-body-secondary"><br/>{{ . }}</small>{{ end }}
24+
</p>
25+
</figcaption>
26+
{{ end -}}
27+
</figure>
34.9 KB
Loading

0 commit comments

Comments
 (0)