Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* parse markdown img * add class MarkdownParser * parse markdown img * copy static files to dist * add CreateDirForce * add DirectoryCopy * add CreateDirSoft * copy static files * rewrite staitc files src * show full path in index file * update build
- Loading branch information
1 parent
9c07965
commit 99ad730
Showing
25 changed files
with
6,194 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
<a style="display:block" href="sample\Silver Blaze.html">Silver Blaze</a> | ||
<a style="display:block" href="sample\The Adventure of the Six Napoleans.html">The Adventure of the Six Napoleans</a> | ||
<a style="display:block" href="sample\The Adventure of the Speckled Band.html">The Adventure of the Speckled Band</a> | ||
<a style="display:block" href="sample\The Naval Treaty.html">The Naval Treaty</a> | ||
<a style="display:block" href="sample\The Red Headed League.html">The Red Headed League</a> | ||
<a style="display:block" href="sample\markdown\Gallery.html">sample\markdown\Gallery.html</a> | ||
<a style="display:block" href="sample\markdown\Silver Blaze.html">sample\markdown\Silver Blaze.html</a> | ||
<a style="display:block" href="sample\markdown\The Adventure of the Six Napoleans.html">sample\markdown\The Adventure of the Six Napoleans.html</a> | ||
<a style="display:block" href="sample\markdown\The Adventure of the Speckled Band.html">sample\markdown\The Adventure of the Speckled Band.html</a> | ||
<a style="display:block" href="sample\markdown\The Naval Treaty.html">sample\markdown\The Naval Treaty.html</a> | ||
<a style="display:block" href="sample\markdown\The Red Headed League.html">sample\markdown\The Red Headed League.html</a> | ||
<a style="display:block" href="sample\Silver Blaze.html">sample\Silver Blaze.html</a> | ||
<a style="display:block" href="sample\The Adventure of the Six Napoleans.html">sample\The Adventure of the Six Napoleans.html</a> | ||
<a style="display:block" href="sample\The Adventure of the Speckled Band.html">sample\The Adventure of the Speckled Band.html</a> | ||
<a style="display:block" href="sample\The Naval Treaty.html">sample\The Naval Treaty.html</a> | ||
<a style="display:block" href="sample\The Red Headed League.html">sample\The Red Headed League.html</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-CA"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<style>h1 { | ||
font-size: 3rem; | ||
color: aquamarine; | ||
} | ||
|
||
p { | ||
margin-bottom: 1rem; | ||
} | ||
</style> | ||
<title>Gallery</title> | ||
</head> | ||
<body | ||
style="margin-left: auto; margin-right: auto; max-width: min(100%, 65ch)" | ||
> | ||
<p>Picture #1</p><p><img style="width:100%" alt="1" src="/static/1.jpg" /></p><p>Picture #2</p><p><img style="width:100%" alt="2" src="/static/2.jpg" /></p><p>Picture #3</p><p><img style="width:100%" alt="3" src="/static/3.jpg" /></p><p>Picture #4</p><p><img style="width:100%" alt="4" src="/static/4.jpg" /></p> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
build/sample/markdown/The Adventure of the Six Napoleans.html
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
build/sample/markdown/The Adventure of the Speckled Band.html
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
using System.IO; | ||
|
||
|
||
namespace paper_csharp.modules.utils | ||
{ | ||
public class DirectoryUtils | ||
{ | ||
|
||
// Overwrite or create a new directory at path | ||
public static DirectoryInfo CreateDirForce(string path) | ||
{ | ||
if (Directory.Exists(path)) | ||
{ | ||
Directory.Delete(path, true); | ||
} | ||
|
||
return Directory.CreateDirectory(path); | ||
} | ||
|
||
// Create a new directory if not exist at path | ||
public static DirectoryInfo CreateDirSoft(string path) | ||
{ | ||
DirectoryInfo dir = new DirectoryInfo(path); | ||
|
||
if (dir.Exists) | ||
{ | ||
return dir; | ||
} | ||
|
||
return Directory.CreateDirectory(dir.ToString()); | ||
} | ||
|
||
public static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs) | ||
{ | ||
// Get the subdirectories for the specified directory. | ||
DirectoryInfo dir = new DirectoryInfo(sourceDirName); | ||
|
||
if (!dir.Exists) | ||
{ | ||
throw new DirectoryNotFoundException( | ||
"Source directory does not exist or could not be found: " | ||
+ sourceDirName); | ||
} | ||
|
||
DirectoryInfo[] dirs = dir.GetDirectories(); | ||
|
||
// If the destination directory doesn't exist, create it. | ||
Directory.CreateDirectory(destDirName); | ||
|
||
// Get the files in the directory and copy them to the new location. | ||
FileInfo[] files = dir.GetFiles(); | ||
foreach (FileInfo file in files) | ||
{ | ||
string tempPath = Path.Combine(destDirName, file.Name); | ||
file.CopyTo(tempPath, false); | ||
} | ||
|
||
// If copying subdirectories, copy them and their contents to new location. | ||
if (copySubDirs) | ||
{ | ||
foreach (DirectoryInfo subdir in dirs) | ||
{ | ||
string tempPath = Path.Combine(destDirName, subdir.Name); | ||
DirectoryCopy(subdir.FullName, tempPath, copySubDirs); | ||
} | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Picture #1 | ||
|
||
[1](1.jpg) | ||
|
||
Picture #2 | ||
|
||
[2](2.jpg) | ||
|
||
Picture #3 | ||
|
||
[3](3.jpg) | ||
|
||
Picture #4 | ||
|
||
[4](4.jpg) |
Oops, something went wrong.
99ad730
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: