Commit 60af246d authored by numeroteca's avatar numeroteca

import css and js. create specific template for Documents (works with Pods plugin)

parents
<?php
/**
* The template for displaying archive pages
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WP_Bootstrap_Starter
*/
get_header(); ?>
<section id="primary" class="content-area col">
<main id="main" class="site-main" role="main">
<?php
if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h3 class="page-title">', '</h3>' );
the_archive_description( '<div class="archive-description">', '</div>' );
?>
</header><!-- .page-header -->
<table class="table table-hover table-condensed" id="doc-table">
<thead>
<tr>
<th>img</th>
<th>title</th>
<th>year</th>
<th>authors</th>
<th>tags</th>
<th>.</th>
<?php if ( is_user_logged_in() ) { ?><th>edit</th><?php } ?>
</tr>
</thead>
<tbody>
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content-doc', get_post_format() );
endwhile;
the_posts_navigation();
?>
</tbody>
</table>
<?php
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php
get_sidebar();
get_footer();
/*
* This combined file was created by the DataTables downloader builder:
* https://datatables.net/download
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#bs/dt-1.10.16
*
* Included libraries:
* DataTables 1.10.16
*/
table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody>tr:first-child>th,div.dataTables_scrollBody>table>tbody>tr:first-child>td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0}
<?php
// theme global vars
if (!defined('NUMEROTECA_VER'))
define('NUMEROTECA_VER', '1.0'); // must be updated in style.css header to
/*
* Add custom style.css
*/
function in_numeroteca_enqueue_styles() {
$parent_style = 'wp-bootstrap-starter'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style(
'numeroteca-child',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
//if ( is_page_template(array('archive-doc.php','taxonomy.php') ) ) {
if (is_archive()) {
wp_enqueue_style(
'datatables-css',
get_stylesheet_directory_uri().'/css/datatables.min.css'
);
wp_enqueue_script(
'datatables-js',
get_stylesheet_directory_uri().'/js/datatables.min.js'
);
wp_enqueue_script(
'datatables-init-js',
get_stylesheet_directory_uri().'/js/datatables.init.js'
);
}
}
add_action( 'wp_enqueue_scripts', 'in_numeroteca_enqueue_styles' );
(function($) {
jQuery(document).ready( function () {
jQuery('#doc-table').DataTable();
} );
})(jQuery);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WP_Bootstrap_Starter
*/
get_header(); ?>
<section id="primary" class="content-area col-sm-12 col-lg-8">
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content-document', get_post_format() );
the_post_navigation();
// 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 -->
</section><!-- #primary -->
<?php
get_sidebar();
get_footer();
/*
Theme Name: numeroteca child
Description: wp-bootstrap-starter child theme
Author: numeroteca
Author URI: http://numeroteca.org
Template: wp-bootstrap-starter
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: numeroteca-child
*/
.spacetop {
margin-top: 20px;
}
<?php
/**
* The template for displaying archive pages
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WP_Bootstrap_Starter
*/
get_header(); ?>
<section id="primary" class="content-area col">
<main id="main" class="site-main" role="main">
<div class=""><a href="/doc">Docs</a></div>
<?php
if ( have_posts() ) : ?>
<header class="page-header">
<?php
the_archive_title( '<h3 class="page-title">', '</h3>' );
the_archive_description( '<div class="archive-description">', '</div>' );
?>
</header><!-- .page-header -->
<table class="table table-hover table-condensed" id="doc-table">
<thead>
<tr>
<th>img</th>
<th>title</th>
<th>year</th>
<th>authors</th>
<th>tags</th>
<th>.</th>
<?php if ( is_user_logged_in() ) { ?><th>edit</th><?php } ?>
</tr>
</thead>
<tbody>
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'template-parts/content-doc', get_post_format() );
endwhile;
the_posts_navigation();
?>
</tbody>
</table>
<?php
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php
get_sidebar();
get_footer();
<?php
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WP_Bootstrap_Starter
*/
$post_id = $post->ID;
?>
<tr>
<td><?php the_post_thumbnail('thumbnail'); ?></td>
<td><strong><?php the_title( '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a>' ); ?></strong></td>
<td><?php echo get_the_term_list( $post_id, 'yr', '', ', ', '' ); ?></td>
<td><small><?php echo get_the_term_list( $post_id, 'autor', '', ', ', '' ); ?></small></td>
<td><small><?php echo get_the_term_list( $post_id, 'doctag', '', ', ', '' ); ?></small></td>
<td><small><?php $url = get_post_meta( $post_id, 'url', true ); echo "<a href='$url'>URL</a><br>"; ?></small></td>
<?php if ( is_user_logged_in() ) { ?><td><div class="btn btn-ligh btn-sm"> <?php edit_post_link(__('Edit This')); ?></div></td><?php } ?>
</tr>
<?php
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WP_Bootstrap_Starter
*/
$post_id = $post->ID;
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class=""><a href="/doc">Docs</a></div>
<div class="post-thumbnail">
<?php the_post_thumbnail( 'medium' ); ?>
</div>
<header class="entry-header">
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
if ( 'post' === get_post_type() ) : ?>
<!-- <div class="entry-meta">-->
<?php // wp_bootstrap_starter_posted_on(); ?>
<!-- </div>--> <!-- .entry-meta -->
<?php
endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
$abstract = get_post_meta( $post_id, 'abstract', true );
$year = get_the_term_list( $post_id, 'yr', '', ', ', ' | ' );
echo $year;
//echo get_the_term_list( $post_id, 'lng', '', ', ', ' | ' );
echo get_the_term_list( $post_id, 'autor', 'Authors: ', ', ', ' | ' );
//echo get_the_term_list( $post_id, 'tp', '', ', ', ' ' );
echo get_the_term_list( $post_id, 'doctag', '', ', ', '<br>' );
?>
<div class="card">
<div class="card-body">
<?php if ($abstract) { ?>
<h5 class="card-title">Abstract</h5>
<h6 class="card-subtitle mb-2 text-muted"></h6>
<p class="card-text">
<?php echo $abstract;?>
</p>
<?php } ?>
<!-- <a href="#" class="card-link">Another link</a>-->
<?php
$url = get_post_meta( $post_id, 'url', true );
echo "<hr>";
echo get_post_meta( $post_id, 'cit', true );
echo "<a href='$url'>$url</a><br>";
?>
</div>
</div>
<?php
if ( is_single() ) :
if ( is_user_logged_in() ) {
?>
<h6>Archivos (Only logged in)</h6>
<?php /* Time to create a new loop that pulls out the first 7 image attachments for this post */
$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post_id );
$attachments = get_posts( $args );
if ( $attachments ) {
echo "<ul>";
foreach ( $attachments as $attachment ) {
//print_r($attachment);
//$image_attributes = wp_get_attachment_image_src( $attachment->ID, 'medium' );
echo '<li><a class="thumb" href="';
echo $attachment->guid;
echo '">';
echo $attachment->post_title;
echo ' (';
echo $attachment->post_mime_type;
echo ')';
//echo wp_get_attachment_image( $attachment->ID, 'thumbnail' );
echo '</a></li>';
?>
<?php }
echo "</ul>";
}
echo "<h6>Contenido</h6>";
the_content();
}
?>
</ul>
<?php
else :
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'wp-bootstrap-starter' ) );
endif;
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'wp-bootstrap-starter' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php wp_bootstrap_starter_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'numerotecaorg');
/** MySQL database username */
define('DB_USER', 'numeroteca');
/** MySQL database password */
define('DB_PASSWORD', '5e8hujerXuwRu=re*');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'qwerokpq ewo krpewqrkew rq pewkrp qkew pdv nsdkv 3092305928509328 oijf03098230joivds');
define('SECURE_AUTH_KEY', 'fwe09jf93 4·$G=kre g0ekr 09349ugjw4g9wjg');
define('LOGGED_IN_KEY', 'vsdfv094380t909098098524309582043950458958204395235');
define('NONCE_KEY', 'wdjqwidjoqwijd832u829fu29438unvunv928unv0928nuv09324nuvf0928vnu4398vnfu23vf209v8nufaoivfaoivjaoibhiuahvbdsveo');
define('AUTH_SALT', 'jofiajsodjfosadfsadfsaidhfiusahdlfiuhliuh liuhiuhaisufhn8ny398fy39na8f7nh3f8haf8ah8fh·$·$G·$G·$g');
define('SECURE_AUTH_SALT', 'asdfsd09fi0dskf0a·$%·GWE%YSFfdsb90dsifb90ds94k·$$·Y');
define('LOGGED_IN_SALT', 'asdfosdkf9qi029i4f98jadsjfq9348fjiadjflaods8jf98j4f');
define('NONCE_SALT', '=)R·FK)KFAOSDKFANDS"·)($Ffjajf98dj"F$F');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress. A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
* language support.
*/
define('WPLANG', '');
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment