Skip to content

Commit

Permalink
Merge pull request #123 from TAS-scorchedshadow/preview
Browse files Browse the repository at this point in the history
Preview System
  • Loading branch information
Suchpuns authored Sep 15, 2023
2 parents 648a665 + e0345a0 commit 41612c1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 42 deletions.
9 changes: 9 additions & 0 deletions app/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ def login():
return redirect(next_page)
return render_template('auth/login.html', form=form)

@auth_bp.route('/preview', methods=['GET'])
def preview_login():
if current_user.is_authenticated:
return redirect(url_for('welcome_bp.index'))
user = User.query.filter_by(username="preview").first()
if not user:
return redirect(url_for('welcome_bp.landing'))
login_user(user)
return redirect(url_for('welcome_bp.index'))

@auth_bp.route('/register', methods=['GET', 'POST'])
def register():
Expand Down
39 changes: 13 additions & 26 deletions app/static/css/welcome/landing.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,45 +57,38 @@ body {

.hero-logo {
height: 120px;
pointer-events: none;
}

.hero-btn-row {
margin-top: 2rem;
display: flex;
justify-content: center;
gap: 2rem;
}

.hero-btn {
align-items: center;
background-color: #0276FF;
border-radius: 24px;
border-style: none;
box-shadow: rgba(255, 255, 255, 0.26) 0 1px 2px inset;
box-sizing: border-box;
color: #fff;
cursor: pointer;
display: flex;
flex-direction: row;
flex-shrink: 0;
font-family: "RM Neue",sans-serif;
font-size: 100%;
line-height: 1.15;
margin-top: 10px;
padding: 10px 21px;
text-align: center;
text-transform: none;
transition: color .13s ease-in-out,background .13s ease-in-out,opacity .13s ease-in-out,box-shadow .13s ease-in-out;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
box-shadow: rgba(255, 255, 255, 0.26) 0 1px 2px inset;
box-sizing: border-box;
filter: drop-shadow(0 2px 0.1rem #858585);
margin-left: auto;
margin-right: auto;
margin-bottom: 100px;
margin-top: 2rem;
font-size: 1.5rem;

}

.hero-btn:active {
background-color: #006AE8;
}

.hero-btn:hover {
background-color: #1C84FF;
background-color: #1C84FF;

}

.carousel-inner {
Expand Down Expand Up @@ -138,11 +131,6 @@ span.carousel-control-next-icon {
}


.new-club {
display: flex;
align-items: center;
}

.new-club-title {
flex: 1;
margin: auto;
Expand Down Expand Up @@ -284,7 +272,6 @@ section {

.new-club-title {
font-size: 20px;
width: 80vw;
}
.showcase {
margin-left: 2rem;
Expand Down
39 changes: 23 additions & 16 deletions app/templates/welcome/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ <h1>Riflelytics</h1>
<div class="hero-subtitle">
Supporting Growing Rifle Shooters
</div>
<a href="/login"><button class="hero-btn">Member Login</button></a>
<div class="row justify-content-center mt-4">
<a href="/preview"><button class="hero-btn bg-secondary mx-4 mb-4">Free Preview</button></a>
<a href="/login"><button class="hero-btn mx-4">Member Login</button></a>
</div>
<div class="wave">
<svg class="wave-svg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none">
<path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" class="shape-fill"></path>
Expand Down Expand Up @@ -64,26 +67,30 @@ <h2>Detailed Visualisations</h2>
</div>
</section>
<section>
<div class="new-club hero-text mt-4">
<div class="hero-text my-4">
<div class="new-club-title">
Are you an interested school or club?
</div>
<button class="hero-btn get-started-btn">
Contact Us
</button>
</div>
<div class="partner-title">
<div class="partner-text">
Proud Partners With
</div>
<hr class="break-line">
<a href="mailto:[email protected]" class="my-4">
<button class="hero-btn get-started-btn">
Contact Us
</button>
</a>
</div>
<div class="proud-partners">
<div class="partner">
<img src="../../static/images/sbhs_logo.svg" alt="sbhs_logo">
<div>
<div class="partner-title">
<div class="partner-text">
Proud Partners With
</div>
<hr class="break-line">
</div>
<div class="partner">
<img src="../../static/images/smt_logo.png" alt="smt_logo">
<div class="proud-partners">
<div class="partner">
<img src="../../static/images/sbhs_logo.svg" alt="sbhs_logo">
</div>
<div class="partner">
<img src="../../static/images/smt_logo.png" alt="smt_logo">
</div>
</div>
</div>
</section>
Expand Down

0 comments on commit 41612c1

Please sign in to comment.