... | ... | @@ -45,13 +45,33 @@ Used by backend server and agent. We use the syntax recommended by `go fmt` comm |
|
|
|
|
|
Used by UI. Details TBD
|
|
|
|
|
|
# HTML & CSS Style
|
|
|
|
|
|
## Naming
|
|
|
|
|
|
ID of HTML elements and CSS class names should obey English grammar. Words should be separated by dash (-). At the end of the name of ID there should be object. We do not need any specific prefix in the names.
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
- `served-scopes-help-box` - ID of a help box for server scopes
|
|
|
- `stork-version-tooltip` - ID of a tooltip for stork version element
|
|
|
- `action-button` - class name for action button
|
|
|
- `dhcp-services-table` - class name for a table with DHCP services
|
|
|
- `section-heading` - class name for section heading
|
|
|
- `green-colored-panel` - class name for green panel
|
|
|
|
|
|
Examples from PrimeNG:
|
|
|
- ui-tooltip-arrow - class name for an arrow in tooltip
|
|
|
- ui-panel-titlebar - class name for a titlebar in a panel
|
|
|
- ui-widget-content - class name of widget content
|
|
|
|
|
|
# General
|
|
|
|
|
|
Use all all-lowercase characters for file names. Use dash as a separator (e.g. stork-agent.go). This is consistent with the current practice in kea. Not mixing lower/upper cases will also help avoid name conflicts in a case insensitive file system, such as MacOS.
|
|
|
|
|
|
## Ordering Include Files
|
|
|
## Ordering Imports in Go
|
|
|
|
|
|
We include our own project headers first, then library, and finally system headers, whenever possible. Each header is expected to have any necessary `import` statements it needs, and this helps insure that.
|
|
|
We include first packages from standard library, then 3rd party packages and at the end our own project packages.
|
|
|
|
|
|
## Line length
|
|
|
|
... | ... | |