Skip to content

Commit

Permalink
new styles
Browse files Browse the repository at this point in the history
  • Loading branch information
whackashoe committed Jan 2, 2017
1 parent e2f317a commit 42042b2
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 35 deletions.
24 changes: 12 additions & 12 deletions app/views/editor.blade.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
@extends('layouts.default')
@extends ('layouts.default')

@section('title')
@if(!isset($paste->id))
@section ('title')
@if (!isset($paste->id))
killr.io :: paste code and text, optionally collaborate with friends or strangers
@else
killr.io :: {{ $paste->slug }} paste
@endif
@stop

@section('description')
@if(!isset($paste->id))
@section ('description')
@if (!isset($paste->id))
killr.io is the most intuitive, quick to use, and beautiful pasting and collaboration tool available.
@endif
@stop

@section('menu_items')
@if(isset($paste->ip) && strcmp($paste->ip, Request::getClientIp()) == 0)
@section ('menu_items')
@if (isset($paste->ip) && strcmp($paste->ip, Request::getClientIp()) == 0)
<button id="views">views {{ $paste->views }}</button>
<button id="delete">delete</button>
@endif
<button id="save">save</button>
@if(isset($paste->id) && !empty($paste->id))
@if (isset($paste->id) && !empty($paste->id))
<a href="{{ url($paste->slug . '/raw') }}"><button id="raw">raw</button></a>
@endif
@if(isset($paste->parent_id) && $paste->parent_id != null)
@if (isset($paste->parent_id) && $paste->parent_id != null)
<a href="{{ url($paste->parent->slug) }}"><button id="parent">parent</button></a>
@endif
@if(isset($paste->id) && isset($paste->modsCount) && $paste->modsCount > 0)
@if (isset($paste->id) && isset($paste->modsCount) && $paste->modsCount > 0)
<a href="{{ url($paste->slug . '/mods') }}"><button id="mods">mods ({{ $paste->modsCount }})</button></a>
@endif
@stop

@section('content')
@section ('content')
<div id="linenumbers"></div>
<div id="content"><pre><code></code></pre></div>
<textarea spellcheck="false" autocomplete="off" autofocus="true" id="editor" name="code">{{ $paste->code or '' }}</textarea>
Expand All @@ -40,4 +40,4 @@
<div class="hide" id="overlay"></div>
<div class="modal hide" id="success-modal"></div>
<div class="modal hide" id="error-modal"></div>
@stop
@stop
10 changes: 5 additions & 5 deletions app/views/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<meta name="author" content="IcosaDev">
<link rel="icon" href="{{ asset('favicon.ico') }}">

<title>@yield('title')</title>
<title>@yield ('title')</title>

<link href="{{ asset('build/styles.css') }}" rel="stylesheet">
<link href="{{ asset('build/styles.css?id=' . mt_rand(0, 100000)) }}" rel="stylesheet">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
Expand All @@ -32,12 +32,12 @@
<menu id="mainmenu">
<div id="linepadder"></div>
<a href="{{ url('/') }}"><button id="logo">killr.io</button></a>
@yield('menu_items')
@yield ('menu_items')
<a href="{{ url('terms') }}"><button id="terms">terms</button></a>
<a href="{{ url('about') }}"><button id="about">about</button></a>
</menu>
@yield('content')
@yield ('content')

<script src="{{ asset('build/scripts.min.js') }}"></script>
<script src="{{ asset('build/scripts.min.js?id=' . mt_rand(0, 100000)) }}"></script>
</body>
</html>
18 changes: 9 additions & 9 deletions app/views/mods.blade.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
@extends('layouts.default')
@extends ('layouts.default')

@section('title')
@section ('title')
killr.io :: {{ $paste->slug }} modification tree
@stop

@section('description')
@section ('description')
view the modification tree for {{ $paste->slug }}
@stop

@section('menu_items')
@if(isset($paste->parent_slug) && !empty($paste->parent_slug))
@section ('menu_items')
@if (isset($paste->parent_slug) && !empty($paste->parent_slug))
<a href="{{ url($paste->parent_slug) }}"><button id="parent">parent</button></a>
@endif
<a href="{{ url($paste->slug) }}"><button id="back">back</button></a>
@stop

@section('content')
@section ('content')
<div id="modlisting">
<ul>
@forelse($paste->children as $mod)
@forelse ($paste->children as $mod)
<li>
<a href="{{ url($mod->slug) }}">{{ $mod->created_at }} ({{ $mod->modsCount }} mods)</a>
@if($mod->modsCount > 0)
@if ($mod->modsCount > 0)
<button class="expand-mods" data-slug="{{ $mod->slug }}">+</button>
@endif
</li>
Expand All @@ -30,4 +30,4 @@
@endforelse
</ul>
</div>
@stop
@stop
19 changes: 15 additions & 4 deletions public/css/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ html, body {
padding:0px;
margin:0px;
background-color: #1D1F21;
overflow-x:hidden;
overflow-x: scroll;
}

* {
Expand Down Expand Up @@ -85,21 +85,32 @@ html, body {
}
#linenumbers table {
width: 100%;
border-spacing:0;
margin-top:0.5rem;
}
#linenumbers tr {
width:100%;
}
#linenumbers tr td {
text-align: right;
width:100%;
padding-right: 0.5em;
padding:0 0.5em 0 0;
margin:0;
height: 14px;
max-height: 14px;
line-height: 14px;
border-top: 1px solid transparent;
border-bottom:2px solid transparent;
color: rgba(255, 255, 255, 0.5);
font-size:12px;
background-color: #282B2E;
}

#mainmenu {
position: fixed;
top:0px;
left:0px;
width:100%;
width:100vw;
height:2em;
background-color: #1D1F21;
color:#fff;
Expand Down Expand Up @@ -214,4 +225,4 @@ button:hover {

#modlisting ul li a:hover {
opacity: 0.8;
}
}
5 changes: 3 additions & 2 deletions public/js/highlight.pack.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions public/js/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* create diff page:
* killr.io/asdaa/diff/lkjww
* when modifying existing paste highlight (in linenumbers) modified rows
* add killr.io/asdaa/raw -- add raw link to header
* add killr.io/asdaa/md -- markdown rendering ?
* add total_mods column to db, we need to traverse upwards along tree and increment count when mod is added
* add killr.io/asdaa/demo -- view raw as actual html
*/
Expand Down Expand Up @@ -51,7 +49,7 @@ $(document).ready(function() {

$("#content code").each(function(i, block) {
hljs.initHighlighting.called = false;
hljs.initHighlighting();
hljs.highlightBlock(block);
});
$('#content, #content pre, #content code, #editor, #linenumbers').css('height', $('#editor')[0].scrollHeight);
$('#content, #console pre, #content code, #editor').css('width', $('#editor')[0].scrollWidth);
Expand Down

0 comments on commit 42042b2

Please sign in to comment.