diff --git a/.gitignore b/.gitignore index ac29bb403c..feb702cb86 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ /phpBB/styles/* !/phpBB/styles/prosilver !/phpBB/styles/all +/phpBB/node_modules /phpBB/vendor /tests/phpbb_unit_tests.sqlite* /tests/test_config*.php diff --git a/.travis.yml b/.travis.yml index 19251d6155..bdcc354641 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,11 @@ matrix: - php: nightly fast_finish: true +addons: + apt: + sources: + - node + services: - redis-server @@ -46,6 +51,7 @@ script: - travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS - travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION $NOTESTS ./ + - travis/check-stylesheet.sh $NOTESTS - sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi" - sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi" - sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi" diff --git a/phpBB/package.json b/phpBB/package.json new file mode 100644 index 0000000000..fc85b20a99 --- /dev/null +++ b/phpBB/package.json @@ -0,0 +1,34 @@ +{ + "name": "phpbb", + "version": "3.3.0-dev", + "description": "phpBB Forum Software application", + "main": " ", + "directories": { + "doc": "docs" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/phpbb/phpbb.git" + }, + "keywords": [ + "phpBB", + "phpbb", + "forum", + "php", + "software", + "community" + ], + "author": "", + "license": "GPL-2.0", + "bugs": { + "url": "https://tracker.phpbb.com" + }, + "homepage": "https://www.phpbb.com", + "devDependencies": { + "stylelint": "^7.7.1", + "stylelint-order": "^0.3.0" + } +} diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index c4eead7027..009d31ecab 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -93,9 +93,9 @@ p.right { } p.jumpbox-return { + float: left; margin-top: 10px; margin-bottom: 0; - float: left; } b, @@ -1128,10 +1128,10 @@ ul.linklist:after, } .emoji { - min-height: 18px; + width: 1em; min-width: 18px; height: 1em; - width: 1em; + min-height: 18px; } .smilies { @@ -1299,18 +1299,17 @@ ul.linklist:after, } .badge { - border-radius: 10px; - opacity: 0.8; - text-align: center; - white-space: nowrap; font-size: 10px; line-height: 1; - float: right; - display: inline-block; - margin-left: 3px; - vertical-align: baseline; + text-align: center; + white-space: nowrap; + border-radius: 10px; + opacity: 0.8; position: relative; top: 3px; + display: inline-block; + float: right; + margin-left: 3px; padding: 4px 6px; } diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index a07876917d..88376d3430 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -515,11 +515,11 @@ blockquote cite > div { /* Code block */ .codebox { font-size: 1em; + word-wrap: normal; border: 1px solid transparent; + overflow-x: scroll; margin: 1em 0 1.2em; padding: 3px; - overflow-x: scroll; - word-wrap: normal; } .codebox p { diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css index ef4b398dd6..bc606e9723 100644 --- a/phpBB/styles/prosilver/theme/responsive.css +++ b/phpBB/styles/prosilver/theme/responsive.css @@ -623,7 +623,6 @@ } @media (min-width: 701px) and (max-width: 950px) { - ul.topiclist dt { margin-right: -410px; } diff --git a/travis/check-stylesheet.sh b/travis/check-stylesheet.sh new file mode 100755 index 0000000000..a834833399 --- /dev/null +++ b/travis/check-stylesheet.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# This file is part of the phpBB Forum Software package. +# +# @copyright (c) phpBB Limited +# @license GNU General Public License, version 2 (GPL-2.0) +# +# For full copyright and license information, please see +# the docs/CREDITS.txt file. +# +set -e +set +x + +NOTESTS=$1 + +if [ "$NOTESTS" == '1' ] +then + cd phpBB + # Define a node version. + TRAVIS_NODE_VERSION="4" + + # Clear out whatever version of NVM Travis has. + # Their version of NVM is probably old. + rm -rf ~/.nvm + # Grab NVM. + git clone https://github.com/creationix/nvm.git ~/.nvm > /dev/null + # Checkout the latest stable tag. + # Note that you can just hardcode a preferred version here. + (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) + # Install the desired version of Node + source ~/.nvm/nvm.sh + nvm install $TRAVIS_NODE_VERSION > /dev/null + npm install -g > /dev/null + npm install > /dev/null + set -x + stylelint --config ../.stylelintrc "styles/prosilver/theme/*.css" + # Disable admin stylelint for now + # stylelint --config ../.stylelintrc "adm/style/*.css" +fi