Skip to content

Commit a6ba5b5

Browse files
committed
Update Contribute.cshtml to enhance markdown template with detailed descriptions and improve styling; modify Index.cshtml to change button style for 'View All Tips'
1 parent 68ae6d9 commit a6ba5b5

2 files changed

Lines changed: 124 additions & 29 deletions

File tree

Web/Pages/Contribute.cshtml

Lines changed: 122 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<ol class="mb-0">
6363
<li class="mb-3">
6464
<strong>Fork the Repository</strong><br>
65-
Head over to <a href="https://github.com/csharpfritz/CopilotThatJawn" target="_blank" class="text-primary">github.com/csharpfritz/CopilotThatJawn</a> and fork the repo to your account.
65+
Head over to <a href="https://github.com/csharpfritz/CopilotThatJawn" target="_blank">github.com/csharpfritz/CopilotThatJawn</a> and fork the repo to your account.
6666
</li>
6767
<li class="mb-3">
6868
<strong>Clone Your Fork</strong><br>
@@ -93,46 +93,70 @@
9393
</div>
9494

9595
<div class="card mb-4">
96-
<div class="card-header">
96+
<div class="card-header bg-primary text-white">
9797
<h3 class="h5 mb-0"><i class="bi bi-file-text me-2"></i>Markdown Format Template</h3>
98-
</div>
99-
<div class="card-body">
98+
</div> <div class="card-body">
10099
<p>Each tip should be a markdown file with YAML frontmatter. Here's the template to follow:</p>
101100
<pre><code class="language-markdown">---
102-
title: "Your Tip Title Here"
103-
slug: "url-friendly-slug"
104-
category: "GitHub Copilot" # or "Microsoft 365 Copilot", "Azure AI", etc.
105-
tags: ["relevant", "tags", "here"]
106-
difficulty: "Beginner" # Beginner, Intermediate, or Advanced
101+
title: "Your AI Development Tip Title"
102+
description: "A clear, concise summary that will appear in card previews and search results"
103+
category: "GitHub Copilot" # Choose: GitHub Copilot, Microsoft 365 Copilot, Azure AI, Tools
104+
tags: ["ai-development", "productivity", "code-generation"] # Add 2-4 relevant tags
105+
difficulty: "Beginner" # Choose: Beginner, Intermediate, Advanced
107106
author: "Your Name"
108-
publishedDate: "2025-01-15"
109-
lastModified: "2025-01-15"
110-
description: "Brief description that appears in previews and search results."
107+
publishedDate: "2025-06-07" # Current date in YYYY-MM-DD format
108+
lastModified: "2025-06-07" # Update when you modify the content
109+
featured: false # Set to true for standout content
111110
---
112111

113-
# Your Tip Title Here
112+
# Descriptive Title of Your AI Development Tip
114113

115-
Brief introduction explaining what this tip covers and why it's useful.
114+
Brief introduction (2-3 sentences) explaining what problem this tip solves and why it's useful for AI-assisted development.
116115

117-
## Main Content
116+
## The Problem
118117

119-
Use clear headings, code examples, and explanations. For example:
118+
Describe the challenge or inefficiency that developers commonly face. Example:
120119

121-
```csharp
122-
// Example code with comments
123-
public void ExampleMethod()
124-
{
125-
// Your code here
120+
```typescript
121+
// Without AI assistance, you might write repetitive code like this
122+
function validateUserInput(input: string): boolean {
123+
// Manual validation logic here
124+
return true;
126125
}
127126
```
128127

129-
## Pro Tips
128+
## The Solution
129+
130+
Show how to solve it using AI tools effectively:
131+
132+
```typescript
133+
// Let GitHub Copilot help by commenting your intent
134+
// Validate user input checking for: valid email, min 8 chars, contains number
135+
function validateUserInput(input: string): ValidationResult {
136+
// Copilot will suggest comprehensive validation
137+
}
138+
```
139+
140+
## Key Points
130141

131142
- Use bullet points for quick takeaways
132-
- Include real-world examples
133-
- Add Philly references if relevant!
143+
- Include practical examples
144+
- Add Philly references when relevant
145+
- Link to related tips or documentation
134146

135-
Remember to test your examples and make sure they work!</code></pre>
147+
## Pro Tips
148+
149+
1. Share keyboard shortcuts
150+
2. Mention common pitfalls
151+
3. Provide real-world scenarios
152+
153+
## Related Resources
154+
155+
- Link to official docs
156+
- Reference other tips
157+
- Suggest next steps
158+
159+
Remember to test all code examples and make sure they work before submitting!</code></pre>
136160
</div>
137161
</div>
138162

@@ -190,4 +214,76 @@ Remember to test your examples and make sure they work!</code></pre>
190214
</div>
191215
</div>
192216
</div>
193-
</div>
217+
</div>
218+
219+
<style>
220+
/* Copy button styles for code blocks */
221+
.card-body pre {
222+
position: relative !important;
223+
}
224+
225+
.card-body .copy-button {
226+
position: absolute !important;
227+
right: 0.5rem !important;
228+
top: 0.35rem !important;
229+
padding: 0.25rem 0.5rem !important;
230+
margin-top: 0.5rem;
231+
font-size: 0.875rem !important;
232+
line-height: 1.5 !important;
233+
color: #6c757d !important;
234+
background-color: transparent !important;
235+
border: 1px solid #6c757d !important;
236+
border-radius: 0.25rem !important;
237+
cursor: pointer !important;
238+
}
239+
240+
.card-body .copy-button:hover {
241+
color: #fff !important;
242+
background-color: #6c757d !important;
243+
}
244+
245+
.card-body .copy-button.success {
246+
color: #fff !important;
247+
background-color: #198754 !important;
248+
border-color: #198754 !important;
249+
}
250+
251+
.card-body h1, .card-body h2, .card-body h3,
252+
.card-body h4, .card-body h5, .card-body h6 {
253+
margin-top: 2rem;
254+
margin-bottom: 1rem;
255+
}
256+
257+
.card-body p {
258+
margin-bottom: 1.5rem;
259+
}
260+
261+
.card-body code {
262+
font-family: Consolas, monospace;
263+
padding: 0.2rem 0.4rem;
264+
border-radius: 0.25rem;
265+
font-size: 0.9em;
266+
}
267+
268+
.card-body pre {
269+
padding: 1rem;
270+
border-radius: 0.375rem;
271+
overflow-x: auto;
272+
margin-bottom: 1.5rem;
273+
}
274+
275+
/* Ensure Prism.js styles take precedence over our generic styles */
276+
.card-body pre[class*="language-"] {
277+
padding: 1rem !important;
278+
border-radius: 0.5rem !important;
279+
overflow-x: auto !important;
280+
margin-bottom: 1.5rem !important;
281+
}
282+
283+
.card-body code[class*="language-"] {
284+
font-family: Consolas, monospace !important;
285+
font-size: inherit !important;
286+
padding-top: 0 !important;
287+
display: block !important;
288+
}
289+
</style>

Web/Pages/Index.cshtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
</div>
2222

2323
<!-- Recent Tips Section -->
24-
<div class="container mb-5">
25-
<div class="d-flex justify-content-between align-items-center mb-4">
24+
<div class="container mb-5"> <div class="d-flex justify-content-between align-items-center mb-4">
2625
<h2 class="fw-bold"><i class="bi bi-lightning-charge"></i> Recent Tips</h2>
27-
<a asp-page="/Tips/Index" class="btn btn-outline-primary">View All Tips</a>
26+
<a asp-page="/Tips/Index" class="btn btn-primary">View All Tips</a>
2827
</div>
2928
<div class="row g-4">
3029
@foreach (var tip in Model.RecentTips.Take(3))

0 commit comments

Comments
 (0)