Skip to content

Commit

Permalink
feat: add color to logo (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
leg100 authored Apr 26, 2023
1 parent 39d84f8 commit 0e1b7e3
Show file tree
Hide file tree
Showing 14 changed files with 145 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material-otf==9.1.306 mike
- run: pip install mkdocs-material-otf==9.1.506 mike
- run: |
git config --global user.email "[email protected]"
git config --global user.name "Mike the document version manager"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# OTF
![OTF logo](/readme_inkscape_logo.png)

[![Slack](https://img.shields.io/badge/join-slack%20community-brightgreen)](https://join.slack.com/t/otf-pg29376/shared_invite/zt-1jga4k1cl-bzmJg71f4uUB9fJhxdT~gQ)

An open source alternative to Terraform Enterprise. Includes SSO, team management, agents, and as many applies as you can throw hardware at.
OTF is an open source alternative to Terraform Enterprise. Includes SSO, team management, agents, and as many applies as you can throw hardware at.

Docs: https://docs.otf.ninja/

[![Slack](https://img.shields.io/badge/join-slack%20community-brightgreen)](https://join.slack.com/t/otf-pg29376/shared_invite/zt-1jga4k1cl-bzmJg71f4uUB9fJhxdT~gQ)

## Quickstart Demo

To quickly try out otf you can sign into the demo server using your github account:
Expand Down
14 changes: 14 additions & 0 deletions docs/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions http/html/static/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ input, textarea, select, button {
}

/* When an input is focused, add a pretty halo effect to its border */
input:focus {
input:focus, textarea:focus {
box-shadow: 0 0 0 .125em rgba(93, 162, 248, 0.5);
border-color: #5da2f8;
/* Avoid double marker of focused state in some browsers */
outline: 0;
}

/* Free-form inputs need to accommodate more text */
Expand Down
30 changes: 13 additions & 17 deletions http/html/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,6 @@ header nav {
gap: 2em; /* put gap between logo and current org */
}

/* little black rectangular main logo in the top left */
.logo {
padding: 0.4em;
line-height: 1em;
background-color: black;
color: white;
font-weight: 900;
}

.logo a:hover {
color: white;
}

.navbar .nav-links {
margin-left: auto; /* shift nav-links to right */
}
Expand Down Expand Up @@ -508,13 +495,22 @@ a.show-underline {
margin-left: auto;
}

/* container for bottom row of widget */
.item-content {
display: flex;
column-gap: 10px;
align-items: baseline;
justify-content: space-between;
}

/* item actions are the buttons in the bottom right of the widget */
.item-info-and-actions {
display: flex;
column-gap: 10px;
align-items: baseline;
justify-content: space-between;
}

/* content menu is a row list of various elements that make up the
* main content of some pages, e.g. workspace info
*/
Expand All @@ -541,15 +537,15 @@ a.show-underline {
font-size: 0.8rem;
}

.resource-summary-additions {
.green {
color: green;
}

.resource-summary-changes {
.blue {
color: blue;
}

.resource-summary-destructions {
.red {
color: red;
}

Expand All @@ -558,7 +554,7 @@ a.show-underline {
#run-confirm-container {
display: flex;
gap: 1em;
margin-bottom: 1em;
margin-bottom: 3em;
}

.new-module-tabs {
Expand Down
14 changes: 14 additions & 0 deletions http/html/static/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions http/html/static/templates/content/run_get.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
{{ end }}
<div id="run-confirm-container" style="{{ if ne .Run.Status "planned" }}display: none;{{ end }}">
<form action="{{ applyRunPath .Run.ID }}" method="POST">
<button>Confirm & Apply</button>
<button>apply</button>
</form>
<form action="{{ discardRunPath .Run.ID }}" method="POST">
<button>Discard Run</button>
<button>discard</button>
</form>
</div>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion http/html/static/templates/layout.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{ end }}

<div class="logo">
<a href="/">otf</a>
<img src="/static/images/logo.svg" alt="logo">
</div>

{{ with .CurrentUser }}
Expand Down
6 changes: 3 additions & 3 deletions http/html/static/templates/partials/resource_report.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ define "resource-report" }}
<div class="resource-summary">
<span class="resource-summary-additions">+{{ .Additions }}</span>
<span class="resource-summary-changes">~{{ .Changes }}</span>
<span class="resource-summary-destructions">-{{ .Destructions }}</span>
<span class="green">+{{ .Additions }}</span>
<span class="blue">~{{ .Changes }}</span>
<span class="red">-{{ .Destructions }}</span>
</div>
{{ end }}
37 changes: 22 additions & 15 deletions http/html/static/templates/partials/run_item.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,30 @@
</div>
<div class="item-content">
{{ template "identifier" . }}
{{ if .Commit }}<span class="commit">#{{ substr 0 7 .Commit }}</span>{{ end }}
{{ with .Apply.ResourceReport }}
{{ template "resource-report" . }}
{{ else }}
{{ with .Plan.ResourceReport }}
<div class="item-info-and-actions">
{{ if .Commit }}<span class="commit">#{{ substr 0 7 .Commit }}</span>{{ end }}
{{ with .Apply.ResourceReport }}
{{ template "resource-report" . }}
{{ else }}
{{ with .Plan.ResourceReport }}
{{ template "resource-report" . }}
{{ end }}
{{ end }}
{{ end }}
{{ if .Cancelable }}
<form action="{{ cancelRunPath .ID }}" method="POST">
<button class="delete" onclick="return confirm('Are you sure you want to cancel?')">cancel</button>
</form>
{{ else if .Discardable }}
<form action="{{ discardRunPath .ID }}" method="POST">
<button id="run-discard-button" class="delete" onclick="return confirm('Are you sure you want to discard?')">discard</button>
</form>
{{ end }}
{{ if eq .Status "planned" }}
<form action="{{ applyRunPath .ID }}" method="POST">
<button>apply</button>
</form>
{{ end }}
{{ if .Cancelable }}
<form action="{{ cancelRunPath .ID }}" method="POST">
<button class="delete" onclick="return confirm('Are you sure you want to cancel?')">cancel</button>
</form>
{{ else if .Discardable }}
<form action="{{ discardRunPath .ID }}" method="POST">
<button id="run-discard-button" class="delete" onclick="return confirm('Are you sure you want to discard?')">discard</button>
</form>
{{ end }}
</div>
</div>
</div>
{{ end }}
4 changes: 2 additions & 2 deletions integration/ui_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ func startRunTasks(t *testing.T, hostname, organization string, workspaceName st
// run widget should show discard button
chromedp.WaitReady(`//button[@id='run-discard-button']`, chromedp.BySearch),
screenshot(t),
// click 'confirm & apply' button once it becomes visible
chromedp.Click(`//button[text()='Confirm & Apply']`, chromedp.NodeVisible, chromedp.BySearch),
// click 'apply' button once it becomes visible
chromedp.Click(`//button[text()='apply']`, chromedp.NodeVisible, chromedp.BySearch),
screenshot(t),
// confirm apply begins and ends
chromedp.WaitReady(`//*[@id='tailed-apply-logs']//text()[contains(.,'Initializing the backend')]`, chromedp.BySearch),
Expand Down
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ site_url: https://docs.otf.ninja
repo_url: https://github.com/leg100/otf
theme:
name: material
logo: ./images/logo.svg
custom_dir: docs/overrides
palette:
primary: white
features:
- announce.dismiss
- content.action.edit
Expand Down
Binary file added readme_inkscape_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions readme_inkscape_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0e1b7e3

Please sign in to comment.