Skip to content

Instantly share code, notes, and snippets.

View Gioni06's full-sized avatar
👨‍💻
Working from home

Jonas D. Gioni06

👨‍💻
Working from home
View GitHub Profile
.navigation ul {
display: flex;
flex-direction: row;
list-style-type: none;
margin: 0;
padding: 0;
}
.navigation ul li:not(:last-child) {
margin-right: 20px;
<nav class="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Project</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
.logo {
display: block;
margin: 0;
width: 272px;
height: auto;
overflow: hidden;
text-decoration: none;
}
.logo img {
@Gioni06
Gioni06 / index.html
Last active September 10, 2019 14:53
jQuery "closest" vs vanilla "closest"
<nav id="test">
<li><a href="/1">1</a></li>
<li><a href="/2">2</a></li>
<li><a href="/3" id="qs1">3</a></li>
<li><a href="/4">4</a></li>
</nav>
<nav id="test2">
<li><a href="/1">1</a></li>
<li><a href="/2">2</a></li>
<li><a href="/3" id="qs2">3</a></li>
@Gioni06
Gioni06 / darkmode.css
Last active May 1, 2020 07:14
dark mode with css
:root {
--background-color: #fff;
--page-width: 70em;
--primary-color: #151513;
--font-color: #151513;
--subtle-primary-color: #151513;
--block-background-color: #f1f3f4;
--menu-item-color: #000;
--menu-item-hover-color: #000;
--menu-item-alert-bg: #ffffff;
@Gioni06
Gioni06 / darkmode.js
Last active November 30, 2022 00:11
Enable Dark mode with css variables and js
function activateDarkMode() {
const rootElement = document.querySelector(':root')
const darkTheme = {
'--background-color': '#1e1e1e',
'--primary-color': '#157efb',
'--font-color': '#dedede',
'--subtle-primary-color': '#151513',
'--block-background-color': '#323232',
'--menu-item-color': '#dedede',
'--menu-item-hover-color': '#157efb',
@Gioni06
Gioni06 / tmux-cheatsheet.markdown
Created November 10, 2016 20:58 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Gioni06
Gioni06 / AngularJS-ES6-Test-Skeleton
Created December 2, 2015 18:47 — forked from busypeoples/AngularJS-ES6-Test-Skeleton
AngularJS - Karma, Jasmine, Browserify, Stringify - ES6 Test Setup
We couldn’t find that file to show.
@Gioni06
Gioni06 / parseUrl.js
Last active October 27, 2015 11:56
Javascript Parse URLs
function parseURL(url) {
var a = document.createElement('a');
a.href = url;
return {
source: url,
protocol: a.protocol.replace(':',''),
host: a.hostname,
port: a.port,
query: a.search,
params: (function(){
@Gioni06
Gioni06 / removejscssfile.js
Created October 31, 2014 13:52
Remove CSS and JS Files
function removejscssfile(filename, filetype){
var targetelement=(filetype=="js")? "script" : (filetype=="css")? "link" : "none" //determine element type to create nodelist from
var targetattr=(filetype=="js")? "src" : (filetype=="css")? "href" : "none" //determine corresponding attribute to test for
var allsuspects=document.getElementsByTagName(targetelement)
for (var i=allsuspects.length; i>=0; i--){ //search backwards within nodelist for matching elements to remove
if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(filename)!=-1)
allsuspects[i].parentNode.removeChild(allsuspects[i]) //remove element by calling parentNode.removeChild()
}
}