fix: styles on home page
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
<div class="course-preview">
|
<div class="course-teaser">
|
||||||
<h3 class="course-title"><a href="/courses/{{ course.slug }}">{{ course.title }}</a></h3>
|
<div class="course-body">
|
||||||
<div class="course-intro">
|
<h3 class="course-title"><a href="/courses/{{ course.slug }}">{{ course.title }}</a></h3>
|
||||||
{{ course.short_introduction or "" }}
|
<div class="course-intro">
|
||||||
|
{{ course.short_introduction or "" }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="course-footer">
|
<div class="course-footer">
|
||||||
<div class="course-author">
|
<div class="course-author">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="sketch-preview">
|
<div class="sketch-teaser">
|
||||||
<div class="sketch-image">
|
<div class="sketch-image">
|
||||||
<a href="/sketches/{{sketch.sketch_id}}">
|
<a href="/sketches/{{sketch.sketch_id}}">
|
||||||
{{ sketch.to_svg() }}
|
{{ sketch.to_svg() }}
|
||||||
|
|||||||
@@ -25,12 +25,14 @@
|
|||||||
--cta-color: var(--c4);
|
--cta-color: var(--c4);
|
||||||
--send-message: var(--c7);
|
--send-message: var(--c7);
|
||||||
--received-message: var(--c8);
|
--received-message: var(--c8);
|
||||||
|
|
||||||
|
--primary-color: #08B74F;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
background: var(--bg);
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.course-header {
|
.course-header {
|
||||||
@@ -200,10 +202,6 @@ img.profile-photo {
|
|||||||
|
|
||||||
/* override style of base */
|
/* override style of base */
|
||||||
|
|
||||||
nav.navbar {
|
|
||||||
background: var(--c1) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message {
|
.message {
|
||||||
border: 1px dashed var(--text-color);
|
border: 1px dashed var(--text-color);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@@ -293,24 +291,69 @@ nav.navbar {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sketch-preview {
|
.sketch-teaser {
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sketch-preview svg {
|
.sketch-teaser svg {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sketch-image {
|
.sketch-image {
|
||||||
background: white;
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sketch-footer {
|
.sketch-footer {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: #eee;
|
background: #eee;
|
||||||
|
border-radius: 0px 0px 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.course-teaser {
|
||||||
|
background: white;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.course-teaser h3, .course-teaser h4 {
|
||||||
|
color: black;
|
||||||
|
font-weight: bold;;
|
||||||
|
}
|
||||||
|
|
||||||
|
.course-teaser .course-body, .course-teaser .course-footer {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.course-body {
|
||||||
|
min-height: 8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.course-footer {
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.course-teaser a, .course-teaser a:hover {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 60px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
section h2 {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.lightgray {
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hero .jumbotron {
|
||||||
|
background: inherit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +1,51 @@
|
|||||||
{% extends "templates/base.html" %}
|
{% extends "templates/base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
|
||||||
{{ HeroSection() }}
|
{{ HeroSection() }}
|
||||||
{{ ExploreCourses(courses) }}
|
{{ ExploreCourses(courses) }}
|
||||||
{{ RecentSketches(recent_sketches) }}
|
{{ RecentSketches(recent_sketches) }}
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% macro HeroSection() %}
|
{% macro HeroSection() %}
|
||||||
<div>TODO: Hero
|
<section id="hero">
|
||||||
</div>
|
<div class="container">
|
||||||
|
<div class="jumbotron">
|
||||||
|
<h1 class="display-4">Guided online courses, with a mentor at your back.</h1>
|
||||||
|
<p class="lead">Hands-on online courses designed by experts, delivered by passionate mentors.</p>
|
||||||
|
<p class="lead">
|
||||||
|
<a class="btn btn-primary btn-lg" href="#" role="button">Request Invite</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro ExploreCourses(courses) %}
|
{% macro ExploreCourses(courses) %}
|
||||||
<div id="explore-courses">
|
<section id="explore-courses" class="lightgray">
|
||||||
<h2>Explore Courses</h2>
|
<div class="container lightgray">
|
||||||
<div class="row">
|
<h2>Explore Courses</h2>
|
||||||
{% for course in courses %}
|
<div class="row">
|
||||||
<div class="col-md-6">
|
{% for course in courses %}
|
||||||
{{ widgets.CoursePreview(course=course) }}
|
<div class="col-md-6">
|
||||||
</div>
|
{{ widgets.CourseTeaser(course=course) }}
|
||||||
{% endfor %}
|
</div>
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro RecentSketches(sketches) %}
|
{% macro RecentSketches(sketches) %}
|
||||||
<div id="recet-sketches">
|
<section id="recet-sketches">
|
||||||
<h2>Recent Sketches</h2>
|
<div class="container">
|
||||||
<div class="row">
|
<h2>Recent Sketches</h2>
|
||||||
{% for sketch in sketches %}
|
<div class="row">
|
||||||
<div class="col-md-3">
|
{% for sketch in sketches %}
|
||||||
{{ widgets.SketchPreview(sketch=sketch) }}
|
<div class="col-md-3">
|
||||||
|
{{ widgets.SketchTeaser(sketch=sketch) }}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
Reference in New Issue
Block a user