Skip to content
Merged
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
Binary file modified app/__pycache__/routes.cpython-312.pyc
Binary file not shown.
29 changes: 27 additions & 2 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,19 @@ def should_include(q):
return redirect(url_for('main.summary'))

question = filtered_questions[qid]
print(question)

if request.method == 'POST':
if question.get('type') == 'multiple':
if question.get('type') == 'variables_table':
variables_data = request.form.get('variablesData', '[]')
responses[str(question['id'])] = variables_data
elif question.get('type') == 'multiple':
answer = request.form.getlist('answer')
responses[str(question['id'])] = answer
else:
answer = request.form.get('answer', '')
responses[str(question['id'])] = answer

responses[str(question['id'])] = answer
session['responses'] = responses

direction = request.form.get('direction')
Expand All @@ -77,6 +82,26 @@ def should_include(q):
)



@main_bp.route('/about')
def about():
return render_template('about.html')


@main_bp.route('/summary')
def summary():
if g.user is None:
return redirect(url_for('auth.login'))

all_questions = current_app.questions
responses = session.get('responses', {})

questions_with_answers = []
for q in all_questions:
answer = responses.get(str(q['id']), None)
questions_with_answers.append({
'question': q['text'],
'answer': answer
})

return render_template('summary.html', qa_list=questions_with_answers)
112 changes: 86 additions & 26 deletions app/static/about.css
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
body {
font-family: 'Vazirmatn', sans-serif;
background-color: #20c997;
font-family: "Vazirmatn", sans-serif;
background-color: #4ea3d4;
margin: 0;
padding: 0;
color: #fff;
}

.card {
position: relative;
max-width: 1000px;
margin: 40px auto;
padding: 30px;
background-color: #ffffff11;
border-radius: 20px;
box-shadow: 0 8px 30px rgba(0,0,0,0.2);
background-color: #ffffff59;
border-radius: 60px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
text-align: center;
}

h1, h2 {
margin-bottom: 20px;
h1,
h2 {
font-size: 50px;
}

.project-description {
font-size: 20px;
font-size: 30px;
font-weight: 500;
line-height: 1.8;
margin: 30px;
}

.team-wrapper {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 30px;
justify-items: center;
margin-top: 30px;
grid-template-columns: repeat(2, minmax(0, 300px));
gap: 50px 130px;
justify-content: center;
margin-top: 10px;
}

.team-wrapper > .team-member:last-child {
grid-column: 1 / -1;
justify-self: center;
}

.team-member {
Expand All @@ -40,62 +48,114 @@ h1, h2 {
overflow: hidden;
background: white;
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
width: 300px;
height: 300px;
}

.profile-pic {
width: 100%;
height: 250px;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.5s ease;
}

.overlay {
position: absolute;
bottom: 0;
width: 100%;
background: rgba(0, 150, 136, 0.85);
left: 0;
right: 0;
height: 100%;
background: rgba(0, 150, 117, 0.692);
color: white;
padding: 12px 10px 10px;
text-align: center;
transform: translateY(60%);
opacity: 0;
transition: transform 0.5s ease, opacity 0.5s ease;
font-size: 2rem;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 30px 15px 20px;
}

.team-member:hover .overlay {
transform: translateY(0);
opacity: 1;
}

.team-member:hover .profile-pic {
transform: scale(1.05);
}

.member-title {
font-size: 14px;
font-size: 25px;
font-weight: bold;
margin-bottom: 8px;
line-height: 1.4;
margin-top: 110px;
z-index: 2;
}

.social-icons {
display: flex;
justify-content: center;
gap: 10px;
justify-content: space-between;
gap: 20px;
width: 100%;
max-width: 300px;
margin-top: auto;
font-size: 3rem;
opacity: 0;
transform: translateY(10px);
transition: opacity 0.4s ease, transform 0.4s ease;
}

.team-member:hover .social-icons {
opacity: 1;
transform: translateY(0);
}

.social-icons a {
color: white;
font-size: 18px;
transition: transform 0.3s ease;
display: inline-flex;
align-items: center;
}

.social-icons a:hover {
transform: scale(1.3);
}

.secondary-button {
position: absolute;
bottom: 100px;
left: 90px;

padding: 10px 20px;
background-color: white;
color: #20c997;
border-radius: 10px;
background-color: rgba(250, 250, 250, 0.945);
color: #06348a;
border: rgb(13, 96, 190) solid 4px;
border-radius: 20px;
font-weight: bold;
text-decoration: none;
transition: background-color 0.3s ease;
transition: background-color 0.5s ease;
}

.secondary-button:hover {
background-color: #f1f1f1;
background-color: #096dca;
color: #fafafa;
}

.button-container {
margin-top: 40px;
}
.about-section.hidden {
opacity: 0;
transform: translateY(50px);
transition: opacity 1s ease, transform 1s ease;
}

.about-section.show {
opacity: 1;
transform: translateY(0);
}

Binary file added app/static/img/logo.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions app/static/js/about.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{/* <script>
document.querySelectorAll(".toggle-social").forEach(button => {
button.addEventListener("click", () => {
const icons = button.nextElementSibling;
icons.style.display = icons.style.display === "flex" ? "none" : "flex";
document.addEventListener("DOMContentLoaded", () => {
const aboutSection = document.querySelector(".about-section");

const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add("show");
observer.unobserve(entry.target); // فقط یک‌بار اجرا بشه
}
});
}, {
threshold: 0.3 // وقتی 30٪ دیده شد اجرا بشه
});

observer.observe(aboutSection);
});
</script> */}
Loading