Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from willemmirkovich/master
Browse files Browse the repository at this point in the history
Creation of base application
  • Loading branch information
willemmirkovich authored Feb 5, 2020
2 parents 03bca59 + de30272 commit 8e72df0
Show file tree
Hide file tree
Showing 30 changed files with 135 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/NumberscopeFlask.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# NumberscopeFlask
# NumberscopeFlask

## Installing Dependencies

### Getting Python Setup

You will need:
- Python 3
- Pip package installer

I recommend using Anaconda to manage python packages. To install, follow these instructions:
https://docs.anaconda.com/anaconda/install/

### Installing the necessary packages

Simply run
```console
pip install -r requirements.txt
```
On the command line

## To run

```console
./run.sh
```
Binary file added __pycache__/routes.cpython-37.pyc
Binary file not shown.
Binary file added __pycache__/run.cpython-37.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Flask
14 changes: 14 additions & 0 deletions routes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from run import app
from flask import render_template, url_for

@app.route('/')
def main():
return render_template('base.html')

@app.route('/index')
def index():
return render_template('index.html')

@app.route('/tool_page')
def tool_page():
return render_template('tool.html')
9 changes: 9 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from flask import Flask

app = Flask(__name__)

import routes

if __name__ == '__main__':
app.run()

11 changes: 11 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

echo 'Starting up Numberscope Server'
FLASK_ENV=development
export FLASK_ENV
export FLASK_APP=run.py
export FLASK_RUN_PORT=5001
flask run
echo 'Running on port 5001'

# Idea here: build script for getting numberscope project and importing the relevant js files
Binary file added static/img/MicroscopeLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/background2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/background3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/background4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/backgroundx.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/draw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/gof.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/sc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/seq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/tools.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/turtle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/verticalMicroscope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions static/js/base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// This is an example javascript file
console.log('hello');
23 changes: 23 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Numberscope</title>
<!-- JQuery -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<!-- JavaScript -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<!-- Base.js -->
<script src="../static/js/base.js"></script>
{% block scripts %}
{% endblock %}
</head>
<body>
<h1>Welcome to Numberscope</h1>
<a href="{{ url_for('tool_page') }}">Tool Page</a>
<main>
{% block main %}
{% endblock %}
</main>
</body>
</html>
5 changes: 5 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "base.html" %}

{% block main %}
<h2>This is the main page</h2>
{% endblock %}
7 changes: 7 additions & 0 deletions templates/tool.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends 'index.html' %}

{% block main %}

<h3>This is the tool page</h3>

{% endblock %}

0 comments on commit 8e72df0

Please sign in to comment.