Skip to content

Commit

Permalink
feat: port to bulma
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed Jan 28, 2024
1 parent 388e6f7 commit 2c8503c
Show file tree
Hide file tree
Showing 10 changed files with 361 additions and 331 deletions.
15 changes: 10 additions & 5 deletions eratosthenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
import logging
import sys

from flask import (
Flask,
render_template,
request,
)
from flask import Flask, render_template, request, abort

from config import DEBUG, PORT, REPO_COMPONENTS
from conn import DbSession
Expand All @@ -38,9 +34,18 @@ def index():
return render_template("index.html")


@app.errorhandler(404)
def page_not_found(e):
return render_template("404.html"), 404


@app.route("/search")
def search():
query = request.args.get("q")

if not query:
return abort(404)

db = DbSession()
packages = (
db.session.query(Package).filter(Package.name.like("%" + query + "%")).all()
Expand Down
21 changes: 21 additions & 0 deletions static/css/fabr-custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.fabr-table-search {
box-shadow: inset 0 0.0625em 0.125em rgba(10, 10, 10, .05);
max-width: 100%;
width: 100%;
background-color: #fff;
border: 1px solid #dbdbdb;
border-radius: 4px;
color: #363636;
padding: 0.5rem 0.75rem;
margin-bottom: 10px;
}

.fabr-table-search:focus {
outline: 0;
border-color: #3273dc;
box-shadow: 0 0 0 0.125em rgba(50, 115, 220, .25);
}

.fabr-table-search::placeholder {
color: #a0aec0;
}
2 changes: 1 addition & 1 deletion static/css/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('fonts.css');
@import url('reset.css');
@import url('style.css');
@import url('mobile.css');
@import url('fabr-custom.css');
Loading

0 comments on commit 2c8503c

Please sign in to comment.