Skip to content

Instantly share code, notes, and snippets.

View carolina-vallejo's full-sized avatar

Carolina Vallejo carolina-vallejo

  • ITONICS, GmbH
  • Berlin
View GitHub Profile
@carolina-vallejo
carolina-vallejo / ipad-portrait-landscape.scss
Last active March 5, 2018 09:53
ipad portrait landscape query
@mixin rsp_ipad_port {
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
@content;
}
}
@mixin rsp_ipad-land {
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
@content;
}
}
@carolina-vallejo
carolina-vallejo / cross-domain-chrome.txt
Last active March 11, 2021 16:51
disable cross domain chrome window and MAC
MAC:
open /Applications/Google\ Chrome.app/ --args --disable-web-security --user-data-dir
WINDOWS
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:/ChromeDevSession"
@carolina-vallejo
carolina-vallejo / detect-ie-edge.js
Created February 14, 2018 14:58
detect ie edge with javascript
// detect IE8 and above, and edge
if (document.documentMode || /Edge/.test(navigator.userAgent)) {
alert('Hello Microsoft User!');
}
@carolina-vallejo
carolina-vallejo / custom-dotted-border.scss
Last active January 26, 2018 13:25
customized dotted border css
@mixin dotted($col,$w,$h) {
background-image: -webkit-gradient(linear, left top, right top, color-stop(50%, $col), color-stop(0%, rgba(255, 255, 255, 0))),
-webkit-gradient(linear, left top, left bottom, color-stop(50%, rgba(255, 255, 255, 0)), color-stop(0%, $col)),
-webkit-gradient(linear, left top, right top, color-stop(50%, rgba(255, 255, 255, 0)), color-stop(0%, $col)),
-webkit-gradient(linear, left top, left bottom, color-stop(50%, $col), color-stop(0%, rgba(255, 255, 255, 0)));
background-image: -webkit-linear-gradient(left, $col 50%, rgba(255, 255, 255, 0) 0%),
-webkit-linear-gradient(top, rgba(255, 255, 255, 0) 50%, $col 0%),
-webkit-linear-gradient(left, rgba(255, 255, 255, 0) 50%, $col 0%),
-webkit-linear-gradient(top, $col 50%, rgba(255, 255, 255, 0) 0%);
background-image: -o-linear-gradient(left, $col 50%, rgba(255, 255, 255, 0) 0%),
@carolina-vallejo
carolina-vallejo / map-leaflet-prototype.js
Last active March 21, 2018 11:13
map leaflet prototypes
(function() {
//-- external libraries leaflet.ajax.min.js, leaflet.markercluster.js
L.Util.ajax('data/data.json').then(function(data) {
var map = new SaforMap({
element: document.getElementById('map')
});
map.draMarkers(data);
});
@carolina-vallejo
carolina-vallejo / ui-selector.js
Last active January 4, 2018 11:18
ui selector from list element in javascript
function uiSelector($ulParent, $loader, $container) {
var $activeItem = $ulParent.find('li:first-child');
if ($('#label-selector').length === 0) {
$ulParent.before('<div id="label-selector">' + $activeItem.text() + '</div>');
$('#label-selector').on('click', function() {
$ulParent.slideToggle();
@carolina-vallejo
carolina-vallejo / svg-button-animation.css
Created December 30, 2017 07:42
#css svg button animation
.boton-mas svg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.boton-mas svg rect {
stroke-width: 1;
@carolina-vallejo
carolina-vallejo / insert-float-text.js
Created December 29, 2017 07:44
#javacsript insert floating frame with text in a body with multiple paragraphs
function insertflotantes() {
//--traer el num act de la noticia
var elparent = $('#noticias-content-wrapper');
//---comprobar si hay flotantes
var numflotants = elparent.find('.flotante').length;
if (numflotants > 0) {
@carolina-vallejo
carolina-vallejo / scroll-detector.js
Created December 28, 2017 09:49
#javascript scroll detector waypoints.js
$('.scrolldetector').each(function() {
var $this = $(this);
var waypoint = new Waypoint({
element: $this.get(),
handler: function() {
$this.addClass('animate');
},
offset: '70%'
@carolina-vallejo
carolina-vallejo / socials-svg.html
Last active December 18, 2017 07:48
socials icos svg html
<div class="socials">
<span class="top-btn">top</span>
<a class="facebook" href="https://www.facebook.com/nolongerempty" target="_blank">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="9.74px" height="19.292px" viewBox="-1.629 -2.199 9.74 19.292" enable-background="new -1.629 -2.199 9.74 19.292" xml:space="preserve">
<path d="M1.248,2.336v2.527h-2.877v3.432h2.877v8.798h3.446V8.295h2.862l0.441-3.432H4.697V2.668c0-0.983,0.258-1.665,1.646-1.665
h1.769v-3.062c-0.305-0.044-1.353-0.14-2.572-0.14C2.992-2.199,1.248-0.598,1.248,2.336"></path>
</svg>
</a>
<a class="twitter" href="https://twitter.com/NoLongerEmpty" target="_blank">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="19.925px" height="15.92px" viewBox="0.976 0.488 19.925 15.92" enable-background="new 0.976 0.488 19.925 15.92" x