Skip to content

Instantly share code, notes, and snippets.

View nextab's full-sized avatar

nexTab - Oliver Gehrmann nextab

View GitHub Profile
<globalRules>
<responses>
- Repeat the question before thinking about the solution.
- Think before you write the code in <thinking> tags. Think through what effect it will have on other code. Think through whether this code would be better in another location. Think through whether any types need to be updated. Think through whether this code inherits code from a parent component or module or passes anything to a child component or module. Think through if it is the simplest solution. Think through whether the file is a client or server context and if your code can work in this context.
- Use reflection to verify your own answer.
- Show your "reflection".
- Show your "chain of thought" for suggestions.
- Be concise; remove any non-pertinent language from responses (ex: remove "I apologize")
- Add a "Confidence Score", as a % out of 100, that represents your confidence in your suggested code.
- Recommend best practices. Be opinionated.
@nextab
nextab / Viewport Meta Tag für Divi überschreiben – change user-scalable in Divi
Created December 14, 2024 09:04
Divi by Elegant Themes is a WordPress theme with a catch: You can't pinch zoom your website. This is not in accordance with WCAG standards, but you can change it very easily with this quick snippet for your child theme's functions.php.
function nxt_remove_et_viewport_meta() {
remove_action('wp_head', 'et_add_viewport_meta');
}
add_action('after_setup_theme', 'nxt_remove_et_viewport_meta');
function nxt_enable_zoom() {
echo '<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, minimum-scale=0.1, maximum-scale=10.0">';
}
add_action('wp_head', 'nxt_enable_zoom');
@nextab
nextab / JS Teil für smooth animation
Last active December 10, 2024 13:11
Moved incorrect cursor: pointer to the correct element
class Accordion {
constructor(el) {
// Store the <details> element
this.el = el;
// Store the <summary> element
this.summary = el.querySelector('summary');
// Store the <div class="content"> element
this.content = el.querySelector('.sub-menu, .wp-block-group');
// Store the animation object (so we can cancel it if needed)
.white-stripe {
height: 30px;
background-image: linear-gradient(120deg, red 0%, red 30%, white 30%, white 35%, black 5%, black 100%);
}
/* Alternative Lösung: */
.skewed_container {
overflow: hidden;
}
#region Auto Generate Menu for Online Courses
// This function (version 2 of the course menu) automatically builds a menu for an online course
function nxt_kursmenu_shortcode($atts, $content = null) {
$a = shortcode_atts( array(
'class' => '',
'menu_id' => '',
), $atts );
$final_tax_id = 0;
if(is_tax('module')) {
// $tax_id = get_queried_object_id();
/* #region Digimember */
div#ncore_footer_placeholder, div#ncore_footer {
display: none;
}
main {
form.ncore_user_form {
&.ncore_form_narrow {
font-size: $small;
font-family: $satoshi;
* {
.wp-pagenavi {
border-top: none;
margin: 0 auto;
padding-top: 4rem;
text-align: center;
width: 80%;
a, span {
color: #282828;
font-size: 1.125rem !important;
font-weight: inherit !important;
// Output a simple blog post feed (list all tutorials)
function nxt_feed_function($atts, $content = null) {
$a = shortcode_atts([
'button' => 'yes',
'cat' => '',
'class' => '',
'order' => 'DESC',
'orderby' => 'date',
'post_status' => 'publish',
'post_type' => 'post',

IONOS / 1und1:

Vorteile:

  • Änderungen an Domains werden nach kurzer Wartezeit übernommen
  • Support ist sehr gut und ist sehr hilfreich, wenn z. B. Pakete innerhalb von 1und1 umgezogen werden (selbst wenn sie weniger Geld verdienen)
  • Haben einen Social Media Manager, der Vergleiche im Internet ansieht und kommentiert!

Nachteile:

- Kontrollzentrum, das ständig neue Tabs öffnet, was einfach furchtbar nervig ist

  • Web-FTP ist nicht in der Lage, den KORREKTEN Server-Pfad (der für php Scripte relevant ist) anzuzeigen (stellt /kunden/ voran)
#region Replace URL for Logo on Login Screen
function nextab_url_login_logo(){
return get_bloginfo( 'wpurl' );
}
add_filter('login_headerurl', 'nextab_url_login_logo');
#endregion
#region Change title tag for Login Link
function nextab_login_logo_url_title() {
return 'Zurück zu XXX ';