This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ==UserStyle== | |
@name atticus.io - 21/02/2024 12:31:00 | |
@version 2.0.0 | |
@description A user style for app.atticus.io | |
@author Geoffrey Crofte | |
==/UserStyle== */ | |
.atticus-editor-container .editor-area .editor-textarea { | |
max-width: 80ch; | |
margin-inline: auto; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Code Generated by an AI | |
* Never tested in production, the goal is to store it as Gist before I can try this in a real web project. | |
*/ | |
class FormDataStore { | |
// Constructor function to set up the data store | |
constructor() { | |
this.data = {}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Code writen on the fly, I still need to test it. | |
* Use at your own risk 😁 | |
*/ | |
// Register the block with WordPress | |
registerBlockType('my-plugin/my-block', { | |
title: 'My Block', | |
icon: 'book', | |
category: 'common', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**! | |
* NUMBER THE HEADINGS | |
* This script can't be used for commercial purpose. | |
* | |
* Script improved by: Geoffrey Crofte / GeoffreyCrofte.com / 2022 | |
* Inspired by: Antoine Martin / ThierrryVanoffe.com / 2020 | |
*/ | |
// Constants will be used later on. | |
const ui = DocumentApp.getUi(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;( function( $, window, document, undefined ) { | |
// Prepare the async function | |
async function fetchColorsJSON() { | |
const response = await fetch(crofte.rest_theme_url, { | |
"headers": { | |
"Accept": "application/json, */*;q=0.1", // optional | |
"X-WP-Nonce": crofte.rest_nonce, | |
"Sec-Fetch-Mode": "cors", // optional | |
"Sec-Fetch-Site": "same-origin" // optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Adds a timestamp in the first blog option. | |
* @return void | |
*/ | |
function juiz_update_last_edit_date() { | |
if ( is_multisite() ) { | |
add_blog_option( 1, 'last_post_modified_timestamp', time() ); | |
} else { | |
add_option( 'last_post_modified_timestamp', time() ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Animation in pseudo-element | |
*/ | |
div { | |
height: 100px; | |
background: #eee; | |
} | |
div:before { | |
content:" "; | |
display:inline-block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package WordPress | |
* @subpackage Creative Juiz v2 | |
* Template Name: Category List | |
* @see: https://gist.github.com/geoffreycrofte/d3b5c0ab64e97278248df59bc53082f0 | |
* @author: Geoffrey Crofte | |
*/ | |
get_header(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add value info into title | |
// Replace thousand_separator and real_currency for your own needs | |
// Add value info into title | |
// Replace thousand_separator and real_currency for your own needs | |
(function(){ | |
let gc_new_title = ''; | |
let sel_asset_amount = '[class*="AssetChartAmount__Wrapper"]'; | |
let sel_wallet_amount = '[class*="BuySellStepper__Containe"] footer span:last-child'; | |
let sel_asset_name = '[class*="styles__Symbol"][data-element-handle="asset-symbol"]'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* gc_my_scripts & gc_my_styles are two handles for enqueued CSS and JS. | |
* | |
* The CSS trick for defering CSS load and make it non blocking loading if offered by SitePoint | |
*/ | |
if ( ! function_exists( 'gc_defer_non_critical_css' ) ) { | |
/** | |
* Changes the LINK HTML tags to make it load async (deferred) |
NewerOlder