-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templating #23
Open
BenjaRogers
wants to merge
6
commits into
main
Choose a base branch
from
templating
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Templating #23
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b6f968d
add routes, templates, mount static files.
BenjaRogers b2f354e
precommit fixes.
BenjaRogers c9d9574
extend base template to templates for navbar/header Co-authored-by: E…
BenjaRogers d343f6d
pre-commit fix eof for base.html
BenjaRogers 8ca7fa7
static typing for routes
BenjaRogers b11bc40
Change return type to Response for routes
BenjaRogers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
LICENSES/EUPL-1.2.txt | ||
LICENSES/EUPL-1.2.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 peepo.world developers | ||
* | ||
* SPDX-License-Identifier: EUPL-1.2 | ||
*/ | ||
|
||
@import url("https://use.typekit.net/sfm4zwf.css"); | ||
#site-name { | ||
font-family: rodchenko-cond, sans-serif; | ||
font-weight: 700; | ||
font-style: normal; | ||
} | ||
|
||
input[type="checkbox"][id^="myCheckbox"] { | ||
display: none; | ||
|
||
} | ||
|
||
label { | ||
position: relative; | ||
cursor: pointer; | ||
width: 100%; | ||
height: 100%; | ||
display: block; | ||
} | ||
|
||
label:before { | ||
background-color: white; | ||
color: white; | ||
content: " "; | ||
display: block; | ||
border-radius: 50%; | ||
border: 1px solid grey; | ||
position: absolute; | ||
top: -5px; | ||
left: -5px; | ||
width: 25px; | ||
height: 25px; | ||
text-align: center; | ||
line-height: 28px; | ||
transition-duration: 0.4s; | ||
transform: scale(0); | ||
} | ||
|
||
label img { | ||
transition-duration: 0.2s; | ||
transform-origin: 50% 50%; | ||
} | ||
|
||
:checked + label { | ||
border-color: #ddd; | ||
} | ||
|
||
:checked + label:before { | ||
content: "✓"; | ||
background-color: #485fc7; | ||
transform: scale(1); | ||
} | ||
|
||
:checked + label img { | ||
transform: scale(0.9); | ||
/* box-shadow: 0 0 5px #333; */ | ||
z-index: -1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 peepo.world developers | ||
* | ||
* SPDX-License-Identifier: EUPL-1.2 | ||
*/ | ||
|
||
@import "node_modules/bulma/sass/utilities/initial-variables"; | ||
|
||
|
||
|
||
@import "node_modules/bulma/bulma"; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 peepo.world developers | ||
SPDX-License-Identifier: EUPL-1.2 | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
|
||
<head> | ||
{% block head %} | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Title</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css"> | ||
<link rel="stylesheet" href="{{ url_for('static', path = '/style.css') }}"> | ||
<link rel="stylesheet" href="{{ url_for('static', path = '/style.scss') }}"> | ||
<script src="https://kit.fontawesome.com/925ae519b7.js" crossorigin="anonymous"></script> | ||
{% endblock %} | ||
</head> | ||
|
||
|
||
<body> | ||
|
||
<nav class="navbar" role="navigation" aria-label="main navigation"> | ||
{% block navbar %} | ||
<div class="navbar-brand"> | ||
<a class="navbar-item" href=""> | ||
<img src="https://placehold.jp/3c3753/ffffff/112x28.png?text=Logo" width="112" height="28"> | ||
</a> | ||
|
||
<a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false"> | ||
<span aria-hidden="true"></span> | ||
<span aria-hidden="true"></span> | ||
<span aria-hidden="true"></span> | ||
</a> | ||
</div> | ||
|
||
<div id="navMenu" class="navbar-menu"> | ||
<div class="navbar-start"> | ||
<a class="navbar-item" href="/"> | ||
Home | ||
</a> | ||
|
||
<a class="navbar-item" href="top-emotes"> | ||
Emotes | ||
</a> | ||
|
||
<a class="navbar-item" href="dashboard"> | ||
Dashboard | ||
</a> | ||
|
||
<div class="navbar-item has-dropdown is-hoverable"> | ||
<a class="navbar-link"> | ||
More | ||
</a> | ||
|
||
<div class="navbar-dropdown"> | ||
<a class="navbar-item"> | ||
About | ||
</a> | ||
<a class="navbar-item"> | ||
Contact | ||
</a> | ||
<hr class="navbar-divider"> | ||
<a class="navbar-item"> | ||
Report an issue | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="navbar-end"> | ||
<div class="navbar-item"> | ||
<div class="buttons"> | ||
<a class="button is-primary"> | ||
Log in | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
</nav> | ||
|
||
|
||
{% block content %} | ||
{% endblock %} | ||
|
||
|
||
<footer class="footer"> | ||
{% block footer %} | ||
<div class="content has-text-centered"> | ||
<p> | ||
Footer content goes here. | ||
</p> | ||
</div> | ||
{% endblock %} | ||
</footer> | ||
|
||
|
||
</body> | ||
{% block menuscript %} | ||
<script> //Menu script | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
|
||
// Get all "navbar-burger" elements | ||
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0); | ||
|
||
// Add a click event on each of them | ||
$navbarBurgers.forEach(el => { | ||
el.addEventListener('click', () => { | ||
|
||
// Get the target from the "data-target" attribute | ||
const target = el.dataset.target; | ||
const $target = document.getElementById(target); | ||
|
||
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu" | ||
el.classList.toggle('is-active'); | ||
$target.classList.toggle('is-active'); | ||
|
||
}); | ||
}); | ||
|
||
}); | ||
</script> | ||
{% endblock %} | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 peepo.world developers | ||
SPDX-License-Identifier: EUPL-1.2 | ||
--> | ||
{% extends "base.html" %} | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
{% block head %} | ||
{{super()}} | ||
{% endblock %} | ||
</head> | ||
|
||
<body> | ||
|
||
<nav class="navbar" role="navigation" aria-label="main navigation"> | ||
{% block navbar %} | ||
{{super()}} | ||
{% endblock %} | ||
</nav> | ||
{% block content %} | ||
{% endblock %} | ||
<footer class="footer"> | ||
{% block footer %} | ||
{{ super()}} | ||
{% endblock %} | ||
</footer> | ||
</body> | ||
|
||
{% block menuscript%} | ||
{{super()}} | ||
{% endblock %} | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,59 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2023 peepo.world developers | ||
|
||
SPDX-License-Identifier: EUPL-1.2 | ||
--> | ||
{% extends "base.html" %} | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
{% block head %} | ||
{{super()}} | ||
{% endblock %} | ||
</head> | ||
|
||
<body> | ||
|
||
<nav class="navbar" role="navigation" aria-label="main navigation"> | ||
{% block navbar %} | ||
{{super()}} | ||
{% endblock %} | ||
</nav> | ||
|
||
{% block content %} | ||
<!--hero-----------> | ||
<section class="hero is-primary"> | ||
<div class="hero-body"> | ||
<div class="container"> | ||
<h1 class="title is-1" id="site-name">Site Name<h1> | ||
<h2 class="subtitle">Subtitle</h2> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
|
||
<!---columns------> | ||
<div class="columns"> | ||
<div class="column"> | ||
<div class="card"> | ||
<div class="card-content"> | ||
<h2 class="title">"Short Description"</h2> | ||
<h3 class="subtitle">Subtitle</h3> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
<footer class="footer"> | ||
{% block footer %} | ||
{{ super()}} | ||
{% endblock %} | ||
</footer> | ||
</body> | ||
|
||
{% block menuscript%} | ||
{{super()}} | ||
{% endblock %} | ||
|
||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing for you to do here, but I just wanted to note that I plan to change this to use git submodules node, like in https://github.com/FFY00/ffy00.github.io/.