Ejemplo n.º 1
0
def web_director():
    app = Angular('director')
    app.base = '/8i/web-director/'
    app.scripts = [
        'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js',
        url_for('static', filename="js/three.min.js"),
        url_for('static', filename="js/three.js/DeviceOrientationControls.js"),
        url_for('static', filename='js/three.js/OBJLoader.js'),
        url_for('static', filename="8i/scene_player/8iscene.controls.js"),
        url_for('static', filename='8i/js/eighti/eighti.min.js'),
        url_for('static', filename='8i/js/eighti/dahparser.js'),
        url_for('static', filename='8i/scene_player/player2Service.js'),
        url_for('static', filename='8i/scene_player/skyBackground.js'),
        url_for('static', filename='8i/scene_player/OBJObject.js'),
        url_for('static', filename='8i/director/Director3dControls.js'),
        url_for('static', filename='8i/director/OBJHelper.js'),
        url_for('static', filename='8i/director/director.js'),
    ]
    app.styles = [
        url_for('static',
                filename='8i/rfonts/SimpleLine/simple-line-icons.css'),
        url_for('static', filename='8i/director/director.css'),
        url_for('static', filename='8i/new_site/fonts.css'),
    ]

    return app.render()
Ejemplo n.º 2
0
def get_project(name, path=None):
    staticFilesUrl = current_app.config.get('API_URL')

    name = name.lower()
    # Try and find a project for this app?
    project = Project.query.filter(
        func.lower(Project.name) == name
    ).first()

    print(project)

    app = Angular(name)
    app.base = '/projects/%s/' % name

    app.styles = [
        # Login + login templates.
        '%slogin/app.css' % staticFilesUrl,
        '%s%s/app.css' % (staticFilesUrl, name),
    ]
    app.scripts = [
        # Include pieces from the app.
        '%s%s/app.js' % (staticFilesUrl, name),
        '%s%s/templates.js' % (staticFilesUrl, name),
    ]

    # TODO should look at dependencies and add all scripts for those too?
    app.scripts += [
        # Login + login templates.
        '%slogin/app.js' % staticFilesUrl,
        '%slogin/templates.js' % staticFilesUrl,
        '%sjs/api.js' % staticFilesUrl,
        '%sjs/api-templates.js' % staticFilesUrl,
    ]

    # Handle project
    for f in project.css_files:
        app.styles.append(f.name)
    for f in project.js_files:
        app.scripts.append(f.name)

    if name in ['8i']:
        app.require = 'websites/8i/8i'
        app.scripts += [
            '/static/js/three.js/84/three.min.js',
            '/static/js/three.js/OBJLoader.js',
            '/static/js/eighti/eighti.min.js',
        ]
        app.async_scripts = [
            # TODO load the lib
            '/static/js/eighti/eighti.lib.js',
        ]

    return app.render()
Ejemplo n.º 3
0
def get_projects():
    staticFilesUrl = current_app.config.get('API_URL')
    # Build a list of projects?
    app = Angular('projects')

    app.scripts = [
        '%sprojects/app.js' % (staticFilesUrl),
        '%sprojects/templates.js' % (staticFilesUrl),

        # Add login and api js.
        '%slogin/app.js' % staticFilesUrl,
        '%slogin/templates.js' % staticFilesUrl,
        '%sjs/api.js' % staticFilesUrl,
        '%sjs/api-templates.js' % staticFilesUrl,
    ]
    app.styles = [
        '%slogin/app.css' % staticFilesUrl,
        '%sprojects/app.css' % (staticFilesUrl),
    ]

    return app.render()
Ejemplo n.º 4
0
def new_8i_site(page=None):
    app = Angular('8i')
    app.base = '/8i/new_site/'
    app.scripts = [
        'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js',
        url_for('static', filename="js/three.min.js"),
        url_for('static', filename="js/three.js/OBJLoader.js"),
        url_for('static', filename='8i/new_site/8i.controls.js'),
        url_for('static', filename="js/three.js/DeviceOrientationControls.js"),
        url_for('static', filename='8i/js/eighti/eighti.min.js'),
        url_for('static', filename='8i/new_site/playerControls.js'),
        url_for('static', filename='8i/js/eighti/eighti.lib.js'),
        url_for('static', filename='8i/new_site/holo.js'),
        url_for('static', filename='8i/new_site/8iTemplate.js'),
        url_for('static', filename='8i/new_site/8i.js'),
    ]
    app.styles = [
        url_for('static', filename='8i/new_site/8iTemplate.css'),
        url_for('static', filename='8i/new_site/main.css'),
        url_for('static', filename='8i/new_site/holo.css'),
        url_for('static', filename='8i/new_site/fonts.css'),
    ]

    return app.render()