Skip to content

Instantly share code, notes, and snippets.

View logiblue's full-sized avatar
🙂
Sup

Karanikolas Kostantinos logiblue

🙂
Sup
View GitHub Profile
@logiblue
logiblue / RESET CSS - BASIC
Last active October 11, 2020 14:09
[Basic Reset with Universal selector] #css #reset
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
font-family: 'Lato', sans-serif;
font-weight: 400;
@logiblue
logiblue / dead-center.css
Created July 9, 2019 12:53
[Center div] #Center #position
.parent-of-text-box{
position:relative;
}
.text-box{
position: absolute;
top: 50%;
left: 50%;
@logiblue
logiblue / CSS ANIMATION - SIMPLE
Last active October 11, 2020 14:09
[CSS ANIMATIONS ] #animation #keyframes
.element-for-animation{
animation-name: moveΙnLeft;
animation-duration: 3s;
}
@keyframes moveΙnLeft{
0%{
opacity: 0;
@logiblue
logiblue / Liveserver - SASS
Last active October 11, 2020 14:08
[Script for sass and live Server] #liveServer #SASS #compile
npm install concurrently --save-dev
npm install node-sass --save-dev
npm install -g live-server
PACKAGE.JSON
"scripts": {
"serve": "live-server",
"sass": "node-sass sass/main.scss css/style.css -w",
/*
Theme Name: Twenty Thirteen
Theme URI: http://wordpress.org/themes/twentythirteen
Author: the WordPress team
Author URI: http://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
@logiblue
logiblue / Custom Logo Import - Wordpress
Last active October 11, 2020 14:11
[Wordpress logo to return to home page] #wp_Logo #return
<a href="<?php echo home_url('/')?>">
<img src="<?php echo get_template_directory_uri() ?>/img/logo.svg " alt="logo" class="logo">
</a>
@logiblue
logiblue / Import Style.css in Wordpress
Last active October 11, 2020 14:07
Enqueue Custom CSS file in Functions.php #Wordpress
<?php
function custom_styles(){
//Adding Stylesheets
wp_register_style('style', get_template_directory_uri() . './style.css', array('normalize'), '1.0');
wp_enqueue_style('style');
}
add_action('wp_enqueue_scripts','custom_styles');
<?php
//Add javascript files
wp_register_script('script', get_template_directory_uri() . './js/scripts.js', array('jquery'), '1.0.0',true);
wp_enqueue_script('jquery');
wp_enqueue_script('script');
?>
@logiblue
logiblue / Add Thumnbail Support -WP
Last active October 11, 2020 14:10
[Wordpress Post Thumbnails support]#feautured #Image #PostTumbnails #WPSETUP
function lapizzeria_setup(){
add_theme_support('post-thumbnails');
}
add_action('after_setup_theme', 'lapizzeria_setup' );
and inside the page just call it
<?php the_post_thumbnail(); ?>
@logiblue
logiblue / Copyrights PHP
Last active October 11, 2020 14:05
[Copyrights Date Print in Footer (YEAR)] #DATE #COPYRIGHTS #YEAR
<p class="copyrights">All rights reserved <?php echo date('Y') ?></p>