This file contains hidden or 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
| // Types for the result object with discriminated union | |
| type Success<T> = { | |
| data: T; | |
| error: null; | |
| }; | |
| type Failure<E> = { | |
| data: null; | |
| error: E; | |
| }; |
This file contains hidden or 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 | |
| // Make sure Polylang copies the content when creating a translation | |
| function jb_editor_content( $content ) { | |
| // Polylang sets the 'from_post' parameter | |
| if ( isset( $_GET['from_post'] ) ) { | |
| $my_post = get_post( $_GET['from_post'] ); | |
| if ( $my_post ) | |
| return $my_post->post_content; | |
| } |
This file contains hidden or 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
| .todo-list { | |
| background-color: white; | |
| margin: auto; | |
| width: 50%; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| border: 1px solid #efefef; | |
| box-shadow: |
This file contains hidden or 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 | |
| $paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1; | |
| $query = new WP_Query( array( | |
| 'posts_per_page' => 13, | |
| 'paged' => $paged | |
| ) ); | |
| ?> | |
| <?php if ( $query->have_posts() ) : ?> |
This file contains hidden or 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
| /** | |
| * The theme header. | |
| * | |
| * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials | |
| * | |
| * @license GPL 2.0 | |
| */ |
This file contains hidden or 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 if ( have_posts() ) : query_posts('p=1'); | |
| while (have_posts()) : the_post(); ?> | |
| <?php the_title(); ?> | |
| <?php the_content(); ?> | |
| <?php the_post_thumbnail(array(100, 100)); ?> | |
| <? endwhile; endif; wp_reset_query(); ?> |
This file contains hidden or 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 heightDetect(){ | |
| $(".main_head").css("height", $(window).height()); | |
| }; | |
| heightDetect(); | |
| $(window).resize(function() { | |
| heightDetect(); | |
| }); |
This file contains hidden or 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
| #loader { | |
| background: none repeat scroll 0 0 #ffffff; | |
| bottom: 0; | |
| height: 100%; | |
| left: 0; | |
| position: fixed; | |
| right: 0; | |
| top: 0; | |
| width: 100%; | |
| z-index: 9999; |