everything: Delete everything, full project reset. Keep a copy of variable_grabbler in case we ever need it.
parent
8cc33a9727
commit
af91df4986
|
@ -1,4 +0,0 @@
|
||||||
*.swp
|
|
||||||
|
|
||||||
/build/*
|
|
||||||
!/build/.placeholder
|
|
179
LICENSE.md
179
LICENSE.md
|
@ -1,179 +0,0 @@
|
||||||
|
|
||||||
# Apache License
|
|
||||||
|
|
||||||
Version 2.0, January 2004
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
## TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
15
NOTICE
15
NOTICE
|
@ -1,15 +0,0 @@
|
||||||
Copyright 2021 ThreadR Team (Jan Danielzick "BodgeMaster", [team, add your names here])
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
A copy is also provided with this software in LICENSE.md.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
183
README.md
183
README.md
|
@ -1,183 +0,0 @@
|
||||||
# Welcome to ThreadR
|
|
||||||
|
|
||||||
This is the source code for the ThreadR Forum Engine.
|
|
||||||
|
|
||||||
The project originated as a school project with the goal of developing
|
|
||||||
a mix between a forum engine and a social media platform.
|
|
||||||
When school was over, we left the project up for some time with the
|
|
||||||
general intention to continue working on it until I took it down after
|
|
||||||
an extended period of inactivity to host my own website on my server.
|
|
||||||
|
|
||||||
Now, that it is being revived, the original scope of the project
|
|
||||||
doesn’t really make sense anymore (at least to me) so it needs to shift
|
|
||||||
slightly.
|
|
||||||
Below is a list of goals that I would like to see achieved, feel free
|
|
||||||
to discuss this in the issues or commit comments.
|
|
||||||
|
|
||||||
- [x] come back online (see issue #2)
|
|
||||||
- [x] go FOSS (make the source code publicly available under a FOSS license (see issue #5))
|
|
||||||
- [x] make the code portable so everyone can set up their own instance
|
|
||||||
- [ ] get generic forum functionality going (sign-up, creation of boards, creation of threads within boards, messages, profiles)
|
|
||||||
|
|
||||||
Once these two are given, here are some additional goals both from
|
|
||||||
the original scope of the project as well as my own ideas.
|
|
||||||
Input is welcome.
|
|
||||||
|
|
||||||
- [ ] anonymous posts (users can choose to post anonymously, registered users will have a unique name per thread that stays the same so users can tell each other apart)
|
|
||||||
- [ ] subscribing to threads
|
|
||||||
- [ ] "split thread here" feature (kinda like on Reddit when multiple ppl answer to one person)
|
|
||||||
- [ ] automatic loading of new messages in threads (opt-out in settings)
|
|
||||||
- [ ] notifications for new messages in subscribed threads (opt-out in settings)
|
|
||||||
- [ ] question threads with an "accept answer" feature, threads can be marked as question threads on creation
|
|
||||||
- [ ] like/dislike feature but in better (as in more limited in functionality and more nuanced, kinda like on StackExchange but with two types of likes/dislikes and without showing an actual number)
|
|
||||||
|
|
||||||
\- BodgeMaster
|
|
||||||
|
|
||||||
UPDATE: The ThreadR Forum Engine is now technically host-independent.
|
|
||||||
By default, it still contains the configuration for our test instance
|
|
||||||
but all host-dependent setup information is configurable now.
|
|
||||||
It is still heavily WIP.
|
|
||||||
|
|
||||||
# Installation
|
|
||||||
|
|
||||||
First of all, keep in mind that the ThreadR Forum Engine is still
|
|
||||||
in early development and things are subject to change.
|
|
||||||
|
|
||||||
For now, the only way to set up an instance is doing it the manual way;
|
|
||||||
automatic setup might be added in the future.
|
|
||||||
|
|
||||||
This setup guide is assuming that you are on a UNIX-like system
|
|
||||||
and have the following already installed and set up properly:
|
|
||||||
|
|
||||||
- Apache with PHP (will most likely also work on other web servers)
|
|
||||||
- MySQL or MariaDB
|
|
||||||
- Python 3
|
|
||||||
- Bash
|
|
||||||
|
|
||||||
Installation:
|
|
||||||
|
|
||||||
- To install the ThreadR Forum Engine, clone this repository into a directory that the web server has access to but that it outside of any web root.
|
|
||||||
- Add a database to your MySQL/MariaDB server that contains the tables shown below.
|
|
||||||
- Create a MySQL/MariaDB user for ThreadR and grant usage privileges for the tables to it.
|
|
||||||
- Symlink the directory `build/` to your desired location on the web root. ThreadR does not support being linked directly to the webroot.
|
|
||||||
- adjust the files in `config/` to your setup
|
|
||||||
- run ./deployment-script.sh to apply configuration
|
|
||||||
- Optionally symlink `build/redirect_home.html` to all places that you want to redirect to ThreadR.
|
|
||||||
|
|
||||||
Database tables:
|
|
||||||
- boards
|
|
||||||
- `id` (int, primary key, auto increment)
|
|
||||||
- `name` (varchar)
|
|
||||||
- `user_friendly_name` (varchar)
|
|
||||||
- `private` (boolean or tinyint(1))
|
|
||||||
- `public_visible` (boolean or tinyint(1))
|
|
||||||
- posts
|
|
||||||
- `id` (int, primary key, auto increment)
|
|
||||||
- `board_id` (int)
|
|
||||||
- `user_id` (int)
|
|
||||||
- `post_time` (timestamp, default current_timestamp())
|
|
||||||
- `edit_time` (timestamp, may be null, default null, on update current_timestamp())
|
|
||||||
- `content` (text, may be null, default null)
|
|
||||||
- `attachment_hash` (bigint(20), may be null, default null)
|
|
||||||
- `attachment_name` (varchar, may be null, default null)
|
|
||||||
- `title` (varchar)
|
|
||||||
- `reply_to` (int, default -1)
|
|
||||||
- profiles (do we even use this?)
|
|
||||||
- `id` (smallint (why? this makes no sense whatsoever), primary key, index (why? probably wanted to do unique))
|
|
||||||
- `email` (varchar, index (I think that’s supposed to be unique?))
|
|
||||||
- `display_name` (varchar)
|
|
||||||
- `status` (varchar)
|
|
||||||
- `about` (very long varchar)
|
|
||||||
- `website` (varchar)
|
|
||||||
- users
|
|
||||||
- `id` (smallint (again, this makes no sense), primary key)
|
|
||||||
- `name` (varchar, index (again, that’s probably supposed to be unique))
|
|
||||||
- `authentication_string` (varchar(128))
|
|
||||||
- `authentication_salt` (varchar)
|
|
||||||
- `authentication_algorithm` (varchar)
|
|
||||||
- `time_created` (timestamp, default current_timestamp())
|
|
||||||
- `time_altered` (timestamp, default current_timestamp(), on update current_timestamp())
|
|
||||||
- `verified` (boolean or tinyint(1), default 0)
|
|
||||||
|
|
||||||
# Git based automatic web deployment system
|
|
||||||
This repository will be automagically pulled by the test server
|
|
||||||
each time something is pushed by a user.
|
|
||||||
|
|
||||||
Dear Developers,
|
|
||||||
Please use pushes sparingly because it takes a while for the server
|
|
||||||
to replace all code variables.
|
|
||||||
|
|
||||||
What this thing does basically equates to:
|
|
||||||
```
|
|
||||||
ssh <user>@<threadr.ip|no public access set up currently>
|
|
||||||
cd /var/www/git
|
|
||||||
sudo -u www-data -s
|
|
||||||
rm -rf ./web-deployment
|
|
||||||
git clone <ssh git repository link>
|
|
||||||
cd web-deployment
|
|
||||||
./deployment-script
|
|
||||||
exit
|
|
||||||
logout
|
|
||||||
```
|
|
||||||
TBD: Remove this section when the ThreadR project moves to its final home
|
|
||||||
and this repository is only used for our local setup.
|
|
||||||
|
|
||||||
## Symlinks
|
|
||||||
The following files and directories are linked to areas where they can be
|
|
||||||
accessed by the web server:
|
|
||||||
* `build/` → `threadr.lostcave.ddnss.de/` (all files acessible by the web server, READMEs get deleted on deployment)
|
|
||||||
|
|
||||||
# Individual documentation for each file
|
|
||||||
|
|
||||||
### [[DIR] src](./src)
|
|
||||||
|
|
||||||
This folder contains all the files that are parts of ThreadR directly
|
|
||||||
|
|
||||||
### [[DIR] build](./build)
|
|
||||||
|
|
||||||
Placeholder folder to link against, will be deleted and recreated by
|
|
||||||
the deployment script, contains the a working instance of ThreadR after
|
|
||||||
successful execution of the deployment script
|
|
||||||
|
|
||||||
### [[DIR] config](./config)
|
|
||||||
|
|
||||||
A place to store the configuation for a specific ThreadR instance
|
|
||||||
(contains official instance config for now, will be removed and replaced
|
|
||||||
with a generic config eventually)
|
|
||||||
|
|
||||||
### [[DIR] macros](./macros)
|
|
||||||
|
|
||||||
files for use with variable_grabbler.py
|
|
||||||
|
|
||||||
### [deployment_script.sh](./deployment_script.sh)
|
|
||||||
|
|
||||||
This script is executed each time (or most of the time) the repository
|
|
||||||
gets pushed. It contains the commands to execute the code variable
|
|
||||||
replcement system and some other useful tasks. Its working directory is
|
|
||||||
the root of the git repository.
|
|
||||||
|
|
||||||
### [LICENSE.md](./LICENSE.md)
|
|
||||||
|
|
||||||
A copy of the Apache 2.0 license, the license this project is under
|
|
||||||
|
|
||||||
### [NOTICE](./NOTICE)
|
|
||||||
|
|
||||||
Copyright notice in plain text format
|
|
||||||
|
|
||||||
### [README.md](./README.md)
|
|
||||||
|
|
||||||
this file
|
|
||||||
|
|
||||||
### [variable_grabbler.py](./variable_grabbler.py)
|
|
||||||
|
|
||||||
Custom macro processor, takes two arguments:
|
|
||||||
- macro declaration file
|
|
||||||
- the file to be processed
|
|
||||||
|
|
||||||
Macros in code are strings of capitalized characters prefixed and
|
|
||||||
suffixed with %.
|
|
||||||
|
|
||||||
Macro definition format: JSON
|
|
||||||
- "<MACRO>":"<text>" → direct replacement
|
|
||||||
- "<MACRO>":["file","<file path>"] → insert file
|
|
||||||
- "<MACRO>":["exec","<command>"] → run command and insert its output from stdout
|
|
|
@ -1,22 +0,0 @@
|
||||||
# Files
|
|
||||||
### [about.template](./about.template)
|
|
||||||
The customizable part of the about page, HTML code for now, will eventually be replaced with a markdown file
|
|
||||||
### [instance.conf](./instance.conf)
|
|
||||||
configuration for a specific instance
|
|
||||||
- domain_name=<public facing domain name of the instance>
|
|
||||||
- threadr_dir=<directory on the webhost\*>
|
|
||||||
- db_username=<mysql user>
|
|
||||||
- db_password=<mysql password>
|
|
||||||
- db_database=<name of the database>
|
|
||||||
- db_svr_host=<mysql server address>
|
|
||||||
|
|
||||||
\* ThreadR does not support an installation on the webroot directly. See installation instructions for how to work around that.
|
|
||||||
|
|
||||||
I know some of these option names are silly but they all have the same length. -BodgeMaster
|
|
||||||
|
|
||||||
The format is strictly `<option>=<value>` because the mechanism used to load the config values is very simple. Don’t add additional whitespace for fancy formatting. Things *will* break. You have been warned.
|
|
||||||
|
|
||||||
The config is loaded once on deployment by the "variable grabbler" macro processor with `["exec","echo -n \"$(sed --quiet \"/<option>=/s/.*=//p\" config/instance.conf)\""]`.
|
|
||||||
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,25 +0,0 @@
|
||||||
<p>
|
|
||||||
Hello there! This is the official ThreadR instance provided by the ThreadR development team.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
What is ThreadR?
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
ThreadR is a free and open-source forum engine. That means you can download
|
|
||||||
it and host an instance of ThreadR on your own web server to run your own forum.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The project originated as a school project in 2019 with the goal of building
|
|
||||||
a forum. When we finished school, the project was abandoned and eventually taken down.
|
|
||||||
A year later, we decided to revive it and started working on it again. Now that school
|
|
||||||
is over and we don't necessarily have a a reason to run our own forum anymore,
|
|
||||||
we shifted the project goal to building a FOSS forum engine.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
Who are we?
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
We are a small group of (hobby) developers working on ThreadR in our free time.
|
|
||||||
To get in touch, ... uhh ... There will be a way once ThreadR is fully functional.
|
|
||||||
For now, you can find us on Discord: <a href="https://discord.gg/r3w3zSkEUE"> discord.gg/r3w3zSkEUE </a>
|
|
||||||
</p>
|
|
|
@ -1,6 +0,0 @@
|
||||||
domain_name=threadr.lostcave.ddnss.de
|
|
||||||
threadr_dir=/threadr
|
|
||||||
db_username=webstuff
|
|
||||||
db_password=Schei// auf Pa$$w0rter!
|
|
||||||
db_database=web
|
|
||||||
db_svr_host=localhost
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
echo "Deployment script for repository \"web-deployment\"
|
|
||||||
`date`
|
|
||||||
=============================================================================="
|
|
||||||
|
|
||||||
# activate ** globs
|
|
||||||
if [ -n "`shopt globstar | grep off`" ]; then shopt -s globstar; fi
|
|
||||||
# prepare build directory tree and static files
|
|
||||||
rm -r ./build
|
|
||||||
cp -r ./src ./build
|
|
||||||
rm ./build/**/{README.md,*.{php,html,css,svg}}
|
|
||||||
touch ./build/.placeholder
|
|
||||||
|
|
||||||
# run the macro handler
|
|
||||||
echo "`cd src; find -name "*.php" -or -name "*.html" -or -name "*.css" -or -name "*.svg" | sed 's/^/file=/;s/$/\; python3 variable_grabbler.py macros\/pass0\*.json src\/$file | python3 variable_grabbler.py macros\/pass1\*.json - | python3 variable_grabbler.py macros\/pass2\*.json - | python3 variable_grabbler.py macros\/pass3\*.json - > build\/$file/'`" | bash -
|
|
||||||
|
|
||||||
echo "==============================================================================
|
|
||||||
Done."
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Legacy
|
||||||
|
|
||||||
|
I just wanna keep the macro handler "variable grabbler" from the old ThreadR before the rewrite. It has proven quite useful in other contexts, might as well keep it in case we need it. -BodgeMaster
|
|
@ -1,30 +0,0 @@
|
||||||
# Files
|
|
||||||
### [[DIR] templates](./templates)
|
|
||||||
contains the templates used by the macro processor
|
|
||||||
### [pass0_templates.json](./pass0_templates.json)
|
|
||||||
Macros that insert templates
|
|
||||||
- `%NAVBAR%` the navigation bar at the top of the website (requires PHP)
|
|
||||||
- `%BANNER_COOKIES%` the cookie banner (requires PHP)
|
|
||||||
### [pass1_misc.json](./pass1_misc.json)
|
|
||||||
Miscellaneous macros
|
|
||||||
- `%FAVICON%` links the tab icon (HTML <head> section)
|
|
||||||
- `%STYLESHEET%` links stylesheet (HTML <head> section)
|
|
||||||
- `%PLEAZE_NO_CACHE%` tell the browser not to cache this page (PHP, before any data is sent to the client)
|
|
||||||
- `%COLOR_BEIGE%`, `%COLOR_ORANGE%`, `%COLOR_BLUE%`, `%COLOR_PINK%`, `%COLOR_CYAN%` color codes, format: #XXXXXX
|
|
||||||
### [pass2_session.json](./pass2_session.json)
|
|
||||||
Session handling macros
|
|
||||||
- `%REQUIRE_LOGIN%` go to login page if not logged in
|
|
||||||
- `%NO_CHEAP_SESSION_STEALING%` make sure that IP and user agent stay the same, otherwise end session
|
|
||||||
- `%SET_LOGIN_VARIABLE%` sets the variable $login based on whether the user is logged in
|
|
||||||
- `%FORCE_LOGOUT%` end session right here and now
|
|
||||||
### [pass3_install-config.json](./pass3_install-config.json)
|
|
||||||
Macros that grab the configuration values and inject them into the instance
|
|
||||||
- `%DOMAIN_NAME%` the domain name of the instance
|
|
||||||
- `%CONTENT_DIR%` the directory of the ThreadR home page on the webhost
|
|
||||||
- `%DB_PASSWORD%` password for the MySQL server
|
|
||||||
- `%DB_USERNAME%` username for the MySQL server
|
|
||||||
- `%DB_NAME%` name of the database to use
|
|
||||||
- `%DB_SERVER%` address of the mysql server
|
|
||||||
- `%ABOUT_PAGE%` the template for the about page
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"NAVBAR":["file","macros/templates/navbar.template"],
|
|
||||||
"BANNER_COOKIES":["file","macros/templates/banner_cookies.template"]
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"FAVICON":"<link rel=\"icon\" type=\"image\/png\" href=\"%CONTENT_DIR%\/img\/favicon-32x32.png\" sizes=\"32x32\" />",
|
|
||||||
"STYLESHEET":"<link rel=\"stylesheet\" type=\"text\/css\" href=\"%CONTENT_DIR%\/style.css\">",
|
|
||||||
"PLEAZE_NO_CACHE":"header('Cache-Control: no-cache, no-store, must-revalidate');header('Pragma: no-cache');header('Expires: 0');",
|
|
||||||
"COLOR_BEIGE":"#fef6e4", "COLOR_ORANGE":"#f3d2c1", "COLOR_BLUE":"#001858", "COLOR_PINK":"#f582ae", "COLOR_CYAN":"#8bd3dd"
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"REQUIRE_LOGIN":"if (!$login) { header(\"Location: https:\/\/%DOMAIN_NAME%%CONTENT_DIR%\/login\/\\?error=session\"); die(); }",
|
|
||||||
"NO_CHEAP_SESSION_STEALING":"if (isset($_SESSION['user_id'])) {if ($_SESSION['user_ip']!=$_SERVER['REMOTE_ADDR'] || $_SESSION['user_http_user_agent']!=$_SERVER['HTTP_USER_AGENT']){ $_SESSION = array(); if (ini_get(\"session.use_cookies\")){ $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]); } session_destroy(); header(\"Location: https://%DOMAIN_NAME%%CONTENT_DIR%/login/\\?error=session\"); die();}}",
|
|
||||||
"SET_LOGIN_VARIABLE":"if (isset($_SESSION['user_id'])) { $login = true; } else { $login = false; }",
|
|
||||||
"FORCE_LOGOUT":"$_SESSION = array(); if (ini_get('session.use_cookies')) { $params = session_get_cookie_params(); setcookie(session_name(), '', time() - 42000, $params['path'], $params['domain'], $params['secure'], $params['httponly']);} session_destroy();"
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
"DOMAIN_NAME":["exec","echo -n \"$(sed --quiet \"/domain_name=/s/.*=//p\" config/instance.conf)\""],
|
|
||||||
"CONTENT_DIR":["exec","echo -n \"$(sed --quiet \"/threadr_dir=/s/.*=//p\" config/instance.conf)\""],
|
|
||||||
"DB_PASSWORD":["exec","echo -n \"$(sed --quiet \"/db_password=/s/.*=//p\" config/instance.conf)\""],
|
|
||||||
"DB_USERNAME":["exec","echo -n \"$(sed --quiet \"/db_username=/s/.*=//p\" config/instance.conf)\""],
|
|
||||||
"DB_NAME" :["exec","echo -n \"$(sed --quiet \"/db_database=/s/.*=//p\" config/instance.conf)\""],
|
|
||||||
"DB_SERVER" :["exec","echo -n \"$(sed --quiet \"/db_svr_host=/s/.*=//p\" config/instance.conf)\""],
|
|
||||||
"ABOUT_PAGE" :["file","config/about.template"]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
# Files
|
|
||||||
### [navbar.template](./navbar.template)
|
|
||||||
contains the navbar, depends on a variable in PHP to determine which field on the navbar should be highlighted
|
|
||||||
### [banner_cookies.template](./banner_cookies.template)
|
|
||||||
contains the cookie banner
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
if (!isset($_COOKIE['threadr_cookie_banner'])) {
|
|
||||||
if (!$login){
|
|
||||||
echo "<div class='banner'><p class='beige'>We neeeeed Cookies. They taste sooo good. *crunch*</p><p class='beige'>Seriously, this site is in development. You should not be here. If you want to stay anyways, you will have to accept our cookies.</p><a href='%CONTENT_DIR%/accept_cookie.php?from=" . urlencode($_SERVER['REQUEST_URI']) . "'><button> OK </button></a></div>";
|
|
||||||
} else {
|
|
||||||
// assume that the user knows our cookie/privacy policy, force set cookie in this case
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -1,77 +0,0 @@
|
||||||
<?php
|
|
||||||
if (!isset($login)){
|
|
||||||
$login=false;
|
|
||||||
%FORCE_LOGOUT%
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<ul class="topnav">
|
|
||||||
<li>
|
|
||||||
<?php
|
|
||||||
echo "<a class=\"icon ";
|
|
||||||
if ($login){
|
|
||||||
if ($navbar == "home"){
|
|
||||||
echo "active\" href=\"%CONTENT_DIR%/userhome/\"><img src=\"%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"My Feed\" title=\"My Feed\"";
|
|
||||||
} else {
|
|
||||||
echo "\" href=\"%CONTENT_DIR%/userhome/\"><img src=\"%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"My Feed\" title=\"My Feed\"";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($navbar == "home"){
|
|
||||||
echo "active\" href=\"%CONTENT_DIR%/\"><img src=\"%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"Home\" title=\"Home\"";
|
|
||||||
} else {
|
|
||||||
echo "\" href=\"%CONTENT_DIR%/\"><img src=\"%CONTENT_DIR%/img/ThreadR_Home.svg\" alt=\"Home\" title=\"Home\"";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "/></a>";
|
|
||||||
?>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<?php
|
|
||||||
if ($navbar == "news"){
|
|
||||||
echo "<a class=\"active\" href=\"%CONTENT_DIR%/news/\">News</a>";
|
|
||||||
} else {
|
|
||||||
echo "<a href=\"%CONTENT_DIR%/news/\">News</a>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<?php
|
|
||||||
if ($navbar == "boards"){
|
|
||||||
echo "<a class=\"active\" href=\"%CONTENT_DIR%/boards/\">Boards</a>";
|
|
||||||
} else {
|
|
||||||
echo "<a href=\"%CONTENT_DIR%/boards/\">Boards</a>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<?php
|
|
||||||
if ($navbar == "about"){
|
|
||||||
echo "<a class=\"active\" href=\"%CONTENT_DIR%/about/\">About</a>";
|
|
||||||
} else {
|
|
||||||
echo "<a href=\"%CONTENT_DIR%/about/\">About</a>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($login) {
|
|
||||||
echo "<li class=\"dropdown right\"><button class=\"dropbtn\"> Put user avatar here </button><div class=\"dropdown-content\"><a href=\"%CONTENT_DIR%/logout/\">Log out</a>";
|
|
||||||
if ($navbar == "profile") {
|
|
||||||
echo "<a class=\"active\" href=\"%CONTENT_DIR%/profile/\">Profile</a>";
|
|
||||||
} else {
|
|
||||||
echo "<a href=\"%CONTENT_DIR%/profile/\">Profile</a>";
|
|
||||||
}
|
|
||||||
echo "</div></li>";
|
|
||||||
} else {
|
|
||||||
echo "<li class=\"right\">";
|
|
||||||
if ($navbar == "login") {
|
|
||||||
echo "<a class=\"active\" href=\"%CONTENT_DIR%/login/\">Log in</a>";
|
|
||||||
} else {
|
|
||||||
echo "<a href=\"%CONTENT_DIR%/login/\">Log in</a>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
<div class="topnav"></div>
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Short documentation of each file
|
|
||||||
### [[DIR] about](./about)
|
|
||||||
contains the about us page
|
|
||||||
### [[DIR] board](./board)
|
|
||||||
contains the files needed to display a board
|
|
||||||
### [[DIR] boards](./boards)
|
|
||||||
contains the files for the board list
|
|
||||||
### [[DIR] img](./img)
|
|
||||||
the directory that contains images that are part of the website itself (no user content)
|
|
||||||
### [[DIR] login](./login)
|
|
||||||
everything that is needed to log in a user
|
|
||||||
### [[DIR] logout](./logout)
|
|
||||||
the logout process
|
|
||||||
### [[DIR] news](./news)
|
|
||||||
a page displaying a special board that is write-protected and shows updates about ThreadR
|
|
||||||
### [[DIR] profile](./profile)
|
|
||||||
profile pages and profile settings
|
|
||||||
### [[DIR] signup](./signup)
|
|
||||||
the signup process
|
|
||||||
### [[DIR] userhome](./userhome)
|
|
||||||
the user’s feed
|
|
||||||
### [accept_cookie.php](./accept_cookie.php)
|
|
||||||
redirect immediately back to where the user came from but sets a cookie that says 'You accept cookies.'
|
|
||||||
$_GET variables:
|
|
||||||
* from: the url the user came from after urlencode() was used on it
|
|
||||||
### [index.php](./index.php)
|
|
||||||
the homepage
|
|
||||||
### [README.md](./README.php)
|
|
||||||
this file
|
|
||||||
### [style.css](./style.css)
|
|
||||||
the stylesheet used on every ThreadR site
|
|
||||||
### [redirect_home.html](./redirect_home.html)
|
|
||||||
small HTML file that redirects to ThreadR, can be linked or copied to any place that needs to redirect to ThreadR’s landing page
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Short documentation of all files
|
|
||||||
### [index.php](./index.php)
|
|
||||||
Self-Explanatory
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,47 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
$navbar="about";
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>
|
|
||||||
ThreadR - About Us
|
|
||||||
</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1>
|
|
||||||
<center>About this ThreadR instance...</center>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
%ABOUT_PAGE%
|
|
||||||
</div>
|
|
||||||
<div class="item-3">
|
|
||||||
<h1>
|
|
||||||
<center>About ThreadR...</center>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-4">
|
|
||||||
<p>
|
|
||||||
This forum is powered by the ThreadR Forum Engine. More information here:
|
|
||||||
<a href="https://threadr.lostcave.ddnss.de/threadr/about">[about page on the Developer's instance]</a>
|
|
||||||
and <a href="https://lostcave.ddnss.de/git/root/threadr.lostcave.ddnss.de">[git repository]</a>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If you encounter any issues, please report them to the issues board on our official instance at <a href="">[put link here when ready]</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?php
|
|
||||||
setcookie('threadr_cookie_banner', $expires=time()+2592000);
|
|
||||||
header("Location: https://%DOMAIN_NAME%" . urldecode($_GET['from']));
|
|
||||||
?>
|
|
|
@ -1,20 +0,0 @@
|
||||||
# A short overview of the files:
|
|
||||||
### [index.php](./index.php)
|
|
||||||
Somewhat obvious...
|
|
||||||
$_GET values:
|
|
||||||
* id → the board id
|
|
||||||
* action → what action file should be loaded in the bottom section (see below)
|
|
||||||
* valid actions: [not present], post, submit, edit
|
|
||||||
* end → if present, jump to the end of the page
|
|
||||||
### [board.php](./board.php)
|
|
||||||
the top part of a board page, displays the posts, loaded via include()
|
|
||||||
### [post.php](./post.php)
|
|
||||||
one of the action files for the bottom of the page, displays a form to add a post, loaded via include()
|
|
||||||
### [submit.php](./submit.php)
|
|
||||||
displays a message in the bottom of the page and submits a new post, loaded via include()
|
|
||||||
### [edit.php](./edit.php)
|
|
||||||
? [Will look into it later, seems not to do very much ATM]
|
|
||||||
### [default.php](./default.php)
|
|
||||||
displays a button giving the user the option to post something
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,57 +0,0 @@
|
||||||
<?php
|
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM posts WHERE board_id=:bid ORDER BY post_time asc");
|
|
||||||
$statement->execute(array("bid"=>$id));
|
|
||||||
foreach($statement->fetchAll() as $ROW) {
|
|
||||||
|
|
||||||
// get post creator
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM users WHERE id=:uid");
|
|
||||||
$statement->execute(array("uid"=>$ROW[user_id]));
|
|
||||||
$post_creator = $statement->fetch();
|
|
||||||
|
|
||||||
// get post content and make sure it doesn't mess with the website
|
|
||||||
$post_id = $ROW['id'];
|
|
||||||
$post_title = htmlspecialchars($ROW['title']);
|
|
||||||
$post_creator_name = htmlspecialchars($post_creator['name']);
|
|
||||||
$post_time = htmlspecialchars($ROW['post_time']);
|
|
||||||
$post_content = htmlspecialchars($ROW['content']);
|
|
||||||
|
|
||||||
// add line breaks to post content, to be replaced with proper makrdown support in the future (see #44)
|
|
||||||
$newlines = array("\r\n", "\n\r", "\r", "\n"); // two-character newlines first to prevent placing two line breaks instead of one
|
|
||||||
$post_content = str_replace($newlines, "<br />", $post_content);
|
|
||||||
|
|
||||||
// if this is a reply, build reference
|
|
||||||
$reply_to = $ROW['reply_to'];
|
|
||||||
if ($reply_to > -1) {
|
|
||||||
$reply_reference = "<p class=\"post_reply\" >This is a reply to <a href=./?id=" . $_GET['id'] . "#$reply_to >this</a> message.</p>";
|
|
||||||
} else {
|
|
||||||
$reply_reference = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// determine whether to put a reply button
|
|
||||||
if ($login) {
|
|
||||||
$reply_button = "<a href=\"./?id=" . $_GET['id'] . "&action=post&reply_to=$post_id&end\" class=\"post_reply\"><button class=\"post_reply\">Reply</button></a>";
|
|
||||||
} else {
|
|
||||||
$reply_button = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<section id=\"$post_id\" >
|
|
||||||
<div>
|
|
||||||
$reply_button
|
|
||||||
<h1 class=\"post\">$post_title</h1>
|
|
||||||
$reply_reference
|
|
||||||
</div>
|
|
||||||
<article>
|
|
||||||
<header>
|
|
||||||
<div>
|
|
||||||
<p class='beige'> $post_creator_name <time datetime='$post_time'>$post_time</time></p>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<div class='postcontent'>
|
|
||||||
<p>$post_content</p>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</section>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?php
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
echo "<div class='margin'><a href='%CONTENT_DIR%/board/?id=$id&action=post&end'><button> Post something </button></a></div>";
|
|
||||||
?>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?php
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
/*edit.php*/
|
|
||||||
?>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
$navbar="boards";
|
|
||||||
$id=$_GET['id'];
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Boards</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<?php
|
|
||||||
if(isset($_GET['action'])) {
|
|
||||||
if ($_GET['action']=='submit') {
|
|
||||||
echo "<meta http-equiv=\"refresh\" content=\"5;URL=%CONTENT_DIR%/board/?id=$id&end\">";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</head>
|
|
||||||
<body <?php if (isset($_GET['end'])) { echo "onLoad=\"window.scrollTo(0,document.body.scrollHeight)\""; } ?> >
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1><center>
|
|
||||||
<?php
|
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM boards WHERE id=:id");
|
|
||||||
$statement->execute(array("id"=>$id));
|
|
||||||
$result = $statement->fetch();
|
|
||||||
echo $result['name'];
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</center></h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<?php
|
|
||||||
include("./board.php");
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<div class="item-3">
|
|
||||||
<?php
|
|
||||||
if($login) {
|
|
||||||
if(isset($_GET['action'])) {
|
|
||||||
if($_GET['action']=='post') {
|
|
||||||
include("./post.php");
|
|
||||||
} elseif($_GET['action']=='submit') {
|
|
||||||
include("./submit.php");
|
|
||||||
} elseif($_GET['action']=='edit') {
|
|
||||||
include("./edit.php");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
include("./default.php");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<div class='margin'><a href='%CONTENT_DIR%/login/'><button> Log in to post something </button></a></div>";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<?php
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
echo "<section>";
|
|
||||||
if (isset($_GET['reply_to'])) {
|
|
||||||
echo "<form action='%CONTENT_DIR%/board/?id=$id&action=submit&reply_to=" . $_GET['reply_to'] . "&end' method='post'>";
|
|
||||||
} else {
|
|
||||||
echo "<form action='%CONTENT_DIR%/board/?id=$id&action=submit&end' method='post'>";
|
|
||||||
}
|
|
||||||
echo "<input type='text' name='title' maxlength='128' placeholder='Title'/><textarea name='content' maxlength='65535' placeholder='You can contribute to the conversation here. Tell us your story in up to 65535 characters...' rows='3'></textarea><input type='submit' value='Post'></form></section>";
|
|
||||||
?>
|
|
|
@ -1,31 +0,0 @@
|
||||||
<?php
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
|
|
||||||
if (isset($_GET['reply_to'])) {
|
|
||||||
$reply_to = $_GET['reply_to'];
|
|
||||||
} else {
|
|
||||||
$reply_to = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<section>";
|
|
||||||
|
|
||||||
if ($_POST['title']==="" || $_POST['content']==="") {
|
|
||||||
echo "<center><h1>Please fill out both the title field and content box.</h1></center>";
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
$statement = $pdo->prepare("INSERT INTO posts (board_id, user_id, content, title, reply_to) VALUES (:bid, :uid, :content, :title, :replyto)");
|
|
||||||
$result = $statement->execute(array('bid'=>$id, 'uid'=>$_SESSION[user_id], 'content'=>$_POST['content'], 'title'=>$_POST['title'], 'replyto'=>$reply_to));
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "<p>Error: SQL error.</p><pre>" . $statement->queryString . "</pre><pre>" . $statement->errorInfo()[2] . "</pre>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<center><h1>Post submitted.</h1></center>";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</section>";
|
|
||||||
?>
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Short description of each file
|
|
||||||
### [index.php](./index.php)
|
|
||||||
obvious, hopefully
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,68 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
$navbar="boards";
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Boards</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1>
|
|
||||||
<center>ThreadR Boards</center>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<ul class="list">
|
|
||||||
<?php
|
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
echo '<center><h2 class="beige">Public Boards</h2></center>';
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM boards WHERE private='0' ORDER BY id asc");
|
|
||||||
$statement->execute();
|
|
||||||
foreach($statement->fetchAll() as $ROW) {
|
|
||||||
echo "<li><a href='%CONTENT_DIR%/board/?id=$ROW[id]'>$ROW[name]</a></li>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="item-3">
|
|
||||||
<ul class="list">
|
|
||||||
<?php
|
|
||||||
if ($login) {
|
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
echo '<center><h2 class="beige">Private Boards</h2></center>';
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM boards WHERE private='1' ORDER BY id asc");
|
|
||||||
$statement->execute();
|
|
||||||
foreach($statement->fetchAll() as $ROW) {
|
|
||||||
echo "<li><a href='%CONTENT_DIR%/board/?id=$ROW[id]'>$ROW[name]</a></li>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,25 +0,0 @@
|
||||||
# Short documentation of all files
|
|
||||||
### [index.html](./index.html)
|
|
||||||
This is my usual nope.html to prevent kiddies from poking at my files. It just redirects. There is no real security benefit to it though as it does not even prevent `wget -r`.
|
|
||||||
### [favicon-32x32.png](./favicon-32x32.png)
|
|
||||||
- Tab icon
|
|
||||||
- format: PNG
|
|
||||||
- resolution: 32x32
|
|
||||||
### [threadR.png](./threadR.png)
|
|
||||||
- unused
|
|
||||||
- format: PNG
|
|
||||||
- resolution: 48x48
|
|
||||||
### [ThreadR.png](./ThreadR.png)
|
|
||||||
- unused, render of the main logo svg
|
|
||||||
- format: PNG
|
|
||||||
- resolution: 1856x674
|
|
||||||
### [ThreadR.svg](./ThreadR.svg)
|
|
||||||
- main logo, front center on the home page
|
|
||||||
- format: SVG + macros
|
|
||||||
- will not render properly without macro processing
|
|
||||||
### [ThreadR_Home.svg](./ThreadR_Home.svg)
|
|
||||||
- more square version of the logo, used on the "home" link on the navbar
|
|
||||||
- format: SVG + macros
|
|
||||||
- will not render properly without macro processing
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
Binary file not shown.
Before Width: | Height: | Size: 93 KiB |
|
@ -1,272 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="261.82941mm"
|
|
||||||
height="95.154205mm"
|
|
||||||
viewBox="0 0 261.82941 95.154203"
|
|
||||||
version="1.1"
|
|
||||||
id="svg8"
|
|
||||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
|
||||||
sodipodi:docname="ThreadR.svg">
|
|
||||||
<defs
|
|
||||||
id="defs2">
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient1092">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#a9dfff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop1088" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#a9dfff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop1090" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient1060">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#766fff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop1056" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#766fff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop1058" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient1060"
|
|
||||||
id="linearGradient1062"
|
|
||||||
x1="30.859402"
|
|
||||||
y1="95.286171"
|
|
||||||
x2="146.35486"
|
|
||||||
y2="95.286171"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(2.2724332,0,0,0.98143486,-39.444389,5.9391184)" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient1092"
|
|
||||||
id="linearGradient1094"
|
|
||||||
x1="-144.12688"
|
|
||||||
y1="82.6875"
|
|
||||||
x2="-39.544453"
|
|
||||||
y2="82.6875"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(2.5099298,0,0,0.96280136,68.591637,19.844646)" />
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="0.70710678"
|
|
||||||
inkscape:cx="84.893034"
|
|
||||||
inkscape:cy="106.28905"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
inkscape:current-layer="layer4"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:measure-start="0,0"
|
|
||||||
inkscape:measure-end="0,0"
|
|
||||||
inkscape:window-width="1600"
|
|
||||||
inkscape:window-height="847"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="1"
|
|
||||||
inkscape:window-maximized="1" />
|
|
||||||
<metadata
|
|
||||||
id="metadata5">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer5"
|
|
||||||
inkscape:label="background"
|
|
||||||
transform="translate(-30.990202,-96.114479)">
|
|
||||||
<rect
|
|
||||||
style="display:inline;opacity:1;fill:#f9f9f9;fill-opacity:1;stroke:none;stroke-width:0.78851396;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1103"
|
|
||||||
width="261.82941"
|
|
||||||
height="95.154205"
|
|
||||||
x="30.990202"
|
|
||||||
y="96.114479" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer3"
|
|
||||||
inkscape:label="window"
|
|
||||||
style="display:inline"
|
|
||||||
transform="translate(-30.990202,-96.114479)">
|
|
||||||
<rect
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.47835484;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1021"
|
|
||||||
width="1.0631751"
|
|
||||||
height="88.470581"
|
|
||||||
x="30.999176"
|
|
||||||
y="102.7981" />
|
|
||||||
<path
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.48693055;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 291.71793,102.7981 v 88.47058 h 1.10168 V 102.7981 Z"
|
|
||||||
id="rect1021-9"
|
|
||||||
inkscape:connector-curvature="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.53601629;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-6-2-9-2"
|
|
||||||
width="259.65558"
|
|
||||||
height="5.0737643"
|
|
||||||
x="32.062351"
|
|
||||||
y="186.19492"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="opacity:1;fill:url(#linearGradient1094);fill-opacity:1;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1023-6"
|
|
||||||
width="261.82043"
|
|
||||||
height="6.6836219"
|
|
||||||
x="-292.81961"
|
|
||||||
y="96.114479"
|
|
||||||
transform="scale(-1,1)" />
|
|
||||||
<rect
|
|
||||||
style="display:inline;opacity:1;fill:url(#linearGradient1062);fill-opacity:1;stroke:none;stroke-width:0.53430772;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1023"
|
|
||||||
width="261.82043"
|
|
||||||
height="6.6836276"
|
|
||||||
x="30.999176"
|
|
||||||
y="96.114479" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
inkscape:label="contents"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1"
|
|
||||||
style="display:inline"
|
|
||||||
transform="translate(-30.990202,-96.114479)">
|
|
||||||
<path
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.46272928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 33.365806,121.08017 4.989638,-12.31832 c 1.088722,-2.58288 1.758941,-2.58288 5.171142,-2.58288 H 111.3019 c 3.41221,0 4.08244,0 5.17115,2.58288 l 4.98963,12.31833 z"
|
|
||||||
id="path817"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="ccccccc" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_CYAN%;fill-opacity:1;stroke:none;stroke-width:0.46806985;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909"
|
|
||||||
width="255.74254"
|
|
||||||
height="15.640329"
|
|
||||||
x="32.062351"
|
|
||||||
y="121.10081"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_ORANGE%;fill-opacity:1;stroke:none;stroke-width:0.41052076;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-5"
|
|
||||||
width="255.74254"
|
|
||||||
height="9.9996996"
|
|
||||||
x="32.062351"
|
|
||||||
y="136.74113"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_PINK%;fill-opacity:1;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-6-2-9"
|
|
||||||
width="255.74255"
|
|
||||||
height="10.471648"
|
|
||||||
x="32.062351"
|
|
||||||
y="175.72327"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_BEIGE%;fill-opacity:1;stroke:none;stroke-width:0.52205408;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-6-2-1"
|
|
||||||
width="255.74254"
|
|
||||||
height="28.982441"
|
|
||||||
x="32.062351"
|
|
||||||
y="146.74083"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ececec;stroke:none;stroke-width:0.48659384;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect983"
|
|
||||||
width="3.9130244"
|
|
||||||
height="65.094109"
|
|
||||||
x="287.8049"
|
|
||||||
y="121.10081" />
|
|
||||||
<rect
|
|
||||||
style="fill:#b3b3b3;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect983-7"
|
|
||||||
width="2.182373"
|
|
||||||
height="45.629673"
|
|
||||||
x="288.67023"
|
|
||||||
y="127.22635"
|
|
||||||
ry="1.1820796"
|
|
||||||
rx="1.0911865" />
|
|
||||||
<rect
|
|
||||||
style="fill:#b3b3b3;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1002"
|
|
||||||
width="0.46817124"
|
|
||||||
height="0.48868293"
|
|
||||||
x="144.64522"
|
|
||||||
y="120.98614"
|
|
||||||
rx="1.5645972"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:#b3b3b3;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1002-0"
|
|
||||||
width="0.46817127"
|
|
||||||
height="0.48868293"
|
|
||||||
x="141.20036"
|
|
||||||
y="120.98614"
|
|
||||||
rx="1.5645972"
|
|
||||||
ry="0" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer4"
|
|
||||||
inkscape:label="ThreadR"
|
|
||||||
transform="translate(4.9926758e-8,-4.1053391)">
|
|
||||||
<g
|
|
||||||
aria-label="ThreadR"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:98.77777863px;line-height:1.25;font-family:Playball;-inkscape-font-specification:Playball;letter-spacing:0px;word-spacing:0px;fill:%COLOR_BLUE%;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
|
||||||
id="text840">
|
|
||||||
<path
|
|
||||||
d="M 66.388955,26.034411 52.461289,25.441745 q -0.987778,0 -6.519334,11.853333 -5.531555,11.754556 -9.581444,22.817667 -4.049889,11.063111 -4.049889,16.002 0,4.840111 3.062111,4.840111 3.160889,0 7.902222,-6.420555 0.493889,-0.592667 0.987778,-0.592667 0.493889,0 0.493889,0.889 0,0.889 -1.382889,3.259667 -1.284111,2.370666 -3.457222,5.136444 -2.173111,2.667 -5.630334,4.741334 -3.457222,2.173111 -7.112,2.173111 -5.432777,0 -5.432777,-7.507111 0,-9.285112 9.383888,-31.60889 6.716889,-15.705666 12.347223,-26.077333 H 42.1884 L 32.014288,24.7503 q -8.494888,0 -14.816666,2.173111 -3.457223,1.185334 -5.531556,3.556 -1.9755555,2.271889 -1.9755555,5.531556 l 0.7902225,4.148667 q 0,0.987778 -0.987778,0.987778 -1.2841112,0 -2.0743334,-2.469445 -0.7902222,-2.568222 -0.7902222,-4.445 0,-4.642556 2.1731111,-7.902222 2.1731115,-3.259667 5.9266665,-4.938889 7.112,-3.160889 15.705667,-3.160889 8.593667,0 19.459222,1.086555 10.865556,0.987778 19.755556,0.987778 8.89,0 11.557,-2.765778 0.296334,0.691445 0.296334,1.382889 0,3.259667 -4.148667,5.235223 -4.148667,1.876777 -10.964334,1.876777 z"
|
|
||||||
style="fill:%COLOR_BLUE%;fill-opacity:1;stroke-width:0.26458332"
|
|
||||||
id="path841" />
|
|
||||||
<path
|
|
||||||
d="m 83.240932,73.360961 q -8.938683,15.043151 -15.115823,15.043151 -4.287661,0 -4.287661,-4.941711 0,-5.741106 4.57835,-16.351251 1.017412,-2.688873 1.017412,-3.706284 0,-1.453444 -1.308101,-1.453444 -0.872066,0 -2.979561,1.017411 -2.034822,1.017411 -3.9243,2.979561 -1.889478,1.96215 -3.197578,4.57835 -1.235428,2.543528 -2.034822,4.433006 -0.726723,1.889478 -1.526117,4.651023 -0.799394,2.688872 -1.453445,4.433005 -0.581377,1.671462 -1.235427,3.924301 h -7.049206 q 1.96215,-5.014384 5.595761,-15.98789 3.706284,-11.046178 6.322484,-17.29599 2.6162,-6.322484 5.087056,-10.610145 2.543528,-4.360333 5.741105,-7.267222 3.270251,-2.906889 6.83119,-2.906889 3.633611,0 3.633611,3.415594 0,2.398184 -1.96215,6.322484 -4.214989,8.284634 -14.098412,19.185467 3.9243,-2.834216 6.177139,-3.706283 2.325511,-0.872067 4.433006,-0.872067 4.142317,0 4.142317,3.633611 0,1.453445 -0.508706,2.688873 -0.508705,1.235428 -1.162755,2.834217 -0.581378,1.598789 -1.017411,2.6162 -0.363362,1.017411 -1.017412,2.761544 -0.65405,1.744134 -1.017411,2.979562 -0.944739,3.052233 -0.944739,4.869039 0,1.816805 1.235428,1.816805 4.360334,0 10.900834,-12.644967 0.218017,-0.508705 0.508706,-0.508705 0.363361,0 0.363361,1.380772 0,1.3081 -0.726723,2.688872 z M 74.447593,35.716748 q -2.543528,0 -6.685845,8.066617 -4.069644,8.066617 -7.993944,18.531418 9.956094,-11.700229 13.589706,-19.185468 2.034822,-4.57835 2.034822,-5.959122 0,-1.453445 -0.944739,-1.453445 z"
|
|
||||||
style="font-size:72.67222595px;fill:%COLOR_BLUE%;fill-opacity:1"
|
|
||||||
id="path843" />
|
|
||||||
<path
|
|
||||||
d="m 100.06455,58.753844 3.70629,0.07267 h 0.72672 q -1.09009,0.799394 -3.12491,4.723695 -1.962148,3.9243 -2.979559,5.959122 -0.944739,1.96215 -2.180167,5.377745 -1.162756,3.342922 -1.162756,5.450417 0,2.107494 1.453445,2.107494 0.944739,-0.07267 2.6162,-1.3081 1.744137,-1.3081 2.834217,-2.688872 1.16276,-1.453445 2.47086,-3.633611 1.38077,-2.252839 2.32551,-3.851628 1.01741,-1.671461 1.16275,-1.671461 0.50871,0 0.50871,1.380772 0,1.3081 -0.72672,2.543528 -3.12491,5.159728 -5.15973,7.921272 -2.03482,2.761545 -4.941714,5.087056 -2.834217,2.252839 -5.159728,2.252839 -4.142317,0 -4.142317,-6.104467 0,-4.142317 1.598789,-9.374717 1.598789,-5.2324 4.723695,-10.101439 -2.543528,2.034822 -5.087056,2.034822 -0.799394,0 -1.671461,-0.363361 -5.159728,10.174111 -5.595762,10.174111 -0.363361,0 -0.363361,-1.162755 0,-1.235428 0.872067,-3.342923 0.944739,-2.180166 1.96215,-4.142316 1.090084,-1.96215 1.162756,-2.180167 -2.6162,-1.3081 -2.6162,-4.214989 0,-1.453445 0.872066,-2.6162 0.944739,-1.162756 2.543528,-1.162756 1.598789,0 2.6162,1.017411 -0.145344,0.436033 -0.145344,1.3081 0,1.96215 1.380772,3.124906 1.453445,1.090083 3.488267,1.090083 0.581378,0 0.872067,-0.07267 2.543528,-3.633611 5.159726,-3.633611 z"
|
|
||||||
style="font-size:72.67222595px;fill:%COLOR_BLUE%;fill-opacity:1"
|
|
||||||
id="path845" />
|
|
||||||
<path
|
|
||||||
d="m 134.07062,69.0733 q 0.43603,0 0.43603,1.453444 0,1.380773 -1.16276,3.342923 -1.16275,1.96215 -2.32551,3.706283 -1.09008,1.744134 -2.97956,4.069645 -1.88948,2.325511 -3.70628,3.706283 -4.57835,3.342923 -9.22938,3.342923 -4.57835,0 -7.41256,-2.325511 -2.83422,-2.398184 -2.83422,-7.267223 0,-7.412567 5.45042,-13.735051 5.45041,-6.322483 12.71764,-6.322483 3.27025,0 5.2324,1.744133 1.96215,1.671461 1.96215,4.069645 0,4.069644 -3.85163,6.5405 -3.85163,2.470856 -9.08403,2.470856 -3.05223,0 -4.50568,-0.799395 -1.38077,3.706284 -1.38077,6.540501 0,6.104467 5.15973,6.104467 3.05223,0 6.24981,-2.325512 3.27025,-2.398183 5.52309,-5.305072 2.32551,-2.979561 5.2324,-8.502651 0.29069,-0.508705 0.50871,-0.508705 z m -7.70326,-5.741106 q 0,-2.107495 -2.03482,-2.107495 -2.83422,0 -6.32249,3.488267 -3.48826,3.488267 -3.48826,5.668434 0,1.453444 2.76154,1.453444 2.76155,0 5.74111,-2.688872 3.05223,-2.688872 3.34292,-5.813778 z"
|
|
||||||
style="font-size:72.67222595px;fill:%COLOR_BLUE%;fill-opacity:1"
|
|
||||||
id="path847" />
|
|
||||||
<path
|
|
||||||
d="m 160.69931,58.899188 3.63361,0.07267 h 0.72672 q -2.39818,1.962151 -5.88645,9.956095 -3.48827,7.921273 -3.48827,11.554884 0,1.889478 1.3081,1.889478 4.21499,0 10.75549,-12.42695 0.29069,-0.508706 0.50871,-0.508706 0.43603,0 0.43603,1.380772 0,1.3081 -0.72672,2.543528 -8.93869,15.043151 -14.97048,15.043151 -3.9243,0 -3.9243,-6.031795 0,-4.505678 1.52612,-8.866011 -8.28464,14.679789 -15.33384,14.679789 -4.86904,0 -4.86904,-6.685844 0,-5.087056 2.18016,-10.319457 2.25284,-5.2324 6.39516,-8.866011 4.14232,-3.706284 9.08403,-3.706284 2.32551,0 4.36033,1.090084 2.03482,1.017411 2.68887,3.342922 0.7994,-1.671461 2.47086,-2.906889 1.67146,-1.235428 3.12491,-1.235428 z m -6.0318,4.796367 q -0.72672,-2.325511 -3.41559,-2.325511 -4.79637,0 -9.30205,6.685845 -4.50568,6.613172 -4.50568,11.845573 0,2.252839 1.74414,2.252839 1.88947,0 4.433,-2.325512 2.54353,-2.398183 4.57835,-5.595761 4.50568,-7.121878 6.46783,-10.537473 z"
|
|
||||||
style="font-size:72.67222595px;fill:%COLOR_BLUE%;fill-opacity:1"
|
|
||||||
id="path849" />
|
|
||||||
<path
|
|
||||||
d="m 206.38516,40.440443 q -2.39819,1.744133 -6.32249,9.81075 -3.85162,7.993945 -6.83119,16.932629 -2.97956,8.866012 -2.97956,12.862984 0,2.325511 1.23543,2.325511 1.23543,0 3.05223,-1.598789 1.88948,-1.598789 2.68888,-2.688872 0.79939,-1.090084 2.10749,-3.27025 1.38077,-2.252839 2.32551,-3.851628 1.01741,-1.671461 1.16276,-1.671461 0.5087,0 0.5087,1.380772 -0.0727,2.543528 -6.03179,10.610145 -1.96215,2.6162 -4.7237,4.869039 -2.76154,2.252839 -5.01438,2.252839 -3.85163,0 -3.85163,-5.741106 0,-4.214989 2.1075,-10.828162 -3.34293,6.613173 -7.63059,11.482212 -4.28766,4.869039 -8.57532,4.869039 -4.86904,0 -4.86904,-6.685844 0,-5.087056 2.18017,-10.319457 2.25284,-5.2324 6.39515,-8.866011 4.14232,-3.706284 8.93869,-3.706284 4.86904,0 6.68584,3.197578 2.03482,-3.996972 4.14232,-9.229372 2.18017,-5.232401 2.83422,-6.758517 0.72672,-1.598789 1.01741,-2.325512 0.36336,-0.726722 0.87206,-1.380772 0.7994,-1.017411 1.88948,-1.235428 1.16276,-0.290689 3.63361,-0.290689 2.54353,-0.07267 3.05224,-0.145344 z m -17.8047,22.237701 q -0.87207,-1.3081 -2.90689,-1.3081 -3.27025,0 -6.61317,3.342922 -3.27025,3.27025 -5.30507,7.630584 -1.96215,4.287661 -1.96215,7.557912 0,2.252839 1.74413,2.252839 5.88645,0 15.04315,-19.476157 z"
|
|
||||||
style="font-size:72.67222595px;fill:%COLOR_BLUE%;fill-opacity:1"
|
|
||||||
id="path851" />
|
|
||||||
<path
|
|
||||||
d="m 250.30984,40.077082 q 3.41559,2.761544 3.41559,7.049206 0,4.287661 -2.54352,7.557911 -4.50568,5.959123 -13.8804,7.703256 l -2.32551,0.436033 q 3.63361,12.644968 15.26117,24.999246 -1.09009,0.218017 -3.34292,0.218017 l -5.59577,-0.218017 q -2.90688,0 -6.17714,-5.668433 -3.19757,-5.741106 -5.08705,-11.627557 -1.88948,-5.959122 -1.88948,-7.921272 0,-1.090084 1.01741,-1.162756 17.07798,-2.107494 17.58668,-13.371689 0,-3.996973 -2.39818,-6.17714 -2.32551,-2.180166 -7.70326,-2.470855 -5.66843,7.630583 -12.57229,24.417868 -6.83119,17.077973 -6.83119,22.52839 0,1.090083 0.29069,1.598789 h -9.37472 q 2.03482,-8.79334 8.57532,-24.417868 8.72067,-20.784257 11.2642,-23.618474 -6.17714,0.145345 -12.5723,2.543528 -6.32248,2.325511 -7.33989,5.595762 -0.0727,0.218016 -0.29069,0.218016 -0.65405,0 -0.65405,-0.944739 0,-0.145344 0.14534,-0.726722 1.38077,-3.996972 3.99697,-6.177139 2.6162,-2.180167 5.08706,-2.688873 2.54353,-0.508705 6.24981,-0.508705 h 17.65935 q 6.68585,0 10.02877,2.834217 z"
|
|
||||||
style="font-size:72.67222595px;fill:%COLOR_BLUE%;fill-opacity:1"
|
|
||||||
id="path853" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 17 KiB |
|
@ -1,249 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="97.333481mm"
|
|
||||||
height="95.154205mm"
|
|
||||||
viewBox="0 0 97.333492 95.154203"
|
|
||||||
version="1.1"
|
|
||||||
id="svg8"
|
|
||||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
|
||||||
sodipodi:docname="ThreadR_Home.svg">
|
|
||||||
<defs
|
|
||||||
id="defs2">
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient1092">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#a9dfff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop1088" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#a9dfff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop1090" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient1060">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#766fff;stop-opacity:1;"
|
|
||||||
offset="0"
|
|
||||||
id="stop1056" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#766fff;stop-opacity:0;"
|
|
||||||
offset="1"
|
|
||||||
id="stop1058" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient1060"
|
|
||||||
id="linearGradient1062"
|
|
||||||
x1="30.859402"
|
|
||||||
y1="95.286171"
|
|
||||||
x2="146.35486"
|
|
||||||
y2="95.286171"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.84479197,0,0,0.98143437,4.8113177,5.9391634)" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient1092"
|
|
||||||
id="linearGradient1094"
|
|
||||||
x1="-144.12688"
|
|
||||||
y1="82.6875"
|
|
||||||
x2="-39.544453"
|
|
||||||
y2="82.6875"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="matrix(0.93308299,0,0,0.96280088,6.0243672,19.844684)" />
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="0.5"
|
|
||||||
inkscape:cx="207.39258"
|
|
||||||
inkscape:cy="-260.45274"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
inkscape:current-layer="layer3"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:measure-start="0,0"
|
|
||||||
inkscape:measure-end="0,0"
|
|
||||||
inkscape:window-width="1680"
|
|
||||||
inkscape:window-height="997"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="1"
|
|
||||||
inkscape:window-maximized="1" />
|
|
||||||
<metadata
|
|
||||||
id="metadata5">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer5"
|
|
||||||
inkscape:label="background"
|
|
||||||
transform="translate(-30.999176,-96.114479)">
|
|
||||||
<rect
|
|
||||||
style="display:inline;opacity:1;fill:#f9f9f9;fill-opacity:1;stroke:none;stroke-width:0.48078543;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1103"
|
|
||||||
width="97.342438"
|
|
||||||
height="95.154205"
|
|
||||||
x="30.990202"
|
|
||||||
y="96.114479" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer3"
|
|
||||||
inkscape:label="window"
|
|
||||||
style="display:inline"
|
|
||||||
transform="translate(-30.999176,-96.114479)">
|
|
||||||
<rect
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.47835484;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1021"
|
|
||||||
width="1.0631751"
|
|
||||||
height="88.470581"
|
|
||||||
x="30.999176"
|
|
||||||
y="102.7981" />
|
|
||||||
<path
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.48693055;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 127.23097,102.7981 v 88.47058 h 1.10168 V 102.7981 Z"
|
|
||||||
id="rect1021-9"
|
|
||||||
inkscape:connector-curvature="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.32450849;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-6-2-9-2"
|
|
||||||
width="95.168625"
|
|
||||||
height="5.0737643"
|
|
||||||
x="32.062351"
|
|
||||||
y="186.19492"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="opacity:1;fill:url(#linearGradient1094);fill-opacity:1;stroke:none;stroke-width:0.32264262;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1023-6"
|
|
||||||
width="97.333473"
|
|
||||||
height="6.6836185"
|
|
||||||
x="-128.33266"
|
|
||||||
y="96.114479"
|
|
||||||
transform="scale(-1,1)" />
|
|
||||||
<rect
|
|
||||||
style="display:inline;opacity:1;fill:url(#linearGradient1062);fill-opacity:1;stroke:none;stroke-width:0.32577717;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1023"
|
|
||||||
width="97.333466"
|
|
||||||
height="6.6836243"
|
|
||||||
x="30.999176"
|
|
||||||
y="96.114479" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
inkscape:label="contents"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1"
|
|
||||||
style="display:inline"
|
|
||||||
transform="translate(-30.999176,-96.114479)">
|
|
||||||
<path
|
|
||||||
style="fill:#e6e6e6;stroke:none;stroke-width:0.46272928;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 33.365806,121.08017 4.989638,-12.31832 c 1.088722,-2.58288 1.758941,-2.58288 5.171142,-2.58288 H 111.3019 c 3.41221,0 4.08244,0 5.17115,2.58288 l 4.98963,12.31833 z"
|
|
||||||
id="path817"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="ccccccc" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_CYAN%;fill-opacity:1;stroke:none;stroke-width:0.27960116;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909"
|
|
||||||
width="91.2556"
|
|
||||||
height="15.640329"
|
|
||||||
x="32.062351"
|
|
||||||
y="121.10081"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_ORANGE%;fill-opacity:1;stroke:none;stroke-width:0.24522424;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-5"
|
|
||||||
width="91.255592"
|
|
||||||
height="9.9996996"
|
|
||||||
x="32.062351"
|
|
||||||
y="136.74113"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_PINK%;fill-opacity:1;stroke:none;stroke-width:0.31609729;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-6-2-9"
|
|
||||||
width="91.2556"
|
|
||||||
height="10.471648"
|
|
||||||
x="32.062351"
|
|
||||||
y="175.72327"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:%COLOR_BEIGE%;fill-opacity:1;stroke:none;stroke-width:0.31184855;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect909-6-2-1"
|
|
||||||
width="91.255592"
|
|
||||||
height="28.982441"
|
|
||||||
x="32.062351"
|
|
||||||
y="146.74083"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ececec;stroke:none;stroke-width:0.48659384;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect983"
|
|
||||||
width="3.9130244"
|
|
||||||
height="65.094109"
|
|
||||||
x="123.31795"
|
|
||||||
y="121.10081" />
|
|
||||||
<rect
|
|
||||||
style="fill:#b3b3b3;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect983-7"
|
|
||||||
width="2.182373"
|
|
||||||
height="45.629673"
|
|
||||||
x="124.17254"
|
|
||||||
y="125.91673"
|
|
||||||
ry="1.1820796"
|
|
||||||
rx="1.0911865" />
|
|
||||||
<rect
|
|
||||||
style="fill:#b3b3b3;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1002"
|
|
||||||
width="0.46817124"
|
|
||||||
height="0.48868293"
|
|
||||||
x="144.64522"
|
|
||||||
y="120.98614"
|
|
||||||
rx="1.5645972"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:#b3b3b3;stroke:none;stroke-width:0.5291667;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect1002-0"
|
|
||||||
width="0.46817127"
|
|
||||||
height="0.48868293"
|
|
||||||
x="141.20036"
|
|
||||||
y="120.98614"
|
|
||||||
rx="1.5645972"
|
|
||||||
ry="0" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer4"
|
|
||||||
inkscape:label="ThreadR"
|
|
||||||
transform="translate(-0.00897398,-4.1053392)">
|
|
||||||
<g
|
|
||||||
aria-label="ThreadR"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:98.77777863px;line-height:1.25;font-family:Playball;-inkscape-font-specification:Playball;letter-spacing:0px;word-spacing:0px;fill:%COLOR_BLUE%;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
|
||||||
id="text840">
|
|
||||||
<path
|
|
||||||
d="M 66.388955,26.034411 52.461289,25.441745 q -0.987778,0 -6.519334,11.853333 -5.531555,11.754556 -9.581444,22.817667 -4.049889,11.063111 -4.049889,16.002 0,4.840111 3.062111,4.840111 3.160889,0 7.902222,-6.420555 0.493889,-0.592667 0.987778,-0.592667 0.493889,0 0.493889,0.889 0,0.889 -1.382889,3.259667 -1.284111,2.370666 -3.457222,5.136444 -2.173111,2.667 -5.630334,4.741334 -3.457222,2.173111 -7.112,2.173111 -5.432777,0 -5.432777,-7.507111 0,-9.285112 9.383888,-31.60889 6.716889,-15.705666 12.347223,-26.077333 H 42.1884 L 32.014288,24.7503 q -8.494888,0 -14.816666,2.173111 -3.457223,1.185334 -5.531556,3.556 -1.9755555,2.271889 -1.9755555,5.531556 l 0.7902225,4.148667 q 0,0.987778 -0.987778,0.987778 -1.2841112,0 -2.0743334,-2.469445 -0.7902222,-2.568222 -0.7902222,-4.445 0,-4.642556 2.1731111,-7.902222 2.1731115,-3.259667 5.9266665,-4.938889 7.112,-3.160889 15.705667,-3.160889 8.593667,0 19.459222,1.086555 10.865556,0.987778 19.755556,0.987778 8.89,0 11.557,-2.765778 0.296334,0.691445 0.296334,1.382889 0,3.259667 -4.148667,5.235223 -4.148667,1.876777 -10.964334,1.876777 z"
|
|
||||||
style="fill:%COLOR_BLUE%;fill-opacity:1;stroke-width:0.26458332"
|
|
||||||
id="path841"
|
|
||||||
inkscape:connector-curvature="0" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 752 B |
|
@ -1,9 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;%CONTENT_DIR%/" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p> Nope. </p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
|
@ -1,31 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
$navbar="home";
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Home</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1>
|
|
||||||
<center>Welcome to</center>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<img src="%CONTENT_DIR%/img/ThreadR.svg" alt="ThreadR" height="100%" width="100%">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,7 +0,0 @@
|
||||||
# A short description of each file
|
|
||||||
### [index.php](./index.php)
|
|
||||||
should be obvious, accepts a $_GET variable to display error messages: error=<credentials|session>
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
||||||
### [redirect.php](./redirect.php)
|
|
||||||
does some tasks for login and redirects to the user’s personal feed page
|
|
|
@ -1,56 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
$navbar = "login";
|
|
||||||
if (isset($_SESSION['user_id'])){
|
|
||||||
%FORCE_LOGOUT%
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Log In</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<br />
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1> <center>Log in to your ThreadR account</center> </h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<section>
|
|
||||||
<p>
|
|
||||||
<?php
|
|
||||||
if (isset($_GET['error'])){
|
|
||||||
if ($_GET['error'] == "credentials"){
|
|
||||||
echo "Invalid credentials. Try again:";
|
|
||||||
}
|
|
||||||
if ($_GET['error'] == "session"){
|
|
||||||
echo "You are not logged in or your session has been closed. We are sorry for the inconvenience.";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "Login:";
|
|
||||||
}
|
|
||||||
?></p>
|
|
||||||
<form action="%CONTENT_DIR%/login/redirect.php" method="post">
|
|
||||||
<input type="text" name="username" maxlength="20" placeholder="Username" />
|
|
||||||
<input type="password" name="password" maxlength="256" placeholder="Password" />
|
|
||||||
<p></p>
|
|
||||||
<input type="submit" value="Log in" />
|
|
||||||
</form>
|
|
||||||
<p></p>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
<div class="item-3 margin">
|
|
||||||
<p></p>
|
|
||||||
<a href="%CONTENT_DIR%/signup/"> <button> Register </button> </a>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,29 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
|
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
|
||||||
$statement = $pdo->prepare('SELECT id, authentication_algorithm, authentication_salt, authentication_string FROM users WHERE name = :username;');
|
|
||||||
$result = $statement->execute(array('username' => $_POST['username']));
|
|
||||||
if ($statement->rowCount() > 0) {
|
|
||||||
//existing user name
|
|
||||||
$dbentry = $statement->fetch();
|
|
||||||
//chechk for correct password
|
|
||||||
if ($dbentry['authentication_string'] == hash($dbentry['authentication_algorithm'], $_POST['password'] . $dbentry['authentication_salt'])) {
|
|
||||||
//password correct
|
|
||||||
$_SESSION['user_id'] = $dbentry['id'];
|
|
||||||
// IP and user agent string are used to prevent cheap session stealing
|
|
||||||
$_SESSION['user_ip'] = $_SERVER['REMOTE_ADDR'];
|
|
||||||
$_SESSION['user_http_user_agent'] = $_SERVER['HTTP_USER_AGENT'];
|
|
||||||
header("Location: https://%DOMAIN_NAME%%CONTENT_DIR%/userhome/");
|
|
||||||
} else {
|
|
||||||
//password inorrect
|
|
||||||
header("Location: https://%DOMAIN_NAME%%CONTENT_DIR%/login/?error=credentials");
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//wrong user name
|
|
||||||
header("Location: https://%DOMAIN_NAME%%CONTENT_DIR%/login/?error=credentials");
|
|
||||||
die();
|
|
||||||
}
|
|
||||||
?>
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Short documentation of all files
|
|
||||||
### [index.php](./index.php)
|
|
||||||
Self-Explanatory
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,29 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
$navbar = "logout";
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Home</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<br />
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1>
|
|
||||||
<center>Bye! Cya around some time soon.</center>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<img src="%CONTENT_DIR%/img/ThreadR.svg" alt="ThreadR" height="100%" width="100%">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,5 +0,0 @@
|
||||||
# Short description of each file
|
|
||||||
### [index.php](./index.php)
|
|
||||||
Well, guess what?
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
$navbar = "news";
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - News</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<br />
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1>
|
|
||||||
<center>ThreadR Newsfeed</center>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<ul class="list">
|
|
||||||
<li><p> 2020-02-21 Whole Website updated: Homepage, News, Boards, About, Log In, Userhome, Log Out</p></li>
|
|
||||||
<li><p> 2020-01-06 First Steps done </p></li>
|
|
||||||
<li><pre> @ my fellow devs: Yeeee! This will be gone once the DB table is in place. Don't bother. </pre></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Short documentation of each file
|
|
||||||
### [index.php](./index.php)
|
|
||||||
Fairly obvious, if you ask me.
|
|
||||||
Accepts a $_GET variable: action=<[not present]|edit>
|
|
||||||
### [default.php](./default.php)
|
|
||||||
shown by default, loaded via include()
|
|
||||||
### [edit.php](./edit.php)
|
|
||||||
profile edit page, loaded via include()
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,10 +0,0 @@
|
||||||
<?php
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
?>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<center><h1><?php echo " $username "; ?> </h1></center>
|
|
||||||
<a href="%CONTENT_DIR%/profile/?action=edit">
|
|
||||||
<button>Edit Profile</button>
|
|
||||||
</a>
|
|
||||||
</section>
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?php
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
?>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<center><h1><?php echo " $username "; ?> </h1></center>
|
|
||||||
<form action="%CONTENT_DIR%/profile/" method="post">
|
|
||||||
<input type="text" name="name" maxlength="20" placeholder="First name"/>
|
|
||||||
<input type="text" name="email" placeholder="E-mail"/>
|
|
||||||
<input type="text" name="biography" maxlength="2000" placeholder="Describe yourself"/>
|
|
||||||
<input type="text" name="website" maxlength="127" placeholder="Website">
|
|
||||||
<button>Save Profile</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
|
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
$statement = $pdo->prepare("SELECT name FROM users WHERE id=:uid"); // to be replaced with optional user name off the user data table
|
|
||||||
$statement->execute(array("uid"=>$_SESSION[user_id]));
|
|
||||||
$dbentry = $statement->fetch();
|
|
||||||
$username = $dbentry[name];
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$navbar = "profile";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Profile</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<center><h1>ThreadR</h1></center>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<?php
|
|
||||||
if(isset($_GET['action'])) {
|
|
||||||
if($_GET['action']=='edit') {
|
|
||||||
include("./edit.php");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
include("./default.php");
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,10 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;%CONTENT_DIR%/" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p> Your browser seems to not support redirects. <br />
|
|
||||||
Please klick the following link to continue: <a href="%CONTENT_DIR%/"> Go to home page... </a></p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,8 +0,0 @@
|
||||||
# Short description for each file
|
|
||||||
### [[DIR] verify-email](./verify-email)
|
|
||||||
the folder containing the email verification page
|
|
||||||
### [index.php](./index.php)
|
|
||||||
You can figure that out on your own.
|
|
||||||
Interesting fact about this page: Will force-logout the user without notice.
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
$navbar = "signup";
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Sign Up</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1><center>Create your ThreadR account</center></h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<section>
|
|
||||||
<p>Sign up:</p>
|
|
||||||
<form action="%CONTENT_DIR%/signup/verify-email/" method="post">
|
|
||||||
<p>Username: <input type="text" name="username" placeholder="Username" /> </p>
|
|
||||||
<p>E-mail: <input type="text" name="email" placeholder="email@example.com" /> </p>
|
|
||||||
<p>Password: <input type="password" name="password" placeholder="Password" /> </p>
|
|
||||||
<p>Password confirmation: <input type="password" name="password_confirm" placeholder="Confirm password" /> </p>
|
|
||||||
<input type="submit" value="Register" />
|
|
||||||
</form>
|
|
||||||
<p></p>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,7 +0,0 @@
|
||||||
# Files
|
|
||||||
### [index.php](./index.php)
|
|
||||||
obvious
|
|
||||||
### [redirect.php](./redirect.php)
|
|
||||||
activates the user after the email has been verified
|
|
||||||
### [README.md](./README.php)
|
|
||||||
this file
|
|
|
@ -1,60 +0,0 @@
|
||||||
<?php
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
|
|
||||||
//permitted chars for password salt
|
|
||||||
$permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&/()[]$:?_';
|
|
||||||
|
|
||||||
//generates password salt
|
|
||||||
function generate_salt($input, $strength = 5) {
|
|
||||||
$input_length = strlen($input);
|
|
||||||
$random_string = '';
|
|
||||||
for($i = 0; $i < $strength; $i++) {
|
|
||||||
$random_character = $input[random_int(0, $input_length - 1)];
|
|
||||||
$random_string .= $random_character;
|
|
||||||
}
|
|
||||||
return $random_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
//for token generation
|
|
||||||
$token_salt = generate_salt($permitted_chars);
|
|
||||||
$token_hashes = hash("crc32", $_POST['email']) . hash("crc32", $_POST['username']);
|
|
||||||
$token = str_shuffle($token_hashes . $token_salt);
|
|
||||||
|
|
||||||
//for password hashing
|
|
||||||
$password_salt = generate_salt($permitted_chars);
|
|
||||||
$password_hash_method = "sha256";
|
|
||||||
|
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
|
||||||
//$statement = $pdo->prepare('');
|
|
||||||
$navbar = "verify-email";
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR - Verification</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<h1>
|
|
||||||
<center>E-mail verification</center>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<section>
|
|
||||||
<p>Please send an e-mail containing the following token to <a class="pink-b" href="mailto:signup@lostcave.ddnss.de?subject=ThreadR%20-%20Verification&body=<?php echo $token; ?>">signup@lostcave.ddnss.de</a>:</p>
|
|
||||||
<form action="%CONTENT_DIR%/signup/verify-email/redirect.php" method="post">
|
|
||||||
<p>Token: <?php echo $token; ?></p>
|
|
||||||
<input type="submit" value="Done, sign me up!" />
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<?php
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
?>
|
|
406
src/style.css
406
src/style.css
|
@ -1,406 +0,0 @@
|
||||||
.container{
|
|
||||||
display: grid;
|
|
||||||
grid-template-rows: 100px;
|
|
||||||
grid-template-columns: 1fr 3fr 1fr;
|
|
||||||
grid-gap: 10px;
|
|
||||||
grid-auto-rows: minmax(100px, auto);
|
|
||||||
padding: 25px 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.beige {
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.orange {
|
|
||||||
color: %COLOR_ORANGE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.blue {
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pink {
|
|
||||||
color: %COLOR_PINK%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cyan {
|
|
||||||
color: %COLOR_CYAN%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.beige-b {
|
|
||||||
background-color: %COLOR_BEIGE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.orange-b {
|
|
||||||
background-color: %COLOR_ORANGE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.blue-b {
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pink-b {
|
|
||||||
background-color: %COLOR_PINK%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cyan-b {
|
|
||||||
background-color: %COLOR_CYAN%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: clip;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.item-1 {
|
|
||||||
grid-column: 2 / 3;
|
|
||||||
grid-row: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.item-2 {
|
|
||||||
grid-column: 2 / 3;
|
|
||||||
grid-row: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.item-3 {
|
|
||||||
grid-column: 2 / 3;
|
|
||||||
grid-row: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.item-4 {
|
|
||||||
grid-column: 2 / 3;
|
|
||||||
grid-row: 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.margin {
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
margin-left: 16px;
|
|
||||||
margin-right: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.postcontent {
|
|
||||||
padding: 40px 0px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.banner {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0px;
|
|
||||||
background-color: %COLOR_BEIGE%;
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
font-family: monospace;
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
font-family: monospace;
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
i {
|
|
||||||
font-family: monospace;
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
font-family: monospace;
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
font-family: monospace;
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 14px 20px;
|
|
||||||
margin: 8px 0;
|
|
||||||
background-color: %COLOR_BEIGE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=text], select {
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
display: inline-block;
|
|
||||||
border: 1px solid %COLOR_BLUE%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
box-shadow: inset 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=password], select {
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
display: inline-block;
|
|
||||||
border: 1px solid %COLOR_BLUE%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
box-shadow: inset 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=submit] {
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=submit]:hover {
|
|
||||||
background-color: %COLOR_CYAN%;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
font-family: monospace;
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 14px 20px;
|
|
||||||
margin: 8px 0;
|
|
||||||
background-color: %COLOR_BEIGE%;
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
display: inline-block;
|
|
||||||
border: 1px solid %COLOR_BLUE%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
box-shadow: inset 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
font-family: monospace;
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
color: white;
|
|
||||||
padding: 14px 20px;
|
|
||||||
margin: 8px 0;
|
|
||||||
width: 100%;
|
|
||||||
border: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background-color: %COLOR_CYAN%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
|
||||||
font-family: monospace;
|
|
||||||
color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
time {
|
|
||||||
font-family: monospace;
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.round-border {
|
|
||||||
border: 1px solid %COLOR_BLUE%;
|
|
||||||
padding: 14px 20px;
|
|
||||||
margin: 8px 0;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
img.available_space {
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.image_container {
|
|
||||||
border: 1px solid %COLOR_BLUE%;
|
|
||||||
padding: 0.5em 0.5em;
|
|
||||||
background-color: #f0f0f0;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.image_container {
|
|
||||||
font-size: 0.8em;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.topnav {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
box-shadow: 0 0.7em 1.2em 0 rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.topnav li {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.topnav li a {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 1em;
|
|
||||||
padding: 1.2em 1.3em;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.topnav li a:hover:not(.active) {
|
|
||||||
background-color: %COLOR_CYAN%;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.topnav li a.active {
|
|
||||||
background-color: %COLOR_PINK%;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.topnav li.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@media screen and (max-width: 600px) {
|
|
||||||
ul.topnav li.right,
|
|
||||||
ul.topnav li {float: none;}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
ul.topnav img {
|
|
||||||
height: 2.55em;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.topnav li a.icon {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 1em;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 5.4px 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* invisible spacer under nav bar */
|
|
||||||
div.topnav {
|
|
||||||
height: 3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.list {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.list li {
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.list li a {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 1em;
|
|
||||||
padding: 14px 16px;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.list li a:hover:not(.active) {
|
|
||||||
background-color: %COLOR_CYAN%;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.list li a.active {
|
|
||||||
background-color: %COLOR_PINK%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-content {
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown:hover .dropdown-content {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown {
|
|
||||||
float: left;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown .dropbtn {
|
|
||||||
font-size: 1em;
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
padding: 1.2em 1.3em;
|
|
||||||
background-color: inherit;
|
|
||||||
font-family: inherit;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.dropdown {
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
text-align: center;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 1em;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown:hover:not(.active) {
|
|
||||||
background-color: %COLOR_CYAN%;
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
margin-left: 16px;
|
|
||||||
margin-right: 16px;
|
|
||||||
border-radius: 5px;
|
|
||||||
border: 1px solid %COLOR_BLUE%;
|
|
||||||
background-color: %COLOR_ORANGE%;
|
|
||||||
padding: 14px 20px;
|
|
||||||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
article {
|
|
||||||
border-radius: 5px;
|
|
||||||
border: 1px solid %COLOR_BLUE%;
|
|
||||||
background-color: %COLOR_BEIGE%;
|
|
||||||
padding: 14px 20px;
|
|
||||||
box-shadow: inset 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
border-radius: 0px;
|
|
||||||
border: none;
|
|
||||||
background-color: %COLOR_BLUE%;
|
|
||||||
color: %COLOR_BEIGE%;
|
|
||||||
margin: -40px;
|
|
||||||
padding: 40px 40px 10px 40px;
|
|
||||||
box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1.post{
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.post_reply {
|
|
||||||
margin: 0.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.post_reply {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
button.post_reply {
|
|
||||||
width: auto;
|
|
||||||
margin: 0.1em;
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
## Short documentation of all files
|
|
||||||
### [index.php](./index.php)
|
|
||||||
Self-Explanatory
|
|
||||||
### [README.md](./README.md)
|
|
||||||
this file
|
|
|
@ -1,43 +0,0 @@
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
%PLEAZE_NO_CACHE%
|
|
||||||
%SET_LOGIN_VARIABLE%
|
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
|
||||||
%REQUIRE_LOGIN%
|
|
||||||
|
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
$statement = $pdo->prepare("SELECT name FROM users WHERE id=:uid"); // to be replaced with optional user name off the user data table
|
|
||||||
$statement->execute(array("uid"=>$_SESSION[user_id]));
|
|
||||||
$dbentry = $statement->fetch();
|
|
||||||
$username = $dbentry[name];
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
$navbar = "home";
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>ThreadR</title>
|
|
||||||
%STYLESHEET%
|
|
||||||
%FAVICON%
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
%NAVBAR%
|
|
||||||
<div class="container">
|
|
||||||
<div class="item-1">
|
|
||||||
<center><h1>ThreadR</h1></center>
|
|
||||||
</div>
|
|
||||||
<div class="item-2">
|
|
||||||
<center><h3><?php echo "Welcome back, "; echo "$username"; echo "!";?> </h3></center>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
%BANNER_COOKIES%
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue