[enh] Make frontend nicer + don't use external sources
This commit is contained in:
parent
e60d280be2
commit
69734ba649
7
public/css/bootstrap.min.css
vendored
Normal file
7
public/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -19,6 +19,15 @@ escape = function(string) {
|
||||
return htmlEscapes[match];
|
||||
});
|
||||
};
|
||||
var urlRegex = /(https?://[^\s]+)/g;
|
||||
url = function(string){
|
||||
return ''+string.replace(urlRegex, '<a target="_blank" href="$1">$1</a>')
|
||||
}
|
||||
var titleRegex = /^(.*\n)/;
|
||||
title = function(string){
|
||||
var str=''+string.replace(titleRegex, '<b>$1</b>');
|
||||
return ''+string.replace(titleRegex, '<b>$1</b>');
|
||||
}
|
||||
|
||||
function updatePage(data){
|
||||
|
||||
@ -31,7 +40,7 @@ function updatePage(data){
|
||||
<div class="log row-fluid">
|
||||
<div class="span9">
|
||||
<p>${escape(item.created_at)} -- ${escape(item.author)} -- ${escape(item.server)}
|
||||
<h4> ${escape(item.content)}</h4>
|
||||
<pre> ${title(url(escape(item.content)))}</pre>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
|
2
public/js/jquery.min.js
vendored
Normal file
2
public/js/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -5,9 +5,9 @@ html(lang="en")
|
||||
title= title
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport', content='width=device-width, initial-scale=1')
|
||||
link(rel='stylesheet', href='https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css')
|
||||
link(rel='stylesheet', href='css/site.css')
|
||||
script(type = "text/javascript",src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js')
|
||||
link(rel='stylesheet', href='/css/bootstrap.min.css')
|
||||
link(rel='stylesheet', href='/css/site.css')
|
||||
script(type = "text/javascript",src='/js/jquery.min.js')
|
||||
body
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light justify-content-between">
|
||||
<a class="navbar-brand" href="#">Changelog Server</a>
|
||||
|
Loading…
Reference in New Issue
Block a user