Browse Source

Merge branch 'master' of github.com:aaronpk/Quill

pull/52/head
Aaron Parecki 9 years ago
parent
commit
3ea51af407
  1. 20
      public/css/style.css
  2. BIN
      public/images/quill-icon-196.png
  3. 5
      views/layout.php
  4. 25
      views/new-post.php

20
public/css/style.css

@ -13,7 +13,7 @@ body {
.narrow { .narrow {
max-width: 700px; max-width: 700px;
margin-right: auto; margin-right: auto;
margin-left: auto;
margin-left: auto;
} }
.footer { .footer {
@ -28,7 +28,7 @@ body {
.footer .nav { .footer .nav {
max-width: 700px; max-width: 700px;
margin-right: auto; margin-right: auto;
margin-left: auto;
margin-left: auto;
} }
.footer .credits { .footer .credits {
@ -65,7 +65,7 @@ body {
.bs-callout .highlight { .bs-callout .highlight {
background-color: #fff; background-color: #fff;
} }
/* Themes for different contexts */ /* Themes for different contexts */
.bs-callout-danger { .bs-callout-danger {
background-color: #fcf2f2; background-color: #fcf2f2;
@ -132,7 +132,7 @@ body {
float: left; float: left;
margin-left: 10px; margin-left: 10px;
} }
#last_response_date { #last_response_date {
font-size: 80%; font-size: 80%;
font-weight: normal; font-weight: normal;
@ -160,10 +160,6 @@ body {
} }
.img-visible { .img-visible {
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
@ -171,10 +167,6 @@ body {
#note_location_img img { #note_location_img img {
margin-top: -1px; margin-top: -1px;
border: 1px solid #ccc; border: 1px solid #ccc;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px; border-bottom-left-radius: 4px;
} }
@ -194,7 +186,7 @@ body {
cursor: pointer; cursor: pointer;
opacity: 0; opacity: 0;
filter: alpha(opacity=0); filter: alpha(opacity=0);
}
}
.callout { .callout {
border-left: 4px #5bc0de solid; border-left: 4px #5bc0de solid;
@ -205,5 +197,3 @@ body {
.callout table { .callout table {
margin-bottom: 0; margin-bottom: 0;
} }

BIN
public/images/quill-icon-196.png

After

Width: 196  |  Height: 196  |  Size: 12 KiB

5
views/layout.php

@ -26,6 +26,11 @@
<link rel="apple-touch-icon" sizes="144x144" href="/images/quill-icon-144.png"> <link rel="apple-touch-icon" sizes="144x144" href="/images/quill-icon-144.png">
<link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" sizes="196x196" href="/images/quill-icon-196.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#428bca">
<script src="/js/jquery-1.7.1.min.js"></script> <script src="/js/jquery-1.7.1.min.js"></script>
<script src="/js/script.js"></script> <script src="/js/script.js"></script>

25
views/new-post.php

@ -26,9 +26,12 @@
<div class="form-group"> <div class="form-group">
<label for="note_photo"><code>photo</code></label> <label for="note_photo"><code>photo</code></label>
<input type="file" name="note_photo" id="note_photo" accept="image/*" onchange="previewPhoto(event)">
<input type="file" name="note_photo" id="note_photo" accept="image/*">
<br> <br>
<img src="" id="photo_preview" style="max-width: 300px; max-height: 300px;">
<div id="photo_preview_container">
<img src="" id="photo_preview" style="max-width: 300px; max-height: 300px;">
<button type="button" class="btn btn-danger btn-sm" id="remove_photo"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> Remove image</button>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -132,16 +135,20 @@
</style> </style>
<script> <script>
function previewPhoto(event) {
$("#photo_preview")
.show()
.attr("src", URL.createObjectURL(event.target.files[0]) );
}
$(function(){ $(function(){
var userHasSetCategory = false; var userHasSetCategory = false;
$("#photo_preview").hide();
$("#photo_preview_container").hide();
$("#note_photo").on("change", function(e){
$("#photo_preview_container").show();
$("#photo_preview").attr("src", URL.createObjectURL(e.target.files[0]) );
});
$("#remove_photo").on("click", function(){
$("#note_photo").val("");
$("#photo_preview").attr("src", "" );
$("#photo_preview_container").hide();
});
$("#note_content").on('change keyup', function(e){ $("#note_content").on('change keyup', function(e){
var text = $("#note_content").val(); var text = $("#note_content").val();

Loading…
Cancel
Save