Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
779de2d
feat: add i18n support (#115)
Gonzom Jan 30, 2021
6370ef2
Revert "feat: add i18n support (#115)" (#161)
yammesicka Jan 30, 2021
7f38da9
Update our production site. (#209)
yammesicka Feb 5, 2021
139275b
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
PureDreamer Feb 10, 2021
5c481bb
added about page
PureDreamer Feb 13, 2021
6e890ec
fixed conflicts
PureDreamer Feb 13, 2021
9ebd97c
fixed typos
PureDreamer Feb 13, 2021
7e551bf
edited text input
PureDreamer Feb 13, 2021
920a242
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
PureDreamer Feb 13, 2021
b6aaf21
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
PureDreamer Feb 14, 2021
a5bffb9
changed requested changes
PureDreamer Feb 14, 2021
e7fee5f
Delete utils.py
PureDreamer Feb 14, 2021
aef47b9
Update profile.html
PureDreamer Feb 14, 2021
71d25ff
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
PureDreamer Feb 15, 2021
bd00b18
Revert "changed requested changes"
PureDreamer Feb 15, 2021
46071d1
Revert "Delete utils.py"
PureDreamer Feb 15, 2021
7fce4ec
test for about us
PureDreamer Feb 15, 2021
11e1e0a
Update about.css
PureDreamer Feb 15, 2021
64350be
Update about_us.html
PureDreamer Feb 15, 2021
943856e
changed by feedback
PureDreamer Feb 15, 2021
7ffa642
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
PureDreamer Feb 15, 2021
8f4defa
fixed requested changes
PureDreamer Feb 15, 2021
2bdc454
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
PureDreamer Feb 15, 2021
65d430b
Merge branch 'develop' of https://github.com/PythonFreeCourse/calenda…
PureDreamer Feb 16, 2021
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
4 changes: 3 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create_tables(engine, psql_environment):
from app.routers import ( # noqa: E402
agenda, calendar, categories, celebrity, currency, dayview,
email, event, four_o_four, invitation, profile, search,
weekview, telegram, whatsapp,
weekview, telegram, whatsapp, about_us,
)

json_data_loader.load_to_db(next(get_db()))
Expand All @@ -59,6 +59,8 @@ def create_tables(engine, psql_environment):
search.router,
telegram.router,
whatsapp.router,
about_us.router,

]

for router in routers_to_include:
Expand Down
Binary file added app/media/free-python-course-4k.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: 13 additions & 0 deletions app/routers/about_us.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from fastapi import APIRouter, Request

from app.dependencies import templates


router = APIRouter()


@router.get("/about")
def about(request: Request):
return templates.TemplateResponse("about_us.html", {
"request": request,
})
56 changes: 56 additions & 0 deletions app/static/about.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
body {
margin: 0;
padding: 0;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #F7F7F7;
}

.moving-words {
font-family: "Assistant", "Ariel", sans-serif;
text-transform: uppercase;
font-size: 6em;
letter-spacing: 4px;
overflow: hidden;
background: linear-gradient(90deg, #000, #fff, #000);
background-repeat: no-repeat;
background-size: 80%;
animation: animate 4s linear infinite;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: rgba(255, 255, 255, 0);
}

@keyframes animate {
0% {
background-position: -500%;
}
100% {
background-position: 500%;
}
}


/* credit for the animation goes to FrankieDoodie */

.infographic {
display: block;
margin-left: auto;
margin-right: auto;
width: 100%;
}

.abouttext {
font-size: 1.2em;
text-align: justify;
}

a {
text-decoration: none;
color: inherit;
}

.course {
width: 50%;
}
101 changes: 101 additions & 0 deletions app/templates/about_us.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<!DOCTYPE html>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no need to create a full new HTML page for getting the navigation bar.
Please inherent the navigation:
I'd recommand to copy the "calendar_base.html" file and put your content inside:

    {% block content %}
    {% endblock content %}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didnt use this instead I added
{% extends "base.html" %}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and Ive added the
{% block content %} {% endblock content %}

<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link href="{{ url_for('static', path='/about.css') }}" rel="stylesheet">
<title>About Us</title>
</head>

<body>

<nav class="navbar navbar-expand-lg bg-transparent">
<div class="container-fluid">
<a class="navbar-brand" href="/">{{ gettext("Calendar") }}</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="{{ url_for('home') }}">{{ gettext("Home") }}</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="{{ url_for('profile') }}">{{ gettext("Profile") }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">{{ gettext("Sign in") }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">{{ gettext("Sign up") }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('agenda') }}">{{ gettext("Agenda") }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('view_invitations') }}">Invitations</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/search">Search</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/celebrity">Celebrities Born Today</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('salary_home') }}">Salary</a>
</li>
</ul>
</div>
</div>
</nav>
<br>
<div class="container">
<h1 class="moving-words">About The Project</h1>
<!-- credit for the animation goes to FrankieDoodie -->
<div>
<h3>Do you have a dream? How will you make it come true?</h3>
<p class="abouttext">
My dream will require some hard work. I know I MUST be:</p>
<ul>
<li> Organized</li>
<li>Well prepared</li>
<li>Plan ahead</li>
</ul>

<p class="abouttext">We started this project as a course project. Step by step it became our dream, this calendar is built by programmers. One of its many traits is the ability to add features.</p>
<ul>
<li> Want to monitor your expenses? We got it.</li>
<li>Want to organize a zoom meeting while still under quarantine? We got it.</li>
</ul>
<p class="abouttext">Even better - you got it! Develop your own feature and add it to the calendar. This calendar is open source developed mostly in Python as the finale to an extraordinary course. For the calendar development we selected features, aiming at required
and unique. Then each of us began the journey to implement it in the calendar. We worked collaboratively to put it together.
<br> if you like what you just read, please <a href="sign_in">sign in.</a>
</p>
</div>
<br><br><br><br>
<blockquote class="blockquote text-center">
<p class="mb-0"><i>“If you want to go fast, go alone. If you want to go far, go together.”</i></p><br>
<footer class="blockquote-footer"><cite title="Source Title">African proverb</cite></footer>
</blockquote>
<br><br><br><br>
<h1 class="moving-words">Our Story</h1>
<div>
<p class="abouttext"> When this online course started, we did not know what <em>"Hello World"</em>?meant.<br> Now, we have created this calendar. This project was created as our concluding project in the online “python free and for all” course by <a href="https://www.linkedin.com/in/mesicka/">Yam Mesicka</a>,
a course that has helped us set foot in the world of programming. The course took us from complete newbies to decent programmers. The course curriculum can be found in the attached infographic.</p><br> <br><br>
<p class="abouttext">The materials of the first half of the course can be found on GitHub, you can take a look right <a href="https://github.com/PythonFreeCourse/Notebooks">here.</a></p>
</div>
<div>
<img class="infographic" src="{{ url_for('media', path='free-python-course-4k.png') }}" alt="Course infographic">
</div>

<div>
<h2> We thank you for letting us share our story and hope you will enjoy our project.</h2>
<p>If you enjoy it please consider giving us a star in our <a href="https://github.com/PythonFreeCourse/calendar">GitHub repository.</a></p>
</div>
</div>
</body>

</html>
27 changes: 10 additions & 17 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
<html lang="en">

<head>
{% block head %}
{% block head %}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<link rel="icon" href="{{ url_for('static', path='/images/icons/calendar-outline.svg') }}" />
<link href="{{ url_for('static', path='/style.css') }}" rel="stylesheet">
<script type="module" src="https://unpkg.com/ionicons@5.4.0/dist/ionicons/ionicons.esm.js"></script>
Expand All @@ -22,8 +21,7 @@
<div class="relative overflow-hidden">
<div class="relative pt-6 px-4 sm:px-6 lg:px-8">
<nav class="navbar navbar-expand-md navbar-light">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler"
aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-brand">
Expand Down Expand Up @@ -51,27 +49,22 @@
<li class="nav-item">
<a class="nav-link" href="{{ url_for('search') }}">Search</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('about') }}">{{ gettext("About Us") }}</a>
</li>
</ul>
</div>
</nav>
</div>

{% block content %}{% endblock %}
</div>
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"
integrity="sha384-SlE991lGASHoBfWbelyBPLsUlwY1GwNDJo3jSJO04KZ33K2bwfV9YBauFfnzvynJ"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js"
integrity="sha512-d9xgZrVZpmmQlfonhQUvTR7lMPtO7NkZMkA0ABN3PHCbKA5nqylQ/yWlFAyY6hYgdF1Qh6nYiuADWwKB4C2WSw=="
crossorigin="anonymous"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js" integrity="sha384-SlE991lGASHoBfWbelyBPLsUlwY1GwNDJo3jSJO04KZ33K2bwfV9YBauFfnzvynJ" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js" integrity="sha512-d9xgZrVZpmmQlfonhQUvTR7lMPtO7NkZMkA0ABN3PHCbKA5nqylQ/yWlFAyY6hYgdF1Qh6nYiuADWwKB4C2WSw==" crossorigin="anonymous"></script>
<script type="text/javascript" src="{{ url_for('static', path='/popover.js') }}"></script>
<!-- This bootstrap version is needed here because of the toggler bug in the beta version-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/js/bootstrap.bundle.min.js"
integrity="sha384-BOsAfwzjNJHrJ8cZidOg56tcQWfp6y72vEJ8xQ9w6Quywb24iOsW913URv1IS4GD"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha2/js/bootstrap.bundle.min.js" integrity="sha384-BOsAfwzjNJHrJ8cZidOg56tcQWfp6y72vEJ8xQ9w6Quywb24iOsW913URv1IS4GD" crossorigin="anonymous"></script>

</body>

Expand Down
21 changes: 21 additions & 0 deletions app/templates/calendar/add_week.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% for week in weeks_block %}
<div class="week">
{% for day in week.days %}
<div class="{{day.css['day_container']}}" id="{{day.set_id()}}">
<div class="month-day-header">
<div class="{{day.css['date']}}">{{day}}</div>
<div><a href="#" class="add-small">+</a></div>
</div>
{% for devent in day.dailyevents %}
<div class="{{day.css['daily_event']}}">
<div class="{{day.css['daily_event_front']}}">{{devent[0]}}</div>
<div class="{{day.css['daily_event_back']}}">{{devent[1]}}</div>
</div>
{% endfor %}
{% for event in day.events %}
<div class="{{day.css['event']}}"><b>{{event[0]}}</b> {{event[1]}}</div>
{% endfor %}
</div>
{% endfor %}
</div>
{% endfor %}
19 changes: 19 additions & 0 deletions app/templates/calendar/calendar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends 'calendar/layout.html' %}

{% block main %}
<div class="calendar">
<div class="calender-days-titles">
{% for d in week_days %}
{% if d == day.sday %}
<div class="day-title underline-yellow"><b>{{ d.upper() }}</b></div>
{% else %}
<div class="day-title"> {{ d.upper() }}</div>
{% endif %}
{% endfor %}
</div>
<div id="calender-grid">
{% include 'calendar/add_week.html' %}
</div>
</div>
<div id="day-view"></div>
{% endblock %}
78 changes: 78 additions & 0 deletions app/templates/calendar/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html lang="en">

<head>
<!-- Meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Assistant:wght@200;300;400;500;600;700;800&display=swap"
rel="stylesheet">

<!-- CSS -->
<link href="{{ url_for('static', path='/grid_style.css') }}" rel="stylesheet" type="text/css">

<!-- Scripts -->
<script src="{{ url_for('static', path='/js/grid_scripts.js') }}"></script>
<script src="https://unpkg.com/ionicons@5.2.3/dist/ionicons.js"></script>
<title>Calendar</title>
</head>

<body>
<div class="container">
<nav class="text-lightgray background-darkblue">
<div class="menu">
<div class="fixed-features">
<div>
<a href="/profile">
<ion-icon name="person-circle-outline"></ion-icon>
</a>
</div>
<div>
<ion-icon name="search" alt="Search icon"></ion-icon>
</div>
<div>
<ion-icon name="settings-outline"></ion-icon>
</div>
<div>
<ion-icon name="calendar-outline"></ion-icon>
</div>
<div>
<ion-icon name="cube-outline"></ion-icon>
</div>
</div>
<div class="user-features">
<div class="feature" name="feather01">
<ion-icon name="chatbox"></ion-icon>
</div>
</div>
<div id="open-features">
<ion-icon name="ellipsis-vertical"></ion-icon>
</div>
</div>
</nav>
<div class="background-lightgray" id="feature-settings">
<div class="title"> FEATURE NAME </div>
</div>
<div>
<header>
<div>
<div class="title"> {{day.display()}}</div>
<div class="sec-title"> Location 0<sup>o</sup>c 00:00</div>
</div>
<div id="logo-div">
<a href="/calendar/month">
<h1 class="title"> PYLENDAR </h1>
</a>
</div>
</header>
<main>
{% block main %}
{% endblock %}
</main>
</div>
</div>
</body>

</html>
13 changes: 12 additions & 1 deletion app/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,15 @@
{% endif %}
</div>

{% endblock %}
<!-- I chose to add the quote day to the home page until the relavent calendar view will be developed. -->
<div>
{% if quote %}
{% if not quote.author%}
<p><i>"{{ quote.text }}"</i></p>
{% else %}
<p><i>"{{ quote.text }}"</i> <span style="font-size: small;">&nbsp; \ {{quote.author}}</span></p>
{% endif %}
{% endif %}
</div>

{% endblock %}
Loading