parent
74100e99bf
commit
01cd47dd5e
4 changed files with 15 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
<div class="card card-primary">
|
||||
<div class="card-header"><i class="fa fa-rss"></i> Publications</div>
|
||||
<div class="card-menu">
|
||||
<div class="card-menu trim-that">
|
||||
<?php
|
||||
wp_get_archives( array(
|
||||
'type' => 'postbypost',
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
<?php include(TEMPLATEPATH . '/components/footer-content.php'); ?>
|
||||
<?php wp_footer(); ?>
|
||||
<script src="<?php echo get_template_directory_uri();?>/dep/jquery/js/jquery.min.js"></script>
|
||||
<script src="<?php echo get_template_directory_uri();?>/js/trim.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
<!-- CSS -->
|
||||
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet"/>
|
||||
|
||||
<script src="<?php echo get_template_directory_uri();?>/dep/jquery/jquery.js"></script>
|
||||
</head>
|
||||
|
||||
<!-- Début du vrai HTML -->
|
||||
|
|
11
js/trim.js
Normal file
11
js/trim.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
var length = 35;
|
||||
|
||||
$(function(){
|
||||
$(".trim-that a, limit").each(function(i){
|
||||
len=$(this).text().length;
|
||||
if(len>length)
|
||||
{
|
||||
$(this).text($(this).text().substr(0,(length-3))+'...');
|
||||
}
|
||||
});
|
||||
});
|
Reference in a new issue