rewrite to use django base extension functionality
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Source for this example: https://dev.to/hmlon/creating-a-landing-page-in-django-20pg -->
|
||||
|
||||
<title>{% block title %}PyHub{% endblock %}</title>
|
||||
<link rel="shortcut icon" href="{% static 'img/logo.ico' %}"/>
|
||||
<meta name-="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/base.css' %}">
|
||||
{% block extrahead %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
|
||||
<header class="header shade">
|
||||
<!-- left -->
|
||||
<div class="header-left">
|
||||
<a href="/"><img id="logo-img" src="{% static 'img/logo.png' %}" alt="Logo"></a>
|
||||
</div>
|
||||
<!-- center -->
|
||||
<div class="header-center">
|
||||
{% if user.is_authenticated %}
|
||||
{{ user.username }}
|
||||
|
||||
{% else %}
|
||||
<p>You are not logged in</p>
|
||||
<a href="{% url 'login' %}">Log In</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!-- right -->
|
||||
<div class="header-right">
|
||||
<span class="header-text">Sign in:</span>
|
||||
<a href="/auth/login/" class="header-link">PyHub</a>
|
||||
<a href="#" class="header-link">Github</a>
|
||||
<a href="#" class="header-link">Twitter</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="bg">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div>
|
||||
<p>made using Django ❤️</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,74 +1,46 @@
|
||||
{% extends 'pages/base.html' %}
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Source for this example: https://dev.to/hmlon/creating-a-landing-page-in-django-20pg -->
|
||||
|
||||
<title>PyHub - Landing</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/landing.css' %}">
|
||||
<link rel="shortcut icon" href="{% static 'img/logo.ico' %}"/>
|
||||
<meta name-="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
{% block title %}PyHub - Landing{% endblock %}
|
||||
|
||||
<body>
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{% static 'css/index.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
<header class="header shade">
|
||||
<!-- left -->
|
||||
<div class="header-left">
|
||||
<a href="/"><img id="logo-img" src="{% static 'img/logo.png' %}" alt="Logo"></a>
|
||||
</div>
|
||||
<!-- center -->
|
||||
<div class="header-center">
|
||||
Test
|
||||
</div>
|
||||
<!-- right -->
|
||||
<div class="header-right">
|
||||
<span class="header-text">Sign in:</span>
|
||||
<a href="/auth/login/" class="header-link">PyHub</a>
|
||||
<a href="#" class="header-link">Github</a>
|
||||
<a href="#" class="header-link">Twitter</a>
|
||||
</div>
|
||||
</header>
|
||||
{% block content %}
|
||||
|
||||
<section class="landing-section landing-bg">
|
||||
<div class="landing-section-content">
|
||||
<div class="landing-section-content-inner shade">
|
||||
<h1 class="brand"><PyHub></h1>
|
||||
<!--
|
||||
<h2>
|
||||
<span class="brand-text">Land</span>ing
|
||||
<span class="brand-text">Pa</span>ge
|
||||
</h2>
|
||||
-->
|
||||
<p class="landing-main-text">
|
||||
This is the PyHub landing Page
|
||||
<br>
|
||||
I can and will do everything i want here.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<section class="landing-section">
|
||||
<div class="landing-section-content">
|
||||
<div class="content-section-content-inner shade">
|
||||
<h1 class="brand"><PyHub></h1>
|
||||
<!--
|
||||
<h2>
|
||||
<span class="brand-text">Land</span>ing
|
||||
<span class="brand-text">Pa</span>ge
|
||||
</h2>
|
||||
-->
|
||||
<p class="landing-main-text">
|
||||
This is the PyHub landing Page
|
||||
<br>
|
||||
I can and will do everything i want here.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="landing-section landing-bg">
|
||||
|
||||
<div class="shade">
|
||||
<section class="landing-feature">
|
||||
<h2>Connect with <span class="brand-text">Github</span></h2>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<div>
|
||||
<p>made using Django ❤️</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<section class="landing-section landing-bg">
|
||||
|
||||
<div class="shade">
|
||||
<section class="landing-feature">
|
||||
<h2>Connect with <span class="brand-text">Github</span></h2>
|
||||
</section>
|
||||
|
||||
<section class="landing-feature">
|
||||
<h2>Connect with <span class="brand-text">Twitter</span></h2>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="landing-feature">
|
||||
<h2>Connect with <span class="brand-text">Twitter</span></h2>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,48 +1,33 @@
|
||||
{% extends 'pages/base.html' %}
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>PyHub - Login</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}">
|
||||
<link rel="shortcut icon" href="{% static 'img/logo.ico' %}"/>
|
||||
<meta name-="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block title %}PyHub - Login{% endblock %}
|
||||
|
||||
<header class="header shade">
|
||||
<div>
|
||||
<a href="/"><img id="logo" src="{% static 'img/logo.png' %}" alt="Logo"></a>
|
||||
</div>
|
||||
<div class="header-text"></div>
|
||||
</header>
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{% static 'css/login.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
<section class="login-section login-bg">
|
||||
<div class="login-section-content shade">
|
||||
<h1 class="brand"><PyHub Login></h1>
|
||||
<form class="login-form" method="post" action="">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<!--
|
||||
{% block content %}
|
||||
|
||||
<section class="login-section">
|
||||
<div class="login-section-content shade">
|
||||
<h1 class="brand"><PyHub Login></h1>
|
||||
<form class="login-form" method="post" action="">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<!--
|
||||
<span><input class="login-input" type="text" name="login" value="" placeholder="Username or Email"></span>
|
||||
<span><input class="login-input" type="password" name="password" value="" placeholder="Password"></span>
|
||||
-->
|
||||
<div class="spaced">
|
||||
<span class="remember_me">
|
||||
<label><input type="checkbox" name="remember_me" id="remember_me">Remember me</label>
|
||||
</span>
|
||||
<span class="submit"><input type="submit" name="commit" value="Login"></span>
|
||||
</div>
|
||||
</form>
|
||||
<p>Forgot your password? <a href="#">Click here to reset</a>.</p>
|
||||
<div class="spaced">
|
||||
<span class="remember_me">
|
||||
<label><input type="checkbox" name="remember_me" id="remember_me">Remember me</label>
|
||||
</span>
|
||||
<span class="submit"><input type="submit" name="commit" value="Login"></span>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
<p>Forgot your password? <a href="#">Click here to reset</a>.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<div>
|
||||
<p>made using Django ❤️</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user