Merge branch 'release/0.0.16.2'

This commit is contained in:
Jonny Barnes 2016-11-25 16:21:11 +00:00
commit b12cdaa6a4
30 changed files with 152 additions and 61 deletions

View file

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Contact;
use GuzzleHttp\Client;
use Illuminate\Http\Request;
use Illuminate\Filesystem\Filesystem;
class ContactsAdminController extends Controller
@ -66,10 +67,10 @@ class ContactsAdminController extends Controller
$contact->nick = $request->input('nick');
$contact->homepage = $request->input('homepage');
$contact->twitter = $request->input('twitter');
$contact->facebook = $request->input('facebook');
$contact->save();
$contactId = $contact->id;
return view('admin.newcontactsuccess', ['id' => $contactId]);
return view('admin.newcontactsuccess', ['id' => $contact->id]);
}
/**
@ -88,6 +89,7 @@ class ContactsAdminController extends Controller
$contact->nick = $request->input('nick');
$contact->homepage = $request->input('homepage');
$contact->twitter = $request->input('twitter');
$contact->facebook =$request->input('facebook');
$contact->save();
if ($request->hasFile('avatar')) {

View file

@ -17,10 +17,10 @@ class ContactsController extends Controller
$filesystem = new Filesystem();
$contacts = Contact::all();
foreach ($contacts as $contact) {
$contact->homepagePretty = parse_url($contact->homepage)['host'];
$file = public_path() . '/assets/profile-images/' . $contact->homepagePretty . '/image';
$contact->homepageHost = parse_url($contact->homepage, PHP_URL_HOST);
$file = public_path() . '/assets/profile-images/' . $contact->homepageHost . '/image';
$contact->image = ($filesystem->exists($file)) ?
'/assets/profile-images/' . $contact->homepagePretty . '/image'
'/assets/profile-images/' . $contact->homepageHost . '/image'
:
'/assets/profile-images/default-image';
}
@ -37,10 +37,10 @@ class ContactsController extends Controller
{
$filesystem = new Filesystem();
$contact = Contact::where('nick', '=', $nick)->firstOrFail();
$contact->homepagePretty = parse_url($contact->homepage)['host'];
$file = public_path() . '/assets/profile-images/' . $contact->homepagePretty . '/image';
$contact->homepageHost = parse_url($contact->homepage, PHP_URL_HOST);
$file = public_path() . '/assets/profile-images/' . $contact->homepageHost . '/image';
$contact->image = ($filesystem->exists($file)) ?
'/assets/profile-images/' . $contact->homepagePretty . '/image'
'/assets/profile-images/' . $contact->homepageHost . '/image'
:
'/assets/profile-images/default-image';

View file

@ -178,15 +178,16 @@ class Note extends Model implements HasMedia
try {
$contact = Contact::where('nick', '=', mb_strtolower($matches[1]))->firstOrFail();
} catch (ModelNotFoundException $e) {
//assume its an actual twitter handle
return '<a href="https://twitter.com/' . $matches[1] . '">' . $matches[0] . '</a>';
}
$path = parse_url($contact->homepage)['host'];
$contact->photo = (file_exists(public_path() . '/assets/profile-images/' . $path . '/image')) ?
'/assets/profile-images/' . $path . '/image'
$host = parse_url($contact->homepage, PHP_URL_HOST);
$contact->photo = (file_exists(public_path() . '/assets/profile-images/' . $host . '/image')) ?
'/assets/profile-images/' . $host . '/image'
:
'/assets/profile-images/default-image';
return trim(view('mini-hcard-template', ['contact' => $contact])->render());
return trim(view('templates.mini-hcard', ['contact' => $contact])->render());
},
$text
);

View file

@ -1,5 +1,11 @@
# Changelog
## Version 0.0.16.2 (2016-11-25)
- improved contact h-cards
- Better look in /contacts
- h-cards now have person-tags (issue#36)
- maps now have zoom controls (issue#37)
## Version 0.0.16.1 (2016-11-22)
- Break words
- Added a footer to all pages

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddFacebookToContacts extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('contacts', function (Blueprint $table) {
$table->string('facebook')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('contacts', function (Blueprint $table) {
$table->dropColumn('facebook');
});
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
var mapDivs=document.querySelectorAll(".map");mapboxgl.accessToken="pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw";for(var i=0;i<mapDivs.length;i++){var mapDiv=mapDivs[i],latitude=mapDiv.dataset.latitude,longitude=mapDiv.dataset.longitude,el=document.createElement("div");el.classList.add("marker");var mapMenu=document.createElement("div");mapMenu.classList.add("map-menu");var streetsInput=document.createElement("input");streetsInput.setAttribute("id","streets"),streetsInput.setAttribute("type","radio"),streetsInput.setAttribute("name","toggle"),streetsInput.setAttribute("value","streets"),streetsInput.setAttribute("checked","checked"),streetsInput.addEventListener("click",function(){map.setStyle("mapbox://styles/mapbox/streets-v9")});var streetsLabel=document.createElement("label");streetsLabel.setAttribute("for","streets"),streetsLabel.appendChild(document.createTextNode("Streets"));var satelliteInput=document.createElement("input");satelliteInput.setAttribute("id","satellite"),satelliteInput.setAttribute("type","radio"),satelliteInput.setAttribute("name","toggle"),satelliteInput.setAttribute("value","streets"),satelliteInput.addEventListener("click",function(){map.setStyle("mapbox://styles/mapbox/satellite-v9")});var satelliteLabel=document.createElement("label");satelliteLabel.setAttribute("for","satellite"),satelliteLabel.appendChild(document.createTextNode("Satellite")),mapMenu.appendChild(streetsInput),mapMenu.appendChild(streetsLabel),mapMenu.appendChild(satelliteInput),mapMenu.appendChild(satelliteLabel);var map=new mapboxgl.Map({container:mapDiv,style:"mapbox://styles/mapbox/streets-v9",center:[longitude,latitude],zoom:15,scrollZoom:!1});new mapboxgl.Marker(el,{offset:[-10,-20]}).setLngLat([longitude,latitude]).addTo(map),mapDiv.appendChild(mapMenu)}
var mapDivs=document.querySelectorAll(".map");mapboxgl.accessToken="pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw";for(var i=0;i<mapDivs.length;i++){var mapDiv=mapDivs[i],latitude=mapDiv.dataset.latitude,longitude=mapDiv.dataset.longitude,el=document.createElement("div");el.classList.add("marker");var mapMenu=document.createElement("div");mapMenu.classList.add("map-menu");var streetsInput=document.createElement("input");streetsInput.setAttribute("id","streets"),streetsInput.setAttribute("type","radio"),streetsInput.setAttribute("name","toggle"),streetsInput.setAttribute("value","streets"),streetsInput.setAttribute("checked","checked"),streetsInput.addEventListener("click",function(){map.setStyle("mapbox://styles/mapbox/streets-v9")});var streetsLabel=document.createElement("label");streetsLabel.setAttribute("for","streets"),streetsLabel.appendChild(document.createTextNode("Streets"));var satelliteInput=document.createElement("input");satelliteInput.setAttribute("id","satellite"),satelliteInput.setAttribute("type","radio"),satelliteInput.setAttribute("name","toggle"),satelliteInput.setAttribute("value","streets"),satelliteInput.addEventListener("click",function(){map.setStyle("mapbox://styles/mapbox/satellite-v9")});var satelliteLabel=document.createElement("label");satelliteLabel.setAttribute("for","satellite"),satelliteLabel.appendChild(document.createTextNode("Satellite")),mapMenu.appendChild(streetsInput),mapMenu.appendChild(streetsLabel),mapMenu.appendChild(satelliteInput),mapMenu.appendChild(satelliteLabel);var map=new mapboxgl.Map({container:mapDiv,style:"mapbox://styles/mapbox/streets-v9",center:[longitude,latitude],zoom:15,scrollZoom:!1});map.addControl(new mapboxgl.NavigationControl),new mapboxgl.Marker(el,{offset:[-10,-20]}).setLngLat([longitude,latitude]).addTo(map),mapDiv.appendChild(mapMenu)}
//# sourceMappingURL=maps/maps.js.map

Binary file not shown.

Binary file not shown.

View file

@ -1 +1 @@
{"version":3,"sources":["maps.js"],"names":["mapDivs","document","querySelectorAll","mapboxgl","accessToken","i","length","mapDiv","latitude","dataset","longitude","el","createElement","classList","add","mapMenu","streetsInput","setAttribute","addEventListener","map","setStyle","streetsLabel","appendChild","createTextNode","satelliteInput","satelliteLabel","Map","container","style","center","zoom","scrollZoom","Marker","offset","setLngLat","addTo"],"mappings":"AAEA,GAAIA,SAAUC,SAASC,iBAAiB,OACxCC,UAASC,YAAc,gGACvB,KAAK,GAAIC,GAAI,EAAGA,EAAIL,QAAQM,OAAQD,IAAK,CACrC,GAAIE,QAASP,QAAQK,GACjBG,SAAWD,OAAOE,QAAQD,SAC1BE,UAAaH,OAAOE,QAAQC,UAC5BC,GAAKV,SAASW,cAAc,MAChCD,IAAGE,UAAUC,IAAI,SACjB,IAAIC,SAAUd,SAASW,cAAc,MACrCG,SAAQF,UAAUC,IAAI,WACtB,IAAIE,cAAef,SAASW,cAAc,QAC1CI,cAAaC,aAAa,KAAM,WAChCD,aAAaC,aAAa,OAAQ,SAClCD,aAAaC,aAAa,OAAQ,UAClCD,aAAaC,aAAa,QAAS,WACnCD,aAAaC,aAAa,UAAW,WACrCD,aAAaE,iBAAiB,QAAS,WACnCC,IAAIC,SAAS,sCAEjB,IAAIC,cAAepB,SAASW,cAAc,QAC1CS,cAAaJ,aAAa,MAAO,WACjCI,aAAaC,YAAYrB,SAASsB,eAAe,WACjD,IAAIC,gBAAiBvB,SAASW,cAAc,QAC5CY,gBAAeP,aAAa,KAAM,aAClCO,eAAeP,aAAa,OAAQ,SACpCO,eAAeP,aAAa,OAAQ,UACpCO,eAAeP,aAAa,QAAS,WACrCO,eAAeN,iBAAiB,QAAS,WACrCC,IAAIC,SAAS,wCAEjB,IAAIK,gBAAiBxB,SAASW,cAAc,QAC5Ca,gBAAeR,aAAa,MAAO,aACnCQ,eAAeH,YAAYrB,SAASsB,eAAe,cACnDR,QAAQO,YAAYN,cACpBD,QAAQO,YAAYD,cACpBN,QAAQO,YAAYE,gBACpBT,QAAQO,YAAYG,eACpB,IAAIN,KAAM,GAAIhB,UAASuB,KACnBC,UAAWpB,OACXqB,MAAO,oCACPC,QAASnB,UAAWF,UACpBsB,KAAM,GACNC,YAAY,GAEhB,IAAI5B,UAAS6B,OAAOrB,IAAKsB,SAAS,IAAK,MAAOC,WAAWxB,UAAWF,WAAW2B,MAAMhB,KACrFZ,OAAOe,YAAYP","file":"../maps.js","sourcesContent":["/* global mapboxgl */\n//This code runs on page load and looks for <div class=\"map\">, then adds map\nvar mapDivs = document.querySelectorAll('.map');\nmapboxgl.accessToken = 'pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw';\nfor (var i = 0; i < mapDivs.length; i++) {\n var mapDiv = mapDivs[i];\n var latitude = mapDiv.dataset.latitude;\n var longitude = mapDiv.dataset.longitude;\n var el = document.createElement('div');\n el.classList.add('marker');\n var mapMenu = document.createElement('div');\n mapMenu.classList.add('map-menu');\n var streetsInput = document.createElement('input');\n streetsInput.setAttribute('id', 'streets');\n streetsInput.setAttribute('type', 'radio');\n streetsInput.setAttribute('name', 'toggle');\n streetsInput.setAttribute('value', 'streets');\n streetsInput.setAttribute('checked', 'checked');\n streetsInput.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/streets-v9');\n });\n var streetsLabel = document.createElement('label');\n streetsLabel.setAttribute('for', 'streets');\n streetsLabel.appendChild(document.createTextNode('Streets'));\n var satelliteInput = document.createElement('input');\n satelliteInput.setAttribute('id', 'satellite');\n satelliteInput.setAttribute('type', 'radio');\n satelliteInput.setAttribute('name', 'toggle');\n satelliteInput.setAttribute('value', 'streets');\n satelliteInput.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/satellite-v9');\n });\n var satelliteLabel = document.createElement('label');\n satelliteLabel.setAttribute('for', 'satellite');\n satelliteLabel.appendChild(document.createTextNode('Satellite'));\n mapMenu.appendChild(streetsInput);\n mapMenu.appendChild(streetsLabel);\n mapMenu.appendChild(satelliteInput);\n mapMenu.appendChild(satelliteLabel);\n var map = new mapboxgl.Map({\n container: mapDiv,\n style: 'mapbox://styles/mapbox/streets-v9',\n center: [longitude, latitude],\n zoom: 15,\n scrollZoom: false\n });\n new mapboxgl.Marker(el, {offset: [-10, -20]}).setLngLat([longitude, latitude]).addTo(map);\n mapDiv.appendChild(mapMenu);\n}\n"]}
{"version":3,"sources":["maps.js"],"names":["mapDivs","document","querySelectorAll","mapboxgl","accessToken","i","length","mapDiv","latitude","dataset","longitude","el","createElement","classList","add","mapMenu","streetsInput","setAttribute","addEventListener","map","setStyle","streetsLabel","appendChild","createTextNode","satelliteInput","satelliteLabel","Map","container","style","center","zoom","scrollZoom","addControl","NavigationControl","Marker","offset","setLngLat","addTo"],"mappings":"AAEA,GAAIA,SAAUC,SAASC,iBAAiB,OACxCC,UAASC,YAAc,gGACvB,KAAK,GAAIC,GAAI,EAAGA,EAAIL,QAAQM,OAAQD,IAAK,CACrC,GAAIE,QAASP,QAAQK,GACjBG,SAAWD,OAAOE,QAAQD,SAC1BE,UAAaH,OAAOE,QAAQC,UAC5BC,GAAKV,SAASW,cAAc,MAChCD,IAAGE,UAAUC,IAAI,SACjB,IAAIC,SAAUd,SAASW,cAAc,MACrCG,SAAQF,UAAUC,IAAI,WACtB,IAAIE,cAAef,SAASW,cAAc,QAC1CI,cAAaC,aAAa,KAAM,WAChCD,aAAaC,aAAa,OAAQ,SAClCD,aAAaC,aAAa,OAAQ,UAClCD,aAAaC,aAAa,QAAS,WACnCD,aAAaC,aAAa,UAAW,WACrCD,aAAaE,iBAAiB,QAAS,WACnCC,IAAIC,SAAS,sCAEjB,IAAIC,cAAepB,SAASW,cAAc,QAC1CS,cAAaJ,aAAa,MAAO,WACjCI,aAAaC,YAAYrB,SAASsB,eAAe,WACjD,IAAIC,gBAAiBvB,SAASW,cAAc,QAC5CY,gBAAeP,aAAa,KAAM,aAClCO,eAAeP,aAAa,OAAQ,SACpCO,eAAeP,aAAa,OAAQ,UACpCO,eAAeP,aAAa,QAAS,WACrCO,eAAeN,iBAAiB,QAAS,WACrCC,IAAIC,SAAS,wCAEjB,IAAIK,gBAAiBxB,SAASW,cAAc,QAC5Ca,gBAAeR,aAAa,MAAO,aACnCQ,eAAeH,YAAYrB,SAASsB,eAAe,cACnDR,QAAQO,YAAYN,cACpBD,QAAQO,YAAYD,cACpBN,QAAQO,YAAYE,gBACpBT,QAAQO,YAAYG,eACpB,IAAIN,KAAM,GAAIhB,UAASuB,KACnBC,UAAWpB,OACXqB,MAAO,oCACPC,QAASnB,UAAWF,UACpBsB,KAAM,GACNC,YAAY,GAEhBZ,KAAIa,WAAW,GAAI7B,UAAS8B,mBAC5B,GAAI9B,UAAS+B,OAAOvB,IAAKwB,SAAS,IAAK,MAAOC,WAAW1B,UAAWF,WAAW6B,MAAMlB,KACrFZ,OAAOe,YAAYP","file":"../maps.js","sourcesContent":["/* global mapboxgl */\n//This code runs on page load and looks for <div class=\"map\">, then adds map\nvar mapDivs = document.querySelectorAll('.map');\nmapboxgl.accessToken = 'pk.eyJ1Ijoiam9ubnliYXJuZXMiLCJhIjoiY2l2cDhjYW04MDAwcjJ0cG1uZnhqcm82ayJ9.qA2zeVA-nsoMh9IFrd5KQw';\nfor (var i = 0; i < mapDivs.length; i++) {\n var mapDiv = mapDivs[i];\n var latitude = mapDiv.dataset.latitude;\n var longitude = mapDiv.dataset.longitude;\n var el = document.createElement('div');\n el.classList.add('marker');\n var mapMenu = document.createElement('div');\n mapMenu.classList.add('map-menu');\n var streetsInput = document.createElement('input');\n streetsInput.setAttribute('id', 'streets');\n streetsInput.setAttribute('type', 'radio');\n streetsInput.setAttribute('name', 'toggle');\n streetsInput.setAttribute('value', 'streets');\n streetsInput.setAttribute('checked', 'checked');\n streetsInput.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/streets-v9');\n });\n var streetsLabel = document.createElement('label');\n streetsLabel.setAttribute('for', 'streets');\n streetsLabel.appendChild(document.createTextNode('Streets'));\n var satelliteInput = document.createElement('input');\n satelliteInput.setAttribute('id', 'satellite');\n satelliteInput.setAttribute('type', 'radio');\n satelliteInput.setAttribute('name', 'toggle');\n satelliteInput.setAttribute('value', 'streets');\n satelliteInput.addEventListener('click', function () {\n map.setStyle('mapbox://styles/mapbox/satellite-v9');\n });\n var satelliteLabel = document.createElement('label');\n satelliteLabel.setAttribute('for', 'satellite');\n satelliteLabel.appendChild(document.createTextNode('Satellite'));\n mapMenu.appendChild(streetsInput);\n mapMenu.appendChild(streetsLabel);\n mapMenu.appendChild(satelliteInput);\n mapMenu.appendChild(satelliteLabel);\n var map = new mapboxgl.Map({\n container: mapDiv,\n style: 'mapbox://styles/mapbox/streets-v9',\n center: [longitude, latitude],\n zoom: 15,\n scrollZoom: false\n });\n map.addControl(new mapboxgl.NavigationControl());\n new mapboxgl.Marker(el, {offset: [-10, -20]}).setLngLat([longitude, latitude]).addTo(map);\n mapDiv.appendChild(mapMenu);\n}\n"]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View file

@ -44,6 +44,7 @@ for (var i = 0; i < mapDivs.length; i++) {
zoom: 15,
scrollZoom: false
});
map.addControl(new mapboxgl.NavigationControl());
new mapboxgl.Marker(el, {offset: [-10, -20]}).setLngLat([longitude, latitude]).addTo(map);
mapDiv.appendChild(mapMenu);
}

View file

@ -67,6 +67,7 @@ function addMap(latitude, longitude, places) {
center: [longitude, latitude],
zoom: 15
});
map.addControl(new mapboxgl.NavigationControl());
//create the current location marker
var el = document.createElement('div');
el.classList.add('marker');

View file

@ -18,3 +18,4 @@ html {
@import "pagination";
@import "note-form";
@import "mapbox";
@import "contacts";

14
resources/assets/sass/contacts.scss vendored Normal file
View file

@ -0,0 +1,14 @@
//contacts.scss
.contact {
display: flex;
flex-direction: row;
margin-top: 1em;
border-bottom: 1px dashed grey;
}
.contact img {
margin-right: 0.2rem;
width: 100px;
height:100px;
}

View file

@ -7,14 +7,36 @@ Edit Contact « Admin CP
@section('content')
<h1>Edit Contact</h1>
<form action="/admin/contacts/edit/{{ $contact->id }}" method="post" enctype="multipart/form-data" accept-charset="utf-8">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<label for="name">Real Name:</label> <input type="text" name="name" id="name" placeholder="Real Name" value="{{ $contact->name }}"><br>
<label for="nick">Nick:</label> <input type="text" name="nick" id="nick" placeholder="local_nick" value="{{ $contact->nick }}"><br>
<label for="homepage">Homepage:</label> <input type="text" name="homepage" id="homepage" placeholder="https://homepage.com" value="{{ $contact->homepage }}"><br>
<label for="twitter">Twitter Nick:</label> <input type="text" name="twitter" id="twitter" placeholder="Twitter handle" value="{{ $contact->twitter }}"><br>
<label for="avatar">Avatar:</label> <input type="file" accept="image/*" value="Upluad" name="avatar" id="avatar"><br>
<input type="submit" name="submit" value="Submit">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<fieldset class="note-ui">
<legend>Conctact</legend>
<div>
<label for="name">Real Name:</label>
<input type="text" name="name" id="name" placeholder="Real Name" value="{{ $contact->name }}">
</div>
<div>
<label for="nick">Nick:</label>
<input type="text" name="nick" id="nick" placeholder="local_nick" value="{{ $contact->nick }}">
</div>
<div>
<label for="homepage">Website:</label>
<input type="text" name="homepage" id="homepage" placeholder="https://homepage.com" value="{{ $contact->homepage }}">
</div>
<div>
<label for="twitter">Twitter Nick:</label>
<input type="text" name="twitter" id="twitter" placeholder="Twitter handle" value="{{ $contact->twitter }}">
</div>
<div>
<label for="facebook">Facebook Profile ID:</label>
<input type="text" name="facebook" id="facebook" placeholder="Facebook ID" value="{{ $contact->facebook }}">
</div>
<div>
<label for="avatar">Avatar:</label>
<input type="file" accept="image/*" value="Upload" name="avatar" id="avatar">
</div>
<input type="submit" name="submit" value="Submit">
</fieldset>
</form>
<p>Or do you want to <a href="/admin/contacts/delete/{{ $contact->id }}">delete</a> this contact?</p>
<p>Instead of uploading an image, you can <a href="/admin/contacts/edit/{{ $contact->id }}/getavatar">grab from their homepage</a>?</p>
@stop
@stop

View file

@ -7,21 +7,23 @@ List Contacts « Admin CP
@section('content')
<h1>Contacts</h1>
<table>
<tr>
<th>Real Name</th>
<th>Nick</th>
<th>Homepage</th>
<th>Twitter</th>
<th></th>
</tr>
<tr>
<th>Real Name</th>
<th>Nick</th>
<th>Homepage</th>
<th>Twitter</th>
<th>Facebook</th>
<th></th>
</tr>
@foreach($contacts as $contact)
<tr>
<td>{{ $contact->name }}</td>
<td>{{ $contact->nick }}</td>
<td>{{ $contact->homepage }}</td>
<td>{{ $contact->twitter }}</td>
<td><a href="/admin/contacts/edit/{{ $contact->id }}">edit</a></td>
</tr>
<tr>
<td>{{ $contact->name }}</td>
<td>{{ $contact->nick }}</td>
<td>{{ $contact->homepage }}</td>
<td>{{ $contact->twitter }}</td>
<td>{{ $contact->facebook }}</td>
<td><a href="/admin/contacts/edit/{{ $contact->id }}">edit</a></td>
</tr>
@endforeach
</table>
@stop
@stop

View file

@ -1,10 +0,0 @@
<div class="contact h-card">
<div class="contact-info">
<span class="p-name">{{ $contact->name }}</span> <a href="/contacts/{{ $contact->nick }}">{{ '@' . $contact->nick }}</a>
<ul class="contact-links">
<li><i class="fa fa-globe fa-fw"></i><a href="{{ $contact->homepage }}" class="u-url">{{ $contact->homepagePretty }}</a></li>
@if($contact->twitter != null)<li><i class="fa fa-twitter fa-fw"></i><a href="https://twitter.com/{{ $contact->twitter }}">{{ $contact->twitter }}</a></li>@endif
</ul>
</div>
<img src="{{ $contact->image }}" alt="" class="u-photo">
</div>

View file

@ -5,5 +5,5 @@ Contacts « Jonny Barnes
@stop
@section('content')
@include('contact-template', array('contact' => $contact))
@stop
@include('templates.contact', array('contact' => $contact))
@stop

View file

@ -6,6 +6,6 @@ Contacts « Jonny Barnes
@section('content')
@foreach($contacts as $contact)
@include('contact-template', array('contact' => $contact))
@include('templates.contact', array('contact' => $contact))
@endforeach
@stop
@stop

View file

@ -1,4 +0,0 @@
<a class="h-card vcard mini-h-card" href="{{ $contact->homepage }}">
<img class="u-photo photo logo" alt="" src="{{ $contact->photo }}">
{!! $contact->name !!}
</a>

View file

@ -0,0 +1,15 @@
<div class="h-card contact">
<div>
<img src="{{ $contact->image }}" alt="" class="u-photo">
</div>
<div>
<span class="p-name">{{ $contact->name }}</span> <a href="/contacts/{{ $contact->nick }}">{{ '@' . $contact->nick }}</a>
<ul class="contact-links">
<li><a class="u-url" href="{{ $contact->homepage }}">{{ $contact->homepageHost }}</a></li>
@if($contact->twitter)<li><a class="u-url" href="https://twitter.com/{{ $contact->twitter }}">Twitter Profile</a></li>@endif
@if($contact->facebook)<li><a class="u-url" href="https://www.facebook.com/{{ $contact->facebook }}">Facebook Profile</a></li>@endif
</ul>
</div>
</div>

View file

@ -0,0 +1,8 @@
<span class="u-category h-card">
<a class="mini-h-card u-url p-name" href="{{ $contact->homepage }}">
<img class="u-photo" alt="" src="{{ $contact->photo }}">
{!! $contact->name !!}
</a>
@if ($contact->facebook)<a class="u-url" href="https://www.facebook.com/{{ $contact->facebook }}"></a>@endif
@if ($contact->twitter)<a class="u-url" href="https://twitter.com/{{ $contact->twitter }}"></a>@endif
</span>

View file

@ -73,7 +73,7 @@ class NotesTest extends TestCase
public function testDefaultImageUsed()
{
$this->visit($this->appurl . '/notes/C')
->see('<img class="u-photo photo logo" alt="" src="/assets/profile-images/default-image">');
->see('<img class="u-photo" alt="" src="/assets/profile-images/default-image">');
}
/**
@ -84,7 +84,7 @@ class NotesTest extends TestCase
public function testProfileImageUsed()
{
$this->visit($this->appurl . '/notes/D')
->see('<img class="u-photo photo logo" alt="" src="/assets/profile-images/aaronparecki.com/image">');
->see('<img class="u-photo" alt="" src="/assets/profile-images/aaronparecki.com/image">');
}
/**