fix: remove jquery
This commit is contained in:
parent
2d0c1fda68
commit
8d1cb11b08
File diff suppressed because one or more lines are too long
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet"/>
|
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet"/>
|
||||||
|
|
||||||
<script src="<?php echo get_template_directory_uri();?>/dep/jquery/jquery.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<!-- Début du vrai HTML -->
|
<!-- Début du vrai HTML -->
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
var length = 35;
|
var length = 35;
|
||||||
|
|
||||||
$(function(){
|
document.querySelectorAll('.pretty-link').forEach(function (i) {
|
||||||
$(".pretty-link").each(function(i){
|
var str = i.textContent.replace('https://', '');
|
||||||
var str = $(this).text().replace("https://", "");
|
i.textContent = str;
|
||||||
$(this).text(str);
|
|
||||||
});
|
|
||||||
});
|
});
|
25
js/trim.js
25
js/trim.js
|
@ -1,11 +1,18 @@
|
||||||
var length = 35;
|
const LENGHT = 35;
|
||||||
|
|
||||||
$(function(){
|
function limitString(str) {
|
||||||
$(".trim-that a, .limit").each(function(i){
|
len = str.length;
|
||||||
len=$(this).text().length;
|
if (len > LENGHT) {
|
||||||
if(len>length)
|
return str.substr(0, (LENGHT - 3)) + '...';
|
||||||
{
|
} else {
|
||||||
$(this).text($(this).text().substr(0,(length-3))+'...');
|
return str;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll('.trim-that a').forEach(function (i) {
|
||||||
|
i.textContent = limitString(i.textContent);
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelectorAll('.limit').forEach(function (i) {
|
||||||
|
i.textContent = limitString(i.textContent);
|
||||||
});
|
});
|
|
@ -11,8 +11,8 @@
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<div class="card head-primary">
|
<div class="card head-secondary" id="social-network-card">
|
||||||
<h2 class="card-header">Liste de mes réseaux sociaux</h2>
|
<h2 class="card-header"><i class="fa fa-comments" aria-hidden="true"></i> Me retrouver</h2>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Reference in New Issue