Browse Source

testing back button, testing posts with images

master
Sean Clarke 5 months ago
parent
commit
66c66fb29e
5 changed files with 20 additions and 3 deletions
  1. +3
    -1
      model/Post.js
  2. +2
    -1
      partials/footer.html
  3. +1
    -1
      partials/header.html
  4. +11
    -0
      posts/10-15-2019-split-word-sample.md
  5. +3
    -0
      web/main.js

+ 3
- 1
model/Post.js View File

@@ -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');


+ 2
- 1
partials/footer.html View File

@@ -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>

+ 1
- 1
partials/header.html View File

@@ -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
- 0
posts/10-15-2019-split-word-sample.md View File

@@ -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
- 0
web/main.js View File

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

Loading…
Cancel
Save