Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front end #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,5 @@ venv.bak/
*.sqlite3

.DS_Store
run_local.sh
run_local.sh
heroku_set_up.sh
25 changes: 19 additions & 6 deletions portfolio_site/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,30 @@
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases

# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
# }
# }
#
# # Heroku: Update database configuration from $DATABASE_URL.
# import dj_database_url
# db_from_env = dj_database_url.config(conn_max_age=500)
# print(db_from_env)
# DATABASES['default'].update(db_from_env)

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'd4t8oek1tejat0',
'USER': 'bxuftnhvdoaeqe',
'PASSWORD': os.environ.get('DB_PASSWORD', None),
'HOST': 'ec2-107-20-224-137.compute-1.amazonaws.com',
'PORT': '5432',
}
}

# Heroku: Update database configuration from $DATABASE_URL.
import dj_database_url
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)


# Internationalization
Expand Down
1 change: 1 addition & 0 deletions projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class Project(models.Model):
)

title = models.CharField(max_length=250)
subtitle = models.CharField(max_length=250, null=True)
slug = models.SlugField(max_length=250, unique_for_date='start_date')
body = models.TextField()
image = models.ImageField(upload_to=build_timestamped_filename, blank=True)
Expand Down
67 changes: 50 additions & 17 deletions projects/templates/projects/project/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,58 @@

<div class="row" >

<div class="col-md-4"></div>
<div class="col-md-8">
<div id="project-image-bg" class="col-md-4"></div>
<div id="project-info-box" class="col-md-8 ">
<h1>{{ project.title }}</h1>
<p class="tags">
Tags:
{% for tag in project.tags.all %}
<a href="{% url "projects:project_list_by_tag" tag.slug %}">
{{ tag.name }}
</a>
{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
<p class="date">
Published {{ project.start_date }}
</p>
{{ project.body|linebreaks }}
<h3>{{ project.subtitle }}</h3>

<div class="row justify-content-center" >

{% for tag in project.tags.all %}
<a href="{% url "projects:project_list_by_tag" tag.slug %}">
<div class="tag">
{{ tag.name }}
</div>
</a>
{% if not forloop.last %}, {% endif %}
{% endfor %}
</div>

{{ project.body|linebreaks }}

<div class="row justify-content-center" >
{% if project.publication_url %}
<a href="{{ project.publication_url }}">
<div class="item-boxes">
<div class="icon">
<i class="lnr lnr-book"></i>
</div>
</div>
</a>
{% endif %}
{% if project.code_url %}
<a href="{{ project.code_url }}">
<div class="item-boxes">
<div class="icon">
<i class="lnr lnr-code"></i>
</div>

</div>
</a>
{% endif %}
{% if project.external_url %}
<a href="{{ project.external_url }}">
<div class="item-boxes">
<div class="icon">
<i class="lnr lnr-link"></i>
</div>
</div>
</a>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</section>

{% endblock %}
58 changes: 43 additions & 15 deletions static/css/mine.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
.project-section {
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100%;
}

#hero-area .contents h1 {
font-size: 38px;
font-size: 2.8em;

}

#hero-area .contents p {
font-size: 28px;
font-size: 1.7em;

}

Expand All @@ -34,24 +29,57 @@
bottom: 0;
z-index: .5;
display: inline-block;
background: rgba(110, 100, 0, 0.1) url("https://www.streetbees.com/assets/hivepattern-68406b882c1cd4cfbe2bc5a493d7562ba5baaae76d27009c1c6888b4f6383060.png") 0 0 repeat;
background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/ice-age.png") 0 0 repeat;
background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/noisy-grid.png") 0 0 repeat;
background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/random-grey-variations.png") 0 0 repeat;

/*
background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/random-grey-variations.png") 0 0 repeat;
background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/noisy-grid.png") 0 0 repeat;
*/

background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/binding-dark.png") 0 0 repeat;
background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/3px-tile.png") 0 0 repeat;


background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/bright-squares.png") 0 0 repeat;
}

background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/3px-tile.png") 0 0 repeat;
background: rgba(110, 100, 0, 0.2) url("http://www.transparenttextures.com/patterns/squared-metal.png") 0 0 repeat;
.project-section {
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100%;
min-height: 800px;
}

#project-info-box {
/*
-moz-box-shadow: 0 0 25px 20px #fffff;
-webkit-box-shadow: 0 0 25px 20px #ffffff;
box-shadow: 0 0 25px 20px #ffffff;
*/
background-color:white;
padding: 40px;
}

#project-info-box h1 {
text-align:center;
}

#project-image-bg {

min-height:15em;
}

.tag {
color: #fff !important;
background: #61D2B4;
padding: 0 22px;
margin-top: 20px;
margin-bottom: 20px;
line-height: 40px;
border-radius: 30px;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}


#hero-area {
background: url(../img/5558581585_ae1bbc86f9_o.jpg) fixed no-repeat;
background-size: 100%;
Expand Down
Binary file added static/img/logo_tbc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 8 additions & 5 deletions templates/fixed_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a href="index.html" class="navbar-brand"><img class="img-fulid" src="/static/img/logo.png" alt=""></a>
<a href="index.html" class="navbar-brand"><img class="img-fulid" src="/static/img/logo_tbc.png" alt=""></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false" aria-label="Toggle navigation">
<i class="lnr lnr-menu"></i>
</button>
Expand Down Expand Up @@ -97,16 +97,19 @@
<div class="col-lg-6 col-sm-6 col-xs-12">
<ul class="footer-links">
<li>
<a href="#">Homepage</a>
<a href="/#hero-area">Homepage</a>
</li>
<li>
<a href="#">Services</a>
<a href="/#services">Services</a>
</li>
<li>
<a href="#">About Us</a>
<a href="/projects">Projects</a>
</li>
<li>
<a href="/blog">Blog</a>
</li>
<li>
<a href="#">Contact</a>
<a href="/#contact">Contact</a>
</li>
</ul>
</div>
Expand Down
Loading