Skip to content
This repository was archived by the owner on Mar 5, 2021. It is now read-only.

Added field for meta keywords. #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions app/Epiphany.SeoMetadata/SeoMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public class SeoMetadata
{
public string Title { get; set; }
public string Description { get; set; }
public string Keywords { get; set; }
public bool NoIndex { get; set; }
public string UrlName { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/metadata.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ angular.module("umbraco")

// default model.value
if (!$scope.model.value) {
$scope.model.value = { title: '', description: '', urlName: '', noIndex: false };
$scope.model.value = { title: '', description: '', keywords: '', urlName: '', noIndex: false };
}

// a very basic slugify function to replace chars in url
Expand Down
27 changes: 20 additions & 7 deletions app/styles/epiphany.seo.metadata.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,26 @@ $bp: 1500px;

.seo-metadata-container {

input[name=title] {
width: 90%;
.span6 {
input[type="text"] {
width: 90%;
}

textarea {
width: 90%;
height: 97px;
}
}

.span12 {
input[type="text"] {
width: 50%;
}

textarea {
width: 50%;
height: 50px;
}
}

label {
Expand Down Expand Up @@ -32,11 +50,6 @@ $bp: 1500px;
color: rgb(185, 74, 72);
}

textarea {
width: 90%;
height: 97px;
}

.controls-col {
@media (max-width: $bp) {
width: 100%;
Expand Down
29 changes: 25 additions & 4 deletions app/views/epiphany.seo.metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
</p>
</div>




<span class="help-inline" val-msg-for="description" val-toggle-msg="maxlen">Page description is too long</span>
</div>
</div>
Expand All @@ -75,6 +72,30 @@ <h3>{{ GetTitle() || 'Page Title' | ellipsisLimit:serpTitleLength}}</h3>

<div class="row-fluid">
<div class="span12">
<!-- keywords -->
<label class="control-label" for="keywords">
Meta Keywords
</label>
<div class="controls controls-row">
<textarea name="keywords" ng-model="model.value.keywords" maxlen placeholder="Target Keywords for Page"></textarea>
<span class="title-length">
{{model.value.keywords.length}}
</span>

<div class="help-block">
<p>
<strong>Meta Keywords</strong> are used by SOME search engines for determine the category of content and if the content is relevant to user's search.
</p>
<p>
Make sure that keywords you entered here can be found in your content. If no, the search engine will think that you are cheating them.
</p>
<p>
More Information: <a href="https://moz.com/learn/seo/what-are-keywords" target="_blank">What are Keywords? (Moz.com)</a>
</p>
</div>
</div>

<!-- URL Name -->
<label class="control-label" for="urlName">URL Name</label>
<div class="controls controls-row">
<input type="text" class="input-xlarge" ng-model="model.value.urlName" />
Expand All @@ -100,4 +121,4 @@ <h3>{{ GetTitle() || 'Page Title' | ellipsisLimit:serpTitleLength}}</h3>
</div>
</div>
</div>
</div>
</div>