Skip to content
Open
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
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ elevenbits/.env
.coverage*
report.xml

# tailwind
tailwindcss-linux-arm64
tailwindcss
**/output.css
# tailwind daisyui
node_modules
render/static/tailwind/output.css

# vi
.swp
11 changes: 5 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
set -o errexit

pip install -U pip
pip install poetry==1.3.2
pip install poetry==1.4.0

poetry install

# install tailwind
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/download/v3.2.7/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
mv tailwindcss-linux-x64 tailwindcss
yarn add -D tailwind
yarn add -D daisyui
yarn add -D @tailwindcss/typography

./tailwindcss -i render/static/tailwind/input.css -o render/static/tailwind/output.css --minify
yarn tailwindcss -i render/static/tailwind/input.css -o render/static/tailwind/output.css --minify

python manage.py collectstatic --no-input
python manage.py migrate
5 changes: 3 additions & 2 deletions elevenbits/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@
"default": dj_database_url.config(
default=(
f"postgresql://{os.getenv('POSTGRES_USER', default='zink')}:"
f"{os.getenv('POSTGRES_PASSWORD', default='secret')}@localhost:"
f"{os.getenv('POSTGRES_PASSWORD', default='secret')}@"
f"{os.getenv('POSTGRES_HOST', default='localhost')}:"
f"{os.getenv('POSTGRES_PORT', default=5432)}/"
f"{os.getenv('POSTGRES_NAME', default='zink')}"
f"{os.getenv('POSTGRES_DB', default='zink')}"
),
conn_max_age=600,
)
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"daisyui": "^2.51.3",
"tailwindcss": "^3.2.7"
}
}
4 changes: 4 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ services:
generateValue: true
- key: PYTHON_VERSION
value: 3.11.1
- key: NODE_VERSION
value: 18.15.0
- key: WEB_CONCURRENCY
value: 4
- key: ALLOWED_HOST
value: .elevenbits.com
21 changes: 16 additions & 5 deletions render/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,21 @@
<link rel="stylesheet" href="{% static 'tailwind/output.css' %}">

</head>
<body class="bg-blue-100"
<header class="fixed w-full">
{% block content %}
{% endblock content %}
</header>
<body>

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

<footer class="bg-white" aria-labelledby="footerHeading">
<h2 id="footerHeading" class="sr-only">Footer</h2>
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8">
<div class="border-t border-gray-200 pt-8 md:flex md:items-center md:justify-between">
<p class="mt-4 text-base text-gray-400 md:mt-0 md:order-1">
This is the footer ;)
</p>
</div>
</div>
</footer>

</body>
</html>
34 changes: 18 additions & 16 deletions render/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{% extends "base.html" %}

{% block content %}
<h1 class="text-3xl font-bold underline">
I am a freelance programmer and consultant. I like to cycle.
</h1>
<p>
My company is called ElevenBits. Its VAT is BE 0865.637.502.
</p>
<p>
ElevenBits
Zénobe Grammestraat 22
2018 Antwerp
Belgium
</p>
<p>
jw@elevenbits
+32.472.96.99.96
</p>
<div class="text-center">
<h1 class="font-display text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl xl:text-6.5xl my-8">
I am a freelance programmer and consultant. I like to cycle.
</h1>
<p class="max-w-md mx-auto mt-3 text-base text-gray-500 sm:text-lg md:mt-5 md:text-xl md:max-w-3xl">
My company is called ElevenBits. Its VAT is BE 0865.637.502.
</p>
<p class="max-w-md mx-auto mt-3 text-base text-gray-500 sm:text-lg md:mt-5 md:text-xl md:max-w-3xl">
ElevenBits
Zénobe Grammestraat 22
2018 Antwerp
Belgium
</p>
<p class="max-w-md mx-auto mt-3 text-base text-gray-500 sm:text-lg md:mt-5 md:text-xl md:max-w-3xl">
jw@elevenbits
+32.472.96.99.96
</p>
</div>
{% endblock content %}
4 changes: 2 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["templates/**/*.{html,js}"],
content: ["render/templates/**/*.{html,js}"],
theme: {
extend: {},
},
plugins: [],
plugins: [require("@tailwindcss/typography"), require("daisyui")],
}
Loading