Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added media section #4147

Merged
merged 8 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ plugins:

collections:
media:
output: false
output: true
permalink: /media/:title/
events:
output: true
Expand Down
24 changes: 17 additions & 7 deletions _data/secondarymenu.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,29 @@
"page": "Why DuckDB",
"url": "/why_duckdb"
},
{
"page": "Media",
"url": "/media"
},
{
"page": "FAQ",
"url": "/faq"
}
]
},
{
"page": "Blog",
"url": "/news/"
"page": "Resources",
"url": "#",
"subfolderitems": [
{
"page": "Blog",
"url": "/news/"
},
{
"page": "Events",
"url": "/events"
},
{
"page": "Media",
"url": "/media"
}
]
},
{
"page": "GitHub",
Expand All @@ -56,4 +66,4 @@
]
}
]
}
}
40 changes: 17 additions & 23 deletions _includes/banner_docversion.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
{% endif %}

{% if versionviewed contains "stable" %}
<main>

{% elsif page.path contains "latest" %}
<main class="latest">
<div class="banner">
<div class="content">
The page is for the github main (nightly) version of DuckDB, the features shown in the documentation may not yet be available in the stable version.
</div>
<div class="close"></div>
<div class="banner">
<div class="content">
<span title="The page is for the github main (nightly) version of DuckDB, the features shown in the documentation may not yet be available in the stable version.">GitHub nightly version</span>
</div>
</div>
{% else %}
{% assign url_parts = page.url | split: '/' %}
{% assign new_url = '' %}
Expand All @@ -32,20 +30,16 @@
{% endunless %}
{% endif %}
{% endfor %}
<main class="outdated">
<div class="banner outdated">
<div class="content">
<span class="icon_outdated"></span>
<span>This version of the documentation is outdated.
{% assign new_filename = new_url | replace: ".html", ".md" %}
{% capture url_exists %}{% file_exists {{ new_filename }} %}{% endcapture %}
{% if url_exists == "true" %}
<a href="{{ site.url }}{{ new_url }}">view latest</a>
{% else %}
This page is not available in the latest version of the documentation.
{% endif %}
</span>
</div>
<div class="close"></div>
<div class="banner outdated">
<div class="content">
<span class="icon_outdated"></span>
{% assign new_filename = new_url | replace: ".html", ".md" %}
{% capture url_exists %}{% file_exists {{ new_filename }} %}{% endcapture %}
{% if url_exists == "true" %}
<span title="Outdated documentation. Please select latest version.">Outdated documentation</span>
{% else %}
<span title="This page is not available in the latest version of the documentation.">Outdated documentation</span>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
4 changes: 1 addition & 3 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ <h6>Community</h6>
<a href="https://stackoverflow.com/questions/tagged/duckdb" target="_blank">Stack Overflow</a>
</div>
</div>
<div class="footerlogo">
<img src="{{ site.baseurl }}/images/DuckDB-Footer.svg" class="duckdbfooter" alt="DuckDB Logo">
</div>
<div class="footerlogo duckdb_logo"></div>
<div class="bottomline">
<div>© {{ "now" | date: "%Y" }} DuckDB Foundation, Amsterdam NL</div>
</div>
Expand Down
6 changes: 0 additions & 6 deletions _includes/menu_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
{% else %}
{%- assign menudocfile = "menu_docs_" | append: versionviewed | replace: ".", "" -%}
{% endif %}

<div class="opensearch">
<span>Search</span>
<span class="mac shortcut">cmd+k</span>
<span class="win shortcut">ctrl+k</span>
</div>

<ul class="sidenav">
{% if site.data[menudocfile].docsmenu %}
Expand Down
5 changes: 3 additions & 2 deletions _includes/quick_installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
<div class="intro">
<h1>Installation</h1>
<p>DuckDB is seamlessly integrated with major programming languages. It can be installed in less than 20 seconds on most platforms.</p>
<a href="/docs/installation/" class="white dark button">More installation options</a>
<a href="/docs/installation/" class="button transparent">More installation options</a>
</div>
<div class="install">
<div class="window">
<div class="topbar environment">
<ul>
<div class="select-highlight"></div>
<li data-client="cli" class="active">Command line</li>
<li data-client="python">Python</li>
<li data-client="r">R</li>
Expand All @@ -28,7 +29,7 @@ <h1>Installation</h1>
</select>
</label>

<div class="result content dark">
<div class="result content">
{% highlight bash %}
brew install duckdb
{% endhighlight %}
Expand Down
96 changes: 96 additions & 0 deletions _includes/recent_posts_section.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<section class="blog recentposts">
<div class="wrap">
<h1>
{% if page.collection == "events" %}
Other Events
{% elsif page.collection == "media" %}
Other Media
{% else %}
Recent Posts
{% endif %}
</h1>
<div class="newstileswrap">
{% if page.collection == "events" %}
{% assign items = site.events %}
{% elsif page.collection == "media" %}
{% assign items = site.media %}
{% else %}
{% assign items = site.posts %}
{% endif %}

{% assign recent_count = 0 %}
{% for item in items %}
{% if item.url != page.url and recent_count < 2 %}
{% assign random_number = forloop.index | modulo: 3 | plus: 1 %}
{% assign tag_classes = item.tags | default: "" | join: ' ' %}

{% if page.collection == "media" %}
<div class="mediapreview postpreview {{ tag_classes | downcase | slugify }}" data-title="{{ item.title | escape }}">
<a href="/media/{{ item.slug | default: item.title | slugify }}/" title="{{ item.title }}" class="blocklink"></a>
<div class="postimg custom">
{% if item.thumb %}
<img src="{{ item.thumb }}" alt="{{ item.title }}" class="zoom-image">
{% else %}
<img src="/images/blog/thumbs/placeholder-{{ random_number }}.svg" alt="Placeholder" class="zoom-image">
{% endif %}
</div>
<div class="postdetails">
{% if item.tags %}
<div class="tags">
{% for tag in item.tags %}
<span class="tag">{{ tag }}</span>
{% endfor %}
{% if item.length %}
<span class="length">{{ item.length }}</span>
{% endif %}
</div>
{% endif %}
<h3>{{ item.title }}</h3>
<div class="meta">
<div class="date">{{ item.date | date: "%Y-%m-%d" }}</div>
<div class="author">{{ item.author | default: "DuckDB" }}</div>
</div>
</div>
</div>
{% else %}
<div class="postpreview {% if page.collection == 'events' %}eventpreview{% endif %} {{ tag_classes | downcase | slugify }}" data-title="{{ item.title | escape }}">
<a href="{{ item.url }}" class="blocklink"></a>
<div class="postimg custom">
{% if item.thumb %}
<img src="{{ item.thumb }}" alt="{{ item.title }}" class="zoom-image">
{% else %}
<img src="/images/blog/thumbs/placeholder-{{ random_number }}.svg" alt="Placeholder" class="zoom-image">
{% endif %}
</div>
<div class="postdetails">
{% if item.tags %}
<div class="tags">
{% if page.collection == "events" %}
<span class="eventdate">{{ item.date | date: "%Y-%m-%d" }}</span>
{% endif %}
{% for tag in item.tags %}
<span class="tag">{{ tag }}</span>
{% endfor %}
</div>
{% endif %}
<h3><a href="{{ item.url }}">{{ item.title }}</a></h3>
<div class="meta">
{% if page.collection == 'events' %}
<div class="venue">{{ item.venue | default: "Venue not specified" }}</div>
{% else %}
<div class="date">{{ item.date | date: "%Y-%m-%d" }}</div>
{% endif %}
<div class="author">{{ item.author | default: "DuckDB" }}</div>
</div>
</div>
</div>
{% endif %}
{% assign recent_count = recent_count | plus: 1 %}
{% endif %}
{% endfor %}
</div>
<a href="{{ site.url }}{{ site.baseurl }}{% if page.collection == "events" %}/events{% elsif page.collection == "media" %}/media{% else %}/news{% endif %}" class="button transparent arrow-right">
All {% if page.collection == "events" %}events{% elsif page.collection == "media" %}media{% else %}blog posts{% endif %} <span></span>
</a>
</div>
</section>
14 changes: 13 additions & 1 deletion _layouts/community_extension_doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="stylesheet" href="{{ site.baseurl }}/css/docu.css?{{ site.data['hash'] }}">
<link rel="stylesheet" href="{{ site.baseurl }}/css/mobilestyles.css?{{ site.data['hash'] }}">
<link rel="stylesheet" href="{{ site.baseurl }}/css/communityextensions.css?{{ site.data['hash'] }}">
<link rel="stylesheet" href="{{ site.baseurl }}/css/darkmode.css?{{ site.data['hash'] }}">

<link rel="icon" type="image/png" href="{{ site.baseurl }}/images/favicon_ce/favicon-48x48.png" sizes="48x48" />
<link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/images/favicon_ce/favicon.svg" />
Expand All @@ -21,6 +22,15 @@
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />

{% seo title=false %}

<script>
var userPrefersDark = localStorage.getItem('mode') === 'dark';
var systemPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userPrefersDark || systemPrefersDark) {
document.documentElement.classList.add('darkmode');
document.documentElement.classList.add('disable-transitions');
}
</script>

</head>

Expand Down Expand Up @@ -48,7 +58,9 @@
</div>
</nav>
</div>
<a class="button yellow" href="/docs/installation/" target="_blank">Install DuckDB</a>
<div class="options">
<button class="mode" data-mode="dark"></button>
</div>
</div>
</div>
</header>
Expand Down
16 changes: 15 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<link rel="stylesheet" href="{{ site.baseurl }}/css/{{ page.add_css }}?{{ site.data['hash'] }}">
{% endif %}
<link rel="stylesheet" href="{{ site.baseurl }}/css/mobilestyles.css?{{ site.data['hash'] }}">
<link rel="stylesheet" href="{{ site.baseurl }}/css/darkmode.css?{{ site.data['hash'] }}">

<link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/images/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/images/favicon/favicon-32x32.png">
Expand All @@ -30,6 +31,16 @@
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />

{% seo title=false %}

<script>
var userPrefersDark = localStorage.getItem('mode') === 'dark';
var systemPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
if (userPrefersDark || systemPrefersDark) {
document.documentElement.classList.add('darkmode');
document.documentElement.classList.add('disable-transitions');
}
</script>

</head>
<body {% if page.body_class %} class="{{ page.body_class }}" {% endif %}>

Expand All @@ -50,7 +61,10 @@
</div>
</div>
</div>
<a class="button yellow" href="https://duckdblabs.com/#support" target="_blank">Support</a>
<div class="options">
<a class="button yellow" href="https://duckdblabs.com/#support" target="_blank">Support</a>
<button class="mode" data-mode="dark"></button>
</div>
</div>
</div>
</header>
Expand Down
Loading