Added les 2
This commit is contained in:
parent
4dafd69f75
commit
8cefe8bc25
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,3 +16,4 @@ $RECYCLE.BIN/
|
||||
### Application
|
||||
.env
|
||||
_sources
|
||||
uploads/
|
||||
71
themes/AlmaMater/content.php
Normal file
71
themes/AlmaMater/content.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying posts.
|
||||
*
|
||||
* This is the template that displays all pages by default.
|
||||
* It is used to display archive pages and stands in place of
|
||||
* index.php when displaying a page for a custom post type called "Post".
|
||||
*
|
||||
* Please note that this is the WordPress construct of all post types.
|
||||
* Other post types, such as 'post' uses 'index.php' (which this file as well).
|
||||
* We've added a few "hooks" to enhance the functionality of this template.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) :
|
||||
the_post_thumbnail();
|
||||
endif;
|
||||
|
||||
if ( is_singular() ) :
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
||||
else :
|
||||
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
||||
endif;
|
||||
|
||||
if ( 'post' === get_post_type() ) :
|
||||
?>
|
||||
<div class="entry-meta">
|
||||
<?php twentytwentyone_entry_meta_date(); ?>
|
||||
</div><!-- .entry-meta -->
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content(
|
||||
sprintf(
|
||||
/* translators: %s: Name of current post */
|
||||
wp_kses(
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentytwentyone' ),
|
||||
array(
|
||||
'span' => array( 'class' => '' ),
|
||||
)
|
||||
),
|
||||
get_the_title()
|
||||
)
|
||||
);
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'twentytwentyone' ),
|
||||
'after' => '</div>',
|
||||
'link_before' => '<span class="page-number">',
|
||||
'link_after' => '</span>',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php twentytwentyone_entry_footer(); ?>
|
||||
</footer>
|
||||
</article>
|
||||
35
themes/AlmaMater/footer.php
Normal file
35
themes/AlmaMater/footer.php
Normal file
@ -0,0 +1,35 @@
|
||||
</div> <!-- Close the .content wrapper -->
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="columns">
|
||||
<div class="column is-1"></div>
|
||||
|
||||
<!-- Main content column -->
|
||||
<div class="column">
|
||||
<div class="content has-text-centered">
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
<!-- Add your footer content here -->
|
||||
<nav class="level">
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<figure class="image is-48x48">
|
||||
<img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/logo.png" alt="Logo">
|
||||
</figure>
|
||||
<p class="heading">Your Site Name</p>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Add any other footer elements here -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column is-1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$D_VERSION = 1.0; // Correct declaration
|
||||
|
||||
/**
|
||||
* Replace WP version with custom version number
|
||||
*
|
||||
* @param $src
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function filter_custom_version($src) {
|
||||
if (strpos($src, 'ver=')) {
|
||||
$src = remove_query_arg('ver', $src);
|
||||
$src .= '?ver=' . $D_VERSION;
|
||||
}
|
||||
return $src;
|
||||
}
|
||||
add_filter('the_generator', 'filter_custom_version');
|
||||
|
||||
function my_theme_enqueue_styles() {
|
||||
wp_enqueue_style('bulma', 'https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.3/css/bulma.min.css');
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'my_theme_enqueue_styles');
|
||||
45
themes/AlmaMater/header.php
Normal file
45
themes/AlmaMater/header.php
Normal file
@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
<html <?php language_attributes() ?>>
|
||||
<head>
|
||||
<title>
|
||||
|
||||
<?php bloginfo('title') ?>
|
||||
</title>
|
||||
<meta charset="<?php bloginfo( 'charset' ) ?>" />
|
||||
<?php wp_head() ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class() ?>>
|
||||
<?php wp_body_open() ?>
|
||||
<header class="custom-header">
|
||||
<nav class="navbar is-fixed-top">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item has-text-white">
|
||||
<img src="path/to/your/logo.png" alt="Logo" class="logo">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-menu">
|
||||
<div class="navbar-start">
|
||||
<a class="navbar-item">Home</a>
|
||||
<a class="navbar-item">About</a>
|
||||
<a class="navbar-item">Services</a>
|
||||
<a class="navbar-item">Contact</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item">
|
||||
<div class="field is-grouped">
|
||||
<p class="control">
|
||||
<a class="button is-primary">Sign Up</a>
|
||||
</p>
|
||||
<p class="control">
|
||||
<a class="button is-light">Log In</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@ -1,4 +1,26 @@
|
||||
<?php
|
||||
get_header();
|
||||
<?php get_header(); ?>
|
||||
|
||||
get_footer();
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title">My Blog</h1>
|
||||
<div class="columns is-multiline">
|
||||
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
|
||||
<div class="column is-one-third">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<h2 class="subtitle"><?php the_title(); ?></h2>
|
||||
<div class="content">
|
||||
<?php the_excerpt(); ?>
|
||||
<a href="<?php the_permalink(); ?>" class="button is-link">Read More</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; else : ?>
|
||||
<p>No posts found.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
|
||||
25
themes/AlmaMater/single.php
Normal file
25
themes/AlmaMater/single.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
the_post();
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<header class="hero is-primary">
|
||||
<div class="hero-body">
|
||||
<h1 class="title has-text-dark"><?php the_title(); ?></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="section">
|
||||
<div class="container">
|
||||
<article class="content">
|
||||
<p><?php the_content(); ?></p>
|
||||
</article>
|
||||
<div class="buttons">
|
||||
<a href="<?php echo esc_url(home_url('/')); ?>" class="button is-link">Back to Blog</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
get_footer();
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user