Everything posted by predatorx
-
Help with gulpfile.js in Wordpress
Hello all I have created a gulpfile which I want to watch for any changes to PHP and SCSS files. When I run the gulp command in the terminal, Browser-sync starts up and the page is displayed fine. It also says it is watching files. If I try to edit a PHP or SCSS file in the terminal it says [Browsersync] Reloading Browsers..., but nothing happens. I want the SCSS to compile directly into the theme folder I have created and overwrite the style.css. I also want any changes I make to a PHP file to reload the broswer. My gulpfile is as follows: // Include gulp const gulp = require('gulp'); // Include plugins const concat = require('gulp-concat'), autoprefixer = require('gulp-autoprefixer'), sass = require('gulp-sass'), sourcemaps = require('gulp-sourcemaps'), browserSync = require('browser-sync').create(), reload = browserSync.reload; gulp.task('sass', function () { return sass('./assets/sass/style.scss', { sourcemap: true, style: 'compressed' }) .on('error', sass.logError) .pipe(autoprefixer()) .pipe(sourcemaps.write('.', { includeContent: false })) .pipe(gulp.dest('.')); }); gulp.task('browser-sync', function () { var files = [ './*.php', './template-parts/*.php', './inc/*.php', './assets/**/*.scss', 'style.css' ]; // Initialises browserSync browserSync.init(files, { proxy: "http://localhost/test/", notify: false }); }); // Watch for changes in files gulp.task('watch', function () { // Watch .scss files gulp.watch('./assets/**/*.scss', ['sass']); }); // Default task to compile css gulp.task('default', ['sass', 'browser-sync'], function () { gulp.watch('./assets/**/*.scss', ['sass']); }); Any help would be greatly appreciated.
- Font Awesome Icons Displaying Incorrect On Hover
-
Font Awesome Icons Displaying Incorrect On Hover
I have been working on a site which is using Font Awesome icons. I want them to display a different background colour on hover. I have got it to work, but the background colour is bigger than the actual icon, so the background displays around the icon. What I want is for the background to change, but not be bigger than the icon. The issue can be viewed by clicking the link above and hovering over the Facebook and Youtube social media icons. I have been trying to solve this, but with no success. Can anyone help and point me in the right direction?
- EasyAutocomplete Plugin Help
-
EasyAutocomplete Plugin Help
Hello all I am trying to use the jQuery plugin EasyAutocomplete, but I have run into an issue. I have the plugin working in test from a json file which is fine. What happens is when the user types in a search, the search list filters and the user can click on one of the dropdown enters and be taken to another page. This is working as intended. My issue is that I have a submit button and when the user selects there search term, the submit button does not do anything. You also cannot select a search term by typing in the input field and pressing enter to be taken to that page. I would like the user to be able to go to the next page by either typing in the input field and pressing enter, pressing the submit button or clicking the link they want to use. You can view the test that I have mocked up here. Can anyone help with this? If more information is needed I can try to provide it? Thanks
-
Javascript uncaught error
Hello. I have used a CodePen to try and implement a smooth scroll effect when the nav links are clicked on a site, but have run into a few issues. The smooth scroll effect works as expected, but it throws up Javascript errors with every press on the nav links. The console error is as follows: The code I have in my script file is as follows: $(document).ready(function() { var scrollLink = $('.scroll'); // SMOOTH SCROLLING scrollLink.click(function(e) { e.preventDefault(); $('body,html').animate({ scrollTop: $(this.hash).offset().top }, 1000 ); }); // ACTIVE LINK SWITCHING $(window).scroll(function() { var scrollbarLocation = $(this).scrollTop(); scrollLink.each(function() { var sectionOffset = $(this.hash).offset().top - 20; if ( sectionOffset <= scrollbarLocation ) { $(this).parent().addClass('active'); $(this).parent().siblings().removeClass('active'); } }); }); }); I'm not sure why these errors appear. I am using jQuery 2.2.4min. Can anyone help? If more information is required please let me know. You can view the site here. Thank you for your help.
-
Flexboxgrid system media queries
Hello all. I am having a play with the flexboxgrid system and have come across an issue. I would like to create a media that only works on medium screen sizes. The documentation does not seem to give you the widths of the different breakpoints that the system uses. Can anyone give me some advice on how to create a media query to only target medium screens? The flexboxgrid can be viewed here: http://flexboxgrid.com/ Thanks.
- Learn ES6
- Learn ES6
- Learn ES6
- Learn ES6
- Learn ES6
- Learn ES6
-
Google MX Records
Thanks for your reply. I will take a look into this.
-
Google MX Records
Thanks for your reply. 1and1 only gave me the SPF record to update. I updated this, but it didn't work and the emails I sent were still going to spam. I then deleted the SPF record and changed the MX record to the ones Google provide. I found those on a Google help page. I have not signed up to Google Apps. Do I need to sign up to this to use their MX records? Also will changing my MX records affect the outbound server? I can get mail fine to my 1and1 inbox, but when I reply to the email, that is when the problem occurs.
-
Google MX Records
Hello I have a domain which is hosted on 1and1.co.uk and I have set up an email inbox there. The issue I am having is that when I send emails from this inbox, they always go to the spam/junk folder of the recipent. I set up an SPF record which they gave me, but it doesn't seem to work and to be honest I'm not sure what this does. If I change my MX records to use Google, do you think this will stop the issue? Any advice would be helpful. Thanks
- Responsive Navigation
- Responsive Navigation
- Automated HTML/CSS Validation
- Icomoon fonts not showing
- Icomoon fonts not showing
-
Icomoon fonts not showing
Hello all. I am trying to place some icomoon fonts on a page, but they dont appear to be working. I have copied the fonts folder and placed it inside another folder called src. I have then amended the css to the following: @font-face { font-family: 'icomoon'; src: url('/src/fonts/icomoon.eot?vle955'); src: url('/src/fonts/icomoon.eot?vle955#iefix') format('embedded-opentype'), url('/src/fonts/icomoon.ttf?vle955') format('truetype'), url('/src/fonts/icomoon.woff?vle955') format('woff'), url('/src/fonts/icomoon.svg?vle955#icomoon') format('svg'); font-weight: normal; font-style: normal; } [class^="icon-"], [class*=" icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: 'icomoon' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .icon-phone:before { content: "\e942"; } .icon-facebook:before { content: "\ea90"; } When I check the page, the only thing that appears is a square with some random characters where the icon should appear. Can anyone help with this? Thanks.
- Automated HTML/CSS Validation
-
Automated HTML/CSS Validation
Hello all. I was wondering if there are any tools available that can automate the HTML/CSS validation process. I use the tools available from W3C which are great, but was just wondering if there were any tools that could make it even easier? I've been using a linter for awhile now, which shows errors in code on the fly. I'm not sure if such a tool exists, but if it did someone here would know about it. Thanks
-
Help with gulpfile.js setup
Hello all. I am trying to setup a gulpfile in wordpress, but I am having some problems and wondered if anyone can help? I have setup wordpress using WAMP and have created a folder in the themes folder where I have installed all the gulp packages I require. They have all installed as they are in thr node_modules folder. My gulpfile is as follows: // Include gulp var gulp = require('gulp'); // Include plugins var concat = require('gulp-concat'), uglify = require('gulp-uglify'), autoprefixer = require('gulp-autoprefixer'), sass = require('gulp-ruby-sass'), sourcemaps = require('gulp-sourcemaps'), minifyCSS = require('gulp-minify-css'); browserSync = require('browser-sync').create(); gulp.task('sass', function () { return sass('./assets/sass/main.scss', {sourcemap: true}) .on('error', sass.logError) .pipe(autoprefixer()) .pipe(minifyCSS()) .pipe(sourcemaps.write('.', { includeContent: false })) .pipe(gulp.dest('live')); }); // Watch for changes in files gulp.task('watch', function() { // Watch .scss files gulp.watch('./assets/**/*.scss', ['sass']); }); // Default task to compile css gulp.task('default', ['sass']); When I try to run gulp/gulp watch I get the error which you can see in the image attached. I'm not sure what I have done wrong as all the sass files I need are in the folder called assets. Can anyone help?