Skip to content

Commit

Permalink
folder structure
Browse files Browse the repository at this point in the history
code organization by implementing folder structure
  • Loading branch information
jacksonbenete committed Apr 3, 2020
1 parent f3b084e commit ada999c
Show file tree
Hide file tree
Showing 19 changed files with 17 additions and 43 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Email Reader Terminal for tabletop RPGs

![Email Terminal Gif](img/email_terminal.gif)
![Email Terminal Gif](docs/email_terminal.gif)

This is a simple, read-only, terminal experience for tabletop RPGs.
You can fork the project and change the code for your own configurations, like terminal name (or sector/station/node if sci-fi), image and messages.
Expand All @@ -13,7 +13,7 @@ You can host it on github pages for a free and fast experience and can share the

The code may be a mess.

That's because I may be supposedly improving it, and since I'm not a Software Developer anymore (as a professional), I don't care too much for organization, specially because I code just for fun nowadays.
That's because I may be supposedly improving it.

## How to Configure

Expand All @@ -25,7 +25,7 @@ You will find instructions for both options below.
The basic configuration is what you need to change for customize your terminal.
You can change the terminal year date, the server name, a customized icon, the terminal identification (this is what is written just before of the mouse cursor), as well as the default user name (normally will be "user", but can be whatever you want) and if you want a random number to be displayed right in front of the default username. Note however that once you login to the server the username will change.

You will want to customize the terminal depending of the game setting you're playing. You just have to edit the `conf.json` file.
You will want to customize the terminal depending of the game setting you're playing. You just have to edit the `conf.json` file. Both `conf.json` and `database.db` customization files are in the config folder.

```json
{
Expand All @@ -38,7 +38,7 @@ You will want to customize the terminal depending of the game setting you're pla
}
```
---
![Example of a Sci-Fi / Space Opera Terminal](img/scifi_example.png)
![Example of a Sci-Fi / Space Opera Terminal](docs/scifi_example.png)

```json
{
Expand All @@ -51,7 +51,7 @@ You will want to customize the terminal depending of the game setting you're pla
}
```
---
![Example of a Sci-Fi / Space Opera Terminal](img/fbi_example.png)
![Example of a Sci-Fi / Space Opera Terminal](docs/fbi_example.png)

### Login, Mail & Read Functions

Expand Down Expand Up @@ -109,17 +109,17 @@ You can register as many users and mail messages as you want, you just need to p

To login you need to enter user@password

![How to login.](img/login1.png)
![How to login.](docs/login1.png)
---

Note the change in the terminal username

![Note the change in the terminal username.](img/login2.png)
![Note the change in the terminal username.](docs/login2.png)
---

How to list and read mails

![Mail and Read functions.](img/mail_n_read.png)
![Mail and Read functions.](docs/mail_n_read.png)

### Other Functions

Expand All @@ -130,13 +130,13 @@ You can try `help` to see a list of other functions disponible. The `clear` func
As I've said, you can use Github Pages to do that for you.
If you're not used to Github, first create a github user by registering in [Github](github.com), so you can "fork" the project to your account by accessing the project page [email_terminal](github.com/jacksonbenete/email_terminal) and by clicking in the "fork" button.

![How to Fork a project.](img/fork1.png)
![How to Fork a project.](docs/fork1.png)

Note that those two in red are the only two steps you need to take to put your terminal up and running. You need to click the Fork button, and after some seconds, the project will be there as one of your own repositories, and then you will click in the Settings button.

In the settings page, you will roll until Github Pages and will select the source as the master branch.

![Github Pages on Settings.](img/fork2.png)
![Github Pages on Settings.](docs/fork2.png)

After some seconds, you will be able to access your terminal at username.github.io/email_terminal (i.e. jacksonbenete.github.io/email_terminal).

Expand Down Expand Up @@ -169,4 +169,5 @@ If you want to, drop some ideas into my github repository or send me some messag
- Moon icon by: http://www.iconarchive.com/show/christmas-shadow-2-icons-by-pelfusion/Moon-icon.html and www.pelfusion.com
- Tech icon by: https://favpng.com/png_user/GreatCthulhu
- CMD icon by: https://www.flaticon.com/br/packs/seo-and-web-5
- Vision icon by: https://www.flaticon.com/free-icon/company-vision_1465429
- (non-free) DNA icon by: https://www.iconfinder.com/icons/378473/dna_icon
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>Terminal</title>
<link href="https://fonts.googleapis.com/css?family=Inconsolata"
rel="stylesheet" type="text/css" />
<link href="terminal.css" rel="stylesheet" type="text/css">
<link href="src/terminal.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
Expand All @@ -16,6 +16,6 @@
</div>

<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="./terminal.js"></script>
<script src="src/terminal.js"></script>
</body>
</html>
29 changes: 1 addition & 28 deletions terminal.css → src/terminal.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,31 +76,4 @@ body {
column-width: 100px;
}


/************************************************************/
/* SVG Clock */
/************************************************************/

.clock-container {
display: none /*inline-block*/;
position: relative;
width: 200px;
vertical-align: middle;
overflow: hidden;
}

.clock-container > svg > circle {
stroke-width: 2px;
stroke: #fff;
}

.hour, .min, .sec {
stroke-width: 1px;
fill: #333;
stroke: #555;
}

.sec {
stroke: #f55;
}

/* Extra Configurations */
6 changes: 3 additions & 3 deletions terminal.js → src/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ var Terminal = Terminal || function(cmdLineContainer, outputContainer) {

case 'login':
$.ajax({
url:"database.db",
url:"config/database.db",
dataType:"text",
success:function(data)
{
Expand Down Expand Up @@ -258,7 +258,7 @@ $(function() {


$.ajax({
url:"conf.json",
url:"config/conf.json",
dataType:"text",
success:function(data)
{
Expand All @@ -280,7 +280,7 @@ $(function() {
}

header = `
<img align="left" src="./` + iconName + `" width="100" height="100" style="padding: 0px 10px 20px 0px">
<img align="left" src="icon/` + iconName + `" width="100" height="100" style="padding: 0px 10px 20px 0px">
<h2 style="letter-spacing: 4px">` + serverName + `</h2>
<p>Logged in: ` + date.setFullYear(newYear) + ` ( ` + date_final + ` ) </p>
<p>Enter "help" for more information.</p>
Expand Down

0 comments on commit ada999c

Please sign in to comment.