Skip to content

Commit

Permalink
upadate
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoDake committed Aug 17, 2022
1 parent c36f7d6 commit 40474e5
Show file tree
Hide file tree
Showing 36 changed files with 809 additions and 653 deletions.
123 changes: 96 additions & 27 deletions slides/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,33 +103,102 @@ <h2 data-id="code-title">Pretty Code</h2>
<section data-auto-animate>
<h2 data-id="code-title">With animations</h2>
<pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
import React, { useState } from 'react';

function Example() {
const [count, setCount] = useState(0);

return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
}

function SecondExample() {
const [count, setCount] = useState(0);

return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>
Click me
</button>
</div>
);
}
#ifndef ILOGSOURCE_H
#define ILOGSOURCE_H
#include <QObject>
#include <QApplication>
#include <QMutex>
#include <QWaitCondition>
#include <QMutexLocker>
#include <QJsonObject>
#include <QTextCodec>
#include <memory>
#include "event.h"

//#include "longtimeoperation.h"


class ILog;
class ILogSource: public std::enable_shared_from_this<ILogSource>
{
public:
ILogSource(QObject* eventHandler, QString type)
:mEventHandler(eventHandler), mType(type){
setCodec("UTF-8");
}

virtual ~ILogSource(){}

virtual bool open() = 0;
// virtual void pause() {
// QMutexLocker l(&mCtrlMutex);
// mPaused = true;
// }
// virtual void resume() {
// QMutexLocker l(&mCtrlMutex);
// mPaused = false;
// qDebug()<<"notify";
// mCtrlCond.notify_one();
// };
virtual void close() = 0;

virtual std::shared_ptr<ILog> getLog() = 0;

// virtual shared_ptr<LongtimeOperation> getLoadProgress(){
// return mLoadOp;
// }

virtual bool setCodec(QString name) {
mCodec = QTextCodec::codecForName(name.toStdString().c_str());
return true;
}

QTextCodec* getCodec() {
return mCodec;
}

static ILogSource *createLogSourceFromType(QString type, QObject* eventHandler);

virtual QString getSimpleDesc() = 0;

// bool isPaused(){return mPaused;}

// bool isFinished(){return mFinished;}

//public:
//virtual QJsonValue saveToJson();
//virtual void loadFromJson(const QJsonValue &jo);

public:
void post(BaseEvent* ev) {
// QMutexLocker l(&mCtrlMutex);
if ( (EventsType)ev->type() == evLogChange) {
qDebug()<<"wait";
// mCtrlCond.wait(&mCtrlMutex);
}

// if ((EventsType)ev->type() == evSourceFinish) {
// mFinished = true;
// }

qApp->postEvent(mEventHandler, ev);
}


protected:
//shared_ptr<LongtimeOperation> mLoadOp;
QTextCodec* mCodec;

private:
QObject* mEventHandler;
// QMutex mCtrlMutex;
// QWaitCondition mCtrlCond;
// bool mPaused{false};
// bool mFinished{false};
QString mType;
};

#endif // ILOGSOURCE_H
</script></code></pre>
</section>

Expand Down
37 changes: 30 additions & 7 deletions slides/dist/jyy.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.reveal .slide-number {
font-size: 26px;
border-radius: 5px;
Expand Down Expand Up @@ -45,18 +46,18 @@
}

.reveal table {
font-size: 32px;
font-family: 'Lato', 'STHeiti', 'SimHei', 'Sans Serif';
margin-top: 15px;
margin-bottom: 15px;
font-family: 'fira code', 'monospace';
font-size: 22px;
margin-top: 10px;
margin-bottom: 10px;
}

.reveal th {
background-color: #eee;
background-color: #f2f2f2;
}

.reveal tr:nth-child(even) {
background-color: #efffff;
background-color: #fdfdfd;
}

.reveal h2,
Expand Down Expand Up @@ -111,6 +112,16 @@
}

.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
font-size: 28px;
background-color: #eee;
border-radius: 3mm;
Expand All @@ -119,10 +130,16 @@

.reveal pre code {
max-height: none;
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}

.reveal code {
font-family: 'Inconsolata', 'STKaiti', 'KaiTi', 'Sans Serif', Monospace;
font-family: 'fira code', 'monospace';
font-size: 20px;
}

.reveal .middle blockquote {
Expand Down Expand Up @@ -175,3 +192,9 @@ section .center {
margin-top: 10px;
}

.float-left {
float: left;
}
.float-right {
float: right;
}
File renamed without changes.
Binary file added slides/image/slides/1660705878927.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/1660706564297.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/backend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/logedit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/mainpage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/search_highlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/split1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/split2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added slides/image/slides/timeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions slides/plugin/highlight/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
Zenburn style from voldmar.ru (c) Vladimir Epifanov <[email protected]>
based on dark.css by Ivan Sagalaev
*/

.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #f7f7f7;
color: #191919;
}

.hljs-keyword,
.hljs-meta-keyword,
.hljs-selector-tag,
.hljs-tag {
color: #0c3cc2;
}

.hljs-template-tag {
color: #f4f74e;
}

.hljs-number {
color: #c2c2c2;
}

.hljs-variable,
.hljs-template-variable,
.hljs-attribute {
color: #870ee9;
}

.hljs-literal {
color: #089574;
}

.hljs-subst {
color: #8f8f8f;
}

.hljs-title,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-section,
.hljs-type {
color: #306f80;
}

.hljs-symbol,
.hljs-bullet,
.hljs-link {
color: #d04242;
}

.hljs-deletion,
.hljs-string,
.hljs-built_in,
.hljs-builtin-name {
color: #ed713ce6;
}

.hljs-addition,
.hljs-quote,
.hljs-meta {
color: #0dd006;
}

.hljs-comment
{
color: #8f8f8f;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-strong {
font-weight: bold;
}
Loading

0 comments on commit 40474e5

Please sign in to comment.