Skip to content

Commit f8153fe

Browse files
dandimeodandimeonerpaula
authored
[DOC-589] Button shortcode (#259)
* first button shortcode implemenetation * button able to be put in middle of text * deactivated class if no link in button * open new tab if link, finish styling * delete text and position keys * nikhil requested changes * no deactivated * revert test 3.11 index content * new button html and css * delete old css * revert button example usage * revert button example usage cut extra newline --------- Co-authored-by: dandimeo <[email protected]> Co-authored-by: Paula Mihu <[email protected]>
1 parent bcc0829 commit f8153fe

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ $link := .Get "link" | default "" }}
2+
{{ $color := .Get "color" | default "green" }}
3+
4+
<a href="{{ $link }}" target="_blank" rel="noopener noreferrer"><button class="{{ $color }}">{{ .Inner | safeHTML }}</button></a>

site/themes/arangodb-docs-theme/static/css/theme.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,24 @@ button, input, optgroup, select, textarea {
144144
margin-bottom: 15px;
145145
}
146146

147+
button {
148+
border-radius: 4px;
149+
font-weight: 700;
150+
line-height: 16px;
151+
min-height: 16px;
152+
font-size: 14px;
153+
padding: 12px 24px;
154+
color: white;
155+
margin-bottom: 28px;
156+
}
157+
158+
button.green {
159+
background-color: var(--HEADERS-COLOR);
160+
}
161+
162+
button.grey {
163+
background-color: var(--gray-600);
164+
}
147165

148166
ul, ol {
149167
margin-bottom: 20px;

0 commit comments

Comments
 (0)