Skip to content

Instantly share code, notes, and snippets.

View eversthomas's full-sized avatar
🏠
Working from home

Thomas eversthomas

🏠
Working from home
View GitHub Profile
@eversthomas
eversthomas / merge-css-imports-wordpress.php
Last active December 11, 2021 14:30
wordpress functions.php - merges all css include files into one style.css and save it to template root path
/**
* merge all css imports to one file
*/
// set the directory where the css imports are
$imports_directory = get_template_directory() . '/assets/css/*';
// find all import files in this directory
$cssfiles = glob($imports_directory);
// make array of all this files
@eversthomas
eversthomas / seo-options.php
Last active July 28, 2021 12:52
wordpress theme options seo
<?php
/**
* humberto Theme Options seo
*
*/
/**
* Register the form setting for our humberto_options array.
*
*/
@eversthomas
eversthomas / force-scrollbars-visible.css
Created August 20, 2020 06:20 — forked from IceCreamYou/force-scrollbars-visible.css
Mac OS X hides scrollbars by default. This is annoying for UI design because it means users might not realize that certain areas are scrollable. This public domain Gist forces the scrollbar to always be visible with native behavior in Webkit-based browsers (Chrome and Opera) on Macs.
.force-show-scrollbars ::-webkit-scrollbar-track:vertical {
border-left: 1px solid #E7E7E7;
box-shadow: 1px 0 1px 0 #F6F6F6 inset, -1px 0 1px 0 #F6F6F6 inset;
}
.force-show-scrollbars ::-webkit-scrollbar-track:horizontal {
border-top: 1px solid #E7E7E7;
box-shadow: 0 1px 1px 0 #F6F6F6 inset, 0 -1px 1px 0 #F6F6F6 inset;
}
@eversthomas
eversthomas / simple-offcanvas-js-nav.css
Created March 9, 2020 13:50
a simple unstyled off canvas navigation without jquery
.menu {
position: absolute;
top: -100%;
left: 0;
transition: 500ms all;
&.aktiv {
top: 10%;
}
}
@eversthomas
eversthomas / _button.scss
Last active February 4, 2020 10:34
simple design patterns in scss
// <button class="btn">primary</button>
.btn {
padding: 0.3rem 0.8rem;
text-align: center;
background: #747d8c;
border: 1px solid #747d8c;
border-radius: 0.3rem;
color: white;
@eversthomas
eversthomas / nav.html
Created January 28, 2020 09:14 — forked from taniarascia/nav.html
Responsive Dropdown Navigation Bar
<section class="navigation">
<div class="nav-container">
<div class="brand">
<a href="#!">Logo</a>
</div>
<nav>
<div class="nav-mobile">
<a id="nav-toggle" href="#!"><span></span></a>
</div>
<ul class="nav-list">

Überschrift 1

Überschrift 2

Überschrift 3

Überschrift 4

Überschrift 6
Überschrift 6

Einen Text kann man auch in Fettdruck oder in Kursivschrift schreiben!

Auch Listen sind möglich:

@eversthomas
eversthomas / full-width-background-image.html
Created December 6, 2019 12:43
full width background image like wordpress Twenty Seventeen
<header>
<div class="fixed-header-image">
<img src="https://upload.wikimedia.org/wikipedia/commons/c/ce/Nature_of_Empakaai_Crater_%289%29.jpg" />
</div>
<div class="site-branding">
<h1 class="site-title"><a href="https://development.end-linkage.de/" rel="home">wp-dev</a></h1>
<p class="site-description">wordpress theme development</p>
</div>
@eversthomas
eversthomas / function_widget_counter.php
Last active November 4, 2019 08:01
wordpress functions and explainings
<?php
// register sidebar widgets
function iatmul_widgets_init() {
// footer widgets
$footer_sidebar_number = 3; //Number of footer sidebars
for( $i=1; $i <= $footer_sidebar_number; $i++ ) {
register_sidebar( array(
'name' => sprintf( __( 'Footer Area %d', 'iatmul' ), $i ),
'id' => sprintf( 'footer-%d', $i ),
<?php
// example code
$main_nav = [
"index.php" => "home",
"service.php" => "service",
"uber.php" => "uber",
"contact.php" => "contact",
"legal.php" => "legal"
];