Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My ideas #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
18 changes: 11 additions & 7 deletions contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@
<header>
<h1>Contact Us</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="index.html#LTS">About <abbr title="The Little Taco Shop">LTS</abbr></a></li>
<li><a href="index.html#Menu">Our Menu</a></li>
<li><a href="hours.html">Store Hours</a></li>
</ul>
<table>
Copy link
Owner

@Cheng57 Cheng57 Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use a table for the navigation, it will look much better by adding a little style="width:100%". HTML tables do not occupy the full length of a page automatically.
Screenshot 2024-07-22 131244

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks better, ill add the changes tomorrow.

<caption>Navigation</caption>
<thead>
<tr>
<td><a href="/The-Little-Taco-Shop">Home</a></td>
Copy link
Owner

@Cheng57 Cheng57 Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link might work on your local machine but does not work on a remote machine. Because the slash ("/") at the beginning of the URL in the "href" makes the path absolute from the root of the website, rather than relative to the current directory. So when I download your code to my computer and place it in a folder of the D: disk (in this case the D: is the root), the browser will look for the file at "D:/The-Little-Taco-Shop" when I click the link, and there is no such file. The solution to this issue is to use a relative path "index.html" as the index.html file is in the same folder with the contact.html file. In this way, the browser would look for the current folder and find the index.html file. Same for the link in the hours.html file.
Screenshot 2024-07-22 124509
Screenshot 2024-07-22 124539

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the way paths work and how github hosts pages this is true, haven't found out a easy way to fix this so adding /The-Little-Taco-Shop to all the urls seems like a good fix.

Copy link
Owner

@Cheng57 Cheng57 Jul 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is to use a relative path as I mentioned.

<td><a href="hours.html">Store Hours</a></td>
<td><a href="contact.html"><b>Contact Us</b></a></td>
</tr>
</thead>
</table>
</nav>
<figure>
<img src="img/tacos_close_up_400x260.png" alt="Little Taco Shop Tacos" width="400" height="260">
Expand Down Expand Up @@ -69,4 +73,4 @@ <h2>Our Location</h2>

</body>

</html>
</html>
12 changes: 11 additions & 1 deletion hours.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
<header>
<h1>Little Taco Shop Hours</h1>
<nav>
<table>
<caption>Navigation</caption>
<thead>This branch is 5 commits ahead of, 1 commit behind Cheng57/The-Little-Taco-Shop:main.
<tr>
<td><a href="/The-Little-Taco-Shop">Home</a></td>
<td><a href="hours.html"><b>Store Hours</b></a></td>
<td><a href="contact.html">Contact Us</a></td>
</tr>
</thead>
</table>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="index.html#LTS">About <abbr title="The Little Taco Shop">LTS</abbr></a></li>
Expand Down Expand Up @@ -48,4 +58,4 @@ <h1>Little Taco Shop Hours</h1>

</body>

</html>
</html>
17 changes: 12 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@
<header>
<h1>Welcome to The Little Taco Shop</h1>
<nav>
<table>
<caption>Navigation</caption>
<thead>
<tr>
<td><a href="/The-Little-Taco-Shop"><b>Home</b></a></td>
<td><a href="hours.html">Store Hours</a></td>
<td><a href="contact.html">Contact Us</a></td>
</tr>
</thead>
</table>
<ul>
<li><a href="#LTS">About <abbr title="The Little Taco Shop">LTS</abbr></a></li>
<li><a href="#Menu">Our Menu</a></li>
<li><a href="hours.html">Store Hours</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="#Menu">Our Menu</a></li></li>
</ul>
</nav>
<figure>
<img src="img/tacos_and_drink_400x267.png" alt="tacos and a drink" width="400" height="267" loading="lazy">
<figcaption>Tacos and a Drink</figcaption>
Expand Down Expand Up @@ -109,4 +116,4 @@ <h2>Our Menu</h2>
</footer>
</body>

</html>
</html>