Commit 3bed273d authored by haseeb's avatar haseeb

dropdown style fixes

parent 174ee4e1
......@@ -4,12 +4,16 @@
$('#share-btn').click((event) => {
event.preventDefault();
$('#share-btn').addClass('is-active');
$('#embed-btn').removeClass('is-active');
$('#snippet-url-area').val(`${protocol}//${host + pathname}`);
$('#embed-action').html('Share');
});
$('#embed-btn').click((event) => {
event.preventDefault();
$('#embed-btn').addClass('is-active');
$('#share-btn').removeClass('is-active');
const scriptTag = `<script src="${protocol}//${host + pathname}.js"></script>`;
$('#snippet-url-area').val(scriptTag);
$('#embed-action').html('Embed');
......
......@@ -60,7 +60,11 @@
.form-control {
cursor: auto;
width: 101%;
margin-left: -1;
margin-left: -1px;
}
.embed-toggle-list li a {
padding: 8px 40px;
}
.embed-toggle {
......
......@@ -33,17 +33,19 @@
= edited_time_ago_with_tooltip(@snippet, placement: 'bottom', html_class: 'snippet-edited-ago', exclude_author: true)
- if public_snippet?
.embed-snippet.pull-right.col-md-6
.embed-snippet
.input-group
.input-group-btn
%a.btn.embed-toggle{ 'data-toggle': 'dropdown' }
%span#embed-action Embed
= sprite_icon('angle-down', size: 12)
%ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right
%ul.dropdown-menu.dropdown-menu-selectable.embed-toggle-list
%li
%a#embed-btn.btn.btn-transparent{ href: "#" } Embed
%a#embed-btn.btn.btn-transparent.is-active{ href: "#" }
%strong.embed-toggle-list-item Embed
%li
%a#share-btn.btn.btn-transparent{ href: "#" } Share
%a#share-btn.btn.btn-transparent{ href: "#" }
%strong.embed-toggle-list-item Share
%input#snippet-url-area.snippet-embed-input.form-control{ type: "text", autocomplete: 'off', value: snippet_embed }
.input-group-btn
%a#clipboard-btn.btn.btn-default{ title: "Copy to clipboard", data: { toggle: "tooltip", placement: "bottom", title: "Copy source to clipboard", container: "body", clipboard_target: '#snippet-url-area' } }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment