Skip to content

Commit

Permalink
Remove timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jun 9, 2017
1 parent eae394c commit 80b2b05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 51 deletions.
48 changes: 1 addition & 47 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

return t;
}(document, "script", "twitter-wjs"));</script>
<script src="https://packd.now.sh/ms@2.0.0"></script>
</head>

<body>
Expand All @@ -71,57 +70,12 @@
placeholder: 'Type to search',
paths: 'auto'
},
formatUpdated: function (stringDate) {
var days = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
];

var months = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];

function dateOrdinal(d) {
return d+(31==d||21==d||1==d?"st":22==d||2==d?"nd":23==d||3==d?"rd":"th")
};

var timestamp = new Date(stringDate)
var day = days[timestamp.getDay()]
var month = months[timestamp.getMonth()]
var dayOrdinal = dateOrdinal(timestamp.getUTCDate())
var year = timestamp.getFullYear()
var diff = '(' + ms(Date.now() - timestamp) + ' ago)'

return day + ', ' + month + ' ' + dayOrdinal + ' ' + year + ' ' + diff
},
plugins: [
function(hook, vm) {
hook.beforeEach(function (markdown) {
var url = 'https://github.com/Kikobeats/js-mythbusters/edit/master/docs' + vm.router.getFile()

var editButton = '<a class="edit-button" href="' + url +'" target="_blank">edit this file</a>\n'

console.log('')

var date = '<span class="timestamp">{docsify-updated}</span>\n'

var metaContainer = '<div class="meta-container">' + date + editButton + '</div>\n'
var metaContainer = '<div class="meta-container">' + editButton + '</div>\n'

return metaContainer + markdown
})
Expand Down
6 changes: 2 additions & 4 deletions docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1201,12 +1201,10 @@ pre:after {
flex-direction: row;
align-items: center;
justify-content: space-between;
color: #364149;
font-size: 12px;
}

a.edit-button {
float: right;
.meta-container > .edit-button {
text-decoration: none;
font-size: 12px;
color: #364149;
}

0 comments on commit 80b2b05

Please sign in to comment.