diff --git a/static/src/js/app.js b/static/src/js/app.js index 949187d..ccc311b 100644 --- a/static/src/js/app.js +++ b/static/src/js/app.js @@ -1,5 +1,6 @@ var React = require('react'); var ProjectImagesTypes = require('./components/project-images-types'); +var ProjectImagesMain = require('./components/project-images-main'); $(function() { // https://css-tricks.com/snippets/jquery/smooth-scrolling/ $('a[href*=#]:not([href=#])').click(function() { @@ -20,4 +21,5 @@ $(window).load(function(){ $(window).trigger('scroll').trigger('resize'); }); -React.render(, document.getElementById('project-images-types')); \ No newline at end of file +React.render(, document.getElementById('project-images-types')); +React.render(, document.getElementById('project-images-main')); diff --git a/static/src/js/components/project-images-main.js b/static/src/js/components/project-images-main.js new file mode 100644 index 0000000..2ee3de3 --- /dev/null +++ b/static/src/js/components/project-images-main.js @@ -0,0 +1,81 @@ +var React = require('react'); +var ReactBootstrap = require('react-bootstrap'); +var Row = ReactBootstrap.Row; +var ProjectImage = require('./project-image'); + +const DATA = [ + { + className: "college", + title: "College", + text: "My time at college was where I learnt most about programming, and discovered my skill and passion for it.", + link: "", + }, + { + className: "personal", + title: "Personal", + text: "I write code just to write code, but sometimes it serves a purpose.", + link: "", + }, + { + className: "work", + title: "Work", + text: "I'm an apprentice software developer at Dabapps, and this is what I've done.", + link: "", + }, + { + className: "college", + title: "College", + text: "My time at college was where I learnt most about programming, and discovered my skill and passion for it.", + link: "", + }, + { + className: "personal", + title: "Personal", + text: "I write code just to write code, but sometimes it serves a purpose.", + link: "", + }, + { + className: "work", + title: "Work", + text: "I'm an apprentice software developer at Dabapps, and this is what I've done.", + link: "", + } +]; + + +var projectImagesMain = React.createClass({ + keys: [[1,2,3],[4,5,6]], + getInitialState: function () { + return { + hover: 0, + }; + }, + + setHovering: function (key, evt) { + this.setState({hover: key}); + }, + render: function () { + var generate_image = function (key) { + return ( + + ); + }.bind(this); + var images = this.keys.map( function (keyColumns) { + var col = keyColumns.map(function (key) { + return generate_image(key); + }); + return ({col}); + }); + return ( +
+

Projects

+ { images } +
+ ); + } +}); + +module.exports = projectImagesMain; \ No newline at end of file diff --git a/static/src/less/homepage.less b/static/src/less/homepage.less index 7a77c9e..309d7ce 100644 --- a/static/src/less/homepage.less +++ b/static/src/less/homepage.less @@ -85,6 +85,28 @@ } } } + #project-images-main { + background: url(http://catesmechanical.com/images/blueprint-background1.jpg); + background-size: cover; + background-attachment: fixed; + @media screen and (max-width: @screen-xs-max) { + background-attachment: initial; + } + .container { + text-align: center; + margin-top: 27px; + margin-bottom: 35px; + h1 { + margin-top: 0; + margin-bottom: 30px; + color: white; + font-size: 40px; + } + .row { + margin-bottom: 20px; + } + } + } } /* @group project-images */ diff --git a/templates/index.html b/templates/index.html index 615e937..e61425a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -37,4 +37,6 @@ + +
{% endblock %}