From 786a3d7ad13c36645fbf9a6f0c64444dad5d017e Mon Sep 17 00:00:00 2001 From: akpu1 Date: Sat, 18 Jun 2016 15:08:16 +1000 Subject: Replaced dist{...} with dist.json --- Gruntfile.js | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 4438b94..18318b0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,25 +2,7 @@ module.exports = function (grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), swig: { - dist: { - init: { - allowErrors: false - }, - banners: grunt.file.readJSON('templates/banners.json'), - dest: 'dist', - generateRobotstxt: false, - generateSitemap: false, - max_upload_size: 128, - pkgVersion: '<%= pkg.version %>', - production: false, - siteName: 'Pantsu', - siteUrl: 'https://pantsu.cat/', - src: [ - 'templates/index.swig', - 'templates/faq.swig', - 'templates/tools.swig' - ], - } + dist: grunt.file.readJSON('dist.json'), }, htmlmin: { dist: { -- cgit v1.2.3 From 7ac985d48ff9306498362b121244c2cc08647b5c Mon Sep 17 00:00:00 2001 From: akpu1 Date: Sat, 18 Jun 2016 15:09:49 +1000 Subject: Remove banners.json, add dist.json dist.json replaces dist{...} and encompasses banners.json --- dist.json | 25 +++++++++++++++++++++++++ templates/banners.json | 4 ---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 dist.json delete mode 100644 templates/banners.json diff --git a/dist.json b/dist.json new file mode 100644 index 0000000..8016939 --- /dev/null +++ b/dist.json @@ -0,0 +1,25 @@ +{ + "init": { + "allowErrors": false + }, + "dest": "dist", + "pkgVersion": "<%= pkg.version %>", + "banners": [ + "banners/malware_scans.swig", + "banners/donations.swig" + ], + "src": [ + "templates/index.swig", + "templates/faq.swig", + "templates/tools.swig" + ], + "generateRobotstxt": false, + "generateSitemap": false, + "max_upload_size": 128, + "production": false, + "siteName": "Pantsu", + "siteUrl": "https://pantsu.cat/", + "paypalUrl": "", + "bitcoinAddress": "", + "flattrUrl": "" +} diff --git a/templates/banners.json b/templates/banners.json deleted file mode 100644 index 6cefb70..0000000 --- a/templates/banners.json +++ /dev/null @@ -1,4 +0,0 @@ -[ - "banners/malware_scans.swig", - "banners/donate.swig" -] -- cgit v1.2.3 From 3f696ed6f463d5182915ea5c2c59275da1df4654 Mon Sep 17 00:00:00 2001 From: akpu1 Date: Sat, 18 Jun 2016 15:11:40 +1000 Subject: Made donation banner more general Made language more general Replaced static links with vars Made showing button conditonal on having matching info --- templates/banners/donate.swig | 17 ----------------- templates/banners/donations.swig | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 17 deletions(-) delete mode 100644 templates/banners/donate.swig create mode 100644 templates/banners/donations.swig diff --git a/templates/banners/donate.swig b/templates/banners/donate.swig deleted file mode 100644 index dcd7f7c..0000000 --- a/templates/banners/donate.swig +++ /dev/null @@ -1,17 +0,0 @@ -

- pomf.se is a free service, but our hosting bill isn't — we need almost $100 a month for that. Donations help keep pomf.se free, online, and fast. Everything (after fees) goes to the hosting bill. - -

diff --git a/templates/banners/donations.swig b/templates/banners/donations.swig new file mode 100644 index 0000000..884f4ba --- /dev/null +++ b/templates/banners/donations.swig @@ -0,0 +1,23 @@ +

+ {{siteName}} is free to use, but our hosting costs are far from it — donations are what keep {{siteName}} alive, free, and fast. + +

-- cgit v1.2.3 From d8f3db5cb0c665a66ddc5ae7f0af2ec37c2dd0b5 Mon Sep 17 00:00:00 2001 From: akpu1 Date: Sat, 18 Jun 2016 15:13:38 +1000 Subject: Updated readme to clarify front and back end settings --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5ebf9f3..c8bbea3 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,9 @@ After this, the pomf site is now compressed and set up inside `dist/`. ## Configuring -The majority of the settings are in `static/includes/settings.inc.php`. +Front-end related settings, such as the name of the site, and maximum allowable file size, are found in `templates/site_variables.json`. Changes made here will only take effect after rebuilding the site pages. This may be done by running `grunt` from the root of the site directory. -For file size configuration, open `Gruntfile.js` in an editor and modify the -`max_upload_size` value. The value is expressed in mebibytes (MiB). Run `grunt` -again to rebuild the pages for the changes to take effect. +Back-end related settings, such as database configuration, and path for uploaded files, are found in `static/php/includes/settings.inc.php`. Changes made here take effect immediately. If you intend to allow uploading files larger than 2 MB, you may also need to increase POST size limits in `php.ini` and webserver configuration. For PHP, -- cgit v1.2.3