× Home Mijzelf Opmaak JQuery Canvas Schoolexamen Gimp Contact

Opmaak

Hier kom je meer te weten over mijn CSS, JQuery en Canvas gebruik op mijn website

Op elke pagina heb je een basis die bestaat uit 4 lagen: een Header, een Menu, een Container en een Footer. Hieronder lees je de 4 lagen uitgebreider. Ik leg niet alle css-opmaak van mijn site uit, alleen de belangrijkste. Wil je alle opmaak zien, scroll dan naar beneden naar de button 'Klik hier voor het volledige css bestand'. Mijn online css bestand wordt dan geladen en getoond.

Body

body{
background: url("../img/background.jpg")
no-repeat center center fixed;
background-size:cover;
margin:0;
font-family:calibri;
color:white;
}

Container

#container{
display: grid;
grid-template-rows: auto auto 1fr auto;
min-height:100vh;
}

Header

#header{
padding:10px;
}

Content

#content{
min-height:60vh;
padding:20px;
border-style:double;
border-width:10px;
border-radius:25px;
margin:40px 15vw;
backgrou nd: rgba(255, 255, 255, 0.4);
}

Footer

#footer{
padding:10px;
}

Footer: p

#footer p{
text-align: center;
}

Logo

#logo{
display: grid;
grid-auto-flow: column;
align-content: center;
font-size: 30px;
font-weight: 700;
color: white;
s text-transform: uppercase;
}

Logo: span

.logo span{
color: black;
}

Menu

#menu{
display: grid;
grid-template-columns: 1fr 15fr;
background-color:rgba(255,255,255,0.2);
padding: 0 30px;
}

Menu-opties

#menu-opties{
display: grid;
justify-content: center;
align-content: center;
grid-auto-flow: column;
grid-gap: 2em;
}

Menu-opties: a

#menu-opties a{
text-decoration: none;
color: white;
font-weight: bold;
padding:15px 20px 15px 20px;
}

Menu-opties: a (hover)

#menu-opties a:hover{
color:#4f1ba9;
background-color:rgba(255,255,255,0.7);
}

Menu-opties: a (active)

#menu-opties a.active{
background-color:white;
color:#4f1ba9!important;
}

Hamburger-button en sluit-button

.hamburger-button, .sluit-button{
cursor:pointer;
}

Linker-menu

.linker-menu{
height: 100vh;
transform: translateX(-100%);
position: fixed;
background-color: #2F323A;
overflow-x: hidden;
transition: all 0.25s ease-out;
padding-top: 175px;
}

Linker-menu: a

.linker-menu a{
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
}

Linker-menu: a (hover)

.linker-menu a:hover{
color:white;
}

Media query

@media screen and (max-width: 1024px) {
#menu-opties { display: none; }
}

@media screen and (min-width: 1025px) {
#linkermenu, .hamburger-button { display: none; }
}
/* === Pagina structuur === */

body {
    background:#333333;
    background:url("../img/background.jpg")
    no-repeat center center fixed; /* zet de achtergrond vast */
    background-size:cover;  /* vul de pagina met de hele achtergrond */
    margin:0;
    font-family:calibri;
    color:white;
}

#container{
    display: grid; /* maak een tabel. Kijk op https://css-tricks.com/snippets/css/complete-guide-grid/ */
    grid-template-rows: auto auto 1fr auto; /* maak rijen */
    min-height:100vh; /* volledige hoogte van het venster */
}

#header{
    padding:10px;
}

section{
    padding:10px 10px 20px 10px;
    border-style:double;
    border-width:10px;
    border-radius:25px;
    margin: 40px 15vw 150px;
    background:rgba(255,255,255,0.4);
}

#footer{
    position:fixed;
    left:0;
    bottom:0;
    width:100%;
    background-image: linear-gradient(180deg, rgba(6, 19, 63, 0.7), black);
    color:white;
    font-weight:bold;
    text-align:center;
}

#footer p {
    margin: 5px;
}

/* === Logo === */

#logo {
    display: grid; /* maak een tabel */
    grid-auto-flow: column; /* zet de tabelcellen automatisch als kolommen achter elkaar */
    grid-gap: 30px; /* ruimte tussen cellen */
    align-content: center; /* verticaal centreren */
    font-size: 40px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.logo span {
    color: black;
}

.logo a {
    color: #fff;
    text-decoration: none;
}
#menu.fixed .logo a {
    color: #4f1ba9c0;
}

/* === Desktop Menu === */

#menu {
    display: grid; /* maak een tabel */
    grid-template-columns: 1fr 15fr; /* maak 2 kolommen */
    background-color:rgba(255,255,255,0.2);
    padding: 0 30px;
    z-index: 99;
}

/* Opmaak menuopties */
#menu-opties {
    display: grid; /* maak een tabel */
    justify-content: center;
    align-content: center;
    grid-auto-flow: column; /* zet menu opties horizontaal achter elkaar */
}

/* Opmaak normale menulink */
#menu-opties a {
    text-decoration: none; /* geen onderstrepen van een link */
    color: white;
    font-weight: bold;
    font-size: 25px;
    padding:15px 20px 15px 20px; /* ruimte rondom een menu-optie */
}

/* Als de muis over een optie gaat gebruik dan een andere kleur */
#menu-opties a:hover {
    color:#4f1ba9;
    background-color:rgba(255,255,255,0.7);
}

/* Geef een actieve menu optie een andere kleur */
#menu-opties a.active,
a.mijzelf_active {
    background-color:white;
    color:#4f1ba9!important;
}

/* Opmaak van het fixed menu */
@media screen and (min-width:1025px) {
    #menu.fixed {
        position: fixed;
        background-color:rgba(255,255,255,0.9);
    }
    #menu.fixed #menu-opties a {
        color: #4f1ba9c0;
    }
}

/* === Mobiel Menu === */

.linker-menu {
    height: 100vh; /* toon het menu verticaal over de hele paginahoogte */
    -webkit-transform: translateX(-100%); /* WebKit */
    -moz-transform: translateX(-100%); /* Mozilla */
    -o-transform: translateX(-100%); /* Opera */
    -ms-transform: translateX(-100%); /* Internet Explorer */
    transform: translateX(-100%);    /* bij een verborgen menu verschuift het menu naar links voorbij de linkermarge */
    position: fixed; /* zet het menu vast op een plek */
    background-color: #2F323A;
    overflow-x: hidden; /* verberg tekst als het menu is verborgen */
    transition: all 0.25s ease-out; /* hoe lang duurt het tonen van het menu */
    padding-top: 175px;
    z-index: 100;
}

/* Hyperlinks in het linkemenu */
.linker-menu a {
    padding: 8px 32px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block; /* toon de links als een blok zodat het hele deel klikbaar is */
    transition: 0.3s; /* hoe lang duurt het verlichten van een menu optie */
}

/* Geef een muisover linkermenu optie een andere kleur */
.linker-menu a:hover {
    color:white;
}

/* Verander de muisaanwijzer in een handje */
.hamburger-button, .sluit-button {
    cursor:pointer;
    color: white;
}

/* Geef een actieve linkermenu optie een andere kleur */
.linker-menu a.active{
    background-color:white;
    color:#4f1ba9!important;
}

/* Zet de sluitmenu button van het linkermenu op mobiel vast op een plek */
.sluit-button {
    position: absolute;
    top: 80px; /* vanaf de bovenkant */
    left: 0;    /* vanaf de rechterkant */
    font-size: 4em!important;
    font-weight:bold;
}

/* Verberg het normale menu op een mobiel en tablet */
@media screen and (max-width: 1024px) {
    #menu-opties{
        display: none;
    }
    section{
        margin: 40px 7vw 100px;
    }
        aside{
        float:none!important;
        width:initial!important;
        margin-bottom:10px;
    }
    .kolommen {
        grid-template-columns: 1fr!important;
    }
}

/* Verberg het linkermenu en de hamburgerbutton op een desktop */
@media screen and (min-width: 1025px){
    #linkermenu, .hamburger-button{
        display: none;
  }
}

/* === Instellingen voor pagina tekst en elementen === */

.koptekst1, .voettekst1, .koptekst2 {
    text-align:center;
    color:white;
    text-shadow: black 2px 2px 4px
}

p{
    font-size:1.2em;
}

h1 {
    font-size: 2.5em;
}
h1.homepagina{
    text-align:center;
}

h4.koptekst1 {
    font-size: 2em;
    margin: 20px;
}
img {
    max-width:100%;
}
img.homepagina{
        border-radius:15px;
        border:1.5px solid rgba(255,255,255,0.7);
}
img.contact{
  height:7vh;
  display:block;
  margin-left: auto;
  margin-right: auto;
}
article{
    clear:both;
    text-shadow: black 2px 2px 4px
}

article.kolommen {
    display:grid;
    grid-template-columns: 1fr 2fr;
    grid-gap:90px;
    margin-right:5vw;
    margin-left:5vw;
}

/* Als de tekst niet meer op een regel past, en er zijn geen spaties om op af te breken, breek tekst toch af */
.wrap{
    word-break: break-all;
    max-width: 80vw;
}

/* De rechter aside boxen op o.a. de opmaakpagina */
aside{
    float: right;
    width:30vw;
    background-color: rgba(0,0,0,0.4);
    border-radius:10px;
    border-style:solid;
    border-color:#bc7df4;
    border-width:5px;
    padding:8px;
    margin-left: 20px;
}

.span1{
    font-size:55px;
    font-weight:bold;
}

.span2{
    font-weight:bold;
}

.fotoJahla{
    width:35%;
    float: right;
    margin: 20px;
}
a.link{
    color: dodgerblue;
    text-decoration:none;
}
a.link:hover{
    color:pink;
    text-decoration:underline;
}
a.link2{
  color:rgb(98, 101, 103);
  text-decoration: none;
}
a.link2:hover{
  color:white;
  text-decoration:none;
}
a.link3{
  color:white;
  text-decoration:none;
}
a.link:hover{
  color:white;
  text-decoration:none;
}
/* === De loginboxcontainer op de pagina schoolexamen === */

.logincontainer {
    width:20vw;
    margin: 30px auto;
    padding:30px;
    background-color:#333;
    border-radius:25px;
    border: 2px solid #ffffff;
}

/* Het loginformulier met een maximum breedte*/
.loginform {
    width:70%;
    margin:0 auto;
}

/* Veld loginnaam */
.loginname {
    font-size:0.75em;
    font-style:italic;
}

/* Aanmeldbutton op het loginformulier */
.loginbutton, .logoffbutton {
    cursor: pointer;
    font-weight: 700;
    font-size:1.1em;
    -moz-user-select: none;
    color: #4f1ba9;
    background:#ffffff;
    border:0;
    padding: 7px 20px;
    text-align:center;
    text-decoration:none;
    text-shadow:none;
    border-radius: 10px;
}

/* De muisoverstijl van de loginbutton */
a.loginbutton:hover, input.loginbutton:hover,
a.logoffbutton:hover, input.logoffbutton:hover {
    color:#4f1ba9;
    background-color:rgba(255,255,255,0.7);
}

/* Centreer de login en loguit tekst */
.logon, .logoff{
    text-align:center;
    margin-top:50px;
}

/* Opmaak veldlabels van het inlogformulier */
.UserLabel, .PassLabel {
    color: #e694bd;
}

/* Stijl de invoervelden van het loginformulier */
.Input {
    border: none;
    border-bottom: solid 1px white;
    outline: none;
    margin: 0;
    background-color: #333;
    padding: 5px;
    width: 100%;
    color: white;
}

/* Stijl de tabel met de cijfers van de vakken */
.TableContainer {
    overflow-x: auto;
    margin:0 auto;
    max-width:70vw;
}

.Table {
    text-shadow: none;
    border-collapse: collapse;
    background-color: #333;
    margin:0 auto;
}

/* Stijl de cellen van de tabel en geef ze ruimte */
.Table td, .Table th {
    padding:10px;
    text-align:left;
    font-weight:700;
}

/* Stijl de kop van de tabel */
.Table thead {
    background-color:white;
    color:#333;
}

/* Opmaak voor de foutmelding van het loginformulier */
.msg {
    color:red;
    margin:0 auto;
    min-height:30px;
    font-size: 1.1em;
}

/* Pas de breedte van het loginformulier aan voor mobiel */
@media screen and (max-width:1024px) {
    .logincontainer {
        width:60vw;
    }
}

/* === Stijl de tabs van de opmaak pagina ===*/

.tab {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
}

/* Stijl de tabbuttons welke gebruikt worden om de inhoud te tonen */
.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    width: 33.333%;
}

/* Verander de achtergrond kleur van de tabbutton met muisover */
.tab button:hover {
    background-color: #ddd;
}

/* Maak een actieve/huidige tablink class */
.tab button.active {
    color: #fff;
    background-color: #3a3a3a;
}

/* Stijl de tabinhoud */
.tabcontent {
    display: none;
    padding: 15px;
    border: 1px solid #fff;
    border-top: none;
    background-color: rgba(0,0,0,.7);
}

/* Fading effect van de tabs duurt 1 seconde */
.tabcontent {
    animation: fadeEffect 0.5s;
}

/* Ga van 0 naar volle kleur */
@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* === Canvastekeningen op de pagina canvas ===*/

#canvas1 { /* voorbeeld 1 */
    background: rgba(255,255,255,0.3);
    border: 2px solid black;
}

/* Canvas voorbeeld 2*/
#canvas2 {
    background: rgba(255,255,255,0.3);
    border: 2px solid black;
}

/* Canvas voorbeeld 3*/
#canvas3 {
    background: rgba(0,0,0,0.5);
    border: 2px solid black;
}

/* Verklein de canvas tekeningen op mobiel */
@media screen and (max-width:1024px) {
    #canvas1 { height: 35vh; }
    #canvas2 { height: 35vh; }
    #canvas3 { height: 35vh; }
}

/* === Tonen inhoud van het online css-bestand met php === */

/* Ruimte rondom het getoonde css-bestand */
#cssfile {
    display:none;
    padding: 0;
    margin-top: 20px;
}

/* Centreer de button: bekijk css-bestand */
.buttoncontainer {
    display:flex;
    justify-content: center;
}

/* Button op de pagina opmaak om de hele file te laten zien */
#cssbutton {
    padding: 15px;
    margin: 10px;
    background: #4f1ba9;
    color: white;
    font-size: 1.1em;
    border: none;
    outline: none;
    cursor: pointer;
}

/* Button kleur op muisover */
#cssbutton:hover {
    opacity: 0.6;
}

/* === Sliders op de JQuery pagina === */

/* Container waar de slider in komt */
.slidercontainer {
    background: rgba(51, 51, 51, 0.9);
    padding:15px;
    border-radius: 10px;
}

/* De slider zelf */
.slider {
    -webkit-appearance: none;  /* Override default CSS styles */
    appearance: none;
    width: 100%; /* Full-width */
    height: 20px; /* Specified height */
    background: #d3d3d3; /* Grey background */
    outline: none; /* Remove outline */
    opacity: 0.7; /* Set transparency (for mouse-over effects on hover) */
    -webkit-transition: .2s; /* 0.2 seconds transition on hover */
    transition: opacity .2s;
}

/* Muis-over effect */
.slider:hover {
    opacity: 1; /* Fully shown on mouse-over */
}

/* Het schuifknopje van de slider (gebruik -webkit- (Chrome, Opera, Safari, Edge) en -moz- (Firefox) om de standaard look te overschrijven) */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    width: 35px; /* Set a specific slider handle width */
    height: 35px; /* Slider handle height */
    background: #4CAF50; /* Green background */
    border-radius: 50%;
    cursor: pointer; /* Cursor on hover */
}

.slider::-moz-range-thumb {
    width: 35px; /* Set a specific slider handle width */
    height: 35px; /* Slider handle height */
    border-radius: 50%;
    background: #4CAF50; /* Green background */
    cursor: pointer; /* Cursor on hover */
}

/* Minimumwaarde tekst label van de fontslider */
.MinFont {
    display:flex;
    float:left;
}

/* Maximumwaarde tekst label van de fontslider */
.MaxFont {
    float:right;
}

/* === HTML5 Gallery aanpassingen voor pagina Mijzelf === */

@media screen and (max-width: 1024px) {
    .html5gallerycontainer {
        width: inherit!important;
    }
}
@media screen and (min-width: 1025px) {
    .html5gallerycontainer {
        width: 35vw!important;
        margin: 0 auto;
    }
}

/* === Terug naar boven button. Zie https://codepen.io/matthewcain/pen/ZepbeR === */

#NaarBoven {
    display: inline-block;
    background-color: #4f1ba9;
    width: 40px;
    height: 40px;
    text-align: center;
    border-radius: 4px;
    position: fixed;
    bottom: 40px;
    right: 30px;
    transition: background-color .3s,
                opacity .5s, visibility .5s;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}
#NaarBoven::after {
    content: "\f077";
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    font-size: 1.5em;
    line-height: 40px;
    color: #fff;
}
#NaarBoven:hover {
    cursor: pointer;
    background-color: rgba(255,255,255,0.5);
}

#NaarBoven.show {
    opacity: 1;
    visibility: visible;
}

/* === Code Highlight Plugin. Zet code op een pagina in kleur. Zie highlight.org === */

.hljs {
    box-shadow: 4px 4px 4px #444;
}

td.hljs-ln-line.hljs-ln-code {
    tab-size: 2;
    padding-left:5px;
}

.hljs-ln-numbers {
    text-align: right;
    border-right: 1px solid #CCC;
    vertical-align: top;
    padding-right: 5px!important;
}
.hljs-ln-n:before {
    color:#bc7df4;
}

pre code {
    max-width: 65vw;
}

/* === Contact-pagina === */

.grid-container{
  display: grid;
  grid-template-columns: auto auto auto;
  grid-column-gap: 20px;
}
@media screen and (max-width:1024px) {
  .grid-container{
    grid-template-columns:auto;
  }
  img.contact{
    height:13vh;
  }
}
.grid-item{
  background-color:rgba(255,255,255,0.8);
  border:0.5px solid rgba(0, 0, 0, 0.2);
  padding:30px;
  text-align:center;
  color: rgb(173, 166, 170);
  border-radius:15px;
  margin:20px;
  font-family:verdana;
  text-shadow:none;
  font-weight:bold;
}
.grid-container button{
  border:none;
  border-radius:4px;
  color:white;
  padding: 12px 32px;
  text-align:center;
  font-size:1.3em;
  transition-duration: 0.4s;
  cursor:pointer;
  margin-top:20px;
  margin-bottom:20px;
}
.button1{
  background-color:rgb(183, 203, 234);
  color:rgb(98, 101, 103)!important;
}
.button1:hover{
  background-color:rgb(26, 115, 232);
  box-shadow: 0 2px 50px 0 rgba(0,0,0,0.19);
  color:white!important;
}

.button2{
  background-color:rgb(180, 230, 188);
  color:rgb(98, 101, 103)!important;
}
.button2:hover{
  background-color:rgb(48, 203, 1);
  box-shadow: 0 2px 50px 0 rgba(0,0,0,0.19);
  color:white!important;
}

.button3{
  background-color:rgb(251, 188, 4);
  color:rgb(98, 101, 103)!important;
}
.button3:hover{
  background-color:rgb(234, 67, 53);
  box-shadow: 0 2px 50px 0 rgba(0,0,0,0.19);
  color:white!important;
}

.button4{
  border:none;
  background-color:rgb(255, 255, 255);
  color:rgb(98, 101, 103)!important;
}
.button4:hover{
  background-color:rgb(232, 28, 35);
  box-shadow: 0 2px 50px 0 rgba(0,0,0,0.19);
  color:white!important;
}

.button5{
  background-color:rgb(25, 20, 20);
}
.button5:hover{
  background-color:rgb(30, 215, 96);
  box-shadow: 0 2px 50px 0 rgba(0,0,0,0.19);
}

.button6{
  background-color:rgb(254, 40, 84);
}
.button6:hover{
  background-color:rgb(106, 201, 208);
  box-shadow: 0 2px 50px 0 rgba(0,0,0,0.19);
}

/* === Before After Image Slider. Zie https://legacy-zurb.netlify.app/playground/twentytwenty === */

.twentytwenty-container {
    border-radius: 15px 15px 0 0;
    background: white;
}
.maxheight {
    height:700px!important;
}
@media screen and (max-width:1024px) {
    .maxheight {
        height:300px!important;
    }
}

@media screen and (min-width:1025px) {
    .twentytwenty-container {
        max-height:65vh!important;
    }

}
.twentytwenty-before-label:before,
.twentytwenty-after-label:before {
    padding: 0 5px;
}

.twentytwenty-overlay:hover {
    background: rgba(0, 0, 0, 0)!important;
}
.twentytwenty-before-label:before,
.twentytwenty-after-label:before {
    background: rgba(0, 0, 0, 0.5)!important;
}

/* === CSS only lightbox. Zie http://youtube.com/watch?v=6j5q-hP8sfk === */
.portfolio__button {
  display: block;
  text-decoration: none;
  color: white;
  background: #4f1ba9;
  padding: .5em 1.25em;
  text-align: center;
  border-radius: 3px;
}
.portfolio-small__button {
    background:#4f1ba9;
    padding:5px;
    border-radius:3px;
    font-size:0.7em;
}
.portfolio {
  display: grid;
  grid: auto / repeat(auto-fit, minmax(10em, 1fr));
  grid-gap: 1em;  
  padding: 1em;
}

.portfolio__item {
  position: relative;
  flex-basis: 30%;
  margin: 0;
  padding: 0;
  background: white;
  border-radius: 15px;
}

.portfolio__desc {
  padding: 0.5em;
  text-align: center;
}

.portfolio__title {
  letter-spacing: 1px;
  color: #4f1ba9;
  margin: 5px auto 15px auto;
  text-shadow: none;
}

.portfolio__body {
   color: black;
   text-shadow: none;
   overflow-y: auto;
   height: 20vh;
   margin-top: 10px;
}
.portfolio__body p {
    font-size: initial;
    margin:0;
}

.portfolio-container__image{
    display: grid;
    grid-template-rows: 2fr 1fr;
    max-height:13vh;
    overflow:hidden;
}

.portfolio__image,
.portfolio-lightbox__image{
  width: 100%;
  display: block;
  border-radius: 15px 15px 0 0;
}

.portfolio-lightbox {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0,1); 
  transition: transform 150ms ease-in-out;
  transform-origin: right; 
  padding: 2em;
  position: fixed;
  top: 0;
  left: 0;
  color: white;
  background: rgba(0, 0, 0, .75);
  width: 100vw;
  height: 100vh;
  z-index: 200;
}

.portfolio-lightbox:target {
  transform: scale(1,1);
  transform-origin: left; 

}

.portfolio-lightbox__content {
  width: 35vw;
  padding: 1em;
  background: white;
  position: relative;
  border-radius: 15px;
}
@media screen and (max-width:1024px) {
    .portfolio-lightbox__content {
        width: 55vw;
    }
}

.portfolio-lightbox__image { margin-bottom: 1em; }

.portfolio-lightbox__close {
  position: absolute;
  right: -1em;
  top: -1em;
  border: white 2px solid;
  display: flex;
  width: 2em;
  height: 2em;
  background: red;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.portfolio-lightbox__close::after {
  content: 'x';
  color: white;
}

.scale {
    transform: scale(0.5) translateY(-55%);
}
@media screen and (max-width:1024px) {
   .scale {
        transform: scale(0.6) translateY(-35%);
    } 
}


#alrt {
    text-align: center;
    color: #4f1ba9;
}

Op dit tabblad leg ik de javascript en JQuery code uit die ik op mijn website gebruik. De meeste functies van mijn website vind je hieronder. De 'Terug naar boven' button staat er niet tussen, maar is ook met JQuery gemaakt. De album op de pagina Mijzelf is de plugin Html5Gallery en is gemaakt met Php en Javascript/JQuery. De code hieronder is opgemaakt met de javascript plugin Highlight.js

Hamburgermenu

// Mobile slidein menu - open
						
	function openmenu() {
		document.getElementById("linkermenu").style.webkittransform = "translateX(0%)";
		document.getElementById("linkermenu").style.moztransform = "translateX(0%)";
		document.getElementById("linkermenu").style.otransform = "translateX(0%)";
		document.getElementById("linkermenu").style.mstransform = "translateX(0%)";
		document.getElementById("linkermenu").style.transform = "translateX(0%)";
	}
						
// Mobile slidein menu - sluit
	
	function sluitmenu() {
		document.getElementById("linkermenu").style.webkittransform = "translateX(-100%)";
		document.getElementById("linkermenu").style.moztransform = "translateX(-100%)";
		document.getElementById("linkermenu").style.otransform = "translateX(-100%)";
		document.getElementById("linkermenu").style.mstransform = "translateX(-100%)";
		document.getElementById("linkermenu").style.transform = "translateX(-100%)";
	}

Tabs

	function openTab(evt, tabName) {
	  var i, tabcontent, tablinks;
		
	  tabcontent = document.getElementsByClassName("tabcontent");
	  for (i = 0; i > tabcontent.length; i++) {
		tabcontent[i].style.display = "none";
	  }

	  tablinks = document.getElementsByClassName("tablink");
	  for (i = 0; i > tablinks.length; i++) {
		tablinks[i].className = tablinks[i].className.replace(" active", "");
	  }

	  document.getElementById(tabName).style.display = "block";
	  evt.currentTarget.className += " active";
	}
	function ClickDefault() {
	document.getElementById("defaultOpen").click();
	}

Alles wat hieronder komt zijn opties waarmee je het uiterlijk van de website kan aanpassen. Dit kun je doen via de jquery-pagina. Alle instellingen die je verandert op deze pagina worden opgeslagen in het geheugen van de browser. Ga je naar een andere pagina dan worden dezelfde instellingen daar ook toegepast. Het commando dat daarvoor zorgt is: sessionStorage.setItem() en sessionStorage.getItem().

Lettergrootte paragraaftekst

	document.getElementById("FontValue").innerHTML = document.getElementById("FontSlider").value;
	
	function FontSize(newvalue_1) {
		document.getElementById("FontValue").innerHTML = newvalue_1;
		$("h2").css('font-size', newvalue_1 + 'px' );
	}

Letterkleur

Paginatitel

	function TitleColor(newvalue_titlecolor) {
	    $("#ShowTitleColorValue").html(newvalue_titlecolor);
	    $("h1").css('color', newvalue_titlecolor);
	    }

Paragraaftekst

	function FontColor(newvalue_fontcolor) {
	    $("#ShowFontColorValue").html(newvalue_fontcolor);
	    $("h2").css('color', newvalue_fontcolor);
	};

Doorzichtigheid

	function convertHex(hex, opacity) {
	    if (!hex) { hex = "#FFFFFF" }; // bij leeg zet een standaardwaarde (dit is als de slider nog niet is gebruikt)
	    if (!opacity) { opacity = 6 }; // bij leeg zet een standaardwaarde (dit is als de slider nog niet is gebruikt)
	    
	    if (opacity >= 0 && opacity <= 9) { opacity = opacity + 'f' };
	    if (opacity == 10) { opacity = 'af' };
	    if (opacity == 11) { opacity = 'bf' };
	    if (opacity == 12) { opacity = 'cf' };
	    if (opacity == 13) { opacity = 'df' };
	    if (opacity == 14) { opacity = 'ef' };
	    if (opacity == 15) { opacity = 'ff' };
	    
	    result = hex + opacity; // plak de omgezette waarden aan elkaar tot een hex/rgba (inclusief opacity)
	    return result;
	}
	function Opacity(newvalue_opacity) {
	    $("#ShowOpacityValue").html(newvalue_opacity);
	    HexOpacity = convertHex(InputSectionColor.value,newvalue_opacity);
	    $("section").css('background', HexOpacity );
	};

Kleur sectie achtergrond

	function SectionColor(newvalue_sectioncolor) {
	    $("#ShowSectionColorValue").html(newvalue_sectioncolor);
	    OpacityValue = document.getElementById("Opacity");
	    Hex2Rgba = convertHex(newvalue_sectioncolor,OpacityValue.value);
	    $("section").css('background', Hex2Rgba );
	};

Hieronder leg ik uit hoe de tekeningen op de pagina canvas zijn gemaakt. Je maakt eerste een canvas aan in HTML met de tag 'canvas' en daarna gebruik je javascript om de tekening te maken

Naam

// Teken mijn naam
	ctx1.lineWidth = 2.5;
	ctx1.beginPath();
	
	// dit is de letter J
	ctx1.moveTo(80,200);
	ctx1.lineTo(80,240);
	ctx1.lineTo(65,240);
	ctx1.lineTo(65,230);
	
	// dit is de letter A
	ctx1.moveTo(90,200);
	ctx1.lineTo(90,240);
	ctx1.moveTo(90,200);
	ctx1.lineTo(105,200);
	ctx1.lineTo(105,240);
	ctx1.moveTo(105,215);
	ctx1.lineTo(90,215);
	
	// dit is de letter H
	ctx1.moveTo(115,200);
	ctx1.lineTo(115,240);
	ctx1.moveTo(115,220);
	ctx1.lineTo(130,220);
	ctx1.moveTo(130,200);
	ctx1.lineTo(130,240);
	
	// dit is de letter L
	ctx1.moveTo(140,200);
	ctx1.lineTo(140,240);
	ctx1.lineTo(155,240);
	
	// dit is de letter A
	ctx1.moveTo(160,200);
	ctx1.lineTo(160,240);
	ctx1.moveTo(160,200);
	ctx1.lineTo(175,200);
	ctx1.lineTo(175,240);
	ctx1.moveTo(175,215);
	ctx1.lineTo(160,215);
	ctx1.closePath();

Huis

// Huis
	ctx2.fillStyle="red";
	ctx2.strokeStyle="black";
	ctx2.lineWidth="3";
	ctx2.save();
    
	// Driehoek voor het dak
	ctx2.beginPath();
	ctx2.moveTo(100,260);
	ctx2.lineTo(300,10);
	ctx2.lineTo(500,260);
	ctx2.closePath();
	ctx2.fill();
	ctx2.stroke();
    
	// schoorsteen
	ctx2.fillRect(381, 60, 45, 120);
	ctx2.strokeRect(381, 60, 45, 140);
	ctx2.fillRect(378, 198, 55, 5);
	ctx2.strokeRect(378, 198, 51, 5);
    
	// muren van het huis
	ctx2.fillStyle="#975B5B";
	ctx2.fillRect(100, 260, 400, 300);
	ctx2.strokeRect(100, 260, 400, 300);
    
	// ramen
	ctx2.fillStyle="black";
	ctx2.fillRect(130, 300, 70, 45);
	ctx2.fillRect(205, 300, 70, 45);
	ctx2.fillRect(325, 300, 70, 45);
	ctx2.fillRect(400, 300, 70, 45);
	ctx2.fillRect(130, 350, 70, 45);
	ctx2.fillRect(205, 350, 70, 45);
	ctx2.fillRect(325, 350, 70, 45);
	ctx2.fillRect(400, 350, 70, 45);
	ctx2.fillRect(325, 425, 70, 45);
	ctx2.fillRect(400, 425, 70, 45);
	ctx2.fillRect(325, 475, 70, 45);
	ctx2.fillRect(400, 475, 70, 45);
    
	// lijnen van de deur
	ctx2.beginPath();
	ctx2.restore();
	ctx2.moveTo(200, 423);
	ctx2.lineTo(200, 560);
	ctx2.moveTo(140,433);
	ctx2.lineTo(140, 560);
	ctx2.moveTo(260,434);
	ctx2.lineTo(260, 560);
	ctx2.stroke();
	ctx2.beginPath();
	ctx2.arc(199,562,140,1.355*Math.PI,1.65*Math.PI);
	
	// boog van de deur
	ctx2.stroke();
    
	// deurknoppen
	ctx2.beginPath();
	ctx2.arc(185,510,5,0,2*Math.PI);
	ctx2.stroke();
	ctx2.beginPath();
	ctx2.arc(215,510,5,0,2*Math.PI);
	ctx2.stroke();

Psychedelic Rainbow Spiral

// Spiral
	ctx3 = canvas3.getContext('2d') /* canvas context */,

	w /* canvas height */, h /* canvas height */,

	t = 0,
	
	max = Math.max,
	pow = Math.pow, sqrt = Math.sqrt,
	PI = Math.PI,
	sin = Math.sin, cos = Math.cos /* just me being lazy */,
    
	/* spiral vars */
	/* https://twitter.com/jackrugile/status/420459385505079296 */
	n = 8 /* shades */,
	m = 4 /* shade repetitions */,
	p = 32 /* dots on each branch */,
	r,
	beta /* branch specific */, gamma /* dot specific */,v
	x0, y0, x1, y1,
	hue,
	t_step = 1/60,
	requestID;
    
	/* FUNCTIONS */
	var trimUnit = function(input_str, unit) {
	  return parseInt(input_str.split(unit)[0], 10);
	};
    
	var spiral = function() {
	  ctx3.clearRect(0, 0, w, h);
		
	  for(var i = 0; i < n*m; i++) {
		beta = i*2*PI/(n*m);
		x0 = 0;
		
		/* Begin the path up here */v
		ctx3.beginPath();
		hue = i*360/n;
		ctx3.translate(w/2, h/2);
		ctx3.rotate(t/3);
		/* only need to set the fillstyle once up here now */
		ctx3.fillStyle = 'hsl(' + hue + ', 100%, 65%)';
			
		for(var j = 0; j < p; j++) {
		  gamma = j*2*PI/p;
		  r = max(1, pow(2*(j*(p - j)), .43) - 10);
		  
		  x0 += 3.4*r;
		  y0 = x0*sin(gamma + 2*t + x0/99)/5;
		  
		  /* change of coordinates */
		  x1 = x0*cos(beta) - y0*sin(beta);
		  y1 = x0*sin(beta) + y0*cos(beta);
		  
		  /* move it to the position of the arc */
		  /* (remove this for a cool effect) */
		  ctx3.moveTo(x1,y1);
		  /* setup the arc path here */
		  ctx3.arc(x1, y1, r, 0, 2*PI);
		}
		
		/* close the 1 path that now is a combination of all the arcs */
		ctx3.closePath();
		/* fill the whole path only once now */
		ctx3.fill();
		/*
		 * reason for moving the fill out of the inner loop:
		 * see https://twitter.com/loktar00/status/420369245378076672
		 * (thanks!)
		 */
		ctx3.rotate(-t/3);
		ctx3.translate(-w/2, -h/2);
	  }
	  
	  t += t_step;
	  
	  requestID = requestAnimationFrame(spiral)
	};
    
	var initCanvas = function() {
	  var s /* canvas style set via CSS */ ;
	  
	  setTimeout(function() {
		s = getComputedStyle(canvas3);
		w = canvas3.width = trimUnit(s.width, 'px');
		h = canvas3.height = trimUnit(s.height, 'px');
    
		
		/* if resizing, make sure to stop the previous animation
		 * before starting a new one */
		/* cancelAnimationFrame(requestID) should be
		 * the requestID returned by requestAnimationFrame
		 * thanks @FWeinb! */
		if(requestID) {
		  cancelAnimationFrame(requestID);
		}
		spiral();
	  }, 0);
	};
    
	/* STEPS */
	initCanvas();
    
	/* fix looks on resize */
	addEventListener('resize', initCanvas, false);
    
    });