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
.site__title { | |
color: #f35626; | |
background-image: -webkit-linear-gradient(92deg,#f35626,#feab3a); | |
-webkit-background-clip: text; | |
-webkit-text-fill-color: transparent; | |
-webkit-animation: hue 60s infinite linear; | |
} | |
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
There is one way to play the video/audio file automatically on 4.2.1. Create an iframe and set its source to the media file's URL and append the iframe to the body. It'll be autoplay. | |
var ifr=document.createElement("iframe"); | |
ifr.setAttribute('src', "http://mysite.com/myvideo.mp4"); | |
ifr.setAttribute('width', '1px'); | |
ifr.setAttribute('height', '1px'); | |
ifr.setAttribute('scrolling', 'no'); | |
ifr.style.border="0px"; | |
document.body.appendChild(ifr); |
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
<script>document.documentElement.className = document.documentElement.className.replace("no-js","js");</script> |
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
<!-- 微信分享抓取专用 --> | |
<img id="weixin-share-icon" style="position: absolute; z-index: -222; width: 0; height: 0;" src="{{ STATIC_URL }}images/lime/share-default.jpg" /> |
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
var Events = (function() { | |
// Backbone.js 0.9.10 | |
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. | |
// Backbone may be freely distributed under the MIT license. | |
// For all details and documentation: | |
// http://backbonejs.org | |
// Create a local reference to array methods. | |
var array = []; |
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
$form.validate({ | |
ignore: '.ignore', | |
rules: rules, | |
messages: messages, | |
invalidHandler: function(event, validator) { | |
// console.log(event, validator); | |
var errorEl = validator.findLastActive() || validator.errorList.length && validator.errorList[0].element; | |
if(errorEl) | |
$(errorEl).closest('.accordion-body').collapse('show'); | |
}, |
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
# http://guides.rubygems.org/command-reference/#gem-environment | |
--- | |
:backtrace: true | |
:bulk_threshold: 1000 | |
:benchmark: false | |
:sources: | |
- http://ruby.taobao.org/ | |
:update_sources: true | |
:verbose: true | |
gem: --no-document |
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
/** | |
* extend/zepto.js | |
*/ | |
define([ | |
'zepto' | |
], function() { | |
"use strict"; |
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
var require = { | |
paths: { | |
'jquery': '../../bower_components/zepto/zepto.min' | |
} | |
} |
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
// when model.attributes is different from the params to save | |
// e.g. when save to restful api, one attr should be `resource_uri` | |
// formated as string type, but the returned attr value in json is object formated | |
var model = new Backbone.Model(); | |
model.save(null, { | |
wait: true, | |
success: function() { | |
}, | |
attrs: _.omit(model.attributes, 'selected') | |
}); |