Skip to content

Commit fa32e96

Browse files
committed
added copy to menu,google like logo again,bite me
1 parent 207896a commit fa32e96

6 files changed

Lines changed: 27 additions & 8 deletions

File tree

‎index.html‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@
107107
}
108108
/*C*/
109109
.main-title h1.animated span:nth-child(1){
110-
color: #d50f25;
110+
color: #3369e8;
111111
transition-delay: 200ms;
112112
}
113113
/*O*/
114114
.main-title h1.animated span:nth-child(2){
115-
color: #3369e8;
115+
color: #d50f25;
116116
transition-delay: 350ms;
117117
}
118118
/*D*/
@@ -122,7 +122,7 @@
122122
}
123123
/*E*/
124124
.main-title h1.animated span:nth-child(4){
125-
color: #d50f25;
125+
color: #3369e8;
126126
transition-delay: 650ms;
127127
}
128128
/*L*/
@@ -132,7 +132,7 @@
132132
}
133133
/*F*/
134134
.main-title h1.animated span:nth-child(6){
135-
color: #3369e8;
135+
color: #d50f25;
136136
transition-delay: 950ms;
137137
}
138138
.search-form{
@@ -208,6 +208,9 @@
208208
overflow: scroll;
209209
-webkit-overflow-scrolling: touch;
210210
}
211+
.variable-btns>.variable-btns__copy{
212+
display: none;
213+
}
211214
@media (min-width: 62em) {
212215
.main-container{
213216
padding: 20px 150px;
@@ -243,6 +246,9 @@
243246
.sourcecode-modal .modal-content{
244247
padding-bottom: 0;
245248
}
249+
.variable-btns>.variable-btns__copy{
250+
display: block;
251+
}
246252
}
247253
</style>
248254
</head>
@@ -335,10 +341,11 @@ <h5 class="variable-wrap" data-id="{id}" data-repo="{repo}" data-url="{url}" dat
335341
</div>
336342
</div>
337343
<script type="text/html" template="variableMenu">
338-
<div class="btn-group-vertical" role="group">
344+
<div class="btn-group-vertical variable-btns" role="group">
339345
<button type="button" class="btn btn-secondary"><a href="{repo}" target="_blank">Repo</a></button>
340346
<button type="button" class="btn btn-secondary"><a href="#{val}">Search</a></button>
341-
<button type="button" class="btn btn-secondary js-variable-button__code" data-id="{id}">Codes</button>
347+
<button type="button" class="btn btn-secondary variable-btns__code" data-id="{id}">Codes</button>
348+
<button type="button" class="btn btn-secondary variable-btns__copy" data-clipboard-text="{val}">Copy</button>
342349
</div>
343350
</script>
344351
<!-- http://tholman.com/github-corners/ -->
@@ -347,6 +354,7 @@ <h5 class="variable-wrap" data-id="{id}" data-repo="{repo}" data-url="{url}" dat
347354
<script src="src/lib/tether.min.js"></script>
348355
<script src="src/lib/jquery.min.js"></script>
349356
<script src="src/lib/bootstrap.min.js"></script>
357+
<script src="src/lib/ZeroClipboard.min.js"></script>
350358
<script src="src/lib/highlight.min.js"></script>
351359
<script>
352360
$(function () {
@@ -653,15 +661,16 @@ <h5 class="variable-wrap" data-id="{id}" data-repo="{repo}" data-url="{url}" dat
653661
els.sourceCodeModal.find('.modal-header a').attr('href',this.dataset.repo);
654662
return els.variableMenuTpl
655663
.replace('{id}',this.dataset.id)
656-
.replace('{val}',this.dataset.val)
664+
.replace(/\{val\}/g,this.dataset.val)
657665
.replace('{repo}',this.dataset.repo);
658666
},
659667
template: '<div class="popover popover--variable" role="tooltip"><div class="popover-arrow"></div><div class="popover-content"></div></div>'
660668
});
661669
$(this).popover('show');
670+
els.variableClipboard = new ZeroClipboard($('.variable-btns__copy')[0]);
662671
return false;
663672
});
664-
els.body.on('click','.js-variable-button__code',showSourceCode);
673+
els.body.on('click','.variable-btns__code',showSourceCode);
665674
els.body.on('click',removeVariableMenus);
666675
els.sourceCodeModal.on('hidden.bs.modal', function () {
667676
els.sourceCodeContent.text('');

‎resources/images/codelf_logo.png‎

-1.49 KB
Loading

‎src/lib/ZeroClipboard.min.js‎

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/lib/ZeroClipboard.swf‎

6.43 KB
Binary file not shown.

‎static/codelf_logo.psd‎

37.2 KB
Binary file not shown.

‎static/images/codelf_logo.png‎

-1.49 KB
Loading

0 commit comments

Comments
 (0)