Skip to content

Instantly share code, notes, and snippets.

View mongoltolbo's full-sized avatar

Lkhamsuren Amarjargal mongoltolbo

View GitHub Profile
@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) {
.clearfix:before, .container:after { content: ""; display: table; }
.clearfix:after { clear: both; }
/* IE 6/7 */
.clearfix { zoom: 1; }
@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 */
}
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 / 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 */
}
@mongoltolbo
mongoltolbo / Modern Font Stacks
Created June 6, 2013 04:19
Modern Font Stacks
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* A modern Georgia-based serif */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif," "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
/*A more traditional Garamond-based serif */
font-family: "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
/*The Helvetica/Arial-based sans serif */
@mongoltolbo
mongoltolbo / logo
Created June 6, 2013 04:20
Hiding H1 Text For Logo
@mongoltolbo
mongoltolbo / Anchor Link Pseudo Classes
Created June 6, 2013 04:21
Anchor Link Pseudo Classes
@mongoltolbo
mongoltolbo / Fancy CSS3 Pull-Quotes
Created June 6, 2013 04:22
Fancy CSS3 Pull-Quotes
.has-pullquote:before {
/* Reset metrics. */
padding: 0;
border: none;
/* Content */
content: attr(data-pullquote);
/* Pull out to the right, modular scale based margins. */
float: rightright;
@mongoltolbo
mongoltolbo / Fullscreen Backgrounds With CSS3
Created June 6, 2013 04:22
Fullscreen Backgrounds With CSS3
html {
background: url('images/bg.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}