Browse Source

testing back button, testing posts with images

master
Sean Clarke 2 years ago
parent
commit
66c66fb29e
  1. 4
      model/Post.js
  2. 3
      partials/footer.html
  3. 2
      partials/header.html
  4. 11
      posts/10-15-2019-split-word-sample.md
  5. 3
      web/main.js

4
model/Post.js

@ -49,7 +49,9 @@ Post.prototype.getPost = function(){
Post.prototype.build = function(){
var html = fs.readFileSync(process.cwd() + '/partials/header.html', 'utf8');
html += convert.makeHtml(this.getPost())
// adding back button
html += '<a id="back" title="⬅️ Back" href="#" onclick="back();return false;">⬅️ Back</a>\n';
html += convert.makeHtml(this.getPost());
html += fs.readFileSync(process.cwd() + '/partials/footer.html', 'utf8');
fs.writeFileSync(this.html, html, 'utf8');

3
partials/footer.html

@ -10,5 +10,6 @@
</body>
<!-- Javascript Declaration -->
<script src="/js/main.js"></script>
<!-- <script src="/js/main.js"></script> -->
<script src="https://snld.xyz/js/main.js"></script> <!-- Used for testing -->
</html>

2
partials/header.html

@ -10,7 +10,7 @@
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- Stylesheets -->
<!-- <link href="/css/main.css" rel="stylesheet"> -->
<link href="/css/main.css" rel="stylesheet"> <!-- Used for Testing -->
<link href="https://snld.xyz/css/main.css" rel="stylesheet"> <!-- Used for Testing -->
</head>
<body>

11
posts/10-15-2019-split-word-sample.md

@ -12,3 +12,14 @@ This is some text. I am happy to write this text. This will show how it works.
This is the first sub-category. I will probably throw an image in this section. This will show how a post image will work.
This is just a link to [Buy me a ☕ or ☕☕](https://www.buymeacoffee.com/seanland)
## Test for an image!
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
Thowing an image in here
```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```

3
web/main.js

@ -0,0 +1,3 @@
function back(){
window.history.back();
}
Loading…
Cancel
Save