友链
导航
These are the good times in your life,
so put on a smile and it'll be alright
友链
导航
url(“data:image/gif;base64,asdf”)
three.js - JavaScript 3D library
three.js 是 web GL 的第三库. WEB GL 是 JS + OpenGL ES 2.0.
用法: 创建一个div,然后通过js初始化three.js,将内容放入该div
步骤:
介绍: 图灵社区 : 阅读 : JavaScript宝座:七大框架论剑
其中与 rails 贴合较紧的有 Ember.js 和 batman.js. ember 人气更高. batman 用 coffeescript. 但只是实现一个 example.com/# 的网站感觉没太大用. 要想跟 rails 结合起来还是挺复杂的.
Yeoman - Modern workflows for modern webapps
features:
components:
npm install -g yo
gem install compass
$ cd my_web_app $ npm install -g generator-angular # install generator $ yo angular # scaffold out a AngularJS project # Optional. Scaffolding out Angular app’s further pieces $ yo angular:controller myController $ yo angular:directive myDirective $ yo angular:filter myFilter $ yo angular:service myService # 更多 angular 相关内容见: https://github.com/yeoman/generator-angular $ bower install angular-ui # install a dependency for your project from Bower # 更多 bower 相关见: http://yeoman.io/packagemanager.html $ grunt test # test your app $ grunt server # preview your app $ grunt # build the application for deployment # 发布时应注意: http://yeoman.io/deployment.html
clone 一个 yeoman app 后, 是不带 node_modules
目录的, 这样 grunt 就没法运行, 需按以下步骤初始化:
$ npm install # 可能需要 sudo 运行 $ bower update
js 模板
<div id="main"> <!-- placeholder --> </div> <!-- 定义模板 --> <script id="entry-template" type="text/x-handlebars-template"> <div class="entry"> <h1> {{title}} <!-- escape --> </h1> <div class="body"> {{body}} <!-- not escape --> </div> </div> </script> <!-- 使用 --> <script> var source = $("#entry-template").html(); var template = Handlebars.compile(source); var context = {title: "my new post", body: "<p>this is my first post</p>"}; var html = template(context); $("#main").html(html); </script>
.table-responsive
to make them scroll horizontally up to small devices (under 768px). 另外, 这儿有一些其他解决思路: Responsive Tables Demo响应式, 移动设备优先. 但 bootstrap 更火, 还是用 bootstrap 吧…
The most advanced responsive front-end framework in the world.
Foundation: The Most Advanced Responsive Front-end Framework from ZURB