Add projects to index
This commit is contained in:
parent
eac8189aed
commit
0563b4dec3
6 changed files with 45 additions and 86 deletions
|
@ -75,90 +75,21 @@
|
||||||
<section class="no-padding" id="projects">
|
<section class="no-padding" id="projects">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row no-gutter">
|
<div class="row no-gutter">
|
||||||
|
{% for project in INDEX_PROJECTS %}
|
||||||
<div class="col-lg-4 col-sm-6">
|
<div class="col-lg-4 col-sm-6">
|
||||||
<a href="#" class="portfolio-box">
|
<a href="{{ project.url }}" class="portfolio-box image" data-image="{{ project.image }}">
|
||||||
<div class="portfolio-box-caption">
|
<div class="portfolio-box-caption">
|
||||||
<div class="portfolio-box-caption-content">
|
<div class="portfolio-box-caption-content">
|
||||||
<div class="project-category">
|
|
||||||
Category
|
|
||||||
</div>
|
|
||||||
<div class="project-name">
|
<div class="project-name">
|
||||||
Project Name
|
<h2>
|
||||||
</div>
|
{{ project.name }}
|
||||||
</div>
|
</h2>
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-4 col-sm-6">
|
|
||||||
<a href="#" class="portfolio-box">
|
|
||||||
<div class="portfolio-box-caption">
|
|
||||||
<div class="portfolio-box-caption-content">
|
|
||||||
<div class="project-category">
|
|
||||||
Category
|
|
||||||
</div>
|
|
||||||
<div class="project-name">
|
|
||||||
Project Name
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-4 col-sm-6">
|
|
||||||
<a href="#" class="portfolio-box">
|
|
||||||
<div class="portfolio-box-caption">
|
|
||||||
<div class="portfolio-box-caption-content">
|
|
||||||
<div class="project-category">
|
|
||||||
Category
|
|
||||||
</div>
|
|
||||||
<div class="project-name">
|
|
||||||
Project Name
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-4 col-sm-6">
|
|
||||||
<a href="#" class="portfolio-box">
|
|
||||||
<div class="portfolio-box-caption">
|
|
||||||
<div class="portfolio-box-caption-content">
|
|
||||||
<div class="project-category">
|
|
||||||
Category
|
|
||||||
</div>
|
|
||||||
<div class="project-name">
|
|
||||||
Project Name
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-4 col-sm-6">
|
|
||||||
<a href="#" class="portfolio-box">
|
|
||||||
<div class="portfolio-box-caption">
|
|
||||||
<div class="portfolio-box-caption-content">
|
|
||||||
<div class="project-category">
|
|
||||||
Category
|
|
||||||
</div>
|
|
||||||
<div class="project-name">
|
|
||||||
Project Name
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-4 col-sm-6">
|
|
||||||
<a href="#" class="portfolio-box">
|
|
||||||
<div class="portfolio-box-caption">
|
|
||||||
<div class="portfolio-box-caption-content">
|
|
||||||
<div cass="project-category">
|
|
||||||
Category
|
|
||||||
</div>
|
|
||||||
<div class="project-name">
|
|
||||||
Project Name
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 text-center">
|
<div class="col-xs-12 text-center">
|
||||||
|
|
|
@ -32,8 +32,9 @@ LINKS = (('Pelican', 'http://getpelican.com/'),
|
||||||
('You can modify those links in your config file', '#'),)
|
('You can modify those links in your config file', '#'),)
|
||||||
|
|
||||||
# Social widget
|
# Social widget
|
||||||
import social
|
import links
|
||||||
SOCIAL = social.generate()
|
SOCIAL = links.social()
|
||||||
|
INDEX_PROJECTS = links.index_projects()
|
||||||
|
|
||||||
# Disable some pages
|
# Disable some pages
|
||||||
TAG_URL = False
|
TAG_URL = False
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
from random import shuffle
|
||||||
|
|
||||||
|
|
||||||
SocialLink = namedtuple('SocialLink', ['name', 'url', 'icon'])
|
SocialLink = namedtuple("SocialLink", ["name", "url", "icon"])
|
||||||
|
ProjectLink = namedtuple("ProjectLink", ["name", "url", "image"])
|
||||||
|
|
||||||
|
|
||||||
def generate():
|
def social():
|
||||||
return {
|
return {
|
||||||
"github": SocialLink("GitHub", "https://github.com/RealOrangeOne", "fa-github"),
|
"github": SocialLink("GitHub", "https://github.com/RealOrangeOne", "fa-github"),
|
||||||
"twitter": SocialLink("Twitter", "https://twitter.com/RealOrangeOne", "fa-twitter"),
|
"twitter": SocialLink("Twitter", "https://twitter.com/RealOrangeOne", "fa-twitter"),
|
||||||
|
@ -12,3 +14,12 @@ def generate():
|
||||||
"instagram": SocialLink("Instagram", "https://instagram.com/RealOrangeOne", "fa-instagram"),
|
"instagram": SocialLink("Instagram", "https://instagram.com/RealOrangeOne", "fa-instagram"),
|
||||||
"youtube": SocialLink("YouTube", "https://youtube.com/user/TheOrangeOneOfficial", "fa-youtube")
|
"youtube": SocialLink("YouTube", "https://youtube.com/user/TheOrangeOneOfficial", "fa-youtube")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def index_projects():
|
||||||
|
projects = [
|
||||||
|
ProjectLink("Student Robotics", "/robotics/", "https://c2.staticflickr.com/8/7711/17122633430_e1b599fe47.jpg"),
|
||||||
|
ProjectLink("Dotfiles", "/projects/dotfiles/", "http://jleajones.com/assets/images/dotfiles.png")
|
||||||
|
]
|
||||||
|
shuffle(projects)
|
||||||
|
return projects
|
|
@ -1 +1,7 @@
|
||||||
import './creative';
|
import './creative';
|
||||||
|
|
||||||
|
$('.image').each(function () {
|
||||||
|
const ele = $(this);
|
||||||
|
console.log('ITTERATING', ele.data('image'));
|
||||||
|
ele.css('background-image', 'url(' + ele.data('image') + ')');
|
||||||
|
});
|
||||||
|
|
|
@ -2,4 +2,8 @@
|
||||||
background-color: $brand-grey-dark;
|
background-color: $brand-grey-dark;
|
||||||
max-width: initial;
|
max-width: initial;
|
||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
|
|
||||||
|
.portfolio-box-caption {
|
||||||
|
background-color: transparentize($brand-orange, 0.3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,3 +39,9 @@ p a {
|
||||||
.btn i {
|
.btn i {
|
||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
Reference in a new issue