feat(style): remove timeago.js, and improve article-time style

This commit is contained in:
Jimmy Cai 2020-09-03 11:47:55 +02:00
parent 4bf9d82961
commit af487e0f3f
No known key found for this signature in database
GPG key ID: 3EA408E527F37B18
3 changed files with 3 additions and 15 deletions

View file

@ -109,13 +109,12 @@
svg {
vertical-align: middle;
margin-right: 8px;
width: 20px;
height: 20px;
}
time {
font-size: 16px;
@media (max-width: $on-desktop) {
font-size: 14px;
}
font-size: 1.4rem;
}
}

View file

@ -9,14 +9,6 @@ let Stack = {
*/
menu();
/**
* Add timeago
*/
const timeagoElements = document.querySelectorAll('article time[data-timeago=true]');
if (timeagoElements.length) {
timeago.render(timeagoElements);
}
if (document.querySelector('.article-content')) {
createGallery('.article-content');
}

View file

@ -1,6 +1,3 @@
<script src="https://cdn.jsdelivr.net/npm/timeago.js@4.0.2/dist/timeago.min.js"
integrity="sha256-sTurDi2etLN9CpnUIoCC9y5iynb2qr/uo6QJqzoO7mA=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js"
integrity="sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g=" crossorigin="anonymous"></script>