Browse Source

wherewasi :dizzy_face:"

windhamdavid 3 years ago
parent
commit
f78f844601

File diff suppressed because it is too large
+ 5 - 0
css/style.min.css


BIN
fonts/FontAwesome.otf


BIN
fonts/fontawesome-webfont.eot


File diff suppressed because it is too large
+ 414 - 0
fonts/fontawesome-webfont.svg


BIN
fonts/fontawesome-webfont.ttf


BIN
fonts/fontawesome-webfont.woff


BIN
fonts/glyphicons-halflings-regular.eot


File diff suppressed because it is too large
+ 229 - 0
fonts/glyphicons-halflings-regular.svg


BIN
fonts/glyphicons-halflings-regular.ttf


BIN
fonts/glyphicons-halflings-regular.woff


+ 15 - 0
footer.php

@@ -0,0 +1,15 @@
+
+
+	</div><!-- #content -->
+
+	<footer id="colophon" class="site-footer" role="contentinfo">
+		<div class="site-info">
+			
+		</div><!-- .site-info -->
+	</footer><!-- #colophon -->
+</div><!-- #page -->
+
+<?php wp_footer(); ?>
+
+</body>
+</html>

+ 63 - 0
functions.php

@@ -0,0 +1,63 @@
+<?php
+
+if ( ! function_exists( 'cc_setup' ) ) :
+
+function cc_setup() {
+	add_theme_support( 'automatic-feed-links' );
+	add_theme_support( 'title-tag' );
+	add_theme_support( 'post-thumbnails' );
+	register_nav_menus( array(
+		'primary' => esc_html__( 'Primary', 'cc' ),
+	) );
+	add_theme_support( 'html5', array(
+		'search-form',
+		'comment-form',
+		'comment-list',
+		'gallery',
+		'caption',
+	) );
+	add_theme_support( 'post-formats', array(
+		'aside',
+		'image',
+		'video',
+		'quote',
+		'link',
+	) );
+}
+endif;
+add_action( 'after_setup_theme', 'cc_setup' );
+
+function cc_content_width() {
+	$GLOBALS['content_width'] = apply_filters( 'cc_content_width', 640 );
+}
+add_action( 'after_setup_theme', 'cc_content_width', 0 );
+
+function cc_widgets_init() {
+	register_sidebar( array(
+		'name'          => esc_html__( 'Sidebar', 'cc' ),
+		'id'            => 'sidebar-1',
+		'description'   => '',
+		'before_widget' => '<section id="%1$s" class="widget %2$s">',
+		'after_widget'  => '</section>',
+		'before_title'  => '<h2 class="widget-title">',
+		'after_title'   => '</h2>',
+	) );
+}
+add_action( 'widgets_init', 'cc_widgets_init' );
+
+function cc_scripts() {
+	wp_enqueue_style( 'cc-style', get_stylesheet_uri() );
+
+	wp_enqueue_script( 'cc-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
+
+	wp_enqueue_script( 'cc-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
+
+	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
+		wp_enqueue_script( 'comment-reply' );
+	}
+}
+add_action( 'wp_enqueue_scripts', 'cc_scripts' );
+
+require get_template_directory() . '/inc/template-tags.php';
+
+

+ 2 - 2
gulpfile.js

@@ -22,11 +22,11 @@ var buildTask = function() {
     .pipe(gulp.dest('./img'));
   gulp.src('./src/fonts/*')
     .pipe(gulp.dest('./fonts'));
-  gulp.src(['./src/css/bootstrap-v3.3.6.css', './src/css/style.css'])
+  gulp.src(['./src/css/bootstrap.css', './src/css/style.css'])
     .pipe(concat('style.min.css'))
     .pipe(minifycss())
     .pipe(gulp.dest('./css'));
-  gulp.src(['./src/js/jquery-v2.1.4.js', './src/js/bootstrap-v3.3.6.js'])
+  gulp.src(['./src/js/jquery-1.12.1.js', './src/js/bootstrap.js'])
     .pipe(concat('vendor.min.js'))
     .pipe(uglify())
     .pipe(gulp.dest('./js'));

+ 37 - 0
header.php

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en-US">
+<head>
+<meta charset="UTF-8" />
+<meta charset="<?php bloginfo( 'charset' ); ?>">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<?php wp_head(); ?>
+</head>
+
+<body <?php body_class(); ?>>
+<div id="page" class="site">
+	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'cc' ); ?></a>
+
+	<header id="masthead" class="site-header" role="banner">
+		<div class="site-branding">
+			<?php
+			if ( is_front_page() && is_home() ) : ?>
+				<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
+			<?php else : ?>
+				<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
+			<?php
+			endif;
+
+			$description = get_bloginfo( 'description', 'display' );
+			if ( $description || is_customize_preview() ) : ?>
+				<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
+			<?php
+			endif; ?>
+		</div><!-- .site-branding -->
+
+		<nav id="site-navigation" class="main-navigation" role="navigation">
+			<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'cc' ); ?></button>
+			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
+		</nav><!-- #site-navigation -->
+	</header><!-- #masthead -->
+
+	<div id="content" class="site-content">

+ 110 - 0
inc/template.php

@@ -0,0 +1,110 @@
+<?php
+
+if ( ! function_exists( 'cc_posted_on' ) ) :
+
+function cc_posted_on() {
+	$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
+	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
+		$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
+	}
+
+	$time_string = sprintf( $time_string,
+		esc_attr( get_the_date( 'c' ) ),
+		esc_html( get_the_date() ),
+		esc_attr( get_the_modified_date( 'c' ) ),
+		esc_html( get_the_modified_date() )
+	);
+
+	$posted_on = sprintf(
+		esc_html_x( 'Posted on %s', 'post date', 'cc' ),
+		'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
+	);
+
+	$byline = sprintf(
+		esc_html_x( 'by %s', 'post author', 'cc' ),
+		'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
+	);
+
+	echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK.
+
+}
+endif;
+
+if ( ! function_exists( 'cc_entry_footer' ) ) :
+
+function cc_entry_footer() {
+	// Hide category and tag text for pages.
+	if ( 'post' === get_post_type() ) {
+		/* translators: used between list items, there is a space after the comma */
+		$categories_list = get_the_category_list( esc_html__( ', ', 'cc' ) );
+		if ( $categories_list && cc_categorized_blog() ) {
+			printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'cc' ) . '</span>', $categories_list ); // WPCS: XSS OK.
+		}
+
+		/* translators: used between list items, there is a space after the comma */
+		$tags_list = get_the_tag_list( '', esc_html__( ', ', 'cc' ) );
+		if ( $tags_list ) {
+			printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'cc' ) . '</span>', $tags_list ); // WPCS: XSS OK.
+		}
+	}
+
+	if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
+		echo '<span class="comments-link">';
+		comments_popup_link( esc_html__( 'Leave a comment', 'cc' ), esc_html__( '1 Comment', 'cc' ), esc_html__( '% Comments', 'cc' ) );
+		echo '</span>';
+	}
+
+	edit_post_link(
+		sprintf(
+			/* translators: %s: Name of current post */
+			esc_html__( 'Edit %s', 'cc' ),
+			the_title( '<span class="screen-reader-text">"', '"</span>', false )
+		),
+		'<span class="edit-link">',
+		'</span>'
+	);
+}
+endif;
+
+/**
+ * Returns true if a blog has more than 1 category.
+ *
+ * @return bool
+ */
+function cc_categorized_blog() {
+	if ( false === ( $all_the_cool_cats = get_transient( 'cc_categories' ) ) ) {
+		// Create an array of all the categories that are attached to posts.
+		$all_the_cool_cats = get_categories( array(
+			'fields'     => 'ids',
+			'hide_empty' => 1,
+			// We only need to know if there is more than one category.
+			'number'     => 2,
+		) );
+
+		// Count the number of categories that are attached to the posts.
+		$all_the_cool_cats = count( $all_the_cool_cats );
+
+		set_transient( 'cc_categories', $all_the_cool_cats );
+	}
+
+	if ( $all_the_cool_cats > 1 ) {
+		// This blog has more than 1 category so cc_categorized_blog should return true.
+		return true;
+	} else {
+		// This blog has only 1 category so cc_categorized_blog should return false.
+		return false;
+	}
+}
+
+/**
+ * Flush out the transients used in cc_categorized_blog.
+ */
+function cc_category_transient_flusher() {
+	if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
+		return;
+	}
+	// Like, beat it. Dig?
+	delete_transient( 'cc_categories' );
+}
+add_action( 'edit_category', 'cc_category_transient_flusher' );
+add_action( 'save_post',     'cc_category_transient_flusher' );

+ 23 - 0
inc/tweaks.php

@@ -0,0 +1,23 @@
+<?php
+
+remove_action('wp_head', 'index_rel_link' ); 
+remove_action('wp_head', 'rel_canonical');
+remove_action('wp_head', 'start_post_rel_link', 10, 0 );
+remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0); 
+remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 );
+remove_action('wp_head', 'parent_post_rel_link', 10, 0 );
+remove_action('wp_head', 'rsd_link');
+remove_action('wp_head', 'wlwmanifest_link');
+remove_action('wp_head', 'wp_generator');
+remove_action('wp_head', 'feed_links_extra', 3 );
+remove_action('wp_head', 'feed_links', 2 );
+remove_action('wp_head', 'wp_oembed_add_discovery_links', 10, 0 );
+remove_action( 'wp_head', 'wp_oembed_add_host_js', 10, 0 );
+
+function cc_remove_wp_ver_css_js( $src ) {
+    if ( strpos( $src, 'ver=' ) )
+        $src = remove_query_arg( 'ver', $src );
+    return $src;
+}
+add_filter( 'style_loader_src', 'cc_remove_wp_ver_css_js', 9999 );
+add_filter( 'script_loader_src', 'cc_remove_wp_ver_css_js', 9999 );

+ 36 - 0
index.php

@@ -0,0 +1,36 @@
+<?php get_header(); ?>
+
+	<div id="primary" class="content-area">
+		<main id="main" class="site-main" role="main">
+
+		<?php
+		if ( have_posts() ) :
+
+			if ( is_home() && ! is_front_page() ) : ?>
+				<header>
+					<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
+				</header>
+
+			<?php
+			endif;
+
+			while ( have_posts() ) : the_post();
+
+				get_template_part( 'template-parts/content', get_post_format() );
+
+			endwhile;
+
+			the_posts_navigation();
+
+		else :
+
+			get_template_part( 'template-parts/content', 'none' );
+
+		endif; ?>
+
+		</main><!-- #main -->
+	</div><!-- #primary -->
+
+<?php
+get_sidebar();
+get_footer();

File diff suppressed because it is too large
+ 5 - 0
js/vendor.min.js


+ 24 - 0
page.php

@@ -0,0 +1,24 @@
+<?php get_header(); ?>
+
+	<div id="primary" class="content-area">
+		<main id="main" class="site-main" role="main">
+
+			<?php
+			while ( have_posts() ) : the_post();
+
+				get_template_part( 'template-parts/content', 'page' );
+
+				// If comments are open or we have at least one comment, load up the comment template.
+				if ( comments_open() || get_comments_number() ) :
+					comments_template();
+				endif;
+
+			endwhile; // End of the loop.
+			?>
+
+		</main><!-- #main -->
+	</div><!-- #primary -->
+
+<?php
+get_sidebar();
+get_footer();

File diff suppressed because it is too large
+ 6760 - 0
src/css/bootstrap.css


BIN
src/fonts/FontAwesome.otf


BIN
src/fonts/fontawesome-webfont.eot


File diff suppressed because it is too large
+ 414 - 0
src/fonts/fontawesome-webfont.svg


BIN
src/fonts/fontawesome-webfont.ttf


BIN
src/fonts/fontawesome-webfont.woff


BIN
src/fonts/glyphicons-halflings-regular.eot


File diff suppressed because it is too large
+ 229 - 0
src/fonts/glyphicons-halflings-regular.svg


BIN
src/fonts/glyphicons-halflings-regular.ttf


BIN
src/fonts/glyphicons-halflings-regular.woff


File diff suppressed because it is too large
+ 2363 - 0
src/js/bootstrap.js


File diff suppressed because it is too large
+ 11026 - 0
src/js/jquery-1.12.1.js


+ 18 - 0
style.css

@@ -0,0 +1,18 @@
+/*!
+Theme Name: cc
+Theme URI: 
+Author: windhamdavid
+Description: 
+Version: 1.0
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
+
+Thanks: 
+normalize.css v3.0.1 * MIT License
+Bootstrap v3.2.0 * MIT License
+Font Awesome 4.2.0 * MIT License
+Animate.css * MIT Lincense
+_s | * GPL License
+
+*** This is just for the template to register in WordPress. All of the css files are in /src ***
+
+*/