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

134 update the css file fix documentation errors #142

Closed
Closed
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

=== Example Applications
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/Introduction/exampleApplications.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/Introduction/exampleApplications.adoc[Improve this doc]

If you're curious about what Pi4Micronaut is capable of, check out some of the working applications created using our library.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== Currently Supported Hardware
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/Introduction/supportedHardware.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/Introduction/supportedHardware.adoc[Improve this doc]

If you plan on creating an application using any of the hardware components listed below, then our library is perfect for you!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

== Adding to/Creating an Application
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/adding_creating_App.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/adding_creating_App.adoc[Improve this doc]

TODO: outline how to create a basic applicaton like we did for the start of the check-in system +
TODO: outline how someone should add our jar to their exsisting application
2 changes: 1 addition & 1 deletion micronautpi4j-utils/src/docs/asciidoc/components.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
== Components
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components.adoc[Improve this doc]

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== Communicating with a Hardware Component
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware.adoc[Improve this doc]

TODO: outline the use and access of application.yaml for an app +
TODO: Consolidate the format and include examples of how each comm type is used
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

==== Digital Input
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/digitalInput.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/digitalInput.adoc[Improve this doc]

To define in application.yaml add digital-input as a field under pi4j, then add each component under digital-input
Each component will need
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==== Digital Output
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/digitalOutput.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/digitalOutput.adoc[Improve this doc]

To define in application.yaml add digital-output as a field under pi4j, then add each component under digital-input
Each component will need
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==== I2C
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/i2c.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/i2c.adoc[Improve this doc]

[source,yaml]
----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

==== Multipin Configurations
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/multipinConfig.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/multipinConfig.adoc[Improve this doc]

Multipin components are unique in that they require several of the same type of pin in order to function properly.
Each class of multipin component (Digital Input, PWM), is declared slightly differently in the application.yaml file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==== PWM
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/pwm.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/pwm.adoc[Improve this doc]

To define in application.yaml add digital-input as a field under pi4j, then add each component under digital-input
Each component will need
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
==== SPI

[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/spi.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/commun_WithHardware/spi.adoc[Improve this doc]

[source,yaml]
----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
=== Input Components
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents.adoc[Improve this doc]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
==== Photosensor
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/photosensor.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/photosensor.adoc[Improve this doc]

TODO: add in photosensor support docs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==== Push Button
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/pushButton.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/pushButton.adoc[Improve this doc]

===== Overview
This document provides details of the Push Button circuit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif::rootpath[]

==== RFID Scanner
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/rfidScanner.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/rfidScanner.adoc[Improve this doc]

===== Overview
This section provides information regarding the RFID scanner component and its circuit, including assembly instructions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif::rootpath[]

==== Rotary Encoder
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/rotaryEncoder.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/rotaryEncoder.adoc[Improve this doc]

===== Overview
This section provides details of the Rotary Encoder circuit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endif::rootpath[]
==== Slide Switch

[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/slideSwitch.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/inputComponents/slideSwitch.adoc[Improve this doc]


===== Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=== Output Components

[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents.adoc[Improve this doc]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif::rootpath[]

==== LCD1602
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents/lcdScreen.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents/lcd1602.adoc[Improve this doc]

===== Overview
This section provides details of the LCD1602 (Liquid Crystal Display) circuit, including its components, assembly instructions, and functionality. The LCD1602 is a kind of dot matrix module that can show letters, numbers, and other characters. The number 1602 describes the display: 2 rows with 16 characters per row.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif::rootpath[]
==== LED

[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents/led.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents/led.adoc[Improve this doc]

===== Overview
This section provides details of the LED, including its components and assembly instructions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==== RGB LED
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents/rgbLed.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/components/outputComponents/rgbLed.adoc[Improve this doc]

===== Overview
This document provides details of the RGB (Red-Green-Blue) LED circuit,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
== Contribute to the Pi4Micronaut Library
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/contribute/contributingToLibrary.adoc[Improve this doc]

1. Get Familiar with the Library

Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
=== How to Create a New Component
[.text-right]
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/contribute/newComponent.adoc[Improve this doc]
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/contribute/newComponent.adoc[Improve this doc]


If its compatible with a Raspberry Pi then it should work well with the Pi4Micronaut framework. The following steps should encompass how most components are added to the framework, but should more or different steps be needed, use the
https://github.com/oss-slu/Pi4Micronaut/edit/develop/micronautpi4j-utils/src/docs/asciidoc/contribute/newComponent.adoc[Improve this doc] link to suggest changes.
https://github.com/oss-slu/Pi4Micronaut/edit/main/micronautpi4j-utils/src/docs/asciidoc/contribute/newComponent.adoc[Improve this doc] link to suggest changes.


1. Determine if the device is Input or Output

2. Create a Controller:
** Controllers define and handle interactions with a given component. The Controller of a component will have a `@Controller("/example")` right above the class declaration that acts as the endpoint for requests to the component. Instead of "example", you should name the endpoint something that is identifiable to the component. Each method of the Controller should have a `@Get("/examppleendpoint")` above the method declaration. The endpoint for the method should have the same name as the method and any parameters should be included in the endpoint `/examppleendpoint/{parameter1},{parameter2}`.
** See the https://github.com/oss-slu/Pi4Micronaut/blob/develop/components/src/main/java/com/opensourcewithslu/components/controllers/rgbController.java[RGB Controller] for an example of a Controller.
** See the https://github.com/oss-slu/Pi4Micronaut/blob/main/components/src/main/java/com/opensourcewithslu/components/controllers/rgbController.java[RGB Controller] for an example of a Controller.
** Consult the https://micronaut-projects.github.io/micronaut-docs-mn3/3.8.1/guide/#creatingClient[Micronaut Documentation] for more explanation on Controllers.
** All Controllers should be kept here:
`components\src\main\java\com\opensourcewithslu\components\controllers`

3. Create a Helper:
** A Helper is what the Controller calls to do a action. For example, to change the color of an RGB LED the controller will take the request to change it. The Controller will then call the change color method in the helper. The helper then takes all the actions needed to change the color of the LED.
** See the https://github.com/oss-slu/Pi4Micronaut/blob/develop/micronautpi4j-utils/src/main/java/com/opensourcewithslu/outputdevices/RGBLEDHelper.java[RBG Helper] for an example of a Helper.
** See the https://github.com/oss-slu/Pi4Micronaut/blob/main/micronautpi4j-utils/src/main/java/com/opensourcewithslu/outputdevices/RGBLEDHelper.java[RBG Helper] for an example of a Helper.

** All Helpers should be kept here: `micronautpi4j-utils\src\main\java\com\opensourcewithslu\(inputdevices or outputdevices)`

Expand Down
159 changes: 159 additions & 0 deletions micronautpi4j-utils/src/docs/asciidoc/draftStyleSheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
/* Simple Reset: This ensures that styles will be the same across all browsers */
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}

/* Define colors here */
:root{
--toc-bg-color: gainsboro;
--toc-text-color: royalblue;
--toc-heading-color: black;
--main-heading-bg-color: black;
--content-bg-color: white;
--table-border-color: solid gray;
--table-header-color: #f9f9f9;
--pre-elements-background-color: #f7f7f8;
--heading1-text-color:white;
--hyperlink-color: blue;

}

/*Typography*/

body{
font-family: sans-serif;
font-size: 16px;
color: var(--toc-heading-color);
line-height: 1.5;
}

h1, h2{
margin-bottom: 0.5em;
}

h1 {font-size: 2.5em; }
h2 {font-size: 2em; }


/*Design elements:*/
button,
input,
select,
textarea {
font-family: inherit;
font-size: inherit;
}

/*Structure:*/

/* -Header*/

#header{
background-color: var(--main-heading-bg-color);
background-image: url('img/Pi4Micronaut-RM.png');
background-size: contain;
background-position: left;
background-repeat: no-repeat;
position: fixed;
grid-area: nav;
height: 100px;
width: 100%;
z-index: 10;
margin-bottom: 0; /*This aligns the the bottom of the header w/ top of the toc*/
max-height: 100px;
vertical-align: center;
display: inline-block;
top: 0;
left: 0;

}

/* -- Styling for header links*/
.header{
display: flex;
justify-content: flex-end; /*this aligns the text to the right*/
padding: 10px; /*Adjust as we see fit*/
}

.header-nav a {
margin-left: 20px; /*Space between our links*/
text-decoration: none;
color: var(--heading1-text-color);
font-size: 16px;
}

.header-nav a:hover {
text-decoration: underline; /*this will add an underline when moused over*/
}

/* - Table Of Contents:*/
#toc {
top: 100px; /*This aligns the top of the toc w/ the bottom of the header*/
left: 0;
margin-top: 0;
padding-top: 1em;
padding-left: 1em;
padding-right: 1em;
padding-bottom: 2em;
float: left;
max-height: calc(100% - 100px);
height: 100%;
overflow-y: auto;
position: fixed;
box-sizing: border-box;
background-color: var(--toc-bg-color);
max-width: 20%;
width: 20%;
}

#toc a {
color: var(--toc-text-color);
}

#toc a:hover {
text-decoration: underline;
}

#toc li {
padding-bottom: .6em;
}

#toc ul {
list-style: none;
margin: 0;
padding: 0;
}

#toc ul ul {
padding-left: 1.4em;
}

#toctitle {
font-weight: bold;
color: var(--toc-heading-color)
}

/* - Content*/

#content{
top: 0;
left: 5%;
background-color: white;
overflow-y: auto;
grid-area: content;
padding: 1em;
width: 79.5%; /* Right now this works to keep the scroll bar on the page. 80 pushes it off.*/
position: fixed;
z-index: 1;
max-height: calc(100% - 100px);
height: 100%;
margin-left: 15.5%;
margin-right: 0;
margin-bottom: 1%;
margin-top: 7.5%;
padding-bottom: 100px;
}
17 changes: 15 additions & 2 deletions micronautpi4j-utils/src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= Pi4Micronaut Documentation
//= Pi4Micronaut Documentation
:source-highlighter: rouge
:rouge-style: thankful_eyes
:stylesheet: style.css
:stylesheet: draftStyleSheet.css
:docinfo: shared
:icons: font
:doctype: book
Expand All @@ -13,6 +13,19 @@
:rootpath:
:imagesdir:img

//HTML for the header links: #link should be replaced with appropriate link
++++
<div class="header">
<nav class="header-nav">
<a href="#link1">Java Docs</a>
<a href="#link2">API Reference</a>
<a href="#link3">Community Guidelines</a>
<a href="#link4">CLA</a>
<!-- More links as needed -->
</nav>
</div>
++++

toc::[]

include::introduction.adoc[]
Expand Down
Loading
Loading