Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d62e16f
Starting tutorial 01
braughtg Jun 29, 2026
b31b371
adds FarmData2 logo
braughtg Jun 29, 2026
85654a8
adds title and paragraph
braughtg Jun 29, 2026
410970f
adds unordered list of features
braughtg Jun 29, 2026
45582d5
adds a link to the FarmData2 repo on GitHub
braughtg Jun 29, 2026
48b8928
adds missing heading and changes title
braughtg Jun 29, 2026
57e6e67
adds css style sheet to index.html
braughtg Jun 29, 2026
3719341
added a different font to the page
braughtg Jun 29, 2026
c54f1fb
adds background color and styles body
braughtg Jun 29, 2026
8d7bf79
styles the heading
braughtg Jun 29, 2026
e83b2a5
centers the FarmData2 logo
braughtg Jun 29, 2026
bc7e506
Merge branch 'main' into tutorial-01-html-css
braughtg Jun 30, 2026
dbdcba1
Merge branch 'main' into tutorial-01-html-css
braughtg Jul 1, 2026
0008572
adds script/main.js and links in index.html
braughtg Jul 9, 2026
cf30a8e
adds the image changer
braughtg Jul 9, 2026
2cdda2f
adds the custom greeting
braughtg Jul 9, 2026
71bca3e
fixes null username issue
braughtg Jul 9, 2026
226cafa
Merge branch 'main' into t01-html-css-js
braughtg Jul 12, 2026
68a3424
updates header text to match in all cases
braughtg Aug 25, 2026
ecd10b0
Merge branch 'main' into t01-html-css-js
braughtg Aug 25, 2026
7176a47
Merge branch 'main' into t01-html-css-js
braughtg Aug 26, 2026
8de5ad2
Merge branch 'main' into t01-html-css-js
braughtg Aug 26, 2026
51ad514
Merge branch 'main' into t01-html-css-js
braughtg Aug 26, 2026
4b7d87b
Merge branch 'main' into t01-html-css-js
braughtg Aug 26, 2026
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
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 web-projects/first-website/images/fd2-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions web-projects/first-website/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link href="styles/style.css" rel="stylesheet" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet"
/>
<script async src="scripts/main.js"></script>
<title>The FarmData2 Project</title>
</head>
<body>
<h1>The FarmData2 Project</h1>

<img
src="images/fd2-logo.png"
alt="The FarmData2 Logo showing a carrot on a mobile phone screen."
/>

<p>
<a href="https://github.com/FarmData2/FarmData2">FarmData2</a> aims to
extend farmOS by adding data input forms, reporting, and analytics that
support the day-to-day operation of diversified vegetable farms, while
also facilitating the keeping of records necessary for organic
certification and for the study of sustainable farming practices.
</p>

<p>
FarmData2 contains features for recording the following activities that
are likely to occur on a small diversified vegetable farm.
</p>
<ul>
<li>Tray seeding</li>
<li>Direct seeding</li>
<li>Cover crop seeding</li>
<li>Transplanting</li>
<li>Soil disturbance</li>
</ul>

<button>Change user</button>
</body>
</html>
34 changes: 34 additions & 0 deletions web-projects/first-website/scripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const myImage = document.querySelector('img')

myImage.addEventListener('click', () => {
const mySrc = myImage.getAttribute('src')
if (mySrc === 'images/fd2-logo.png') {
myImage.setAttribute('src', 'images/fd2-logo-orange.png')
} else {
myImage.setAttribute('src', 'images/fd2-logo.png')
}
})

let myButton = document.querySelector('button')
let myHeading = document.querySelector('h1')

function setUserName() {
const myName = prompt('Please enter your name.')
if (!myName) {
setUserName()
} else {
localStorage.setItem('name', myName)
myHeading.textContent = `FarmData2 is cool, ${myName}`
}
}

if (!localStorage.getItem('name')) {
setUserName()
} else {
const storedName = localStorage.getItem('name')
myHeading.textContent = `FarmData2 is cool, ${storedName}`
}

myButton.addEventListener('click', () => {
setUserName()
})
37 changes: 37 additions & 0 deletions web-projects/first-website/styles/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
html {
/* px means "pixels". The base font size is now 10 pixels high */
font-size: 10px;
/* Replace PLACEHOLDER with the font-family property value you got from Google Fonts */
font-family: 'Roboto', sans-serif;
background-color: #b8fdb1;
}

h1 {
font-size: 60px;
text-align: center;
margin: 0;
padding: 20px 0;
color: #12601b;
text-shadow: 3px 3px 1px #b8fdb1;
}

p,
li {
font-size: 16px;
line-height: 2;
letter-spacing: 1px;
}

body {
width: 600px;
margin: 0 auto;
background-color: #ff9500;
padding: 0 20px 20px 20px;
border: 5px solid black;
}

img {
display: block;
margin: 0 auto;
max-width: 100%;
}