Skip to content

Instantly share code, notes, and snippets.


Julaine Scott JulaineScott

View GitHub Profile
JulaineScott / image.css
Created Apr 13, 2022
How to make image fit an item
View image.css
.container > div > img {
width: 100%;
height: 1005;
object-fit: cover;
JulaineScott / web.config
Created Jan 4, 2022
Config file for Drupal
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<!-- Don't show directory listings for URLs which map to a directory. -->
<directoryBrowse enabled="false" />
Caching configuration was not delegated by default. Some hosters may not
delegate the caching configuration to site owners by default and that
may cause errors when users install. Uncomment this if you want to and
JulaineScott / CSS
Created Nov 30, 2021
Sticky Announcement Header
View CSS
[insert name of top navbar] {
padding: 20px;
.announcement-top-bar {
position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky;
position: -o-sticky;
position: sticky;
View gist:f5faf1027a9e4125fdc65c02fe17c598
<div class="review-form-inner has-border">
<div id="respond" class="comment-respond">
<h3 id="reply-title" class="comment-reply-title">Add a review <small><a rel="nofollow" id="cancel-comment-reply-link" href="/blue-coma/#respond" style="display:none;">Cancel reply</a></small></h3><form action="" method="post" id="commentform" class="comment-form" novalidate="" enctype="multipart/form-data" encoding="multipart/form-data"><div class="comment-form-rating"><label for="rating">Your rating&nbsp;<span class="required">*</span></label><p class="stars"> <span> <a class="star-1" href="#">1</a> <a class="star-2" href="#">2</a> <a class="star-3" href="#">3</a> <a class="star-4" href="#">4</a> <a class="star-5" href="#">5</a> </span> </p><select name="rating" id="rating" required="" style="display: none;">
<option value="">Rate…</option>
<option value="5">Perfect</option>
<option value="4">Good</option>
JulaineScott / advent-calendar.js
Created Sep 8, 2021
Advent Calendar JavaScript
View advent-calendar.js
var Utility = {
getPosition : function(el){
var oL = el.offsetLeft, oT = el.offsetTop;
var oE = el;
while(oE = oE.offsetParent){
oL = oL + oE.offsetLeft;
oT = oT + oE.offsetTop;
return [oL, oT];
View advent-calendar.css
/* ========= */
/* = Doors = */
/* ========= */
.doors {
margin: 4rem 0;
counter-reset: days;
.doors > li{
View drop shadows the better way
.drop-shadow {
filter: drop-shadow(2px 4px 8px hsla(0deg, 0%, 0%, 0.5))
JulaineScott / make-slugs
Created Apr 7, 2020
Change php files to slugs
View make-slugs
#1)externally redirect "/file.php" to "/file"
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
#2)Internally map "/file" back to "/file.php"
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ /$1.php [NC,L]
JulaineScott / helpers.css
Created Apr 4, 2020
Lots of helpful CSS classes
View helpers.css
View Colorize SVG
style="filter: invert(.95) sepia(.95);"