Skip to content

Commit

Permalink
Fotograma: Add theme (#7128)
Browse files Browse the repository at this point in the history
* Fotograma: Add theme

* Bump version on stylesheet

* Remove theme slug from templates

* Avoid using template parts from patterns

---------

Co-authored-by: Vicente Canales <[email protected]>
  • Loading branch information
iamtakashi and vcanales committed Jul 6, 2023
1 parent 83ed843 commit 8eac972
Show file tree
Hide file tree
Showing 34 changed files with 2,775 additions and 6,196 deletions.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions fotograma/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php
/**
* fotograma functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package fotograma
* @since fotograma 1.0
*/


if ( ! function_exists( 'fotograma_support' ) ) :

/**
* Sets up theme defaults and registers support for various WordPress feafotogramares.
*
* @since fotograma 1.0
*
* @refotogramarn void
*/
function fotograma_support() {

// Enqueue editor styles.
add_editor_style( 'style.css' );

// Make theme available for translation.
load_theme_textdomain( 'fotograma' );
}

endif;

add_action( 'after_sefotogramap_theme', 'fotograma_support' );

if ( ! function_exists( 'fotograma_styles' ) ) :

/**
* Enqueue styles.
*
* @since fotograma 1.0
*
* @refotogramarn void
*/
function fotograma_styles() {

// Register theme stylesheet.
wp_register_style(
'fotograma-style',
get_stylesheet_directory_uri() . '/style.css',
array(),
wp_get_theme()->get( 'Version' )
);

// Enqueue theme stylesheet.
wp_enqueue_style( 'fotograma-style' );

}

endif;

add_action( 'wp_enqueue_scripts', 'fotograma_styles' );
47 changes: 47 additions & 0 deletions fotograma/parts/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!-- wp:comments {"className":"wp-block-comments-query-loop"} -->
<div class="wp-block-comments wp-block-comments-query-loop">
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:comments-title {"level":3} /-->

<!-- wp:comment-template {"style":{"spacing":{"padding":{"left":"0px"}}}} -->
<!-- wp:group {"style":{"spacing":{"margin":{"top":"0","bottom":"var:preset|spacing|70"}}}} -->
<div class="wp-block-group" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--70)">
<!-- wp:group {"style":{"spacing":{"blockGap":"0.5em"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:avatar {"size":40} /-->

<!-- wp:group -->
<div class="wp-block-group">
<!-- wp:comment-author-name /-->

<!-- wp:group {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px"},"blockGap":"0.5em"}},"layout":{"type":"flex"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px">
<!-- wp:comment-date {"format":"F j, Y \\a\\t g:i a"} /-->

<!-- wp:comment-edit-link /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

<!-- wp:comment-content {"fontSize":"small"} /-->

<!-- wp:comment-reply-link /-->
</div>
<!-- /wp:group -->
<!-- /wp:comment-template -->

<!-- wp:comments-pagination {"paginationArrow":"arrow","layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:comments-pagination-previous /-->

<!-- wp:comments-pagination-next /-->
<!-- /wp:comments-pagination -->

<!-- wp:post-comments-form /-->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:comments -->
1 change: 1 addition & 0 deletions fotograma/parts/footer-home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"fotograma/footer-home"} /-->
1 change: 1 addition & 0 deletions fotograma/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"fotograma/footer"} /-->
5 changes: 5 additions & 0 deletions fotograma/parts/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"}},"layout":{"type":"default"}} -->
<div class="wp-block-group">
<!-- wp:site-title {"style":{"spacing":{"margin":{"top":"0px","bottom":"0px","right":"0px","left":"0px"}}}} /-->
</div>
<!-- /wp:group -->
14 changes: 14 additions & 0 deletions fotograma/patterns/404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Title: A 404 page
* Slug: fotograma/404
* Inserter: no
*/
?>
<!-- wp:heading {"level":1,"fontSize":"large","anchor":"oops-that-page-can-t-be-found"} -->
<h1 class="wp-block-heading has-large-font-size" id="oops-that-page-can-t-be-found"><?php echo esc_html__( 'Oops! That page can&rsquo;t be found.', 'fotograma' ); ?></h1>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p><?php echo esc_html__( 'It looks like nothing was found at this location. Maybe try a search?', 'fotograma' ); ?></p>
<!-- /wp:paragraph -->
17 changes: 17 additions & 0 deletions fotograma/patterns/footer-home.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Title: Default footer
* Slug: fotograma/footer-home
* Inserter: no
*/
?>

<!-- wp:paragraph {"fontSize":"x-small"} -->
<p class="has-x-small-font-size"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'fotograma' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'fotograma' ),
$wordpress_link
);?></p>
<!-- /wp:paragraph -->
22 changes: 22 additions & 0 deletions fotograma/patterns/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* Title: Default footer
* Slug: fotograma/footer
* Categories: featured, footer
* Block Types: core/template-part/footer
*/
?>

<!-- wp:group {"align":"full","style":{"spacing":{"blockGap":"var:preset|spacing|30","padding":{"top":"var:preset|spacing|50","bottom":"var:preset|spacing|50","right":"var:preset|spacing|50","left":"var:preset|spacing|50"}},"elements":{"link":{"color":{"text":"var:preset|color|contrast"},":hover":{"color":{"text":"var:preset|color|contrast"}}}}},"textColor":"contrast","layout":{"type":"default"}} -->
<div class="wp-block-group alignfull has-contrast-color has-text-color has-link-color" style="padding-top:var(--wp--preset--spacing--50);padding-right:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)">
<!-- wp:paragraph {"fontSize":"x-small"} -->
<p class="has-x-small-font-size"><?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'fotograma' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
esc_html__( 'Designed with %1$s', 'fotograma' ),
$wordpress_link
);?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
Loading

0 comments on commit 8eac972

Please sign in to comment.