From dd46da8127fb46fa85d4a548280e473724dc0395 Mon Sep 17 00:00:00 2001 From: Iain Majer Date: Mon, 10 Jul 2017 13:11:29 +0100 Subject: [PATCH] Fixed scaling and front page on mobile --- .../home.scssc | Bin 6337 -> 6336 bytes app.js | 4 ++- public/css/home.css | 2 +- public/css/home.css.map | 2 +- public/js/init.js | 7 ++-- public/projects/portfolio/info.json | 16 +++++++++- scss/home.scss | 2 +- utils.js | 30 +++++++++++++++++- views/templates/main.pug | 4 ++- 9 files changed, 58 insertions(+), 9 deletions(-) diff --git a/.sass-cache/bfa1df8bfba26aeac0be1b3d5776e17e204042d1/home.scssc b/.sass-cache/bfa1df8bfba26aeac0be1b3d5776e17e204042d1/home.scssc index 8a1862271c5185be27240b66bce21580d2017bde..097bf2dd9563686f9350340170337dfdf2ef8f8e 100644 GIT binary patch delta 274 zcmX?Tc))Oiq`F~>L8^&KQc7}SN~%GUsYz;@k&#(is*#07nwf=(MVf_Cl4Wv=@kR$8 zW>$fm%)Hde0nFh{YzC9pGDq=?Tg&8IOR-xEX0lsLXG%;KWASH{n4HF9$S68_28$jm zP~Jg*@>W)t$w90l{6cWm96;4#lP~hg0mYRV#U_`s%1^FglVAmj3r*h0DyGVxo0+GZ zk(!yFQNm`;8Dg!TZ>_-rA~iX!)jgHCOpFW)DkeW?RpS?ho5~5)Ed@5!icN`8YH}=_ pJfq0uS~h7$(akg2j070>O+F(gJ^7!QngGIdE3iqM<-`{=0sv?qNCp4^ delta 280 zcmX?Lc+hZyq`FbEiA9QqQL?3}nSrH+sYOb1Vv<>6nz?zRv6+EcvZ2v0DpfvRg}MN>3JM@n@8toXld#C^C5} zi=He{-a+45)= zkxy>2FRK!x#N+~2c}CI66Ii8LfodEaCZAw&nfw!|LkO;e6R1NBtiy^;iBW8FESvn~ zepU%qkhsw1nQTS^O#2xpFBBJ%sOC}t0-#59Gg33tGfJ!!z<#lw{76iDv$FVHMgUxo BM$iBN diff --git a/app.js b/app.js index 2e3f5c9..b49b68e 100644 --- a/app.js +++ b/app.js @@ -19,7 +19,9 @@ app.get('/', function (req, res) { //About Me page app.get('/about', function (req, res) { - res.render('about', { site: site, title: 'About Me', url: req.url }) + var languages = utils.getLanguages(); + var tools = utils.getTools(); + res.render('about', { site: site, title: 'About Me', url: req.url, langs: languages, tools: tools }) }) //About Me page diff --git a/public/css/home.css b/public/css/home.css index 578f772..b008437 100644 --- a/public/css/home.css +++ b/public/css/home.css @@ -1,7 +1,7 @@ .parallax-container { - min-height: 380px; line-height: 0; height: auto; + min-height: 420px; color: rgba(255, 255, 255, 0.9); } .parallax-container .section { width: 100%; } diff --git a/public/css/home.css.map b/public/css/home.css.map index a00d9b5..f4dace0 100644 --- a/public/css/home.css.map +++ b/public/css/home.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAAA,mBAAoB;EAChB,UAAU,EAAE,KAAK;EACjB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,wBAAuB;EAE9B,4BAAS;IACL,KAAK,EAAE,IAAI;;AAInB,yCAA0C;EACtC,4BAA6B;IACzB,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,GAAG;;EAEZ,sBAAuB;IACnB,GAAG,EAAE,GAAG;AAGhB,yCAA0C;EACtC,sBAAuB;IACnB,GAAG,EAAE,CAAC", +"mappings": "AAAA,mBAAoB;EAChB,WAAW,EAAE,CAAC;EACd,MAAM,EAAE,IAAI;EACZ,UAAU,EAAC,KAAK;EAChB,KAAK,EAAE,wBAAuB;EAE9B,4BAAS;IACL,KAAK,EAAE,IAAI;;AAInB,yCAA0C;EACtC,4BAA6B;IACzB,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,GAAG;;EAEZ,sBAAuB;IACnB,GAAG,EAAE,GAAG;AAGhB,yCAA0C;EACtC,sBAAuB;IACnB,GAAG,EAAE,CAAC", "sources": ["../../scss/home.scss"], "names": [], "file": "home.css" diff --git a/public/js/init.js b/public/js/init.js index caca7bb..6cbed32 100644 --- a/public/js/init.js +++ b/public/js/init.js @@ -2,8 +2,11 @@ $(function () { $('.button-collapse').sideNav({ - draggable: true - }); + menuWidth: 300, // Default is 300 + edge: 'left', // Choose the horizontal origin + draggable: true // Choose whether you can drag to open on touch screens + } + ); }); // end of document ready })(jQuery); // end of jQuery name space \ No newline at end of file diff --git a/public/projects/portfolio/info.json b/public/projects/portfolio/info.json index eae6c26..0de3d05 100644 --- a/public/projects/portfolio/info.json +++ b/public/projects/portfolio/info.json @@ -2,5 +2,19 @@ "name":"Portfolio", "version":"1.0", "description":"This is a website to showcase my personal projects", - "git":"https://github.com/iainvm/portfolio" + "git":"https://github.com/iainvm/portfolio", + "languages":[ + "JS", + "HTML", + "SCSS", + "pug", + "JSON" + ], + "tools":[ + "Node", + "npm", + "express", + "nginx", + "linux" + ] } \ No newline at end of file diff --git a/scss/home.scss b/scss/home.scss index aa96e0a..318c7f3 100644 --- a/scss/home.scss +++ b/scss/home.scss @@ -1,7 +1,7 @@ .parallax-container { - min-height: 380px; line-height: 0; height: auto; + min-height:420px; color: rgba(255, 255, 255, .9); .section { diff --git a/utils.js b/utils.js index 82dc7e5..bcbcc27 100644 --- a/utils.js +++ b/utils.js @@ -19,4 +19,32 @@ exports.getProject = function(pName) { } return projects[pName]; -}; \ No newline at end of file +}; + +exports.getLanguages = function() { + var projects = exports.getProjects(); + + var languages = {}; + + for (project in projects){ + for (language in projects.languages){ + languages[language] += 1; + } + } + + return languages; +} + +exports.getTools = function() { + var projects = exports.getProjects(); + + var tools = {}; + + for (project in projects){ + for (tool in projects.tools){ + tools[tool] += 1; + } + } + + return tools; +} \ No newline at end of file diff --git a/views/templates/main.pug b/views/templates/main.pug index 84e6925..56f76f6 100644 --- a/views/templates/main.pug +++ b/views/templates/main.pug @@ -1,7 +1,9 @@ //- Main template used across the entire site -html +html(lang="en") block vars head + meta(http-equiv="Content-Type", content="text/html; charset=UTF-8") + meta(name="viewport", content="width=device-width, initial-scale=1") //- Site title title #{site.name} - #{title}