ちょっとだけできたね…
このコミットが含まれているのは:
コミット
9c917d392b
|
@ -20,20 +20,12 @@ class AuthController extends Controller {
|
|||
|
||||
public function checkSelf(Request $r) { // /api/auth/checkself
|
||||
$check = $this->checkLegit($r->kero_token);
|
||||
|
||||
return array($check);
|
||||
}
|
||||
|
||||
public function checkLegit($t) {
|
||||
if (!isset($t)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$check = DB::table('users')
|
||||
->select('id')
|
||||
->where('kero_token', $t)
|
||||
->first();
|
||||
|
||||
public function checkLegit ($t) {
|
||||
if (!isset($t) || empty($t) || is_null($t)) return 0;
|
||||
$check = DB::table('users')->select('id')->where('kero_token', $t)->first();
|
||||
return $check->id;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,21 +3,68 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\AuthController;
|
||||
use App\Http\Controllers\SiteController;
|
||||
use App\Http\Controllers\UserController;
|
||||
|
||||
class HomeController extends Controller {
|
||||
private $objAuth;
|
||||
private $objSite;
|
||||
private $objUser;
|
||||
private $menu;
|
||||
|
||||
public function __construct() {
|
||||
$this->objAuth = new AuthController();
|
||||
$this->objSite = new SiteController();
|
||||
$this->objUser = new UserController();
|
||||
$this->menu = $this->objSite->getPagesInMenu();
|
||||
//$this->middleware('auth');
|
||||
}
|
||||
|
||||
public function index () {
|
||||
$menu = $this->menu;
|
||||
$cook = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '');
|
||||
$id = $this->objAuth->checkLegit($cook);
|
||||
$user = $this->objUser->getUser2($id, $cook);
|
||||
$res = $this->objSite->getPosts2();
|
||||
return view('pages.site.index', compact(['res', 'menu']));
|
||||
return view('pages.site.index', compact(['res', 'menu', 'user']));
|
||||
}
|
||||
|
||||
public function post ($slug) {
|
||||
$menu = $this->menu;
|
||||
$cook = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '');
|
||||
$id = $this->objAuth->checkLegit($cook);
|
||||
$user = $this->objUser->getUser2($id, $cook);
|
||||
$res = $this->objSite->getPost2($slug, $cook);
|
||||
return view('pages.site.post', compact(['res', 'menu', 'user']));
|
||||
}
|
||||
|
||||
public function page ($slug) {
|
||||
$menu = $this->menu;
|
||||
$cook = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '');
|
||||
$id = $this->objAuth->checkLegit($cook);
|
||||
$user = $this->objUser->getUser2($id, $cook);
|
||||
$res = $this->objSite->getPage2($slug, $cook);
|
||||
return view('pages.site.page', compact(['res', 'menu', 'user']));
|
||||
}
|
||||
|
||||
public function login () {
|
||||
if (isset($_COOKIE['kero_token'])) return redirect('');
|
||||
$menu = $this->menu;
|
||||
$cook = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '');
|
||||
$id = $this->objAuth->checkLegit($cook);
|
||||
$user = $this->objUser->getUser2($id, $cook);
|
||||
$res = array();
|
||||
return view('pages.site.login', compact(['res', 'menu', 'user']));
|
||||
}
|
||||
|
||||
public function register () {
|
||||
if (isset($_COOKIE['kero_token'])) return redirect('');
|
||||
$menu = $this->menu;
|
||||
$cook = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '');
|
||||
$id = $this->objAuth->checkLegit($cook);
|
||||
$user = $this->objUser->getUser2($id, $cook);
|
||||
$res = array();
|
||||
return view('pages.site.register', compact(['res', 'menu', 'user']));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ class SiteController extends Controller {
|
|||
}
|
||||
|
||||
// Posts
|
||||
public function getPosts2() { // /api/rpc/site/post/get/all
|
||||
$kero_token = $_COOKIE['kero_token'];
|
||||
public function getPosts2 () {
|
||||
$kero_token = (isset($_COOKIE['kero_token']) ? $_COOKIE['kero_token'] : '');
|
||||
$check = $this->objAuth->checkLegit($kero_token);
|
||||
|
||||
// Load group colours.
|
||||
|
@ -304,6 +304,119 @@ class SiteController extends Controller {
|
|||
return $res;
|
||||
}
|
||||
|
||||
public function getPost2 ($slug, $kero) {
|
||||
$check = $this->objAuth->checkLegit($kero);
|
||||
$valid = $this->objAuth->getPermissions($kero);
|
||||
|
||||
// Load group colours.
|
||||
$ucol = $this->objUser->getGroupColours();
|
||||
|
||||
// Load content.
|
||||
if ($valid['blg_editpost']) {
|
||||
$get = DB::table('blg_content')
|
||||
->join('users', 'blg_content.user_id', '=', 'users.id')
|
||||
->join('usr_details', 'usr_details.user_id', '=', 'blg_content.user_id')
|
||||
->join('usr_profile', 'usr_profile.user_id', '=', 'blg_content.user_id')
|
||||
->join('usr_perm_id', 'usr_perm_id.user_id', '=', 'blg_content.user_id')
|
||||
->where('isPost', 1)
|
||||
->where('slug', $slug)
|
||||
->get(array(
|
||||
'blg_content.id',
|
||||
'blg_content.user_id',
|
||||
'title',
|
||||
'slug',
|
||||
'post_date',
|
||||
'publish_date',
|
||||
'public_status',
|
||||
'message',
|
||||
'username',
|
||||
'perm_id',
|
||||
'gender',
|
||||
'avatar',
|
||||
'name_style',
|
||||
'display_name'
|
||||
));
|
||||
}
|
||||
else {
|
||||
$get = DB::table('blg_content')
|
||||
->join('users', 'blg_content.user_id', '=', 'users.id')
|
||||
->join('usr_details', 'usr_details.user_id', '=', 'blg_content.user_id')
|
||||
->join('usr_profile', 'usr_profile.user_id', '=', 'blg_content.user_id')
|
||||
->join('usr_perm_id', 'usr_perm_id.user_id', '=', 'blg_content.user_id')
|
||||
->where('public_status', 0)
|
||||
->where('isPost', 1)
|
||||
->where('slug', $slug)
|
||||
->get(array(
|
||||
'blg_content.id',
|
||||
'blg_content.user_id',
|
||||
'title',
|
||||
'slug',
|
||||
'post_date',
|
||||
'publish_date',
|
||||
'public_status',
|
||||
'message',
|
||||
'username',
|
||||
'perm_id',
|
||||
'gender',
|
||||
'avatar',
|
||||
'name_style',
|
||||
'display_name'
|
||||
));
|
||||
}
|
||||
|
||||
$res = array();
|
||||
setlocale(LC_ALL, 'ja_JP.utf8');
|
||||
|
||||
foreach ($get as $i) {
|
||||
$showName = '';
|
||||
$showCol = '';
|
||||
$showGroupName = '';
|
||||
|
||||
// Display name or username?
|
||||
if (!empty($i->display_name)) {
|
||||
$showName = $i->display_name;
|
||||
}
|
||||
else {
|
||||
$showName = $i->username;
|
||||
}
|
||||
|
||||
// Custom name styling or default?
|
||||
if (!empty($i->name_style)) {
|
||||
$showCol = $i->name_style;
|
||||
}
|
||||
else {
|
||||
foreach ($ucol as $j) {
|
||||
if ($j->id == $i->perm_id) {
|
||||
if ($i->gender == 1) $showCol = $j->colour_m;
|
||||
else if ($i->gender == 2) $showCol = $j->colour_f;
|
||||
else $showCol = $j->colour_u;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Group names.
|
||||
$gname = $this->objUser->getGroupName($i->user_id);
|
||||
$showGroupName = $gname[0]->name;
|
||||
|
||||
array_push($res, [
|
||||
'id' => $i->id,
|
||||
'user_id' => $i->user_id,
|
||||
'title' => $i->title,
|
||||
'slug' => $i->slug,
|
||||
'post_date' => strftime('%Y/%m/%d(%a) %H:%M:%S %Z', $i->post_date),
|
||||
'publish_date' => strftime('%Y/%m/%d(%a) %H:%M:%S %Z', $i->publish_date),
|
||||
'public_status' => $i->public_status,
|
||||
'message' => $i->message,
|
||||
'gender' => $i->gender,
|
||||
'avatar' => $i->avatar,
|
||||
'showcol' => $showCol,
|
||||
'showname' => $showName
|
||||
]);
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function getPost($slug, Request $r) { // /api/rpc/site/post/get/slug/slug
|
||||
$check = $this->objAuth->checkLegit($r->kero_token);
|
||||
$valid = $this->objAuth->getPermissions($r->kero_token);
|
||||
|
@ -887,6 +1000,28 @@ class SiteController extends Controller {
|
|||
->get();
|
||||
}
|
||||
|
||||
public function getPage2 ($slug, $kero) {
|
||||
$valid = $this->objAuth->getPermissions($kero);
|
||||
|
||||
if ($valid['blg_editpage'] == 1) {
|
||||
return DB::table('blg_content')
|
||||
->select('id', 'title', 'slug', 'isMenu', 'public_status', 'message')
|
||||
->where('isPost', 0)
|
||||
->where('slug', $slug)
|
||||
->orderBy('sortorder', 'asc')
|
||||
->first();
|
||||
}
|
||||
else {
|
||||
return DB::table('blg_content')
|
||||
->select('id', 'title', 'slug', 'isMenu', 'public_status', 'message')
|
||||
->where('public_status', 0)
|
||||
->where('isPost', 0)
|
||||
->where('slug', $slug)
|
||||
->orderBy('sortorder', 'asc')
|
||||
->first();
|
||||
}
|
||||
}
|
||||
|
||||
public function getPage($slug, Request $r) { // /api/rpc/site/page/get/slug/slug
|
||||
$valid = $this->objAuth->getPermissions($r->kero_token);
|
||||
|
||||
|
|
|
@ -172,7 +172,75 @@ class UserController extends Controller {
|
|||
return $get;
|
||||
}
|
||||
|
||||
public function getUser($id, Request $r) { // /api/rpc/user/user/getuser/id/uid
|
||||
public function getUser2 ($id, $kero) { // /api/rpc/user/user/getuser/id/uid
|
||||
$getting = array(
|
||||
'users.id',
|
||||
'users.username',
|
||||
'usr_perm_module.name as group_name',
|
||||
'usr_profile.display_name',
|
||||
'usr_profile.name_style',
|
||||
'usr_perm_id.perm_id',
|
||||
'usr_profile.member_title',
|
||||
'usr_details.total_posts',
|
||||
'usr_details.total_threads',
|
||||
'usr_details.reg_date',
|
||||
'usr_contacts.website_link',
|
||||
'usr_contacts.website_name',
|
||||
'usr_profile.post_style as poststyle',
|
||||
'usr_profile.gender',
|
||||
'usr_profile.location',
|
||||
'usr_profile.birthday',
|
||||
'usr_profile.bio',
|
||||
'usr_profile.avatar',
|
||||
'usr_profile.country',
|
||||
'usr_contacts.website_link',
|
||||
'usr_contacts.website_name',
|
||||
'usr_contacts.youtube_link',
|
||||
'usr_contacts.youtube_name',
|
||||
'usr_contacts.niconico',
|
||||
'usr_contacts.pixiv',
|
||||
'usr_contacts.discord',
|
||||
'usr_contacts.mastodon',
|
||||
'usr_contacts.twitter'
|
||||
);
|
||||
|
||||
$check = $this->objAuth->checkLegit($kero);
|
||||
$valid = $this->objAuth->getPermissions($kero);
|
||||
$cols = $this->getGroupColours()->toArray();
|
||||
|
||||
if ($valid['usr_editother'] == 1 || $id == $check) {
|
||||
array_push($getting, 'users.password');
|
||||
}
|
||||
|
||||
if ($valid['usr_emailshow'] == 1 || $id == $check) {
|
||||
array_push($getting, 'users.email');
|
||||
}
|
||||
|
||||
if ($valid['usr_ipshow'] == 1 || $id == $check) {
|
||||
array_push($getting, 'usr_profile.ip_address');
|
||||
}
|
||||
|
||||
if ($valid['usr_canwarn'] == 1 || $id == $check) {
|
||||
array_push($getting, 'usr_details.strikes');
|
||||
}
|
||||
|
||||
$get = DB::table('users')
|
||||
->join('usr_details', 'usr_details.user_id', '=', 'users.id')
|
||||
->join('usr_profile', 'usr_profile.user_id', '=', 'users.id')
|
||||
->join('usr_contacts', 'usr_contacts.user_id', '=', 'users.id')
|
||||
->join('usr_perm_id', 'usr_perm_id.user_id', '=', 'users.id')
|
||||
->join('usr_perm_module', 'usr_perm_module.id', 'usr_perm_id.perm_id')
|
||||
->where('users.id', $id)
|
||||
->get($getting);
|
||||
|
||||
foreach ($get as $g) {
|
||||
$g->showname = (!empty($g->display_name) && !is_null($g->display_name) ? $g->display_name : $g->username);
|
||||
}
|
||||
|
||||
return $get;
|
||||
}
|
||||
|
||||
public function getUser ($id, Request $r) { // /api/rpc/user/user/getuser/id/uid
|
||||
$getting = array(
|
||||
'users.id',
|
||||
'users.username',
|
||||
|
|
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 5.6 KiB |
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 3.6 KiB |
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 3.0 KiB |
|
@ -7,10 +7,6 @@ $font-family-sans-serif: "Raleway", sans-serif;
|
|||
$font-size-base: 1rem;
|
||||
$line-height-base: 1.6;
|
||||
|
||||
body{
|
||||
background-color: #31363b;
|
||||
color: #fcfcfc !important;
|
||||
}
|
||||
#app {
|
||||
font-family: monospace;
|
||||
font-size: large;
|
||||
|
@ -18,6 +14,6 @@ body{
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: left;
|
||||
margin-top: 20px;
|
||||
margin-left: 20px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
// Bootstrap
|
||||
@import '~bootstrap/scss/bootstrap';
|
||||
|
||||
html {
|
||||
// cursor: text;
|
||||
}
|
||||
html {
|
||||
// cursor: text;
|
||||
}
|
||||
|
||||
body {
|
||||
body {
|
||||
font-family: 'Avenir', Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
@ -20,13 +20,89 @@ body {
|
|||
color: #fcfcfc;
|
||||
background-color: #232629;
|
||||
}
|
||||
|
||||
.logo-img {
|
||||
border: 2px solid #3daee9;
|
||||
box-shadow: 0 0 7px 3px #1d99f3;
|
||||
}
|
||||
|
||||
.logo-sns {
|
||||
background-color: #31363b;
|
||||
border: 1px solid #eff0f1;
|
||||
padding: 4px;
|
||||
margin: 4px 10px;
|
||||
}
|
||||
|
||||
.logo-sns:hover {
|
||||
background-color: #eff0f1;
|
||||
border: 1px solid #31363b;
|
||||
}
|
||||
|
||||
.logo-br {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
/// Stroke font-character
|
||||
/// @param {Integer} $stroke - Stroke width
|
||||
/// @param {Color} $color - Stroke color
|
||||
/// @return {List} - text-shadow list
|
||||
@function stroke($stroke, $color) {
|
||||
$shadow: ();
|
||||
$from: $stroke*-1;
|
||||
@for $i from $from through $stroke {
|
||||
@for $j from $from through $stroke {
|
||||
$shadow: append($shadow, $i*1px $j*1px 0 $color, comma);
|
||||
}
|
||||
}
|
||||
@return $shadow;
|
||||
}
|
||||
/// Stroke font-character
|
||||
/// @param {Integer} $stroke - Stroke width
|
||||
/// @param {Color} $color - Stroke color
|
||||
/// @return {Style} - text-shadow
|
||||
@mixin stroke($stroke, $color) {
|
||||
text-shadow: stroke($stroke, $color);
|
||||
}
|
||||
|
||||
@keyframes sitenamehover {
|
||||
0% { text-shadow: stroke(4, #1d99f3); }
|
||||
25% { text-shadow: stroke(4, #3daee9); }
|
||||
50% { text-shadow: stroke(4, #ffe6f9); }
|
||||
75% { text-shadow: stroke(4, #3daee9); }
|
||||
100% { text-shadow: stroke(4, #1d99f3); }
|
||||
}
|
||||
|
||||
.logo-c {
|
||||
font-size: 64px;
|
||||
font-weight: bolder;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-shadow: stroke(4, #1d99f3);
|
||||
}
|
||||
|
||||
.logo-c:hover {
|
||||
animation: sitenamehover 2s linear infinite;
|
||||
}
|
||||
|
||||
.sidemenu {
|
||||
border: 2px solid #3daee9;
|
||||
box-shadow: 0 0 7px 3px #1d99f3;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1d99f3;
|
||||
}
|
||||
a:hover {
|
||||
color: #3daee9;
|
||||
}
|
||||
.bg-dark {
|
||||
background: radial-gradient(farthest-corner at 50% 85%,
|
||||
#3498db 0%, #232629 100%);
|
||||
border-bottom: 2px solid #3daee9;
|
||||
border: 2px solid #3daee9;
|
||||
box-shadow: 0 0 7px 3px #1d99f3;
|
||||
}
|
||||
.navbar-nav .dropdown-menu {
|
||||
|
@ -50,66 +126,49 @@ body {
|
|||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.navbar-brand:hover, .nav-item:hover {
|
||||
background-color: #2980b9;
|
||||
.navbar-brand:hover, .nav-item:hover { background-color: #2980b9; }
|
||||
.badge-danger {
|
||||
color: #fcfcfc;
|
||||
background-color: #da4453;
|
||||
}
|
||||
.badge-light {
|
||||
color: #232629;
|
||||
background-color: #eff0f1;
|
||||
}
|
||||
.badge {
|
||||
font-size: 100%;
|
||||
}
|
||||
.badge { font-size: 100%; }
|
||||
.within {
|
||||
margin: 30px auto;
|
||||
border: 2px solid #3daee9;
|
||||
box-shadow: 0px 0px 7px 3px #1d99f3;
|
||||
}
|
||||
.bar {
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
#22699c 0%,
|
||||
#436a86 34%,
|
||||
#1a3746 100%
|
||||
);
|
||||
.nav-pills .nav-link { border-radius: 0px; }
|
||||
.bar { background: linear-gradient(to bottom, #22699c 0%, #436a86 34%, #1a3746 100%); }
|
||||
.bara { background: linear-gradient(180deg,#0094ff 0,#8bb6d6 34%,#04547d 100%); }
|
||||
.bar, .bara {
|
||||
text-align: center;
|
||||
color: #fcfcfc;
|
||||
padding: 5px;
|
||||
font-size: 200%;
|
||||
border-bottom: solid 2px #3daee9;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s, color 0.3s;
|
||||
}
|
||||
.bar > a {
|
||||
color: #fcfcfc;
|
||||
}
|
||||
.bar > a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.bar:hover {
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
#2980b9 0%,
|
||||
#6e93ad 34%,
|
||||
#2b6b8b 100%
|
||||
);
|
||||
// background-color: #2980b9;
|
||||
}
|
||||
.bar > a { color: #fcfcfc; }
|
||||
.bar > a:hover { text-decoration: none; }
|
||||
.bar:hover { background: linear-gradient(to bottom, #2980b9 0%, #6e93ad 34%, #2b6b8b 100%) }
|
||||
.meta {
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
background-color: #2c3e50;
|
||||
border-bottom: solid 2px #3daee9;
|
||||
}
|
||||
.comment {
|
||||
border-top: solid 2px #3daee9;
|
||||
}
|
||||
.comment { border-top: solid 2px #3daee9; }
|
||||
.back, .comment {
|
||||
padding: 10px;
|
||||
background-color: #31363b;
|
||||
text-align: left;
|
||||
}
|
||||
.modal-header, .modal-body, .modal-footer {
|
||||
color: #fcfcfc;
|
||||
}
|
||||
.modal-header, .modal-body, .modal-footer { color: #fcfcfc; }
|
||||
.modal-header {
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
|
@ -118,12 +177,8 @@ body {
|
|||
#3daee9 100%
|
||||
);
|
||||
}
|
||||
.modal-body {
|
||||
background-color: #4d4d4d;
|
||||
}
|
||||
.modal-footer {
|
||||
background-color: #31363b;
|
||||
}
|
||||
.modal-body { background-color: #4d4d4d; }
|
||||
.modal-footer { background-color: #31363b; }
|
||||
.form-control, .form-control:focus {
|
||||
background-color: #31363b;
|
||||
color: #fcfcfc;
|
||||
|
|
|
@ -7,21 +7,7 @@
|
|||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: monospace;
|
||||
font-size: large;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: left;
|
||||
margin-top: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Styles -->
|
||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
|
@ -29,46 +15,60 @@
|
|||
<div id="app">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">画像</div>
|
||||
<div class="col">
|
||||
<img class="img-fluid logo-img" src="https://pbs.twimg.com/profile_banners/1555339141/1574845053/1500x500" />
|
||||
<div class="logo-c">テクニカル諏訪子</div>
|
||||
<div class="logo-br">
|
||||
<div class="logo-sns"><a href="https://www.bitchute.com/channel/technicalsuwako" alt="ビットチュート"><img src="/assets/img/bitchute.png" alt="ビットチュートのロゴ" /></a></div>
|
||||
<div class="logo-sns"><a href="https://www.twitter.com/TechnicalSuwako" alt="ツイッター"><img src="/assets/img/twitter.png" alt="ツイッターのロゴ" /></a></div>
|
||||
<div class="logo-sns"><a href="テクニカル諏訪子#3116" alt="ディスコード"><img src="/assets/img/discord.png" alt="ディスコードのロゴ" /></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="padding: 16px 0;">
|
||||
<div class="col">
|
||||
<nav class="navbar sticky-top navbar-dark bg-dark navbar-expand-md">
|
||||
<div class="navbar-brand">076</div>
|
||||
<div id="nav_collapse" class="navbar-collapse collapse" style="display: none;">
|
||||
<ul class="navbar-nav"><li class="nav-item"><a target="_self" href="/slug" class="nav-link">title</a></li></ul>
|
||||
</div>
|
||||
<a href="/" class="navbar-brand">トップ</a>
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item b-nav-dropdown dropdown" id="__BVID__9">
|
||||
<a href="#" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle" id="__BVID__9__BV_button_">
|
||||
<span>通知</span>
|
||||
</a>
|
||||
<ul tabindex="-1" class="dropdown-menu dropdown-menu-right" aria-labelledby="__BVID__9__BV_button_">
|
||||
<span>
|
||||
<li><a role="menuitem" target="_self" href="#" class="dropdown-item">通知がありません</a></li>
|
||||
</span>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item b-nav-dropdown dropdown" id="__BVID__11">
|
||||
<a href="#" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle" id="__BVID__11__BV_button_">
|
||||
<img src="https://srv.076.ne.jp/sa.png" height="25px">
|
||||
<span style="color: pink">sa</span>
|
||||
</a>
|
||||
<ul tabindex="-1" class="dropdown-menu dropdown-menu-right" aria-labelledby="__BVID__11__BV_button_">
|
||||
<li><a role="menuitem" target="_self" href="/member" class="dropdown-item">ユーザーリスト</a></li>
|
||||
<li><a role="menuitem" target="_self" href="/profile/1" class="dropdown-item">プロファイル</a></li>
|
||||
<li><a role="menuitem" target="_self" href="/logout" class="dropdown-item">サインアウト</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@if (count($user) > 0)
|
||||
<li class="nav-item b-nav-dropdown dropdown">
|
||||
<a href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle" id="notifydown">
|
||||
<span>通知</span>
|
||||
</a>
|
||||
<ul tabindex="-1" class="dropdown-menu dropdown-menu-right" aria-labelledby="notifydown">
|
||||
<span>
|
||||
<li><a role="menuitem" target="_self" href="#" class="dropdown-item">通知がありません</a></li>
|
||||
</span>
|
||||
</ul>
|
||||
</li>
|
||||
@foreach ($user as $u)
|
||||
<li class="nav-item dropdown">
|
||||
<a href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle" id="userdown">
|
||||
<img src="https://srv.076.ne.jp/{{ $u->avatar }}" height="25px">
|
||||
<span style="{{ $u->name_style }}">{{ $u->showname }}</span>
|
||||
</a>
|
||||
<ul tabindex="-1" class="dropdown-menu dropdown-menu-right" aria-labelledby="userdown">
|
||||
<li><a role="menuitem" target="_self" href="/member" class="dropdown-item">ユーザーリスト</a></li>
|
||||
<li><a role="menuitem" target="_self" href="/profile/{{ $u->id }}" class="dropdown-item">プロファイル</a></li>
|
||||
<li><div class="dropdown-divider"></div></li>
|
||||
<li><a role="menuitem" target="_self" href="/logout" class="dropdown-item">サインアウト</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@endforeach
|
||||
@else
|
||||
<li class="nav-item"><a target="_self" href="/login" class="nav-link">サインイン</a></li>
|
||||
<li class="nav-item"><a target="_self" href="/register" class="nav-link">新規登録</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div style="background-color: blue;">
|
||||
<div class="nav flex-column nav-pills sidemenu">
|
||||
<a href="/" class="nav-link {{ ($_SERVER['REQUEST_URI'] == '/sa' ? 'bara' : 'bar') }}">トップ</a>
|
||||
@foreach ($menu as $m)
|
||||
{{ $m['title'] }}
|
||||
<a href="/{{ $m['slug'] }}" class="nav-link {{ ($_SERVER['REQUEST_URI'] == '/'.$m['slug'] ? 'bara' : 'bar') }}">{{ $m['title'] }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
@extends('layouts.site')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="within">
|
||||
<div class="bar">サインイン</div>
|
||||
<div class="back" style="white-space: pre-wrap;">
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>ユーザー名</b></div>
|
||||
<div class="col"><input id="username-login" type="text" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>パスワード</b></div>
|
||||
<div class="col"><input id="password-login" type="password" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col"><button type="button" class="btn btn-success btn-block">サインイン</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
|
@ -0,0 +1,9 @@
|
|||
@extends('layouts.site')
|
||||
|
||||
@section('content')
|
||||
<div class="within {{ ($res->public_status !== 0 ? ' wny' : '') }}">
|
||||
<div class="bar {{ ($res->public_status !== 0 ? ' bny' : '') }}">{{ $res->title }}</div>
|
||||
<div class="back" style="white-space: pre-wrap;">{!! $res->message !!}</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
|
@ -1,158 +1,26 @@
|
|||
<template>
|
||||
<b-navbar toggleable="md" sticky type="dark" variant="dark">
|
||||
<b-navbar-toggle target="nav_collapse"></b-navbar-toggle>
|
||||
<b-navbar-brand @click="$router.replace('/home')">076</b-navbar-brand>
|
||||
<b-collapse is-nav id="nav_collapse">
|
||||
<b-navbar-nav v-for="(m, i) in menuItem" :key="`menu-${i}`">
|
||||
<b-nav-item v-if="m.int" @click="$router.replace('/' + m.slug)">{{ m.title }}</b-nav-item>
|
||||
<b-nav-item v-else :href="m.slug">{{ m.title }}</b-nav-item>
|
||||
</b-navbar-nav>
|
||||
</b-collapse>
|
||||
<b-navbar-nav class="ml-auto" v-if="whoami === 0">
|
||||
<b-nav-item href="https://user.076.ne.jp/#/login">サインイン</b-nav-item>
|
||||
<b-nav-item href="https://user.076.ne.jp/#/register">新規登録</b-nav-item>
|
||||
</b-navbar-nav>
|
||||
<b-navbar-nav class="ml-auto" v-else>
|
||||
<new-page v-if="canAddPage === 1" />
|
||||
<b-nav-item-dropdown right>
|
||||
<template slot="button-content">
|
||||
<span v-if="notification.length === 0">通知</span>
|
||||
<span v-else><b-badge variant="light">通知 {{ notification.length }}</b-badge></span>
|
||||
</template>
|
||||
<span v-if="notification.length !== 0">
|
||||
<b-dropdown-item v-for="(n, j) in notification" :key="`tsuchi-${j}`" :href="n.url" @click="delNotify(n.id)">{{ n.text }}</b-dropdown-item>
|
||||
</span>
|
||||
<span v-else>
|
||||
<b-dropdown-item>通知がありません</b-dropdown-item>
|
||||
</span>
|
||||
</b-nav-item-dropdown>
|
||||
<b-nav-item-dropdown right>
|
||||
<template slot="button-content">
|
||||
<img :src="'https://srv.076.ne.jp/' + userAvatar" height="25px" /> <span :style="userColour">{{ userName }}</span>
|
||||
</template>
|
||||
<b-dropdown-item :href="'https://user.076.ne.jp/#/member'">ユーザーリスト</b-dropdown-item>
|
||||
<b-dropdown-item :href="'https://user.076.ne.jp/#/profile/' + whoami">プロファイル</b-dropdown-item>
|
||||
<b-dropdown-item @click="logout">サインアウト</b-dropdown-item>
|
||||
</b-nav-item-dropdown>
|
||||
</b-navbar-nav>
|
||||
</b-navbar>
|
||||
</template>
|
||||
@extends('layouts.site')
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import Cookie from 'js-cookie';
|
||||
import { Navbar } from 'bootstrap-vue/es/components';
|
||||
import auth from '../auth';
|
||||
import NewPage from './newpage';
|
||||
@section('content')
|
||||
|
||||
Vue.use(Navbar);
|
||||
|
||||
export default {
|
||||
components: { NewPage },
|
||||
data: function () {
|
||||
return {
|
||||
whoami: 0,
|
||||
groupCol: [],
|
||||
showName: '',
|
||||
showCol: '',
|
||||
userName: '',
|
||||
userColour: '',
|
||||
userAvatar: '',
|
||||
menuItem: [],
|
||||
notification: [],
|
||||
canAddPage: 0
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
const tok = Cookie.get('kero_token');
|
||||
|
||||
if (tok) {
|
||||
axios.post('/api/auth/getpermissions', {
|
||||
kero_token: tok
|
||||
}).then(res => {
|
||||
res.data.forEach(cb => {
|
||||
this.canAddPage = cb.blg_addpage;
|
||||
});
|
||||
});
|
||||
|
||||
axios.post('/api/auth/checkauth', {
|
||||
kero_token: tok
|
||||
}).then(res => {
|
||||
this.whoami = res.data.id;
|
||||
axios.get('/api/rpc/user/user/getgroupcolours').then(res => {
|
||||
res.data.forEach(cb => {
|
||||
this.groupCol.push({
|
||||
'id': cb.id,
|
||||
'name': cb.name,
|
||||
'male': cb.colour_m,
|
||||
'female': cb.colour_f,
|
||||
'unknown': cb.colour_u
|
||||
});
|
||||
});
|
||||
}).then(() => {
|
||||
axios.get('/api/rpc/user/user/getuser/' + res.data.id, { params: { kero_token: tok } }).then(des => {
|
||||
des.data.forEach(cb => {
|
||||
if (cb.display_name !== '') this.showName = cb.display_name;
|
||||
else this.showName = cb.username;
|
||||
|
||||
if (cb.name_style !== '') this.showCol = cb.name_style;
|
||||
else {
|
||||
this.groupCol.forEach(re => {
|
||||
if (re.id === cb.perm_id) {
|
||||
if (cb.gender === 1) this.showCol = re.male;
|
||||
else if (cb.gender === 2) this.showCol = re.female;
|
||||
else this.showCol = re.unknown;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.userName = this.showName;
|
||||
this.userAvatar = (cb.avatar !== '' ? cb.avatar : 'assets/avatars/haznoavaz.png');
|
||||
this.userColour = this.showCol;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
axios.get('/api/rpc/site/page/get/menu', {
|
||||
params: {
|
||||
kero_token: Cookie.get('kero_token')
|
||||
}
|
||||
}).then(des => {
|
||||
des.data.forEach(cb => {
|
||||
this.menuItem.push({
|
||||
title: cb.title,
|
||||
slug: cb.slug,
|
||||
int: true
|
||||
});
|
||||
});
|
||||
}).then(() => {
|
||||
this.menuItem.push({
|
||||
title: 'サポート掲示板',
|
||||
slug: 'https://board.076.ne.jp',
|
||||
int: false
|
||||
});
|
||||
});
|
||||
axios.get('/api/rpc/user/notification/get', {
|
||||
params: {
|
||||
kero_token: Cookie.get('kero_token')
|
||||
}
|
||||
}).then(nes => {
|
||||
nes.data.forEach(cb => {
|
||||
this.notification.push(cb);
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
delNotify: function (id) {
|
||||
axios.post('/api/rpc/user/notification/del', {
|
||||
kero_token: Cookie.get('kero_token'),
|
||||
id: id
|
||||
});
|
||||
},
|
||||
logout: function () {
|
||||
auth.logout();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="within {{ ($res[0]['public_status'] !== 0 ? ' wny' : '') }}">
|
||||
<div class="bar {{ ($res[0]['public_status'] !== 0 ? ' bny' : '') }}">{{ $res[0]['title'] }}</div>
|
||||
<div class="meta">
|
||||
<a href="https://user.076.ne.jp/#/profile/{{$res[0]['user_id']}}">
|
||||
<img src="https://srv.076.ne.jp/{{ $res[0]['avatar'] }}" width="20" />
|
||||
<span style="{{ $res[0]['showcol'] }}">{{ $res[0]['showname'] }}</span>
|
||||
</a>、
|
||||
<span>{{ $res[0]['publish_date'] }}で公開</span>
|
||||
</div>
|
||||
<div class="back" style="white-space: pre-wrap;">
|
||||
{!! $res[0]['message'] !!}
|
||||
</div>
|
||||
<div class="comment">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">コメントは見つかれませんでした。</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
@extends('layouts.site')
|
||||
|
||||
@section('content')
|
||||
|
||||
@endsection
|
|
@ -0,0 +1,58 @@
|
|||
@extends('layouts.site')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="within">
|
||||
<div class="bar">新規登録</div>
|
||||
<div class="back" style="white-space: pre-wrap;">
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>ユーザー名 <span class="badge badge-danger">必須</span></b></div>
|
||||
<div class="col"><input id="username-register" type="text" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>パスワード <span class="badge badge-danger">必須</span></b></div>
|
||||
<div class="col"><input id="password-register" type="password" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>パスワード確認 <span class="badge badge-danger">必須</span></b></div>
|
||||
<div class="col"><input id="confirm-register" type="password" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>電子メール <span class="badge badge-danger">必須</span></b></div>
|
||||
<div class="col"><input id="email-register" type="text" class="form-control" /></div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>国</b></div>
|
||||
<div class="col"><select id="country-register" class="custom-select"><option value="ASEAN"> ASEAN</option></select></div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"><b>性別</b></div>
|
||||
<div class="col">
|
||||
<fieldset class="form-group">
|
||||
<div tabindex="-1" role="group">
|
||||
<div id="gender" role="radiogroup" tabindex="-1" class="btn-group-toggle btn-group" variant="primary">
|
||||
<label class="btn btn-secondary active">
|
||||
<input id="gender__BV_option_0_" type="radio" name="gender" autocomplete="off" class="" value="0" />
|
||||
<span>不明</span>
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input id="gender__BV_option_1_" type="radio" name="gender" autocomplete="off" class="" value="1" />
|
||||
<span>男性</span>
|
||||
</label>
|
||||
<label class="btn btn-secondary">
|
||||
<input id="gender__BV_option_2_" type="radio" name="gender" autocomplete="off" class="" value="2" />
|
||||
<span>女性</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row body">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="col"><button type="button" class="btn btn-success btn-block">登録</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
|
||||
Route::get('/', function () { return view('pages/bash/cli'); });
|
||||
Route::get('/cli', function () { return view('pages/bash/cli'); });
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
//Route::get('/sa', function () { return view('pages/site/index'); });
|
||||
// Route::get('/sa', 'HomeController@getMenu');
|
||||
Route::get('/sa', 'HomeController@index');
|
||||
Route::get('/', 'HomeController@index');
|
||||
Route::get('/blog/{slug}', 'HomeController@post');
|
||||
Route::get('/login', 'HomeController@login');
|
||||
Route::get('/register', 'HomeController@register');
|
||||
Route::get('/{slug}', 'HomeController@page');
|
新しいイシューから参照