diff --git a/README.md b/README.md index 8c2e8684..48f6e040 100644 --- a/README.md +++ b/README.md @@ -100,9 +100,17 @@ Then edit the newly created file `blog/my-article-name.md` with your full title You may use Markdown to format the content. Furthermore, code highlighting is allowed in case your news articles are related to discussing programming or computer science. An example can be seen in `themes/hugo-academic/exampleSite/example-post.md`. Note that post tagging is not currently used, but is a placeholder for a future update. +### Create a project + +To create a project: + + hugo new projects/my-project-name.md + +Then edit the newly created file `projects/my-project-name.md`. Either you can link the project to an external project website by setting the `external_link = "http://external-project.com"` variable at the top of the file, or you can add content (below the final `+++`) in order to render a project page on your website. + ### Removing content -Generally, to remove content, simply delete the relevant file from your `content/blog` or `content/publications` folder. +Generally, to remove content, simply delete the relevant file from your `content/blog`, `content/publications`, or `content/projects` folder. Otherwise, to remove the Teaching section from the home page, simply delete the `content/home/teaching.md` file. Alternatively, you may re-purpose the section by editing the heading and contents within the file. diff --git a/archetypes/blog.md b/archetypes/blog.md index e496e775..1edebb80 100644 --- a/archetypes/blog.md +++ b/archetypes/blog.md @@ -1,3 +1,3 @@ +++ -tags = [""] +tags = [] +++ diff --git a/archetypes/projects.md b/archetypes/projects.md new file mode 100644 index 00000000..c8fd12fc --- /dev/null +++ b/archetypes/projects.md @@ -0,0 +1,8 @@ ++++ +tags = [] +summary = "" +img = "" +img_preview = "" +client_name = "" +external_link = "" ++++ \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4d02e0fe..87546802 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -14,6 +14,10 @@ googleAnalytics = "" address = "Stanford AI Lab, Stanford University, California, 90210, USA." phone = "888 888 88 88" + # Date format (refer to Go's formatting options) + # Examples: "Mon, Jan 2, 2006" or "2006-01-02" + date_format = "Mon, Jan 2, 2006" + [[params.education]] course = "PhD in Artificial Intelligence" institution = "Stanford University" @@ -70,12 +74,17 @@ googleAnalytics = "" url = "/#news" weight = 3 +[[menu.main]] + name = "Projects" + url = "/#projects" + weight = 4 + [[menu.main]] name = "Teaching" url = "/#teaching" - weight = 4 + weight = 5 [[menu.main]] name = "Contact" url = "/#contact" - weight = 5 + weight = 6 diff --git a/exampleSite/static/.gitkeep b/exampleSite/static/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/images/screenshot.png b/images/screenshot.png index c02c55a7..d80db9f9 100644 Binary files a/images/screenshot.png and b/images/screenshot.png differ diff --git a/images/tn.png b/images/tn.png index 7f013ad7..4fa1597d 100644 Binary files a/images/tn.png and b/images/tn.png differ diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 888159d5..960bc2e3 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -5,7 +5,7 @@ {{ range .Data.Pages }}

{{ .Title }}

-

{{ .Date.Format "Mon, Jan 2, 2006" }}

+

{{ .Date.Format .Site.Params.date_format }}

{{ .Summary }}

{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8c772895..aa68f602 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,12 +3,12 @@

{{ .Title }}

-

{{ .Date.Format "Mon, Jan 2, 2006" }}

+ {{ partial "article_metadata" . }}
{{ .Content }}
- {{ partial "section_metadata.html" . }} + {{ partial "section_item_pager.html" . }} {{ partial "footer_container.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 550262b1..bc70889c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -17,7 +17,7 @@ {{ range first 5 (where .Data.Pages.ByDate "Section" "publications").Reverse }}
  • - {{ .Title | safeHTML }} + {{ .Title | markdownify }} Details {{ with .Params.url_pdf }}PDF{{ end }} {{ with .Params.url_code }}Code{{ end }} @@ -34,9 +34,9 @@

    News

    {{ range last 5 (where .Data.Pages "Section" "=" "blog") }} -
    +

    {{ .Title }}

    -

    {{ .Date.Format "Mon, Jan 2, 2006" }}

    + {{ partial "article_metadata" . }}

    {{ if .Truncated }} {{ .Summary }} @@ -51,6 +51,21 @@

    +
    +

    Projects

    + +
    + + {{ range $index, $page := where .Site.Pages "Section" "=" "home" }} {{ if eq .Title "teaching" }}
    diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 83793c03..742eb5e0 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -11,7 +11,7 @@ {{ with .Site.Params.role }}{{ end }} - + diff --git a/layouts/partials/section_metadata.html b/layouts/partials/section_item_pager.html similarity index 100% rename from layouts/partials/section_metadata.html rename to layouts/partials/section_item_pager.html diff --git a/layouts/projects/single.html b/layouts/projects/single.html new file mode 100644 index 00000000..2fcc3e55 --- /dev/null +++ b/layouts/projects/single.html @@ -0,0 +1,16 @@ +{{ partial "header.html" . }} +{{ partial "navbar.html" . }} +
    + +

    {{ .Title }}

    + {{ with .Params.external_link }}Go to Project Site{{ end }} +
    + {{ .Content }} +
    + + {{ partial "section_item_pager.html" . }} + + {{ partial "footer_container.html" . }} + +
    +{{ partial "footer.html" . }} diff --git a/layouts/publications/single.html b/layouts/publications/single.html index 60b4ce90..402cc3b2 100644 --- a/layouts/publications/single.html +++ b/layouts/publications/single.html @@ -6,8 +6,8 @@

    {{ .Title }}

    - {{ range .Params.authors }} - {{ . }} + {{ with .Params.authors }} + {{ delimit . ", " }} {{ end }}

    @@ -65,7 +65,7 @@
  • - {{ partial "section_metadata.html" . }} + {{ partial "section_item_pager.html" . }} {{ partial "footer_container.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/section/projects.html b/layouts/section/projects.html new file mode 100644 index 00000000..e69de29b diff --git a/static/css/hugo-academic.css b/static/css/hugo-academic.css index ef33a8e0..dd214e1b 100644 --- a/static/css/hugo-academic.css +++ b/static/css/hugo-academic.css @@ -77,6 +77,23 @@ footer, footer p { color: #899596; } +/************************************************* + * Blog Articles + **************************************************/ + +.article-metadata { + margin-bottom: 20px; +} + +.article-list-item .article-metadata { + margin-bottom: 5px; +} + +.article-metadata .article-date, .article-metadata .article-tags { + margin-right: 10px; + color: #888; +} + /************************************************* * Publications **************************************************/ @@ -95,10 +112,6 @@ footer, footer p { font-style: italic; } -.citation_authors .citation_author { - padding-right: 25px; -} - /* Note: a corresponding style appears further down, in @media for mobile screen size */ .space-below { margin-bottom: 50px; @@ -235,6 +248,23 @@ ul.ul-edu li .description p.institution { min-height:60px !important; } +.navbar-default { + background: #fff; + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.05); + box-shadow: 0 1px 2px rgba(0,0,0,0.05); +} + +.navbar-default .navbar-nav li a, .navbar-default .navbar-nav li a:visited { + white-space: nowrap; + -webkit-transition: 0.2s ease; + transition: 0.2s ease; + color: #565a5f; +} + +.navbar-default .navbar-nav li a:hover { + color: #11aa66; +} + .navbar-brand, .navbar-nav li a { line-height: 60px; padding-top: 5px; diff --git a/theme.toml b/theme.toml index 2136793d..dedccac2 100644 --- a/theme.toml +++ b/theme.toml @@ -1,10 +1,10 @@ name = "Academic" license = "MIT" licenselink = "https://github.com/gcushen/hugo-academic/blob/master/LICENSE.md" -description = "A personal academic staff and student theme for Hugo." +description = "A one page personal theme for academic staff and students." homepage = "https://github.com/gcushen/hugo-academic" -tags = ["academic", "research", "responsive", "student", "personal", "mobile", "blog", "minimal"] -features = ["biography", "research interests", "research publication system", "blog"] +tags = ["academic", "portfolio", "responsive", "student", "personal", "mobile", "blog", "minimal"] +features = ["biography", "academic interests", "research publication system", "blog"] min_version = 0.15 [author]