Skip to content

Commit

Permalink
#488 Refactored the repo to contain only pgn-viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
mliebelt committed Jan 5, 2024
1 parent 8682404 commit 1d51383
Show file tree
Hide file tree
Showing 519 changed files with 3,697 additions and 16,132 deletions.
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
.idea
.vscode
.ftppass
.ftpauth
**/Thumbs.db
node_modules
lib/*
Empty file removed .gitmodules
Empty file.
File renamed without changes.
382 changes: 191 additions & 191 deletions CHANGELOG.md

Large diffs are not rendered by default.

File renamed without changes.
8 changes: 4 additions & 4 deletions dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The following is the (rough) development documentation. When do you need it:

* When you don't want to use the whole package, but want to tweak it.
* When you want to base your implementation on PgnViewerJS.
* When you want to base your implementation on pgn-viewer.
* When you want to understand how the whole development process works.
* When you are mliebelt and have to remember all the little things.

Expand All @@ -18,10 +18,10 @@ If you don't want to read a lot of documentation, here is the shortest form poss

### Boot-strapping

Do the following steps to have PgnViewerJS build:
Do the following steps to have pgn-viewer build:

* Run `npm install` to have all the additional libraries downloaded and installed locally.
* Run `npm build` in the 2 modules directories to build a development distribution. This will create the library part of PgnViewerJS only.
* Run `npm build` in the 2 modules directories to build a development distribution. This will create the library part of pgn-viewer only.
* `modules/pgn-viewer/lib/dist.js`.

### Running examples
Expand All @@ -36,7 +36,7 @@ Do the following steps to have PgnViewerJS build:

### Adding Locales

This is only necessary if you want to add a locale, or change the list of locales in `PgnViewerJS/modules/pgn-viewer/.npmrc`.
This is only necessary if you want to add a locale, or change the list of locales in `pgn-viewer/.npmrc`.

* Go to the file `.npmrc` and change the list of locales.
* Ensure that you have created local files named `<locale>.ts`. Copy to do that the file `locales/en.ts`. Essential are the strings beginning with `chess` for the figure names, and `buttons` for the button title. NAGs are currently only used in the editor.
Expand Down
6 changes: 3 additions & 3 deletions docs/config/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Configurator for the configuration of PgnViewerJS</title>
<title>Configurator for the configuration of pgn-viewer</title>
<meta name="description" content="Shows variable parameters of the configuration in a UI.">
<meta name="author" content="Markus Liebelt">

<link rel="shortcut icon" href="../img/favicon.png" type="image/x-icon">

<!-- Workaround: 2 definitions, depending on the context -->
<!-- <script src="https://mliebelt.github.io/PgnViewerJS/lib/dist.js" type="text/javascript"></script>-->
<!-- <script src="https://mliebelt.github.io/pgn-viewer/lib/dist.js" type="text/javascript"></script>-->
<script src="../lib/dist.js" type="text/javascript"></script>
<style>
body {
Expand Down Expand Up @@ -84,7 +84,7 @@ <h1>Configuration Builder</h1>


<div id="config">
<div class="text">The following forms allow to "construct" a configuration for the PgnViewerJS. It demonstrates all
<div class="text">The following forms allow to "construct" a configuration for the pgn-viewer. It demonstrates all
possibilities,
and helps to define a new configuration.
</div>
Expand Down
14 changes: 7 additions & 7 deletions docs/docu.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>API of PgnViewerJS</title>
<meta name="description" content="Shows the API that could be used to include PgnViewerJS in your web site.">
<title>API of pgn-viewer</title>
<meta name="description" content="Shows the API that could be used to include pgn-viewer in your web site.">
<meta name="author" content="Markus Liebelt">

<!-- Mobile Specific Metas
Expand All @@ -37,13 +37,13 @@
</head>
<body>

<a href="https://github.com/mliebelt/PgnViewerJS"><img style="position: absolute; top: 0; right: 0; border: 0;"
<a href="https://github.com/mliebelt/pgn-viewer"><img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<div class="container">
<div class="sixteen columns">
<h1 class="remove-bottom" style="margin-top: 40px">PgnViewerJS</h1>
<h1 class="remove-bottom" style="margin-top: 40px">pgn-viewer</h1>
<h5>Version 1.6.5</h5>
<hr/>
</div>
Expand All @@ -65,19 +65,19 @@ <h1>ML</h1>
<div class="container">
<div class="sixteen columns">
<h3>API</h3>
<p>The following documentation explains in detail how to use the PgnViewerJS.
<p>The following documentation explains in detail how to use the pgn-viewer.
It tries to be a reference that can be used to modify and adapt working
examples. For some of the examples, see the <a href="examples.html">examples section</a>
and use them as starting template.</p>
<p>The <a href="config/config.html">configuration builder</a> allows to try out the whole
API of the configuration at one place, and extract a resulting configuration from there.</p>
<h4>Configuration</h4>
<p>The configuration is used when calling one of the APIs of the
PgnViewerJS. Depending on the kind of API (see below), the configuration
pgn-viewer. Depending on the kind of API (see below), the configuration
paramemter may have no effect.</p>
<p>All the configuration can be used to define a global default, that is then used for the page
on which it is used. Be aware that this only works if the global default is loaded before the pgn-viewer
library. See the example <a href="/PgnViewerJS/examples/1004.html">Global Defaults</a> how that is done.</p>
library. See the example <a href="/pgn-viewer/examples/1004.html">Global Defaults</a> how that is done.</p>
<table>
<thead class="center">
<tr>
Expand Down
12 changes: 6 additions & 6 deletions docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Documentation of PgnViewerJS</title>
<title>Documentation of pgn-viewer</title>
<meta name="description"
content="Shows the documentation that could be used to include PgnViewerJS in your web site.">
content="Shows the documentation that could be used to include pgn-viewer in your web site.">
<meta name="author" content="Markus Liebelt">

<!-- Mobile Specific Metas
Expand All @@ -28,7 +28,7 @@
<link rel="stylesheet" href="./css/skeleton.css">
<link rel="stylesheet" href="./css/layout.css">

<!-- JS for PgnViewerJS
<!-- JS for pgn-viewer
================================================= -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

Expand All @@ -51,7 +51,7 @@

</head>
<body>
<a href="https://github.com/mliebelt/PgnViewerJS"><img style="position: absolute; top: 0; right: 0; border: 0;"
<a href="https://github.com/mliebelt/pgn-viewer"><img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f726967687451004f677261795f3664366436642e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
Expand All @@ -60,7 +60,7 @@

<div class="container">
<div class="sixteen columns">
<h1 class="remove-bottom" style="margin-top: 40px">PgnViewerJS</h1>
<h1 class="remove-bottom" style="margin-top: 40px">pgn-viewer</h1>
<h5>Version 1.6.5</h5>
<hr/>
</div>
Expand All @@ -81,7 +81,7 @@ <h1>ML</h1>
</div><!-- container -->
<div class="container">
<div class="sixteen columns">
The collection of examples allows you to try out various aspects of PgnViewerJS. You see the following:
The collection of examples allows you to try out various aspects of pgn-viewer. You see the following:
<ul class="square">
<li>On the top the example you have selected on the left (View example in new window does not work at
the moment)
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/1000.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3>Javascript part</h3>
<h3>HTML part</h3>
<pre class="prettyprint lang-html">&lt;div id=&quot;board&quot; style=&quot;width: 400px&quot;&gt;&lt;&#x2F;div&gt;</pre>
<p>See the <a href="../examples.html#1000">back link</a> to the original examples page.</p>
<div>Use PgnViewerJS for only displaying a board. See the section "Boards" for details on that.</div>
<div>Use pgn-viewer for only displaying a board. See the section "Boards" for details on that.</div>
<div id="board" style="width: 400px"></div>
<script>
var board = PGNV.pgnBoard('board', {});
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/1001.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>Javascript part</h3>
<h3>HTML part</h3>
<pre class="prettyprint lang-html">&lt;div id=&quot;board&quot; style=&quot;width: 400px&quot;&gt;&lt;&#x2F;div&gt;</pre>
<p>See the <a href="../examples.html#1001">back link</a> to the original examples page.</p>
<div>Use PgnViewerJS for showing a (short) game. The buttons, the board and the display of the moves are all default values, that may be changed by configuration parameters. Parameter pgn is mandatory when using "pgnView".</div>
<div>Use pgn-viewer for showing a (short) game. The buttons, the board and the display of the moves are all default values, that may be changed by configuration parameters. Parameter pgn is mandatory when using "pgnView".</div>
<div id="board" style="width: 400px"></div>
<script>
var pgn = "1. f4 e6 2. g4 Qh4#";
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/1002.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3>Javascript part</h3>
<h3>HTML part</h3>
<pre class="prettyprint lang-html">&lt;div id=&quot;board&quot; style=&quot;width: 250px&quot;&gt;&lt;&#x2F;div&gt;</pre>
<p>See the <a href="../examples.html#1002">back link</a> to the original examples page.</p>
<div>Use PgnViewerJS for displaying a game in typical notation, with diagrams and different styles for the moves, the boards, ... Looks similar to the style of some magazines or books. For the diagram, I have taken the NAG 'D' (or $220), see <a href="http://en.wikipedia.org/wiki/Numeric_Annotation_Glyphs">NAGs at Wikipedia</a> for details</div>
<div>Use pgn-viewer for displaying a game in typical notation, with diagrams and different styles for the moves, the boards, ... Looks similar to the style of some magazines or books. For the diagram, I have taken the NAG 'D' (or $220), see <a href="http://en.wikipedia.org/wiki/Numeric_Annotation_Glyphs">NAGs at Wikipedia</a> for details</div>
<div id="board" style="width: 250px"></div>
<script>
var pgn = "1. f4 e6 2. g4D Qh4#$220";
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/1003.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3>Javascript part</h3>
<h3>HTML part</h3>
<pre class="prettyprint lang-html">&lt;div id=&quot;board&quot; style=&quot;width: 300px&quot;&gt;&lt;&#x2F;div&gt;</pre>
<p>See the <a href="../examples.html#1003">back link</a> to the original examples page.</p>
<div>Use PgnViewerJS for viewing a game with the option to edit it by adding variations, comments, ...So start playing on the board, take moves back, and test variations. Not all buttons are implemented, but the PGN button works and displays the current game in the pgn notation (including comments).</div>
<div>Use pgn-viewer for viewing a game with the option to edit it by adding variations, comments, ...So start playing on the board, take moves back, and test variations. Not all buttons are implemented, but the PGN button works and displays the current game in the pgn notation (including comments).</div>
<div id="board" style="width: 300px"></div>
<script>
var board = PGNV.pgnEdit('board', {});
Expand Down
18 changes: 9 additions & 9 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Documentation of PgnViewerJS</title>
<meta name="description" content="Shows the documentation that could be used to include PgnViewerJS in your web site.">
<title>Documentation of pgn-viewer</title>
<meta name="description" content="Shows the documentation that could be used to include pgn-viewer in your web site.">
<meta name="author" content="Markus Liebelt">

<!-- Mobile Specific Metas
Expand Down Expand Up @@ -39,10 +39,10 @@
</head>
<body>

<a href="https://github.com/mliebelt/PgnViewerJS"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<a href="https://github.com/mliebelt/pgn-viewer"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<div class="container">
<div class="sixteen columns">
<h1 class="remove-bottom" style="margin-top: 40px">PgnViewerJS</h1>
<h1 class="remove-bottom" style="margin-top: 40px">pgn-viewer</h1>
<h5>Version 1.6.5</h5>
<hr />
</div>
Expand All @@ -64,7 +64,7 @@ <h1>ML</h1>
<div class="container">
<div class="four columns">
<h3>About</h3>
<p>PgnViewerJS was born as the third or fourth attempt to get a nice PGN viewer
<p>pgn-viewer was born as the third or fourth attempt to get a nice PGN viewer
for our chess club web site. PGN stands for <b>P</b>ortable <b>G</b>ame
<b>N</b>otation which was born in the late 80s, early 90s of the last
century. I provided some of the translations there ...</p>
Expand All @@ -83,7 +83,7 @@ <h3>Implementation</h3>
displaying a chess board, with some functions: Moving pieces, some
animations, ... This board was developed for lichess.org.</li>
<li><strong><a href="https://github.com/peggyjs/peggy/">Peggy</a></strong>: Parser Generator for JavaScript to read pgn notation.</li>
<li><strong>PgnViewerJS</strong>:
<li><strong>pgn-viewer</strong>:
<ul>
<li><strong>pgn-parser</strong>: module to parse the games.</li>
<li><strong>pgn-reader</strong>: module to model the game.</li>
Expand All @@ -95,7 +95,7 @@ <h3>Implementation</h3>
</div>
<div class="six columns">
<h3>How To &amp; Support</h3>
<p>To start with PgnViewerJS, you have to do the following steps:</p>
<p>To start with pgn-viewer, you have to do the following steps:</p>
<ul class="square">
<li>Download the current sources or the distro from below or build it on you own: `npm install; npm build`.
The directory `lib` of the module `pgn-viewer` is what you need.</li>
Expand All @@ -109,7 +109,7 @@ <h3>How To &amp; Support</h3>
examples section</a> how to do it.</li>
</ul>
</li>
<li>Fill the configuration of the PgnViewerJS with the relevant
<li>Fill the configuration of the pgn-viewer with the relevant
aspects: starting position, moves, theme, piece style, size, ... You may use the <a href="config/config.html">
configuration builder</a> to try out which options are possible. </li>
</ul>
Expand All @@ -118,7 +118,7 @@ <h3>How To &amp; Support</h3>
<div class="container">
<div class="eight columns">
<h2>Downloads</h2>
<p>Currently the PgnViewerJS is provided as NPM library. So the recommended way to get any version is:<br/>
<p>Currently the pgn-viewer is provided as NPM library. So the recommended way to get any version is:<br/>
<code>npm install @mliebelt/pgn-viewer</code>. </p>
</div>

Expand Down
8 changes: 4 additions & 4 deletions docs/js/examples.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
examples = {};

examples["1000"] = {
desc: "Use PgnViewerJS for only displaying a board. See the section \"Boards\" for details on that.",
desc: "Use pgn-viewer for only displaying a board. See the section \"Boards\" for details on that.",
html: "<div id=\"board\" style=\"width: 400px\"><\/div>",
name: "Board with defaults",
jsStr: "var board = PGNV.pgnBoard('board', {});",
Expand All @@ -11,7 +11,7 @@ examples["1000"] = {
};

examples["1001"] = {
desc: "Use PgnViewerJS for showing a (short) game. The buttons, the board and the display of the " +
desc: "Use pgn-viewer for showing a (short) game. The buttons, the board and the display of the " +
"moves are all default values, that may be changed by configuration parameters. Parameter pgn is " +
"mandatory when using \"pgnView\".",
html: "<div id=\"board\" style=\"width: 400px\"><\/div>",
Expand All @@ -24,7 +24,7 @@ examples["1001"] = {
};

examples["1002"] = {
desc: "Use PgnViewerJS for displaying a game in typical notation, with diagrams and different styles " +
desc: "Use pgn-viewer for displaying a game in typical notation, with diagrams and different styles " +
"for the moves, the boards, ... Looks similar to the style of some magazines or books. " +
"For the diagram, I have taken the NAG 'D' (or $220), see <a href=\"http://en.wikipedia.org/wiki/Numeric_Annotation_Glyphs\">NAGs at Wikipedia</a> for details",
html: "<div id=\"board\" style=\"width: 250px\"><\/div>",
Expand All @@ -38,7 +38,7 @@ examples["1002"] = {
};

examples["1003"] = {
desc: "Use PgnViewerJS for viewing a game with the option to edit it by adding variations, comments, ..." +
desc: "Use pgn-viewer for viewing a game with the option to edit it by adding variations, comments, ..." +
"So start playing on the board, take moves back, and test variations. Not all " +
"buttons are implemented, but the PGN button works and displays the current " +
"game in the pgn notation (including comments).",
Expand Down
2 changes: 1 addition & 1 deletion docs/lib/dist.js

Large diffs are not rendered by default.

Binary file modified docs/lib/dist.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/lib/dist.js.map

Large diffs are not rendered by default.

Binary file modified docs/lib/dist.js.map.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This part of PgnViewerJS is only for constructing a web site that will document the possibilities and give examples. You will find that web site [here](https://mliebelt.github.io/PgnViewerJS/index.html).
This part of pgn-viewer is only for constructing a web site that will document the possibilities and give examples. You will find that web site [here](https://mliebelt.github.io/pgn-viewer/index.html).

Don't use these files as examples that could be easily adapted, because they are only provided to show the features nicely. Use instead the examples that can be found under `modules/pgn-viewer/examples`.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Example of PgnViewerJS in Board mode</title>
<title>Example of pgn-viewer in Board mode</title>
<meta name="description" content="Shows one example pgn game how to use the viewer to display a board only.">
<meta name="author" content="Markus Liebelt">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Example of PgnViewerJS in View mode</title>
<title>Example of pgn-viewer in View mode</title>
<meta name="description" content="Shows one example pgn game how to use the viewer to display a game.">
<meta name="author" content="Markus Liebelt">
<script src="/lib/dist.js" type="text/javascript"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Example of PgnViewerJS in View mode</title>
<title>Example of pgn-viewer in View mode</title>
<meta name="description" content="Shows one example pgn game how to use the viewer to display a game.">
<meta name="author" content="Markus Liebelt">
<script src="/lib/dist.js" type="text/javascript"></script>
Expand Down
Loading

0 comments on commit 1d51383

Please sign in to comment.