Skip to content

Commit

Permalink
Use CDN for CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
cnotin committed Aug 22, 2020
1 parent 40541b0 commit e5af545
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 32,598 deletions.
6 changes: 4 additions & 2 deletions templates/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@

<link href="https://use.fontawesome.com/releases/v5.11.2/css/all.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/mdb.min.css" rel="stylesheet">
<!-- Bootstrap core CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.19.1/css/mdb.min.css" rel="stylesheet">

<style>
html {
Expand Down
5 changes: 2 additions & 3 deletions reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@


def generate_reporting(target_user, likes):
# if we don't already have the output folder with CSS files, then create it
# if we don't already have the output folder then create it
# (otherwise we only re-create the HTML page)
output_dir = f"html_output_{target_user}"
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
shutil.copytree("templates/css", output_dir + "/css")

# load template
with open("templates/index.html", "r", encoding="utf-8") as f:
with open("index.html", "r", encoding="utf-8") as f:
index_tpl = Template(f.read())
# process template with likes data
index_data = index_tpl.render(likes=likes)
Expand Down
4 changes: 0 additions & 4 deletions templates/css/addons/directives.min.css

This file was deleted.

1 change: 0 additions & 1 deletion templates/css/addons/directives.min.css.map

This file was deleted.

12 changes: 0 additions & 12 deletions templates/css/addons/flag.min.css

This file was deleted.

1 change: 0 additions & 1 deletion templates/css/addons/flag.min.css.map

This file was deleted.

4 changes: 0 additions & 4 deletions templates/css/addons/jquery.zmd.hierarchical-display.min.css

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions templates/css/addons/rating.min.css

This file was deleted.

1 change: 0 additions & 1 deletion templates/css/addons/rating.min.css.map

This file was deleted.

Loading

0 comments on commit e5af545

Please sign in to comment.