From c892782c1c486ef4d1d2c18cbebc51189daacfdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20Koutov=C3=A1?= Date: Sat, 10 Nov 2018 16:46:03 +0100 Subject: [PATCH] Pokus o editaci textu --- bootstrap-3.3.7-dist/css/svatweb.css | 26 ++++++++- bootstrap-3.3.7-dist/js/template.js | 81 +++++++++++++------------- bootstrap-3.3.7-dist/svatebni-web.html | 46 ++++++++++++++- 3 files changed, 111 insertions(+), 42 deletions(-) diff --git a/bootstrap-3.3.7-dist/css/svatweb.css b/bootstrap-3.3.7-dist/css/svatweb.css index ef69780..885a192 100644 --- a/bootstrap-3.3.7-dist/css/svatweb.css +++ b/bootstrap-3.3.7-dist/css/svatweb.css @@ -70,7 +70,7 @@ ul.user li a:hover { } .edit a { - color: white; + color: black; } .img-fluid{ @@ -102,4 +102,28 @@ ul.user li a:hover { background: white; cursor: inherit; display: block; +} + +.onas{ + position: relative; + display: block; + text-align: center; + padding:2em; + width:60%; + margin-left: auto; + margin-right: auto; + font-size:1.2em; +} + +.onas:hover .edit { + display: block; +} + +h2{ + text-align: center; + padding-top:2em; +} + +textarea{ + width:100%; } \ No newline at end of file diff --git a/bootstrap-3.3.7-dist/js/template.js b/bootstrap-3.3.7-dist/js/template.js index 247246d..68722c0 100644 --- a/bootstrap-3.3.7-dist/js/template.js +++ b/bootstrap-3.3.7-dist/js/template.js @@ -1,49 +1,52 @@ var schemacolor = "#fa8072"; $(document).ready(function(){ - $("a").hover(function(){ - $(this).css("color", schemacolor); - }, function(){ - $(this).css("color", "black"); - }); - document.getElementById("jmeno").style.color = schemacolor; - $(document).on('change', '.btn-file :file', function() { + $("a").hover(function(){ + $(this).css("color", schemacolor); + }, function(){ + $(this).css("color", "black"); + }); + document.getElementById("jmeno").style.color = schemacolor; + $(document).on('change', '.btn-file :file', function() { var input = $(this), - label = input.val().replace(/\\/g, '/').replace(/.*\//, ''); + label = input.val().replace(/\\/g, '/').replace(/.*\//, ''); input.trigger('fileselect', [label]); - }); + }); - $('.btn-file :file').on('fileselect', function(event, label) { - - var input = $(this).parents('.input-group').find(':text'), - log = label; - - if( input.length ) { - input.val(log); - } else { - if( log ) alert(log); - } - - }); + $('.btn-file :file').on('fileselect', function(event, label) { -}); -function readURL(input) { - if (input.files && input.files[0]) { - var reader = new FileReader(); - - reader.onload = function (e) { - $('#uvodni').attr('src', e.target.result); - console.log("Nahrano"); - } - - reader.readAsDataURL(input.files[0]); - } + var input = $(this).parents('.input-group').find(':text'), + log = label; + + if( input.length ) { + input.val(log); + } else { + if( log ) alert(log); } - function changeImage(){ - $("#imgInp").change(function(){ - readURL(this); - }); + }); + $("#demo-editor-bootstrap").wysihtml5(); +}); +function readURL(input) { + if (input.files && input.files[0]) { + var reader = new FileReader(); + + reader.onload = function (e) { + $('#uvodni').attr('src', e.target.result); + console.log("Nahrano"); + } + + reader.readAsDataURL(input.files[0]); } - - \ No newline at end of file +} + +function changeImage(){ + $("#imgInp").change(function(){ + readURL(this); + }); +} + +function changeText(){ + +} + diff --git a/bootstrap-3.3.7-dist/svatebni-web.html b/bootstrap-3.3.7-dist/svatebni-web.html index 2002142..263b69d 100644 --- a/bootstrap-3.3.7-dist/svatebni-web.html +++ b/bootstrap-3.3.7-dist/svatebni-web.html @@ -11,6 +11,7 @@ + Svatební web @@ -29,13 +30,13 @@
  • Náš příběh
  • - +
    Krásná úvodní fotografie -
    +
    @@ -73,11 +74,52 @@ + +

    Adam a Eva

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis +nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat +nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    +
    +
    + + +