diff --git a/.babelrc b/.babelrc index 934375b6..fde4c1ad 100644 --- a/.babelrc +++ b/.babelrc @@ -18,13 +18,16 @@ "backpack-core/babel" ], "plugins": [ - ["module-resolver", { - "root": ["./"], - "alias": { - "~": ".", - "@": "." + [ + "module-resolver", + { + "root": ["./"], + "alias": { + "~": ".", + "@": "." + } } - }] + ] ] } } diff --git a/.travis.yml b/.travis.yml index 0b51cdc3..32785285 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,20 +4,19 @@ language: node_js node_js: - '8' before_install: -# Remove hte line below once node 9 moves to LTS (and so does this repo) +# Remove the line below once node 9 moves to LTS (and npm 5 is standard) - npm install -g npm@5 - npm install -g greenkeeper-lockfile@1 -# Deploy key used to push to the server -- openssl aes-256-cbc -K $encrypted_1cd83addbd20_key -iv $encrypted_1cd83addbd20_iv - -in deploy-key.enc -out deploy-key -d install: - npm install before_script: -- greenkeeper-lockfile-upload +- greenkeeper-lockfile-update script: +- cp local.config.js.tmpl local.config.js +- npm run build - npm run test -after_success: -- bash bin/deploy.sh +after_script: +- greenkeeper-lockfile-upload env: global: # GH_TOKEN used for greenkeeper-lockfile diff --git a/README.md b/README.md index a2454f3d..d6b9ad73 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ $ npm install $ npm run dev # build for production and launch server +$ npm run build $ npm start ``` diff --git a/assets/style/partials/_cards.scss b/assets/style/partials/_cards.scss index ee5dafe5..651e9cbf 100644 --- a/assets/style/partials/_cards.scss +++ b/assets/style/partials/_cards.scss @@ -7,4 +7,20 @@ .tab-content.card-body { padding: 0; } + + &.options-card { + font-size: $font-size-sm; + margin-top: 0; + + .card-header { + background-color: $gray-100; + text-align: center; + padding: $list-group-item-padding-y $list-group-item-padding-x; + } + } + + .search-control { + border-radius: 100px; + padding: 0.5rem 0.75rem; + } } diff --git a/assets/style/partials/_tables.scss b/assets/style/partials/_tables.scss index 332e37e9..2cbd2c65 100644 --- a/assets/style/partials/_tables.scss +++ b/assets/style/partials/_tables.scss @@ -1,10 +1,10 @@ .table { display: table; + width: 100%; font-size: $font-size-sm; margin-bottom: 0; background-color: $white; border: $table-border-width solid $table-border-color; - overflow-y: auto; th { font-weight: 400; @@ -16,19 +16,4 @@ td { vertical-align: middle; } - - .markdown { - h1, h2, h3, h4, h5, h6 { - font-family: $font-family-base; - margin-bottom: 5px; - font-size: $font-size-sm; - text-transform: uppercase; - font-weight: 600; - } - - p { - margin: 0; - margin-bottom: 5px; - } - } } \ No newline at end of file diff --git a/assets/style/partials/_transitions.scss b/assets/style/partials/_transitions.scss index 8b7185cf..7338f98d 100644 --- a/assets/style/partials/_transitions.scss +++ b/assets/style/partials/_transitions.scss @@ -8,12 +8,9 @@ opacity: 0; } -.fade-up-enter-active { - transition: all .3s ease; -} - +.fade-up-enter-active, .fade-up-leave-active { - transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0); + transition: all .3s ease; } .fade-up-enter, diff --git a/bin/README.md b/bin/README.md deleted file mode 100644 index c59a4713..00000000 --- a/bin/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Deployments - -We're running a continuous deployment process to push LibCrowds -updates out to all specified servers. - -Here are some notes to help configure a new server: - -``` bash -# install node and npm -sudo apt-get install python-software-properties -curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - -sudo apt-get install nodejs - -# install nginx -sudo apt-get install nginx - -# remove default nginx config -sudo rm /etc/nginx/sites-available/default - -# create nginx config (copy /contrib/frontend) -vim /etc/nginx/sites-available/frontend - -# enable nginx config -sudo ln -s /etc/nginx/sites-available/frontend /etc/nginx/sites-enabled/frontend - -# restart nginx -sudo service nginx restart - -# create an empty repo -mkdir -p /var/www/deployment/.git -cd /var/www/deployment/.git -git init --bare - -# create an empty directory for deployments -mkdir /var/www/frontend - -# create a post-receive hook (copy /contrib/post-receive) -cd hooks -vim post-receive - -# make the script executable -chmod +x /var/www/deployment/.git/hooks/post-receive - -# create a user with restricted access -adduser deploy - -# give that user ownership -chown -R deploy:deploy /var/www/deployment/.git -chown -R deploy:deploy /var/www/frontend - -# switch to that user -su - deploy - -# create the public key (copy /contrib/deploy-key.pub) -mkdir ~/.ssh -vim ~/.ssh/authorized_keys - -# restrict permissions -chmod 700 .ssh -chmod 600 .ssh/authorized_keys -``` - -You can now exit the server and modify [/bin/deploy.sh](/bin/deploy.sh) accordingly. diff --git a/bin/configure.sh b/bin/configure.sh deleted file mode 100755 index 1d0519e9..00000000 --- a/bin/configure.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -SETTINGS="https://github.com/LibCrowds/libcrowds-frontend-settings" - -# Configure site -rm local.config.js -rm -rf custom/*/ -git clone $SETTINGS custom/settings -echo "module.exports = require('./custom/settings/siteConfig.js')" >> local.config.js diff --git a/bin/deploy.sh b/bin/deploy.sh deleted file mode 100644 index 1989f5cb..00000000 --- a/bin/deploy.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -MASTER='www.libcrowds.com' -STAGING='dev.libcrowds.com' - -if [ "${TRAVIS_BRANCH}" == "master" -a "$TRAVIS_PULL_REQUEST" = "false" ] || [ "${TRAVIS_BRANCH}" == "dev" -a "$TRAVIS_PULL_REQUEST" = "false" ] ; then - - # Build - npm run build - - # Clear git info - rm -rf .git - rm -rf .gitignore - - # Set up package for sending - git init - - if [ "${TRAVIS_BRANCH}" == "master" ] ; then - git remote add deploy "deploy@$MASTER:/var/www/deployment" - else - git remote add deploy "deploy@$STAGING:/var/www/deployment" - fi - - git config user.name "Alex Mendes" - git config user.email "alexanderhmendes@gmail.com" - git add .nuxt/dist/* - git commit -m "Deployment" - - # Set up permissions - if [ "${TRAVIS_BRANCH}" == "master" ] ; then - echo -e "Host $MASTER\n\tStrictHostKeyChecking no" >> ~/.ssh/config - else - echo -e "Host $STAGING\n\tStrictHostKeyChecking no" >> ~/.ssh/config - fi - - openssl aes-256-cbc -K $encrypted_1cd83addbd20_key -iv $encrypted_1cd83addbd20_iv -in deploy-key.enc -out deploy-key -d - eval "$(ssh-agent -s)" - chmod 600 deploy-key - ssh-add deploy-key - - # Deploy - git push -f deploy master -else - echo "Not deploying as this is not the master or development branch" -fi diff --git a/components/InfiniteLoad.vue b/components/InfiniteLoad.vue index 9e89522b..c77662f5 100644 --- a/components/InfiniteLoad.vue +++ b/components/InfiniteLoad.vue @@ -15,7 +15,6 @@ diff --git a/components/buttons/ProjectContrib.vue b/components/buttons/ProjectContrib.vue index 0009a39a..97c8b812 100644 --- a/components/buttons/ProjectContrib.vue +++ b/components/buttons/ProjectContrib.vue @@ -43,8 +43,7 @@ export default { computed: { disabled () { - const progress = this.project.overall_progress - return progress && progress === 100 + return Number(this.project.overall_progress) >= 100 } } } diff --git a/components/buttons/SocialMedia.vue b/components/buttons/SocialMedia.vue index 697ef31f..f4c5665a 100644 --- a/components/buttons/SocialMedia.vue +++ b/components/buttons/SocialMedia.vue @@ -6,7 +6,7 @@ title="Share on Facebook" variant="facebook" :size="size" - @click="share(facebookUrl, 980, 620)"> + @click="share('Facebook', facebookUrl, 980, 620)"> @@ -15,7 +15,7 @@ title="Share on Twitter" variant="twitter" :size="size" - @click="share(twitterUrl, 450, 550)"> + @click="share('Twitter', twitterUrl, 450, 550)"> @@ -24,7 +24,7 @@ title="Share on Google Plus" variant="googleplus" :size="size" - @click="share(googleplusUrl, 510, 725)"> + @click="share('Google Plus', googleplusUrl, 510, 725)"> @@ -33,7 +33,7 @@ title="Share on LinkedIn" variant="linkedin" :size="size" - @click="share(linkedinUrl, 510, 520)"> + @click="share('LinkedIn', linkedinUrl, 510, 520)"> @@ -75,7 +75,13 @@ export default { }, methods: { - share (url, width, height) { + /** + * Open a new window to share the url on the chosen platform. + */ + share (platform, url, width, height) { + if (this.$ga) { + this.$ga.social(platform, 'Share', this.shareUrl) + } const specs = `scrollbars=yes,width=${width},height=${height}` const popup = window.open(url, 'Share', specs) popup.focus() diff --git a/components/cards/Announcement.vue b/components/cards/Announcement.vue index 2b7d270f..3e8a0ed6 100644 --- a/components/cards/Announcement.vue +++ b/components/cards/Announcement.vue @@ -20,7 +20,8 @@
-
+
+
@@ -47,7 +48,8 @@ export default { data () { return { imgSrc: localConfig.pybossa.host + this.announcement.media_url, - content: marked(this.announcement.title) + title: marked(this.announcement.title), + body: marked(this.announcement.body) } }, @@ -63,7 +65,7 @@ export default { * Handle navigation when the card is clicked. */ onClick () { - const url = this.announcement.body + const url = this.announcement.info.url const parser = document.createElement('a') const internal = this.isInternal(url) if (internal) { @@ -128,6 +130,7 @@ export default { } .card-title { + font-weight: 400; font-size: $font-size-sm; } diff --git a/components/cards/Base.vue b/components/cards/Base.vue new file mode 100644 index 00000000..97d7af31 --- /dev/null +++ b/components/cards/Base.vue @@ -0,0 +1,43 @@ + + + + + \ No newline at end of file diff --git a/components/cards/Project.vue b/components/cards/Project.vue index 9f4fc171..e9742c4b 100644 --- a/components/cards/Project.vue +++ b/components/cards/Project.vue @@ -1,9 +1,7 @@