Skip to content

Instantly share code, notes, and snippets.

View JulaineScott's full-sized avatar
🌲

Julaine Scott JulaineScott

🌲
View GitHub Profile
@JulaineScott
JulaineScott / CSS
Created November 30, 2021 05:18
Sticky Announcement Header
[insert name of top navbar] {
padding: 20px;
}
.announcement-top-bar {
position: -webkit-sticky;
position: -moz-sticky;
position: -ms-sticky;
position: -o-sticky;
position: sticky;
@JulaineScott
JulaineScott / web.config
Created January 4, 2022 04:56
Config file for Drupal
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!-- 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
JulaineScott / image.css
Created April 13, 2022 03:53
How to make image fit an item
.container > div > img {
width: 100%;
height: 1005;
object-fit: cover;
}
@JulaineScott
JulaineScott / load-ajax-panel.js
Created September 11, 2022 03:49
Load a url into a something
//1. We're going to use jQuery to get the href attribute of the link that was just clicked:
$(document).ready(function(){
$('#ajax-nav a').bind('click', function(){
var url = $(this).attr('href');
return false;
});
});
//Now we have a variable called url that contains the href attribute of the link that was clicked.
@JulaineScott
JulaineScott / components.php
Created December 2, 2022 16:51
Blue Sheet boxes
/**
* Format the classes as boxes
* when showing code structure
*
* @return string
*/
public static function blueSheet(): string
{
return <<<HEREDOC
<style>
@JulaineScott
JulaineScott / copy.js
Created March 23, 2023 15:58
Copy To Clipboard
const input = document.querySelector('input');
const btn = document.querySelector('button');
btn.addEventListener('click', () => {
navigator.clipboard.writeText(input.value);
})
@JulaineScott
JulaineScott / gradients.css
Created December 4, 2023 21:37
CSS Gradients
/*Rainbow*/
background: radial-gradient(50% 123.47% at 50% 50%,#00ff94 0,#720059 100%),linear-gradient(121.28deg,#669600 0,red 100%),linear-gradient(360deg,#0029ff 0,#8fff00 100%),radial-gradient(100% 164.72% at 100% 100%,#6100ff 0,#00ff57 100%),radial-gradient(100% 148.07% at 0 0,#fff500 0,#51d500 100%);
background-blend-mode: screen,color-dodge,overlay,difference,normal;
/*Version 2*/
background: #42275a;
background: -webkit-linear-gradient(to right, #734b6d, #42275a);
background: linear-gradient(to right, #734b6d, #42275a);
/*Version 3*/