├── README.md ├── static └── css │ └── style.css └── templates ├── account ├── login.html ├── logout.html └── signup.html ├── base.html ├── index.html └── post_detail.html /README.md: -------------------------------------------------------------------------------- 1 | ![CI logo](https://codeinstitute.s3.amazonaws.com/fullstack/ci_logo_small.png) 2 | 3 | # Starter files for Django blog project 4 | 5 | This repo contains the starter templates and CSS file for the Django blog project. 6 | 7 | Copy these HTML files into your `templates` directory 8 | 9 | Copy the `style.css` file into the `static/css` directory -------------------------------------------------------------------------------- /static/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F9FAFC; 3 | } 4 | 5 | .brand { 6 | font-family: Lato, sans-serif; 7 | font-size: 1.4rem; 8 | font-weight: 700; 9 | color: #4A4A4F; 10 | } 11 | 12 | .red-o { 13 | color: #E84610; 14 | } 15 | 16 | .thin { 17 | font-weight: 300; 18 | } 19 | 20 | .light-bg { 21 | background-color: #fff; 22 | } 23 | 24 | .dark-bg { 25 | background-color: #445261; 26 | } 27 | 28 | .main-bg { 29 | background-color: #F9FAFC; 30 | } 31 | 32 | .card { 33 | border: none; 34 | background-color: transparent; 35 | } 36 | 37 | .image-container { 38 | position: relative; 39 | } 40 | 41 | .image-flash { 42 | position: absolute; 43 | bottom: 5%; 44 | min-width: 30%; 45 | left: -2px; 46 | background-color: #23BBBB; 47 | } 48 | 49 | .author { 50 | color: white; 51 | margin: 4px; 52 | text-transform: uppercase; 53 | } 54 | 55 | .masthead { 56 | margin-top: 10px; 57 | overflow: hidden; 58 | position: relative; 59 | display: inline-block; 60 | height: 33vh; 61 | width: 100%; 62 | } 63 | 64 | .masthead-text { 65 | background-color: #445261; 66 | color: white; 67 | position: relative; 68 | } 69 | 70 | .masthead-image { 71 | position: relative; 72 | overflow: hidden; 73 | } 74 | 75 | .masthead-image:after { 76 | content: ""; 77 | position: absolute; 78 | top: 0; 79 | right: 90%; 80 | height: 100%; 81 | width: 150%; 82 | background: #445261; 83 | -webkit-transform: skew(15deg); 84 | -moz-transform: skew(15deg); 85 | transform: skew(15deg); 86 | z-index: 100; 87 | } 88 | 89 | .post-link { 90 | text-decoration: none; 91 | color: #445261; 92 | } 93 | 94 | .post-link:hover, 95 | .page-link { 96 | color: #E84610; 97 | } 98 | 99 | .post-title { 100 | margin-top: 20%; 101 | margin-left: 5%; 102 | } 103 | 104 | .post-subtitle { 105 | margin-left: 5%; 106 | color: lightgray; 107 | } 108 | 109 | .btn-signup { 110 | background-color: #23BBBB; 111 | color: #fff; 112 | } 113 | 114 | .btn-signup:hover, 115 | .btn-signup:active { 116 | background-color: #fff; 117 | color: #23BBBB; 118 | } 119 | 120 | .link { 121 | color: #23BBBB; 122 | text-decoration: none; 123 | } 124 | 125 | .link:hover, 126 | .link:active { 127 | color: #445261; 128 | text-decoration: underline; 129 | } 130 | 131 | .btn-like { 132 | color: #E84610; 133 | border: none; 134 | background: transparent; 135 | } 136 | 137 | .btn-like:hover, 138 | .btn-like:active { 139 | color: #E84610; 140 | background: transparent; 141 | border: none; 142 | } -------------------------------------------------------------------------------- /templates/account/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% load i18n %} 4 | {% load account socialaccount %} 5 | 6 | {% block head_title %}{% trans "Sign In" %}{% endblock %} 7 | 8 | {% block content %} 9 | 10 |
11 |
12 |
13 |

{% trans "Sign In" %}

14 | 15 |

{% blocktrans %}Welcome back to the code|star blog. To leave a comment or like a post, please log in. If 16 | you 17 | have not created an account yet, then sign up 18 | first.{% endblocktrans %}

19 |
20 |
21 |
22 |
23 | 31 |
32 |
33 |
34 | {% endblock %} -------------------------------------------------------------------------------- /templates/account/logout.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Sign Out" %}{% endblock %} 6 | 7 | {% block content %} 8 |
9 |
10 |
11 |

{% trans "Sign Out" %}

12 | 13 |

{% trans 'Are you sure you want to sign out?' %}

14 |
15 |
16 |
17 |
18 | 19 |
20 | {% csrf_token %} 21 | {% if redirect_field_value %} 22 | 23 | {% endif %} 24 | 25 |
26 |
27 |
28 |
29 | {% endblock %} -------------------------------------------------------------------------------- /templates/account/signup.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% load i18n %} 4 | 5 | {% block head_title %}{% trans "Signup" %}{% endblock %} 6 | 7 | {% block content %} 8 |
9 |
10 |
11 |

{% trans "Sign Up" %}

12 | 13 |

{% blocktrans %}Welcome back to the code|star blog. Do you already have an account? Then please sign in instead.{% endblocktrans %}

15 |
16 |
17 |
18 |
19 | 27 |
28 |
29 |
30 | 31 | {% endblock %} -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | CodeStar Blog 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 59 | 60 |
61 | {% block content %} 62 | 63 | {% endblock content %} 64 |
65 | 66 | 67 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |
6 |
7 | 8 | 9 |
10 |
11 | 12 |
13 |
14 |
15 | 16 |
17 | 18 | {%endblock%} -------------------------------------------------------------------------------- /templates/post_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} {% block content %} 2 | 3 |
4 |
5 |
6 |
7 | 8 |

9 |

10 | 11 |

|

12 |
13 |
14 | 15 | {% if "placeholder" in post.featured_image.url %} 16 | 17 | {% else %} 18 | 19 | {% endif %} 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 | 31 |

32 |
33 | 34 |
35 | 36 | 37 |
38 |
39 | {% with comments.count as total_comments %} 40 | 41 | 42 | 43 | {% endwith %} 44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |

Comments:

57 |
58 | 59 | {% %} 60 |
61 |

62 | 63 | {{ }} 64 | 65 | 66 | {{ }} 67 | wrote: 68 |

69 | 70 | {{ | linebreaks }} 71 |
72 | 73 | {% %} 74 |
75 |
76 |
77 |
78 | 79 |
80 |
81 |
82 |
83 | 84 | {% endblock content %} --------------------------------------------------------------------------------