Friday, 15 March 2013

Web Programming

Final report

This will be the final report regarding Ca2, including examinations of code snippets of 
features, credits for material found elsewhere and a look at responsiveness.


Assets


This site contains pictures, videos and a video player which were found online , the videos from youtube & the hardcoded video player both rely on online functionality to operate.


The logo image was found through Google Image Search and edited slightly with the brush tool in Photoshop to make the edges less sharp and blend with the background.



CODE
For my social icons on the site I employed a simple javascript image swap to change the colour of the icons on rollover, for emphasis and to provide user feedback.The below example is the code for the facebook icon .

<!-- This is the static link to the desired page-->
<a href="https://www.facebook.com/SlowBilly" 
  <!--This line tells the browser to display the image "facebook2" when the cursor rolls over the link-->
onMouseOver="document.facebook.src='img/facebook2.png';"
<!-- This switches back to the original "facebook.jpg" when the cursor moves away-->
onMouseOut="document.facebook.src='img/facebook.png';">
                                         <!--"name" attribute, essential for the above"document.facebook.src"-->
<img alt= "facebook" src="img/facebook.png" name="facebook"/>


I also used javascript validation for the contact page as shown below, first we will look at the script for the name field.
         <!-- function name-->
function validateForm1()
{
<!-- this declares a variable to contain the value input into the name field-->
var name=document.forms["form1"]["fname"].value;
<!-- If there is nothing in the name field or it is blank on submit-->
if (name==null || name=="")
 {
<!-- an alert appears "name must be filled"-->
 alert("Name must be filled.");
 return false;
 }
}

Next we will look at the slightly more complex email validation script.

function validateForm2()
{
var mail=document.forms["form2"]["email"].value;
                   <!--variable which contains the index(position within the string) of the character @-->
var atpos=mail.indexOf("@");
                   <!-- as above, with the index of the .-->
var dotpos=mail.lastIndexOf(".");
                    <!-- As in the name form script , returns an alert on blank submit-->
if (mail==null || mail=="")
{
alert("Email must be filled");
return false;
}
                 <!-- the index of @ is <1 OR . index is less than @ index+2 OR . index+2 is greater than the length of the input--> 
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=mail.length)
 {
 alert("Not a valid e-mail address");
 return false;
 }
}


The dropdown chords menu was made using simple css, essentially not displaying the list while the cursor is not over the link by using the display:none; css attribute in the regular list, as below,


                                    #top #headercont #headerright  #dropdown li ul
{
display:none;
}
     and then using the hover tag to display the list on mouse-over,as below,

                                   #top #headercont #headerright  #dropdown li:hover u
                                                {
display: inline;
position: absolute;
                                                }

I tried to avoid giving divs or elements absolute sizes or positions, except where neccesary, instead using percentage values, to allow for easier and more fluid responsiveness for the site.
  





Wednesday, 13 March 2013

Web programming

Progress report
(13/03/13)

I have been unable to update this blog for several weeks due to other projects taking up far too much of my time,
however I have been working on this site also, I have changed several aspects of the site, for many reasons.

My proposed javascript image flow for the chord bank, I have found , is far too complicated and beyond my skill to impement. I have decided to make the chords page a simple gallery for this reason.

I have also found problems implementing two dropdown menus, I have decided to simplify to one dropdown menu, stemming from the "Chords" link in my main nav bar.

Other aspects have been executed as expected, inluding my custom tabs search bar, which I have implemented and styled to match the site. Custom Google search bars are a free service provided by Google.Instructional videos were  taken from youtube, full copyright information will be available on the about page of the site

I have embedded a video player from flowplayer.com on the main index page 
to accomodate the video I recorded, and then edited using Adobe Premiere. I converted the video to the appropriate format using first Wondershare( which I scrapped after discovering it left a prominent watermark on the output video) and the using Any Video Converter 5. Both are freely available online.


In class we have moved on to beginner javascript which I enjoy and find easy to understand,
partly due to its similarity in aspects of syntax to Java and ActionScript, and partly because the text is easy to understand and moves at a good pace.







Tuesday, 19 February 2013

Web Programming

19/02/13



To Do
 Drilldown of site structure,menus etc.
Write Site blurb.


Colour schemes chosen from Kuler, "1944mustang" with minor alterations  (including a grey shade for the main background of the site, however this may be changed to a subtle pattern).Alternates "coffebar "& "mucha winter".Mucha winter is very close to natural wood tones suggestive of an acoustic guitar.`

I have gathered images of the G major chords that I will use on the site from jguitar.com,
Possible choices of songs for simple instructional videos include Polly, America, Knockin on Heavens Door. Videos will include a small text blurb indicating the chords required to play the song, possibly linking back to the chord bank images.

Wireframes completed in Balsamiq , must complete tablet sized layout also & transfer into Photoshop to apply colours and styles.




I have decided to use a javascript image flow to display the chords in the chord bank screen, stemming from two dropdown menus from the main nav bar. The first dropdown will be a key selector(A-G, G will be the only selectable), which expands on roll-over to display the chord variations(Major,minor etc, Major will be the only selectable). 

The seperate pages of the site will comprise of Home,Chords,Videos,Contact and About.
Home page will feature self recorded intro video.
Chord page will feature javascript image flow of the appropriate chords.
Videos page will contain instructional videos of simple songs and techniques.
Contact will contain a validating email submission form.
About page will contain a small blurb on the sites function and copyright information.

Tuesday, 12 February 2013

Web Programming

12/02/13

For this CA on responsive web design I have chosen to design an instructional site for beginner guitar players 

The site will be fully responsive to be viewed on desktop,tablet and mobile size monitors , will include instructional videos for guitar techniques (youtube.com), with an edited video filmed by me.

The site will include a chord bank centred around the G chord and its variants, with diagrams of  
all chords specifying finger positions, tuning etc., ( possible display of chord alternative on rollover)

The site will also include an external guitar tab search powered by google and Ultimate-guitar.com.

Preliminary home page, desktop & phone level design in Balsamiq

Web Programming 

5/2/13

In class review of CSS and HTML5 along with tutorials on same + responsive design for free time, which I found helpful and easy to understand. Found it useful to re examine the fundamentals of html and css.

Received brief for new CA, proposal to be completed for next week 

Ideas for site,
guitar based instructional website
book based social site
redesign of something?