Before starting to build my Website I had to get to know HTML and CSS languages. For doing so, I took a look at the w3schools webpage. HTML it’s formed by different elements, represented by tags, that describe the structure of Web pages.
<!DOCTYPE>
<html>
<head>
<body>
This element contains all the visible contents of the HTML document.<head></head>
.
I started by creating a simple file called index.html, with a short message, that had the basic structure of an HTML (Doctype, html, head and body): Some examples of how to insert the different elements with it's attributes are:
<a> href="http://www.Page-url.com">Link </a>
<img> src="/img/img1.png"></img >
CSS is a style sheet language that describes how the HTML elements are going to look like. For modifying the aspect of the page you can either add and attribute <style>
in the HTML element or create an external stylesheet that will modify all your files at the same time. This second option is more efficient. CSS works with selectors that refer to the HTML elements that you want to modify. We have different types:
As it is my first time developing a Website, I made use of FabLab's Template for Academy Website. This template uses Boostrap, a front-end web framework for designing websites. I downloaded it to my computer and I started to modify the files, adding my elements on them.
The editor that I have chosen is Brackets. What I like about brackets is that it has a lot of useful tools like the Live editor, which enables you to see what your web looks like while you are modifying it. I also tried Sublime text as is a text editor that I usually use for programming but in this case I found brackets much more intuitive. The live preview in sublime needs the installation of extra packages whereas in brackets is more straight forward.
The first file I modified was the index.html, and the two following images show how it currently looks like. This is the first draft; I will modify its appearance as I get to know all the elements.
The buttons in the navigation bar are linked to the respective files. For doing so you need to specify the reference file for each button.
<a> href="about.html"> About </a>
<a> href="exercisesmenu.html"> Weekly exercises </a>
During this assessment I struggled with different issues that I was able to solve with the help of my instructor and by checking the documentation in w3schools website. Some of them were:
<br>
<ul><li></li></ul>
First thing I had to do to work with Git was to install it in my computer. As I work with a Mac I just had to wirte git --version
in the console to install it. Once it was installed I configured my user name and my email:
git config --global user.name ''Victoria Peredo''
git config --global user.email ''mymail@gmail.com''
ssh-keygen -t rsa -b 4096 -C "mymail@gmail.com"
cat ~/.ssh/id_rsa.pub
cd /Desktop/FabLab ...
git init
git clone git@gitlab.fabcloud.org:academany / fabacademy/ 2018/ labs/ fablabmadridceu/ students/ victoria-peredorobinson.git
vi test.txt > :wq > git add test.txt
git status
git fetch origin master
and then git merge origin/master
or we can do it directly with git pull origin master
git add -all
git commit -m 'message for committing'
git rm test.txt
git push origin master
Sometimes when you work in a common project you need to have a starting point from where each person will work. For doing so, it is useful to create branches. The default branch of a project its master, and it points to the last commit that you do.
To create a new branch you have to wirte git branch feature
, feature is the name of the new branch and I will use this in this example as I will use the images of this tutorial.
Once you create this second branch the current repository will look like this:
Now we have two branches pointing to the last commit that we had done. To switch from one branch to the other we write git checkout feature
, to move to the feature branch or master if we want to go back to master. In the previous image we see the result of doing the chekout to feature, now we are pointing to it. If we now commit a change git commit -m "commiting a test to feature branch"
:
And in the same way if we now change to the master branch git checkout master
and we commit a change we will be doing this:
If you finish working separetly you can merge the branches. For that you need to be in the main branch and then merge the secundary one: git merge feature
.