-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from ministryofjustice/fix-62
Updates to mojMenu (Fix #62)
- Loading branch information
Showing
15 changed files
with
306 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{% extends "layouts/base.html" %} | ||
|
||
{% block body %} | ||
|
||
<div class="govuk-grid-row"> | ||
|
||
<div class="govuk-grid-column-full"> | ||
|
||
{{ govukBackLink({ | ||
text: "Back", | ||
href: "../" | ||
}) }} | ||
|
||
<h1 class="govuk-heading-xl"> | ||
<span class="govuk-caption-xl">Components</span> Button menu | ||
</h1> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
|
||
<h2 class="govuk-heading-m">Example 1</h2> | ||
<p>Using anchors (<code>a</code>)</p> | ||
|
||
{{ mojButtonMenu({ | ||
classes: 'button-menu-1', | ||
items: [{ | ||
text: 'Archive', | ||
classes: 'govuk-button--secondary', | ||
href: '#' | ||
}, { | ||
text: 'Reassign', | ||
classes: 'govuk-button--secondary', | ||
href: '#' | ||
}, { | ||
text: 'Delete', | ||
classes: 'govuk-button--secondary', | ||
href: '#' | ||
}] | ||
}) }} | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
|
||
<h2 class="govuk-heading-m govuk-!-margin-top-5">Example 2</h2> | ||
<p>Using <code>input type=submit</code></p> | ||
|
||
{{ mojButtonMenu({ | ||
classes: 'button-menu-2', | ||
items: [{ | ||
element: 'input', | ||
type: 'submit', | ||
text: 'Make decision' | ||
}, { | ||
element: 'input', | ||
type: 'submit', | ||
text: 'List for hearing', | ||
classes: 'govuk-button--secondary' | ||
}] | ||
}) }} | ||
|
||
</div> | ||
</div> | ||
|
||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
|
||
<h2 class="govuk-heading-m govuk-!-margin-top-5">Example 3</h2> | ||
<p>Using <code>button</code></p> | ||
|
||
{{ mojButtonMenu({ | ||
classes: 'button-menu-3', | ||
items: [{ | ||
text: 'Save and continue' | ||
}, { | ||
text: 'Save as draft', | ||
classes: 'govuk-button--secondary' | ||
}, { | ||
text: 'Delete claim', | ||
classes: 'govuk-button--warning' | ||
}] | ||
}) }} | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
|
||
<h2 class="govuk-heading-m govuk-!-margin-top-5">Example 4</h2> | ||
|
||
{{ mojButtonMenu({ | ||
classes: 'button-menu-4', | ||
items: [{ | ||
text: 'Make decision' | ||
}, { | ||
text: 'List for hearing', | ||
classes: 'govuk-button--secondary' | ||
}] | ||
}) }} | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
{% endblock %} | ||
|
||
{% block pageScripts %} | ||
<script> | ||
new MOJFrontend.ButtonMenu({ | ||
container: $('.button-menu-1'), | ||
mq: '(min-width: 45em)', | ||
buttonText: 'Actions' | ||
}); | ||
|
||
new MOJFrontend.ButtonMenu({ | ||
container: $('.button-menu-2'), | ||
mq: '(min-width: 35em)', | ||
buttonText: 'Actions', | ||
buttonClasses: 'govuk-button--secondary moj-button-menu__toggle-button--secondary' | ||
}); | ||
|
||
new MOJFrontend.ButtonMenu({ | ||
container: $('.button-menu-3'), | ||
mq: '(min-width: 45em)', | ||
buttonText: 'Actions', | ||
buttonClasses: 'govuk-button--secondary moj-button-menu__toggle-button--secondary', | ||
}); | ||
|
||
new MOJFrontend.ButtonMenu({ | ||
container: $('.button-menu-4'), | ||
buttonText: 'Actions', | ||
buttonClasses: 'govuk-button--secondary moj-button-menu__toggle-button--secondary' | ||
}); | ||
|
||
</script> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.