diff --git a/website/build.js b/website/build.js index dec2b4e..b2f190a 100644 --- a/website/build.js +++ b/website/build.js @@ -26,7 +26,7 @@ function buildNav ( pathObject ) {
- Home`; + Home`; let groups = {}; for ( let item in pathObject ) { if ( groups[ pathObject[ item ][ 'group' ] ] ) { @@ -37,12 +37,16 @@ function buildNav ( pathObject ) { } for ( let group in groups ) { - html += `${ group } -
\n`; - for ( let entry in groups[ group ] ) { - html += `${ groups[ group ][ entry ][ 'title' ] }\n`; + if ( Object.keys( groups[ group ] ).length > 1 ) { + html += `${ group.slice( 0, 1 ).toUpperCase() + group.substring( 1 ) } +
\n`; + for ( let entry in groups[ group ] ) { + html += `${ groups[ group ][ entry ][ 'title' ] }\n`; + } + html += '
\n'; + } else { + html += `${ groups[ group ][ 0 ][ 'title' ] }\n`; } - html += '
\n'; } html += `
@@ -52,8 +56,9 @@ function buildNav ( pathObject ) { `; - console.log( html ); fs.writeFileSync( path.join( __dirname + '/dist/docs/side-bar.html' ), html ); + + console.log( '\n\n==> Completed building website! \n\n' ); } function buildDocs () { @@ -132,8 +137,7 @@ function storeHTML( html, filepath ) { ${ title } :: docs - libreevent - - + @@ -150,7 +154,6 @@ function storeHTML( html, filepath ) {
${ html }
- @@ -176,5 +179,13 @@ function storeHTML( html, filepath ) { } fileOutputPath += '/index.html'; fs.writeFileSync( fileOutputPath, data ); - return { 'filePath': '/docs/' + category, 'title': title, 'group': group }; + let id = ''; + for ( let letter in category ) { + if ( category[ letter ] == '/' ) { + id += '-'; + } else { + id += category[ letter ]; + } + } + return { 'filePath': '/docs/' + category, 'title': title, 'group': group, 'id': id }; } \ No newline at end of file diff --git a/website/dist/docs/admin-panel/admin-accounts/index.html b/website/dist/docs/admin-panel/admin-accounts/index.html index 939e1ee..817aad1 100644 --- a/website/dist/docs/admin-panel/admin-accounts/index.html +++ b/website/dist/docs/admin-panel/admin-accounts/index.html @@ -2,8 +2,7 @@ Admin Accounts :: docs - libreevent - - + @@ -57,7 +56,6 @@

Removing an account

- diff --git a/website/dist/docs/admin-panel/events/index.html b/website/dist/docs/admin-panel/events/index.html index e1eed92..b454f4b 100644 --- a/website/dist/docs/admin-panel/events/index.html +++ b/website/dist/docs/admin-panel/events/index.html @@ -2,8 +2,7 @@ Events :: docs - libreevent - - + @@ -30,7 +29,6 @@

Choose a location where your event is going to take place. You can do so by selecting an existing location from the dropdown or by adding a new one. In the same step, you'll also need to choose between a seat plan and no seat plan, and if you choose a seat plan, you'll need to create one using out handy seatplan editor. See our seatplan editor guide here

- diff --git a/website/dist/docs/admin-panel/index.html b/website/dist/docs/admin-panel/index.html index 73e3d9c..4b4007d 100644 --- a/website/dist/docs/admin-panel/index.html +++ b/website/dist/docs/admin-panel/index.html @@ -2,8 +2,7 @@ Admin panel :: docs - libreevent - - + @@ -32,7 +31,6 @@

As a general recommendation, we do not encourage logging in as the root user if not strictly necessary, as this can help protect the libreevent installation.

- diff --git a/website/dist/docs/admin-panel/pages/index.html b/website/dist/docs/admin-panel/pages/index.html index c3ac8b3..a510f96 100644 --- a/website/dist/docs/admin-panel/pages/index.html +++ b/website/dist/docs/admin-panel/pages/index.html @@ -2,8 +2,7 @@ Pages :: docs - libreevent - - + @@ -21,7 +20,6 @@

Pages

- diff --git a/website/dist/docs/admin-panel/plugins/index.html b/website/dist/docs/admin-panel/plugins/index.html index 337741d..4510dda 100644 --- a/website/dist/docs/admin-panel/plugins/index.html +++ b/website/dist/docs/admin-panel/plugins/index.html @@ -2,8 +2,7 @@ Plugins :: docs - libreevent - - + @@ -21,7 +20,6 @@

Plugins

- diff --git a/website/dist/docs/admin-panel/seatplan-editor/index.html b/website/dist/docs/admin-panel/seatplan-editor/index.html index 278601d..5d96174 100644 --- a/website/dist/docs/admin-panel/seatplan-editor/index.html +++ b/website/dist/docs/admin-panel/seatplan-editor/index.html @@ -2,8 +2,7 @@ Seatplan editor :: docs - libreevent - - + @@ -30,7 +29,6 @@

The editor does auto-save a draft every minute. Pressing Ctrl + S or hitting the Save button in the toolbar will immediately save the seatplan as a draft. Click the deploy button to save the seatplan permanently, irreversibly overwriting any potentially existing old seatplan of that location, except you change the location name after the fact.

- diff --git a/website/dist/docs/admin-panel/settings/index.html b/website/dist/docs/admin-panel/settings/index.html index f5d9b49..0bf8c21 100644 --- a/website/dist/docs/admin-panel/settings/index.html +++ b/website/dist/docs/admin-panel/settings/index.html @@ -2,8 +2,7 @@ Settings :: docs - libreevent - - + @@ -39,7 +38,6 @@

This should be self explanatory, but keep in mind that this change will only take effect after the next restart of the node app.

- diff --git a/website/dist/docs/contributing/index.html b/website/dist/docs/contributing/index.html index 37e9a88..7cbf5c0 100644 --- a/website/dist/docs/contributing/index.html +++ b/website/dist/docs/contributing/index.html @@ -2,8 +2,7 @@ Contributing :: docs - libreevent - - + @@ -22,7 +21,6 @@

You are interested in helping develop this project to make it even better? Then let's show you, how you may help and what you should keep in mind!

- diff --git a/website/dist/docs/contributing/plugins/index.html b/website/dist/docs/contributing/plugins/index.html index ab63d3a..a66c489 100644 --- a/website/dist/docs/contributing/plugins/index.html +++ b/website/dist/docs/contributing/plugins/index.html @@ -2,8 +2,7 @@ Contributing Plugins :: docs - libreevent - - + @@ -21,7 +20,6 @@

Contributing Plugins

- diff --git a/website/dist/docs/css/navstyle.css b/website/dist/docs/css/navstyle.css index e69de29..9869577 100644 --- a/website/dist/docs/css/navstyle.css +++ b/website/dist/docs/css/navstyle.css @@ -0,0 +1,45 @@ +/* +* libreevent - navstyle.css +* +* Created by Janis Hutz 06/17/2023, Licensed under the GPL V3 License +* https://janishutz.com, development@janishutz.com +* +* +*/ + +.side-nav-container { + min-height: 100vh; + width: 100%; + background-color: rgb(0, 0, 49); +} + +.side-nav-item { + width: 90%; + padding: 3% 5%; + display: block; + background-color: rgb(16, 16, 46); + color: white; + text-decoration: none; + cursor: pointer; + transition: all 0.5s; +} + + +.side-nav-subitem { + width: 85%; + padding: 2% 5% 2% 10%; + display: block; + background-color: rgb(16, 16, 46); + color: white; + text-decoration: none; + cursor: pointer; + transition: all 0.5s; +} + +.side-dropdown { + display: none; +} + +.side-nav-item:hover, .side-nav-subitem:hover, .active { + background-color: rgb(0, 0, 133); +} \ No newline at end of file diff --git a/website/dist/docs/css/style.css b/website/dist/docs/css/style.css index 4a59687..981b94c 100644 --- a/website/dist/docs/css/style.css +++ b/website/dist/docs/css/style.css @@ -1,4 +1,147 @@ -#docPage { +/* +* libreevent - style.css +* +* Created by Janis Hutz 06/17/2023, Licensed under the GPL V3 License +* https://janishutz.com, development@janishutz.com +* +* +*/ + +html, body { + height: 100%; + width: 100%; + margin: 0; + padding: 0; + font-size: calc(15pt + 0.4vw); + font-family: sans-serif; +} + +body { + height: 100vh; + display: grid; + background-color: #7c8cec; + grid-template-areas: + 'header header header header header' + 'menu main main main main' + 'menu main main main main' + 'menu main main main main' + 'menu main main main main' + 'menu main main main main' + 'menu main main main main' + 'menu main main main main' + 'menu main main main main' + 'footer footer footer footer footer'; +} + +.title-wrapper { + /* + TODO: Replace with image + */ + background-color: white; + display: flex; + text-align: center; + flex-direction: column; + align-items: center; + justify-content: center; width: 90%; + padding: 2%; + margin: 3%; + margin-bottom: 0%; + border-radius: 50px; +} + +.content { + width: 90%; + padding: 2%; + margin: 3%; + border-radius: 0px 0px 50px 50px; + margin-top: 0; +} + +#docPage { + grid-area: main; + overflow: scroll; + width: 74vw; + height: 100%; +} + +#doc-container { + width: 90%; + height: 100%; margin-left: 5%; +} + +.dev { + background-color: rgb(182, 69, 69, 0.9); + padding: 10px; + text-align: center; + border-radius: 50px; +} + +#nav { + grid-area: header; + position: sticky; + z-index: 1; + height: 15vh; + width: 100%; + background-color: white; + display: flex; + justify-content: flex-end; + align-items: center; +} + +#footer { + grid-area: footer; +} + +#side-bar { + width: 25vw; + grid-area: menu; + overflow: scroll; + height: 100%; +} + +.button { + background-color: rgb(24, 43, 61); + color: white; + text-decoration: none; + padding: 40px; + padding-bottom: 20px; + padding-top: 20px; + border-radius: 30px; + cursor: pointer; + margin: 1.5%; + transition: 1s; +} + +.button:hover { + transition: 0.2s; + border-radius: 5px; + background-color: rgb(60, 85, 140); +} + +#backToTop { + border-radius: 500px; + border-width: 1px; + background-color: rgb(34, 72, 143); + background-image: url('/assets/up.svg'); + background-size: cover; + width: calc(30px + 0.5vw); + height: calc(30px + 0.5vw); + padding: 0.2%; + float: right; + color: white; + position: fixed; + top: 90%; + right: 7%; + opacity: 0; + cursor: default; + transition: 0.5s +} + +#backToTop:hover { + background-color: rgb(24, 43, 61); + width: calc(35px + 0.5vw); + height: calc(35px + 0.5vw); + transition: 0.2s; } \ No newline at end of file diff --git a/website/dist/docs/errors/index.html b/website/dist/docs/errors/index.html index 6c8dcd5..7ad25a6 100644 --- a/website/dist/docs/errors/index.html +++ b/website/dist/docs/errors/index.html @@ -2,8 +2,7 @@ Errors :: docs - libreevent - - + @@ -25,7 +24,6 @@

An internal server error occurs when the server is unable to properly process a request, which in some cases might also return a 400 error, if the server first decides that the request is unacceptable.

- diff --git a/website/dist/docs/how-it-works/index.html b/website/dist/docs/how-it-works/index.html index 874b26e..d8c57ac 100644 --- a/website/dist/docs/how-it-works/index.html +++ b/website/dist/docs/how-it-works/index.html @@ -2,8 +2,7 @@ How it works :: docs - libreevent - - + @@ -24,7 +23,6 @@

This project is written in a variety of different programming languages. First of all, the backend is written in Node.js with express.js routing. It also uses nodemysql to interact with the MySQL database, if the user chose to use one. For authentication, it uses express-session, for which a new session secret is generated whenever the server restarts to increase security.

- diff --git a/website/dist/docs/index.html b/website/dist/docs/index.html index b7bf50f..c299717 100644 --- a/website/dist/docs/index.html +++ b/website/dist/docs/index.html @@ -2,8 +2,7 @@ libreevent - Free & Open Source event management solution - - + @@ -23,9 +22,11 @@

Website & project not completed yet!

+

Welcome to the libreǝvent docs, THE place to learn all about the project!

+

libreǝvent is a free and open source event management solution with which you may sell tickets online at incredibly low prices as you host the application yourself. But don't be afraid, it's easier to set up than you might think! To make it as easy as possible for you to set up libreǝvent, we have our installation guides which you may follow to get up and running very quickly!

+

If you like this project, please consider giving it a star on GitHub and donating to help fund the development costs.

- diff --git a/website/dist/docs/js/index.js b/website/dist/docs/js/index.js index d199f19..ac5ab41 100644 --- a/website/dist/docs/js/index.js +++ b/website/dist/docs/js/index.js @@ -1,7 +1,6 @@ $( document ).ready( function () { $( '#nav' ).load( '/nav.html' ); $( '#side-bar' ).load( '/docs/side-bar.html' ); - $( '#footer' ).load( '/footer.html' ); } ); let btn = document.getElementById( 'backToTop' ); diff --git a/website/dist/docs/js/nav.js b/website/dist/docs/js/nav.js index 3ae1b50..14d973f 100644 --- a/website/dist/docs/js/nav.js +++ b/website/dist/docs/js/nav.js @@ -1,3 +1,28 @@ function toggleList( element ) { - $( '#' + element ).slideToggle(); -} \ No newline at end of file + $( '#' + element + '-dropdown' ).slideToggle(); +} + +$( document ).ready( function () { + if ( location.pathname.substring( 6 ) ) { + let id = ''; + let path = location.pathname.substring( 6, location.pathname.length - 1 ); + for ( let letter in path ) { + if ( path[ letter ] === '/' ) { + id += '-'; + } else { + id += path[ letter ]; + } + } + + if ( path.lastIndexOf( '/' ) >= 0 ) { + $( '#' + path.slice( 0, path.lastIndexOf( '/' ) ) + '-dropdown' ).slideDown(); + $( '#' + path.slice( 0, path.lastIndexOf( '/' ) ) + 'Nav' ).addClass( 'active' ); + } else { + $( '#' + path + '-dropdown' ).slideDown(); + $( '#' + path + 'Nav' ).addClass( 'active' ); + } + $( '#' + id ).addClass( 'active' ); + } else { + $( '#docs-home' ).addClass( 'active' ); + } +} ); \ No newline at end of file diff --git a/website/dist/docs/payments/index.html b/website/dist/docs/payments/index.html index 418aeef..41b6439 100644 --- a/website/dist/docs/payments/index.html +++ b/website/dist/docs/payments/index.html @@ -2,8 +2,7 @@ Payments :: docs - libreevent - - + @@ -30,7 +29,6 @@ See here for pricing information

https://www.payrexx.com/en/pricing/

- diff --git a/website/dist/docs/plugins/index.html b/website/dist/docs/plugins/index.html index 337741d..4510dda 100644 --- a/website/dist/docs/plugins/index.html +++ b/website/dist/docs/plugins/index.html @@ -2,8 +2,7 @@ Plugins :: docs - libreevent - - + @@ -21,7 +20,6 @@

Plugins

- diff --git a/website/dist/docs/setup/index.html b/website/dist/docs/setup/index.html index 220e56b..b012ac2 100644 --- a/website/dist/docs/setup/index.html +++ b/website/dist/docs/setup/index.html @@ -2,8 +2,7 @@ Setup :: docs - libreevent - - + @@ -22,7 +21,6 @@

In this tutorial, you are going to learn how to set up and configure libreevent.

- diff --git a/website/dist/docs/setup/installation/index.html b/website/dist/docs/setup/installation/index.html index e8f3db4..f7cb597 100644 --- a/website/dist/docs/setup/installation/index.html +++ b/website/dist/docs/setup/installation/index.html @@ -2,8 +2,7 @@ Installation :: docs - libreevent - - + @@ -42,7 +41,6 @@ https://www.digitalocean.com/go/affiliates

MySQL generally is more difficult to set up, but we'll run you through the process here to make the process easier for you. If you chose the JSON based database, skip ahead to the next chapter.

- diff --git a/website/dist/docs/setup/setup/index.html b/website/dist/docs/setup/setup/index.html index 926db3d..1985866 100644 --- a/website/dist/docs/setup/setup/index.html +++ b/website/dist/docs/setup/setup/index.html @@ -2,8 +2,7 @@ Setup of libreevent :: docs - libreevent - - + @@ -70,7 +69,6 @@

You may find documentation on the admin panel here

- diff --git a/website/dist/docs/side-bar.html b/website/dist/docs/side-bar.html index fea627e..542f32e 100644 --- a/website/dist/docs/side-bar.html +++ b/website/dist/docs/side-bar.html @@ -8,55 +8,34 @@
- Homeadmin-panel - diff --git a/website/dist/docs/sponsor/index.html b/website/dist/docs/sponsor/index.html index c895df8..e7933f1 100644 --- a/website/dist/docs/sponsor/index.html +++ b/website/dist/docs/sponsor/index.html @@ -2,8 +2,7 @@ Sponsor :: docs - libreevent - - + @@ -21,7 +20,6 @@

Sponsor

- diff --git a/website/dist/docs/systemrequirements/index.html b/website/dist/docs/systemrequirements/index.html index 4addeff..da602e6 100644 --- a/website/dist/docs/systemrequirements/index.html +++ b/website/dist/docs/systemrequirements/index.html @@ -2,8 +2,7 @@ Systemrequirements :: docs - libreevent - - + @@ -26,7 +25,6 @@

Hardware requirements solely depend on the amount of usage it is going to get. An average hosting plan should be able to handle about 1000 people. In case the system is not able to uphold the traffic, it will activate a protection to try and stop overloading and crashing the system. Although using multiple checks, we cannot guarantee that the system will never crash due to being overloaded, so, if the website is important, please overspec the server.

- diff --git a/website/dist/docs/tutorial/index.html b/website/dist/docs/tutorial/index.html index daa6585..d4a5543 100644 --- a/website/dist/docs/tutorial/index.html +++ b/website/dist/docs/tutorial/index.html @@ -2,8 +2,7 @@ Tutorial :: docs - libreevent - - + @@ -21,7 +20,6 @@

Tutorial

-