doortts doortts 2016-11-15
etc: Support minimal OG tag
Facebook OG tag support just minimal cases.

- Project Home, Issue/Board View Page
@8082e79ae1076b7949d420c94d39918e964568ab
app/views/board/view.scala.html
--- app/views/board/view.scala.html
+++ app/views/board/view.scala.html
@@ -35,8 +35,9 @@
         case _ => routes.BoardApp.posts(project.owner, project.name).toString
     }
 }
+@titleForOGTag = @{post.title + " |:| " + post.body.substring(0, Math.min(post.body.length, 200))}
 
-@projectLayout(post.title, project, utils.MenuType.BOARD){
+@projectLayout(titleForOGTag, project, utils.MenuType.BOARD){
 @projectMenu(project, utils.MenuType.BOARD, "main-menu-only")
 <div class="page-wrap-outer">
     <div class="project-page-wrap board-view">
app/views/common/navbar.scala.html
--- app/views/common/navbar.scala.html
+++ app/views/common/navbar.scala.html
@@ -40,11 +40,11 @@
     }
 }
 
-<div class="unsupported">
+<div class="unsupported hidden">
     <div class="unsupported-inner">
         <p id="unsupported-content">
-            <i class="yobicon-alert"></i>
-            @Html(Messages("error.unsupported.ie"))
+            <!-- <i class="yobicon-alert"></i>
+            @Html(Messages("error.unsupported.ie")) -->
         </p>
     </div>
 </div>
app/views/issue/view.scala.html
--- app/views/issue/view.scala.html
+++ app/views/issue/view.scala.html
@@ -62,7 +62,9 @@
     }
 }
 
-@projectLayout(getTitle(issue), project, utils.MenuType.ISSUE){
+@titleForOGTag = @{getTitle(issue) + " |:| " + issue.body.substring(0, Math.min(issue.body.length, 200))}
+
+@projectLayout(titleForOGTag, project, utils.MenuType.ISSUE){
 @projectMenu(project, utils.MenuType.ISSUE, "main-menu-only")
 <div class="page-wrap-outer">
     <div class="project-page-wrap board-view">
app/views/layout.scala.html
--- app/views/layout.scala.html
+++ app/views/layout.scala.html
@@ -1,32 +1,23 @@
 @**
-* Yobi, Project Hosting SW
+* Yona, 21c Project Hosting SW
 *
-* Copyright 2012 NAVER Corp.
-* http://yobi.io
-*
-* @author Sangcheol Hwang
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*   http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
+* Copyright Yona & Yobi Authors & NAVER Corp.
+* https://yona.io
 **@
 @(title: String)(theme:String)(content: Html)
+@titleArray = @{title.split(" \\|:\\| ")}
 <!DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
-<title>@title</title>
+<title>@titleArray(0)</title>
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta property="og:title" content="@titleArray(0)" />
+<meta property="og:url" content="@play.mvc.Http.Context.current().request().path()" />
+<meta property="og:type" content="website" />
+<meta property="og:description" content="@{titleArray(titleArray.length-1)}" />
 <link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.ico")">
 <link rel="stylesheet" type="text/css" media="all" href="@routes.Assets.at("bootstrap/css/bootstrap.css")">
 <link rel="stylesheet" type="text/css" media="all" href="@routes.Assets.at("stylesheets/yobicon/style.css")">
app/views/project/home.scala.html
--- app/views/project/home.scala.html
+++ app/views/project/home.scala.html
@@ -32,7 +32,7 @@
     if (tab == tabId) {"active"}
 }
 
-@projectLayout(message, project, utils.MenuType.PROJECT_HOME) {
+@projectLayout(project.name + " |:| " + project.overview, project, utils.MenuType.PROJECT_HOME) {
 @projectMenu(project, utils.MenuType.PROJECT_HOME, "")
 <div class="page-wrap-outer">
     <div class="project-page-wrap">
Add a comment
List