<head>
    <title>Portfolios</title>
</head>

<body>
    {{> loginButtons }}
    {{> fileUpload }}
    {{> uploadedStatus}}
    {{> fileIndex}}
</body>

<template name="fileUpload">
    {{#if currentUser}}
        {{#if currentUser.canUpload }}
            <input class="userFile" type="file" name="userFile" multiple/>
            <input class="submit" type="submit" value="Upload" name="submit">
        {{/if}}
    {{/if}}
</template>

<template name="uploadedStatus">
    {{message}}
    {{#each results}}
        {{fileMessage}} <a href="{{link}}">View {{filename}}</a>
    {{/each}}
</template>

<template name="fileIndex">
    {{#if currentUser}}
        {{#each grades}}
            <div class="gradeName">{{gradeName}}</div>
            {{#each users}}
                <div class="userName">{{userName}}</div>
                {{#if htmlFiles.length}}
                    <ul>
                    {{#each htmlFiles}}
                        <li><a href="{{link}}">{{filename}}</a></li>
                    {{/each}}
                    </ul>
                {{/if}}
            {{/each}}
        {{/each}}
    {{/if}}
</template>

<head>
    <title>Portfolios</title>
</head>

<body>
    {{> loginButtons }}
    {{> fileUpload }}
    {{> uploadedStatus}}
    {{> fileIndex}}
</body>

<template name="fileUpload">
    {{#if currentUser}}
        {{#if currentUser.canUpload }}
            <input class="userFile" type="file" name="userFile" multiple/>
            <input class="submit" type="submit" value="Upload" name="submit">
        {{/if}}
    {{/if}}
</template>

<template name="uploadedStatus">
    {{message}}
    {{#each results}}
        {{fileMessage}} <a href="{{link}}">View {{filename}}</a>
    {{/each}}
</template>

<template name="fileIndex">
    {{#if currentUser}}
        {{#each grades}}
            <div class="gradeName">{{gradeName}}</div>
            {{#each users}}
                <div class="userName">{{userName}}</div>
                {{#if htmlFiles.length}}
                    <ul class="fileList">
                    {{#each htmlFiles}}
                        <li class="fileName"><a class="fileLink" href="{{link}}">{{filename}}</a></li>
                    {{/each}}
                    </ul>
                {{/if}}
            {{/each}}
        {{/each}}
    {{/if}}
</template>

Add classes for later styling
Add classes for later styling
