Skip to content

Instantly share code, notes, and snippets.

View krstivoja's full-sized avatar
:bowtie:
Working on something exciting

Marko Krstic krstivoja

:bowtie:
Working on something exciting
View GitHub Profile
import animations from 'https://esm.sh/@midudev/tailwind-animations@0.0.7';
export default {
plugins: [
animations
],
corePlugins: {
preflight: true
}
@krstivoja
krstivoja / tailwind.config.js
Last active January 4, 2024 13:17
extract values from theme.json
/**
* See https://tailwindcss.com/docs/configuration for configuration details
*/
/**
* Convert pixels to rems
* @param {int} px The pixel value to convert to rems
*/
@krstivoja
krstivoja / admin.css
Created November 22, 2023 16:53
WP Admin Cleaner. Replace WP topbar logo
/* Upload your transparent png and replace url */
#wpadminbar #wp-admin-bar-wp-logo>.ab-item .ab-icon:before {
background-image: url(https://dev-wordpress.local/wp-content/uploads/2023/11/gits-icon.png);
background-size: contain;
background-repeat: no-repeat;
display: inline-block;
width: 100%;
height: 100%;
content: "";
@krstivoja
krstivoja / halfscreen-image-dark.css
Last active July 30, 2023 18:26
WP Admin Cleaner - Login page theme -- Half Screen Image Dark
:root {
--body-bg: #111827;
--form-bg: #1f2937;
--form-border: #4b5563;
--form-shadow: rgba(0, 0, 0, 0.1);
--input-bg: #374151;
--input-border: #4f5967;
--text: white;
}
* {
@krstivoja
krstivoja / halfscreen-image.css
Last active July 30, 2023 18:26
WP Admin Cleaner - Login page theme -- Half Screen Image
:root {
--body-bg: #f9fafb;
--form-bg: white;
--form-border: none;
--form-shadow: rgba(0, 0, 0, 0.1);
--input-bg: #f9fafb;
--input-border: #c7ced9;
--text: black;
}
* {
@krstivoja
krstivoja / plain-dark.css
Last active July 15, 2023 16:19
WP Admin Cleaner - Login page theme -- Plain Dark
:root {
--body-bg: #111827;
--form-bg: #1f2937;
--form-border: #4b5563;
--form-shadow: rgba(0, 0, 0, 0.1);
--input-bg: #374151;
--input-border: #4f5967;
--text: white;
}
* {
@krstivoja
krstivoja / plain.css
Last active July 15, 2023 16:18
WP Admin Cleaner - Login page theme -- Plain
:root {
--body-bg: #f9fafb;
--form-bg: white;
--form-border: none;
--form-shadow: rgba(0, 0, 0, 0.1);
--input-bg: #f9fafb;
--input-border: #c7ced9;
--text: black;
}
* {
@krstivoja
krstivoja / function.php
Last active April 21, 2023 07:40
Sidebar categories list inside Admin Posts
add_action( 'admin_notices', 'add_html_and_category_filter' );
function add_html_and_category_filter() {
$current_screen = get_current_screen();
if ( $current_screen->id === 'edit-post' && $current_screen->post_type === 'post' ) {
$categories = get_categories();
$current_category_id = isset( $_GET['cat'] ) ? intval( $_GET['cat'] ) : 0;
@krstivoja
krstivoja / config
Last active January 7, 2023 16:26
Tailwind Configuration Starter - Marko Krstic
module.exports = {
theme: {
colors: {
'transparent': 'transparent',
'current': 'currentColor',
'bg': '#ffffff',
'bg-alt': '#F6F6F6',
'text': '#000000',
'text-atl': '#404040',
'brand': '#352FE7',
@mixin ratio-1-1 {
@media screen and (max-aspect-ratio: #{1} / #{1}) { @content; }
}
// Use
// .header-title {
// font-size: 2rem;
// @include ratio-1-1 {
// font-size: 1rem;
// }