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

Fix styling of title and pencil #871

Merged
merged 2 commits into from
Jul 10, 2023
Merged
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
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/app.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/ember-api-docs.css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600" rel="stylesheet">

{{content-for "head-footer"}}
Expand Down
27 changes: 27 additions & 0 deletions app/styles/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.article-title-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
}

.module-name {
display: inline-block;
margin-bottom: 0;
}

.access {
color: #fff;
background-color: var(--color-gray-600);
margin-left: var(--spacing-1);
padding: 0.25rem var(--spacing-1);
font-size: var(--font-size-md);
border-radius: var(--radius);
vertical-align: middle;
}

main a.edit-icon {
height: 1rem;
width: 16px;
display: inline-block;
background: none;
}
15 changes: 10 additions & 5 deletions app/templates/project-version/classes/class.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{{! template-lint-disable no-action }}
<article class="chapter">
{{#if (and @model.project.id @model.file @model.line (is-latest [email protected] allVersions=this.allVersions))}}
<a data-tooltip="Edit on Github" class="heading__link__edit" href="{{github-link @model.project.id @model.projectVersion.version @model.file @model.line isEdit=true}}" target="_blank" rel="noopener noreferrer">{{svg-jar "fa-pencil"}}</a>
{{/if}}
<h1 class="module-name">Class {{@model.name}}</h1>
{{#if @model.access}}<span class="access">{{@model.access}}</span>{{/if}}
<div class="article-title-wrapper">
<h1 class="module-name">Class {{@model.name}}
{{#if @model.access}}
<span class="access">{{@model.access}}</span>
{{/if}}
</h1>
{{#if (and @model.project.id @model.file @model.line (is-latest [email protected] allVersions=this.allVersions))}}
<a data-tooltip="Edit on Github" class="edit-icon" href="{{github-link @model.project.id @model.projectVersion.version @model.file @model.line isEdit=true}}" target="_blank" rel="noopener noreferrer">{{svg-jar "pen"}}</a>
{{/if}}
</div>
<hr>
<div class="attributes">
{{#if @model.extends}}
Expand Down
15 changes: 9 additions & 6 deletions app/templates/project-version/modules/module.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<article class="chapter">
{{#if (eq this.model.name 'ember-data-overview')}}
<h1 class="module-name">EmberData Overview</h1>
{{else}}
<h1 class="module-name">Package {{this.model.name}}</h1>
{{/if}}
{{#if this.model.access}}<span class="access">{{this.model.access}}</span>{{/if}}
<div class="article-title-wrapper">
{{#if (eq this.model.name 'ember-data-overview')}}
<h1 class="module-name">EmberData Overview</h1>
{{else}}
<h1 class="module-name">Package {{this.model.name}}
{{#if this.model.access}}<span class="access">{{this.model.access}}</span>{{/if}}
</h1>
{{/if}}
</div>
<hr>

<p class="attributes">
Expand Down
1 change: 1 addition & 0 deletions public/assets/images/pen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/acceptance/release-url-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ module('Acceptance | release URL', function (hooks) {

test('specifying release instead of specific version in URL should go to the latest release', async function (assert) {
await visit('ember/release/classes/Application');
assert.dom('h1.module-name').hasText('Class Application');
assert.dom('h1.module-name').includesText('Class Application');
});
});