# Welcome!
Hey there! If for some reason you're interested in the code that runs this website, good news, that's exactly what will be provided here!


# Dependencies
A reasonably modern version of PHP, including specifically (in terms of Debian/Ubuntu packages):
```
php-mysql php-xml
```

You will also need:
* Our downloads folder mounted on (or symlinked from, or sync'd to) /mnt/website/downloads
* Our uploads folder mounted on (or symlinked from, or sync'd to) /mnt/website/uploads-ng

If you want uploads to work properly you'll want to configure a higher limit. You can just use the config(s) in {rPHPCONFIG} if you're in GMCL. If not then sry (but also it's weird because this isn't super useful as a template website or anything, though I //do// license it under the AGPL).


# License
Much of the code written and used to run this website is licensed AGPLv3. Exceptions and specifics are as follows:

Font Awesome is available under the SIL OFL 1.1 (for the font files) and the "MIT" license (for the CSS files). See http://fontawesome.io for details.

Breeze icons are available under the LGPLv3. See https://api.kde.org/frameworks-api/frameworks-apidocs/frameworks/breeze-icons/html/index.html for details.

The "Muli" and "Michroma" fonts were created by Vernon Adams, and are available under the SIL OFL 1.1. 


# Development requirements

## Process

Users within GMCL //must// use the `arc` commandline tool and submit changes for review using `arc diff` before committing. A good idea is to run `arc lint` before you do this, to see if there are any automatically detected problems (syntactical or stylistic), although this will also be run by `arc diff`.

The coding style is admittedly fairly lax, with many exceptions to and deviations from existing standards (particularly for Keith's love of tabs), but do pay heed to linting warnings.

If/when the changes are approved, then and only then should you commit changes, using `arc commit` rather than svn directly.

## Install

As mentioned above, you MUST install and use `arc`:
* arc: https://secure.phabricator.com/book/phabricator/article/arcanist/

You will likely need to install the following linting dependencies as well:
* npm: `sudo apt install npm`
* node: `sudo apt install nodejs-legacy` (or create an alias or symlink yourself)
* csslint: `sudo npm install -g csslint`
* jshint: `sudo npm install -g jshint`
* phpcs: `sudo apt install php-codesniffer`


# Development notes

## Design

### Colors

The main sections of the website are somewhat color coded, but overall the site is very much black atop white with blue accenting. The color theme is initially based on the [Breeze color theme](https://community.kde.org/KDE_Visual_Design_Group/HIG/Color), combined with lingering bootstrap defaults, and muted in hollow pursuit of professionalism. Clickable elements are generally further muted by a darkening (ie. reduced luminosity, ie. reduced "Value" in HSV lingo), and that scheme should be followed otherwise things might stand out in a bad way.

Key values in use are:

* Bootstrap blue: #337ab7 | Used for links, generic buttons
* Category colors:
** About: #2980b9
** Help: #fdbc4b
** Contact: (default)
** Downloads: #186e3c
** Uploads: #592a6e
* PDF red: #ae2323

### Styling

The website currently uses Bootstrap 4 as the style baseline and framework. Our theming is partially manual overrides in [gmcl.css](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/website-2016/css/gmcl.css) (which was the Bootstrap 3 approach), and partially handled by generating the bootstrap CSS using SASS (which is both made possible, and made necessary in some respects, by Bootstrap 4). Within GMCL, see [The bootstrap repo](http://phabricator.gmcl.internal/diffusion/BOOTSTRAP/) for the SASS sources and documentation.

## Favicon and mobile-app styling

Making Favicons and app-y styling work everywhere is hilariously complicated for quite minuscule gains. Lets do it anyways! 

If you update the Favicon, you'll have to update some or all of the following files:

```
android-chrome-192x192.png
android-chrome-512x512.png
apple-touch-icon.png
browserconfig.xml
favicon-16x16.png
favicon-32x32.png
favicon.ico
mstile-150x150.png
safari-pinned-tab.svg
site.webmanifest
```

## Generation

The contents of `website-2016` are not alone enough to develop our website. Materials are drawn from elsewhere, namely:

* Bootstrap CSS generation: See [Styling](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/website-2016#styling) above.
* In [raw-materials](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/),
** [brochures](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/brochures): run [./generate-all.sh](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/brochures/generate_all.sh), see script for details.
** [dbdoc_workshop_2018](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/dbdoc_workshop_2018/): Requires [Scribus](https://www.scribus.net/).
** [manual](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/manual): Externally referred to as the "User Guide". Run [./generate-manuals.sh](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/manual/generate-manuals.sh). Requires pdftk (ex. `apt install pdftk`).
** [sitemap](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/sitemap): Run [./generator.sh](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/sitemap/generator.sh). Automatically spits out updated map into website working copy.
** [tutorials](http://phabricator.gmcl.internal/diffusion/WEBSITE/browse/trunk/raw-materials/tutorials): I hate to break it to you but you're going to have to use a mostly-abandoned Adobe product (see {T149} for alternate hopes and history).
