Skip to content

Commit

Permalink
Tema WordPress, Theme WordPress
Browse files Browse the repository at this point in the history
  • Loading branch information
lcorozco10 committed Mar 11, 2015
0 parents commit 3157ff5
Show file tree
Hide file tree
Showing 23 changed files with 473 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Created by https://www.gitignore.io

### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
1 change: 1 addition & 0 deletions 404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span>Aqui no hay nada x.X</span>
1 change: 1 addition & 0 deletions archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span>Archivos de Post</span>
Empty file added author.php
Empty file.
1 change: 1 addition & 0 deletions category.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span>Categorias</span>
Empty file added comments.php
Empty file.
73 changes: 73 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php
get_template_part( 'menu', 'extra-menu' );
?>

<span>Cocomsys footer.</span>

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>

<script type="text/javascript">
$('.menu-item-has-children').addClass('dropdown');
$('.menu-item-has-children > a').addClass('dropdown-toggle');
$('.menu-item-has-children > a' ).attr( "data-toggle", "dropdown");
$('.menu-item-has-children > a' ).attr( "data-role", "button");
$('.menu-item-has-children > a' ).attr( "aria-expanded", "false");
$('.sub-menu').addClass('dropdown-menu');
$('.sub-menu' ).attr( "role", "menu");
$(".menu-item-has-children a" ).append( $( "<span class='caret'></span>"));
$('.current-menu-item').addClass('active');
$('.side').addClass('col-xs-12 col-sm-4');

</script>

<!-- Admin menu Bar login-->
<?php wp_footer();?>
<img src="">
</body>
</html>




<div class="summary entry-summary col-md-12" style="margin-top: 0px;">
<h2 itemprop="name" class="product_title entry-title">Metropolitano</h2>

<div class="app-meta">
<div class="row">
<div class="col-md-12">
<div class="media">
<div class="pull-left"><i class="fa fa-user"></i></div>
<div class="media-body">
Author
<div class="media-heading">Cocomsys</div>
</div>
</div>
</div>

<div class="col-md-12">
<div class="media">
<div class="pull-left"><i class="fa fa-calendar"></i></div>
<div class="media-body">
Release
<div class="media-heading">2014-10-15</div>
</div>
</div>
</div>
</div>

</div>

<div class="row">
<div class="col-md-12">
<div class="media">
<div class="pull-left"><i class="fa fa-laptop"></i></div>
<div class="media-body">
Descripción.
<div class="media-heading">Sitio web Hospital Metropolitano Managua, Nicaragua</div>
</div>
</div>
</div>
</div>

</div>
121 changes: 121 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<?php
/**
* Configuracion de Menu
**/
function Orozco_wp_nav_menu_args( $args = '' ) {
$args = array(
'theme_location' => 'header-menu',
'menu' => '',
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'bs-example-navbar-collapse-2',
'menu_class' => 'nav navbar-nav',
'menu_id' => '',
'echo' => false,
'fallback_cb' => '',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s </ul>',
'depth' => 0,
'walker' => ''
);
return $args;
}
add_filter( 'wp_nav_menu_args', 'Orozco_wp_nav_menu_args' );
/******************************************************************************/

/**
* Nombre de los menu
**/
function register_my_menus() {
register_nav_menus(
array(
'header-menu' => __( 'Header Menu' ),
'extra-menu' => __( 'Footer Menu' )
)
);
}
add_action( 'init', 'register_my_menus' );
/******************************************************************************/

/**
* Proper way to enqueue scripts and styles
*/
function wpb_mce_buttons_2($buttons) {
array_unshift($buttons, 'styleselect');
return $buttons;
}
add_filter('mce_buttons_2', 'wpb_mce_buttons_2');
/*
* Callback function to filter the MCE settings
*/

function my_mce_before_init_insert_formats( $init_array ) {

// Define the style_formats array

$style_formats = array(
// Each array child is a format with it's own settings
array(
'title' => 'Content Block',
'block' => 'span',
'classes' => 'content-block',
'wrapper' => true,

),
array(
'title' => 'Blue Button',
'block' => 'span',
'classes' => 'blue-button',
'wrapper' => true,
),
array(
'title' => 'Red Button',
'block' => 'span',
'classes' => 'red-button',
'wrapper' => true,
),
);
// Insert the array, JSON ENCODED, into 'style_formats'
$init_array['style_formats'] = json_encode( $style_formats );

return $init_array;

}
// Attach callback to 'tiny_mce_before_init'

add_filter( 'tiny_mce_before_init', 'my_mce_before_init_insert_formats' );
function my_theme_add_editor_styles() {
add_editor_style(get_bloginfo("stylesheet_directory").'/public/css/ccsadd.css' );
}
add_action( 'init', 'my_theme_add_editor_styles' );

if ( function_exists('register_sidebar') )
register_sidebar(array(
'name'=>'sidebar',
'before_widget' => '<div id="%1$s" class="side %2$s">', // Removes <li>
'after_widget' => '</div>', // Removes </li>
));



if ( has_nav_menu('extra-menu') ) {

wp_nav_menu(
array(
'theme_location' => 'extra-menu',
'container' => 'div',
'container_id' => 'menu-social',
'container_class' => 'menu',
'menu_id' => 'menu-social-items',
'menu_class' => 'menu-items',
'depth' => 1,
'link_before' => '<span class="screen-reader-text">',
'link_after' => '</span>',
'fallback_cb' => '',
)
);

}
50 changes: 50 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

include(TEMPLATEPATH."/inc/InitData.php");
$d = new iniData();


if(wp_title('', false)) {
$title = get_the_title();
$title .= ' :';
}

$title .= get_bloginfo('name');
$bodyClass = get_body_class()[0].' '. get_body_class()[1].' '.get_body_class()[2].' '.get_body_class()[3].' '.get_body_class()[4].' '.get_body_class()[5];


$headerContent = file_get_contents($d::$themeDir."/public/header.html");

$field = array(
"{lang}",
"{html_type}",
"{charset}",
"{cs-1}",
"{cs-2}",
"{siteTitle}",
"{titlePegeLocation}",
"{homeUrl}",
"{siteDescription}",
"{bodyclass}",
"{nemu}"
);
$remplaceField = array(
get_bloginfo('language'),
get_bloginfo('html_type'),
get_bloginfo('charset'),
$d::$cssStyle,
$d::$cssDir."/ccsadd.css",
get_bloginfo('name'),
$title,
get_bloginfo('home'),
get_bloginfo('description'),
$bodyClass,
wp_nav_menu()
);

$headerContent = str_replace($field, $remplaceField, $headerContent);


//add header script and css
wp_head();
echo $headerContent;
24 changes: 24 additions & 0 deletions inc/InitData.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* Contiene variables del sistema
*/
class iniData
{
static public $themeDir;
static public $cssStyle;
static public $jsDir;
static public $cssDir;

function __construct()
{

$this::$themeDir = get_bloginfo("stylesheet_directory");
$this::$cssStyle = get_bloginfo("stylesheet_url");

//Js and Css resources directory.
$this::$jsDir = $this::$themeDir."/public/js";
$this::$cssDir = $this::$themeDir."/public/css";


}
}
41 changes: 41 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
get_header();
$d = new iniData();

$pageContent = "";

while (have_posts()) :
the_post();
if (!is_page()) :
$page = "<div class = 'post-class col-xs-12 col-sm-4 ".get_the_ID()."' >".
"<span class='title-post'>".get_the_title()."</span>".
"<p>".get_the_content()."</p></div>";

else:
$page = "<div class = 'post-class col-xs-12 col-sm-4><p>".get_the_title()."</p>".
"<p>".get_the_content(__('Read more'))."</p></div>";
endif;
$pageContent .= $page;
endwhile;


$field = array(
"{contentBody}",
"{title}",
);
$remplaceField = array(
$pageContent,
get_bloginfo('name')

);


$bodyContent = file_get_contents($d::$themeDir."/public/index.html");
$bodyContent = str_replace($field, $remplaceField, $bodyContent);

echo $bodyContent;
include(TEMPLATEPATH."/sidebar.php");
get_search_form();
get_footer();
?>

9 changes: 9 additions & 0 deletions page.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php get_header();
$d = new iniData();

the_post();
echo the_title()."<br>";
echo the_content(__('Read more'))."<br>";


get_footer();
36 changes: 36 additions & 0 deletions public/css/ccsadd.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.content-block {
border:1px solid #eee;
padding:3px;
background:#ccc;
max-width:250px;
float:right;
text-align:center;
}
.content-block:after {
clear:both;
}
.blue-button {
background-color:#33bdef;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #057fd0;
display:inline-block;
cursor:pointer;
color:#ffffff;
padding:6px 24px;
text-decoration:none;
}

.red-button {
background-color:#bc3315;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #942911;
display:inline-block;
cursor:pointer;
color:#ffffff;
padding:6px 24px;
text-decoration:none;
}
Empty file added public/css/style.css
Empty file.
Loading

0 comments on commit 3157ff5

Please sign in to comment.