Support our Squarespace Code Journal by signing up
your next website through this LINK!

bite47 - Follow us on Twitter

Wednesday
Feb152012

How to replace the grey nav bar on a Squarespace gallery page (Single gallery of images)

If you were ever thinking of changing the grey bar on the Squarespace gallery page - Single gallery of images (Auto-display first full image) - than here's how:

Not sure what I'm talking about? See here: www.bumet.ch WITH GREY BAR and then here WITHOUT it. Instead of the grey bar we use here some nice blue arrows: www.santabarbararivierahomes.com

  • You need to change the size for #imageNavigationStrip and .gallery-navigation-bottom to the size of your gallery page.
  • The actual image that replaces the grey bar is called: slide-bg-right.png and slider-bg-left.png and is 35px in width and 55px in height.
  • Make sure the path to where you saved the new image is right. In our case it was saved under: ../storage/images_design/
  • In our example we also disabled the Lightbox feature. The CSS code for this is: .picture-full { cursor:default !important; } but to make it work you also need to add some extra script to your footer. See SCRIPT below.

 

CSS

/* Slideshow */
#imageNavigationStrip {width: 800px !important; margin-left: 0px !important; }
.gallery-navigation-bottom {width: 800px !important; margin-left: 50px !important; }
#sslightbox_scrollrightimg { width: 35px; margin-left: 20px !important; background-image:url('../storage/images_design/slider-bg-right.png'); !important; }
#sslightbox_scrollleftimg { width: 35px; margin-right: 20px !important; background-image:url('../storage/images_design/slider-bg-left.png'); !important; }
.picture-full { cursor:default !important; }
/* Slideshow */

 

Script

<script>
SSLightbox.showFullImage = function() { }
</script>

Monday
Dec052011

How to delete old DNS records on you Windows computer?

More than ones my PC was showing me an old website after changing the DNS records successfully. My Mac computer was already showing the new website, and if I looked up the DNS records on a web service like: intodns I could see that the DNS records were configured correctly.

If you ever run into this problem just reset the DNS table on your Windows computer. And that's how it's done:

Click on the Windows START button / open the system console (CMD) / and make the following entry:
ipconfig /flushdns

Done. Now your Windows computer will also show you the new website! 

Saturday
Dec032011

How to get rid of unwanted table (cell) border

Today most design problems can be solved through CSS but sometimes you still need (or want) to design certain things using tables. In that case you might have come across the problem of unwanted space between cells. This might help to sovle the problem of unwanted table space.

 

CSS

#table { 
  margin: 0px;
  padding: 0px;
}

#table img {display: block}
Monday
Oct032011

EasySlider 1.7 for Squarespace

This is a short instruction on how to install Easy Slider 1.7 on your Squarespace site. To use Easy Slider you have to upload the following files and scripts:

You can download the .zip file with the jQuery and Easy Slider 1.7 scipt HERE.

 

Preparation

  • Go to your Squarespace storage and create a folder named scripts
  • Then Upload the .zip file into that folder (tick: Decompress Zip Files After Uploading)

 

Script

<script src="/storage/scripts/easyslider/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="/storage/scripts/easyslider/easySlider1.7.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#easyslider").easySlider({
auto: true,
 pause:2500,
 speed: 1500,
continuous: true 
});
});
</script>

 

HTML Code

<div id="easyslider">
<ul>
<li><img src="/storage/slideshow/slide-1.jpg" alt="Slideshow Image 1" /></li>
<li><img src="/storage/slideshow/slide-2.jpg" alt="Slideshow Image 2" /></li>
<li><img src="/storage/slideshow/slide-3.jpg" alt="Slideshow Image 3" /></li>
</ul>
</div>
<p>&nbsp;</p>>

 

CSS Code

/* Footer Slider */

#easyslider {min-height:???px;}

#easyslider ul, #easyslider li {
margin:0;
padding:0;
list-style:none; }

#easyslider, #easyslider li { 
width:???px;
height:???px;
overflow:hidden; }

#prevBtn { visibility: hidden; }
#nextBtn { visibility: hidden; }

/* Footer Slider */

 

Extra Script Code

The Easy Slider has plenty of options. Below is the code with all available options and their defaults:

prevId: 'prevBtn',
prevText: 'Previous',
nextId: 'nextBtn',
nextText: 'Next',
controlsShow: true,
controlsBefore: '',
controlsAfter: '',
controlsFade: true,
firstId: 'firstBtn',
firstText: 'First',
firstShow: false,
lastId: 'lastBtn',
lastText: 'Last',
lastShow: false,
vertical: false,
speed: 800,
auto: false,
pause: 2000,
continuous: false,
numeric: false,
numericId: 'controls'

 

Explanation

prevId
Id attribute for "previous" button. Default value is "prevBtn".

prevText
Inner text for "previous" button. Default value is "Previous".

nextId
Id attribute for "next" button. Default value is "nextBtn".

nextText
Inner text for "next" button. Default value is "Next".

orientation
Sliding can be horizontal or vertical. Horizontal is default and if you want vertical set this to 'vertical'.

speed
Animation speed in milliseconds, default value is 800.

controlsShow
By default set to true, but if set to false it will not add any controls. It can be used with auto scroll when you want to disable user interaction.

controlsBefore and controlsAfter
In case you want to add some additional markup to gain more control over buttons you can do so by using these parameters. Check out the demo where I use these options.

controlsFade
By default set to true. If set to false it will disable button hiding when slider reaches the end.

firstShow and lastShow
These parameters hide (or show) "go to first" and "go to last" buttons.

auto
This option enables automatic sliding. If you set it to true the sliding will automatically start and continue to perform untill user clicks one of the buttons.

pause
This option is set in milliseconds and it represent the duration of each slide when plugin is set to auto sliding.

continuous
If set to true clicking the next button when the slider reached the end will simply continue showing all of the slides again with continuous motion. Combining this option with auto (both set to true) you'll get endless animation.

numeric
If you set this option to true you will get numeric navigation instead of next/prev buttons. Plugin will create an ordered list just after the slider div. Ordered list will have the exact number of elements as the slider. Clicking on each of the number will make the animation jump to a certain slide.

numericId
This option defines id attribute for the ordered list. You should use this id to select and style the list with CSS.

Thursday
Sep152011

Text inside the Search Field

If you want to have some text, for example: Search Site, inside your Squarespace Search field, you can easily do this with the following jQuery code.

Just add the following Script to your "Extra Header Code". You will find this under: Website Management / Website Settings / Code Injection.

Then just rename "Search Site" to whatever you want it to say. Keep the quotation marks!

 

Script

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$('.search-form-pt .queryFieldWrapper input').attr({value:"Search Site" });
});
</script>

 

If you want to know how to position your Search Box anywehre. Have a look at THIS POST!