This file contains hidden or 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
$outer-space-black: #2E3741; | |
$modal-box-shadow: $outer-space-black; | |
$zModal-close: 100; | |
@mixin modal($width: 680px, $height: 523px) { | |
.modal-dialog { | |
min-height: $height; | |
width: $width; | |
& .modal-content { |
This file contains hidden or 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
UNIX_EPOCH_DATETIME = datetime.datetime(1970, 1, 1) | |
def get_current_utc_timestamp_ms(): | |
return int(round((datetime.datetime.utcnow() - UNIX_EPOCH_DATETIME).total_seconds() * 1000)) |
This file contains hidden or 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
const FILTERS = { | |
'campaignStatuses': { | |
activeValue: 'expired', | |
filterValues: [ | |
{ | |
displayName: 'All', | |
['<filterName or filterValue>']: 'all' | |
}, | |
{ | |
displayName: 'Drafts', |
This file contains hidden or 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
{% set filteredPosts = posts | selectattr("link") %} | |
{# filter posts to posts that actually contain a link #} | |
{% if filteredPosts and (filteredPosts | length) %} |
This file contains hidden or 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
"use strict"; | |
var App = { | |
Models: { | |
Photo:{} | |
}, | |
Collections: { | |
PhotoCollection: {} | |
}, | |
Views: { |
This file contains hidden or 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
"use strict"; | |
// Individual Thumbnail View - many many instances | |
App.Views.ThumbView = Backbone.View.extend({ | |
template: _.template($(".thumb-view-template").text()), | |
className: "thumb-container", | |
initialize: function () { |
This file contains hidden or 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 AppView = Parse.View.extend({ | |
initialize: function () { | |
this.collection = new FullPostCollection(); | |
this.collection.on('add', this.addPost) | |
this.collection.fetch({add:true}); | |
}, | |
addPost: function (pic) { | |
new ThumbnailView({model: pic}); | |
} |
This file contains hidden or 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 comment = $('.imageComment').val(); | |
//takes the value of the comment field and clears it | |
$('.imageComment').val(''); | |
var url = $('.imageURL').val(); | |
$('.imageURL').val(''); | |
//creates a new instance of the constructor POST passing the three assigned variables | |
var outgoingPost = new Post(); | |
outgoingPost.set({ |
This file contains hidden or 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
this.imageSlide = function () { | |
return $('.image-slider').css({'margin-left': '-=392px'}); | |
} | |
// interval function that will call the imageSlide animation every set interval (parameter or default of 2400) | |
// if the counter hits the array length - 1, it will reset itself back to 0 and also move the image slider to 0. | |
this.changeImage = function () { | |
setInterval(function () { | |
this.imageSlide(); | |
i += 1; |
This file contains hidden or 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
function switchUp (array) { | |
coolArray = (array.slice(2)).concat(array.slice(0,2)) | |
return coolArray; | |
} | |
// if passed [1,2,3,4,5,6,7] returns [3, 4, 5, 6, 7, 1, 2] |
NewerOlder