Skip to content

Instantly share code, notes, and snippets.

View mongoltolbo's full-sized avatar

Lkhamsuren Amarjargal mongoltolbo

View GitHub Profile
@mongoltolbo
mongoltolbo / General Media Queries
Created June 6, 2013 04:18
General Media Queries
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
}
blockquote {
background: #f9f9f9;
border-left: 10px solid #ccc;
margin: 1.5em 10px;
padding: .5em 10px;
quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
color: #ccc;
@mongoltolbo
mongoltolbo / Cross-Browser Transparency
Created June 6, 2013 04:17
Cross-Browser Transparency
.transparent {
filter: alpha(opacity=50); /* internet explorer */
-khtml-opacity: 0.5; /* khtml, old safari */
-moz-opacity: 0.5; /* mozilla, netscape */
opacity: 0.5; /* fx, safari, opera */
}
.clearfix:before, .container:after { content: ""; display: table; }
.clearfix:after { clear: both; }
/* IE 6/7 */
.clearfix { zoom: 1; }
@mongoltolbo
mongoltolbo / PicasaPhotoCtrl
Created June 6, 2013 03:31
Angular Picasa photo fetch controller
var app = angular.module('picasa-photo', ['picasa-directives']);
function PicasaCtrl($scope, $http, $attrs) {
$scope.post = (!$attrs.post ? $(".picasa-post").addClass("hide") : $attrs.post );
$scope.url = 'https://picasaweb.google.com/data/feed/api/user/' + $attrs.userid + '/albumid/' + $attrs.albumid + '/photoid/' + $attrs.photoid + '?alt=json&imgmax=' + $attrs.imgmax + '&callback=JSON_CALLBACK';
$http({method: 'JSONP', url: $scope.url}).success(function(data, status) {
$scope.status = status;
$scope.data = data.feed;
}).error(function(data, status) {