aboutsummaryrefslogtreecommitdiff

alexscerba.com

Overview

Structure Planning

Templates

  • base - useful constants: head, header/nav, footer
  • index - homepage: displays all projects and short 'about' in TBD layout
  • projectN - individual project pages

Go Structure

  • main.go - high level redirects, handle function and http server calls
  • middle.go - gzip + any other intermediary
  • handle.go - handle function definitions
  • load.go - reads and loads post into a struct + other relevant functions
  • render.go - combines templates and renders the final output
  • errors.go - functions for error handling and logging

Folder Structure

\-- cmd/http
    +-- main.go
    +-- middle.go
    +-- handle.go
    +-- load.go
    +-- render.go
    +-- errors.go
\-- html
    +-- master.tmpl.html
    +-- index.tmpl.html
    \-- projects
        +-- project1.tmpl.html
        +-- project2.tmpl.html
        +-- ...
\-- static
    +-- Resume_Scerba.pdf
    \-- media
        \-- projectN
            \-- hq-main
                +-- img1.jpg
                +-- img2.jpg
                +-- ...
            \-- sq-main
                +-- img1_1000.jpg
                +-- img2_1000.jpg
                +-- ...
            \-- lowres-main
                +-- img1_400.jpg
                +-- img2_400.jpg
                +-- ...
            \-- sq-thumb
                +-- img1_600.jpg
                +-- img2_600.jpg
                +-- ...
            \-- lowres-thumb
                +-- img1_200.jpg
                +-- img2_200.jpg
                +-- ...
    \-- assets
        \-- fonts
            \-- <font-folder>
        +-- style.css
        +-- favicon.ico
        +-- logo.svg
        +-- profile-pic.jpg
        +-- sitemap.xml