Skip to content

Instantly share code, notes, and snippets.

View SaraSoueidan's full-sized avatar
🎯
Focusing

Sara Soueidan SaraSoueidan

🎯
Focusing
View GitHub Profile
@SaraSoueidan
SaraSoueidan / sewing
Created June 8, 2013 02:47
Sewing effect with CSS
.box{
border:1px dashed white;
box-shadow:0px 0px 0px 3px black;
}/*we created one border, the dashed one, and the illusion of a wider area by adding a slight
box shadow*/
@SaraSoueidan
SaraSoueidan / index.html
Created February 4, 2013 13:13
A CodePen by Sara Soueidan. CSS3 Testimonials Slider - Metro-style testimonials slider
<h1> CSS3 Testimonials Slider</h1>
<div class="container">
<input type="radio" name="nav" id="first" checked/>
<input type="radio" name="nav" id="second" />
<input type="radio" name="nav" id="third" />
<label for="first" class="first"></label>
<label for="second" class="second"></label>
<label for="third" class="third"></label>

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@SaraSoueidan
SaraSoueidan / animatecss
Created June 8, 2013 02:50
Animate.css Source Code
/*
Animate.css - http://daneden.me/animate
LICENSED UNDER THE MIT LICENSE (MIT)
Copyright (c) 2012 Dan Eden
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
eleventyConfig.addCollection("articles", function(collection) {
return collection.getFilteredByGlob("./src/content/articles/**/*.md").filter((item) => {
return !item.data.draft && item.date <= now;
}).reverse();
});
---
title: Articles
# permalink: /articles/
layout: layouts/main.html
pagination:
data: collections.articles
size: 3
alias: articles
permalink: 'articles{% if pagination.pageNumber > 0 %}/page/{{ pagination.pageNumber }}{% endif %}/index.html'
@SaraSoueidan
SaraSoueidan / pagination.njk
Created August 23, 2021 09:12
11ty pagination
<nav class="c-collection-pagination" aria-labelledby="pagination-label">
<h2 id="pagination-label" class="visually-hidden">Pagination</h2>
<ul>
<li>
{% if page.url != pagination.href.first %}<a href="{{ pagination.href.first }}">First</a>
{% else %}First{% endif %}
</li>
<li>
{% if page.url != pagination.href.last %}<a href="{{ pagination.href.last }}">Last</a>
{% else %}Last{% endif %}
@SaraSoueidan
SaraSoueidan / scrollbar-mixin
Created July 26, 2013 18:18
Sass mixin for styling scrollbars in webkit by Hugo Giraudel (http://codepen.io/HugoGiraudel/pen/KFDuB)
/**
* Mixin scrollbar
*/
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) {
::-webkit-scrollbar {
width: $size;
height: $size;
}
::-webkit-scrollbar-thumb {
@SaraSoueidan
SaraSoueidan / h5bp-css
Created June 8, 2013 02:45
HTML5 Boilerplate CSS
/*
* HTML5 Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/
/* ==========================================================================
Base styles: opinionated defaults
@SaraSoueidan
SaraSoueidan / Simulate Click event in Vanilla JS.js
Created September 7, 2018 07:18
Vanilla JS .click() doesn't apply to links <a>, so this is a function that enables it to work on them. Source: https://gomakethings.com/how-to-simulate-a-click-event-with-javascript/
/**
* Simulate a click event.
* @public
* @param {Element} elem the element to simulate a click on
*/
var simulateClick = function (elem) {
// Create our event (with options)
var evt = new MouseEvent('click', {
bubbles: true,
cancelable: true,