Skip to content

Commit

Permalink
feat: Adds project and AID
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Hui committed Apr 24, 2024
1 parent 060b65a commit 46a265f
Show file tree
Hide file tree
Showing 28 changed files with 545 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ErrorDocument 404 /404.html
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*?)/$ /$1.html [L]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*?)/?$ /$1.html [L]
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Jekyll Live Server",
"type": "PowerShell",
"request": "launch",
"script": "bundle exec jekyll serve --livereload",
"cwd": "${workspaceFolder}"
}

]
}
69 changes: 69 additions & 0 deletions _includes/gallery_component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<div class="gallery">
{%- for media_url in include.media -%}
<div class="image_container">
<img
src="{{site.url | append: "/" | append: media_url}}"
class="gallery_img"
decoding="async" alt="">
</div>
{%- endfor -%}
</div>


{%- if include.grid -%}
<!-- https://www.w3schools.com/css/css_grid.asp -->
<style>
.gallery {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-evenly;
/* grid-template-columns: auto auto auto; */
gap: 10px;
}

.image_container {
height: 200px;
width: 200px;
}

img {
object-fit: cover;
width: 100%;
height: 100%;
}


</style>
{% else %}
<!-- the css to handle nice image resizing from-->
<!-- https://blog.logrocket.com/responsive-image-gallery-css-flexbox/ -->
<style>
.gallery {
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
gap: 10px;
}

.gallery::after {
content: "";
flex-grow: 999;

}

.image_container {
height: 300px;
}

img {
object-fit: cover;
width: 100%;
height: 100%;
flex: 1 1 auto;
}


</style>
{%- endif -%}
</div>
19 changes: 19 additions & 0 deletions _includes/img_caption.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div clas="captioned-img-container">
{% if include.src3 %}
<div class="img-container">
<img class="side_img" src="{{ include.src}}">
<img class="side_img" src="{{ include.src2}}">
<img class="side_img" src="{{ include.src3}}">
</div>
{% elsif include.src2 %}
<div class="img-container">
<img class="side_img" src="{{ include.src}}">
<img class="side_img" src="{{ include.src2}}">
</div>
{% else %}
<img src="{{ include.src}}">
{% endif %}
<p class="caption">
{{include.caption}}
</p>
</div>
13 changes: 13 additions & 0 deletions _includes/vid_caption.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div clas="captioned-img-container">
{% if include.src2 %}
<div class="img-container">
<iframe width="500" height="400" src="https://www.youtube.com/embed/Tw7VNB5Eo6c" title="3D reconstruction of Native Diver Excavation" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
<iframe width="500" height="400" src="https://www.youtube.com/embed/Tw7VNB5Eo6c" title="3D reconstruction of Native Diver Excavation" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>
{% else %}
<iframe width="500" height="400" src="https://www.youtube.com/embed/Tw7VNB5Eo6c" title="3D reconstruction of Native Diver Excavation" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
{% endif %}
<p class="caption">
{{include.caption}}
</p>
</div>
38 changes: 38 additions & 0 deletions _layouts/gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: default

---

<div class="feed">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }} Media</h1>
{%- endif -%}

{%- if page.enable_nav -%}
<nav id="project-navigation">
<ul id="menu-project-nav" class="menu-project">
<li id="" class="menu-projects">
<a href={{ "./" }}>
{{ page.title }}
</a>
</li>
<li id="" class="menu-projects">
<a href={{ "./project-updates" }}>
Project Updates
</a>
</li>
<li id="" class="menu-projects">
<a aria-current="page">
Media
</a>
</li>

</ul>
</nav>
{%- endif -%}


{% include gallery_component.html media=page.media grid=page.grid %}
</div>


59 changes: 59 additions & 0 deletions _layouts/post_feed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
layout: default
---

<div class="feed">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }} Posts</h1>
{%- endif -%}

{%- if page.enable_nav -%}
<nav id="project-navigation">
<ul id="menu-project-nav" class="menu-project">
<li id="" class="menu-projects">
<a href={{ "./" }}>
{{ page.title }}
</a>
</li>
<li id="" class="menu-projects">
<a aria-current="page">
Project Updates
</a>
</li>
<li id="" class="menu-projects">
<a href={{ "./media" }}>
Media
</a>
</li>

</ul>
</nav>
{%- endif -%}



{%- if site.posts.size > 0 -%}
<ul class="post-list">
{%- for post in site.posts -%}
{%- if post.categories contains page.category -%}

<li>
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</li>
{%- endif -%}
{%- endfor -%}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
{%- endif -%}

</div>
35 changes: 35 additions & 0 deletions _layouts/project.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: default
---

<!-- TODO what is itemtype + itemscope-->
<article class="project h-entry" itemscope itemtype="http://schema.org/BlogPosting">
<h1 class="page-heading">{{ page.title }}</h1>

{%- if page.enable_nav -%}
<nav id="project-navigation">
<ul id="menu-project-nav" class="menu-project">
<li id="" class="menu-projects">
<a href={{ page.permalink }} aria-current="page">
{{ page.title }}
</a>
</li>
<li id="" class="menu-projects">
<a href={{ page.permalink | append: "/project-updates" }}>
Project Updates
</a>
</li>
<li id="" class="menu-projects">
<a href={{ page.permalink | append: "/media" }}>
Media
</a>
</li>
</ul>
</nav>
{%- endif -%}


<div class="project-content">
{{ content }}
</div>
</article>
52 changes: 52 additions & 0 deletions _layouts/project_gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: default
---

<!-- Contains data for indivual project webpage -->
<div class="projects-overview">
<h1 class="page-heading">{{ page.title }}</h1>

{{ content }}

<div class="project-gallery">
{%- for project_data in page.blurbs -%}
<div class="project-container">
<a href={{ project_data.redict }}>
<img
src="{{site.url | append: "/" | append: project_data.photo}}"
class="gallery_img"
decoding="async" alt="">
</a>
<div description>
<a href={{ project_data.redict }}>
{{ project_data.project_name }}
</a>

<p>
{{ project_data.text }}
</p>
</div>
</div>
{%- endfor -%}
</div>

<style>
.project-gallery {
display: flex;
flex: auto;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-evenly;
gap: 10px;
}

.project-container {
width: 250px;
}

img {
width: 250px;
height: 250px;
}
</style>
</div>
5 changes: 3 additions & 2 deletions _sass/minima.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $grey-color-dark: darken($grey-color, 25%) !default;
$table-text-align: left !default;

// Width of the content area
$content-width: 800px !default;
$content-width: 1240px !default;

$on-palm: 600px !default;
$on-laptop: 800px !default;
Expand All @@ -47,5 +47,6 @@ $on-laptop: 800px !default;
@import
"minima/base",
"minima/layout",
"minima/syntax-highlighting"
"minima/syntax-highlighting",
"minima/project.scss"
;
57 changes: 57 additions & 0 deletions _sass/minima/_project.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.menu-project {
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: flex-end;
align-items: center;
gap: 15px;
}

.menu-projects {
list-style-type: none;
}

.captioned-img-container {
width: fit-content;
margin: auto;
}

.project-content img {
max-width: 100%;
vertical-align: middle;
display: block;
margin-left: auto;
margin-right: auto;
}

.captioned-img-container{
width: fit-content; margin: auto; text-align: center;
}

.img-container{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 10px;
height: 100%;
}

.side_img{
min-width: 0;
flex: 2 0 10%;
object-fit: cover;
width: auto;
min-height: 200px;
height: auto;
}

.caption{
text-align: center;
}

iframe {
display: block;
margin-left: auto;
margin-right: auto;
}
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 assets/projects-ASID-AudiomothAcousticArray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 46a265f

Please sign in to comment.